Model Based Slicing- A Coherent Approach

DOI : 10.17577/IJERTCONV5IS11010

Download Full-Text PDF Cite this Publication

Text Only Version

Model Based Slicing- A Coherent Approach

Tamanna1 , Swati Arya2

1,2Computer Science and Engineering,

N.C. College of Engineering, Israna Panipat, India

Abstract: Software testing isused to evaluate an trait or potential of system and conclude that whether it meets necessary prospects. The most logically demanding part of testing is to plan of test cases. These days, UML has been broadly used for object oriented modeling and design. To describe structural and behavioural aspects of an architecture UML matamodel is used. However, it is still hard to recognize this performance, because the size of automatically generated model diagrams tends to be huge. Software visualization model based slicing procedure has been developed to overcome this problem. Model based slicing is a coherent approach to extract and recognize appropriate model parts or related elements across diverse model views. A novel procedure has proposed to extract the sub- model from a big model diagrams on the basis of slicing criteria. The proposed methodology use the concept of model based slicing to slice the sequence diagram to extract the desired chunk. In the presented approach UML, conversion of UML into XML, Java DOM API for parsing and slicing has been used. Then Extracted Sequence Diagram has been generated by using the Editor.

Keywords- Model Based Slicing, Sequence Diagram, Parsing, Slicing, UML.

  1. INTRODUCTION

    Increase in size and complexity the significance of architectural design has been increased software products. The architecture of software system defines its design structure and allows designer to find about several properties of the organization which are at the sophisticated level of Abstraction. For doing this, Unified Modeling Language (UML) is the best choice and with the help of its various model diagrams of software system, it is used to signify and construct the architecture. UML diagrams tell us about the behavioural and structural aspects of architecture [1, 2]. Several relations among objects, such as Combination, association, configuration and simplification/specialism etc. can be distinct by Basic models (e.g., class diagrams, object diagrams, component diagrams). On the other hand, sequence of actions, states and their communication, through which a use case is comprehended, can be defined through the behavioural models (e.g. communication and sequence diagrams, activity diagram, state diagrams). Evaluating UML Models is perplexing task since the information about the system can be spread across numerous model views. To overcome this problem the concept of model based slicing came into existence. To extract and identify relevant model parser related an element a decomposition technique is used and that is Model Based slicing. It takes the user defined slicing criteria as input and slices the architecture, as a view of interest [3]. Slicing is helpful in reengineering, software

    maintenance, testing, program comprehension, decomposition, integration, recompilation, and debugging. The goal of software testing is to confirm quality. Highly reliable systems are produce by Software Testing, since static verification practices agonise from several difficulties in detecting all software mistakes [15]. The most exciting part of testing is the design of test cases. With the help of program source code Test Cases are generated. Additional approach is to generate test cases developed using formalisms such as UML models. Without affecting their core structure and functionality, structure can be decomposed into sub models and best technique for this is slicing. According to their requirement it helps the developer to gain the perfect view of software.

  2. RELATED WORK

    In early stage of development model based slicing has been applied to state machines [4] where related profits as those recorded above have been demanded. State machine slicing is that when applying slicing to a model of a system rather than to the system implementation. However, system models which are represented in terms of the UML-family of languages are more complex than state machines (and contain state machine sub-languages). Some approaches and efforts have been made for slicing UML diagrams. The approach in [5] define context-free slicing of UML class models where the matter of context has been defined to be object location, which is a dynamic property of the situation therefore for the structural model context free slicing is a static slice. As described in [5] the procedure used for slicing a program or state machine is not much complex than that of slicing a model since there are more types of elements and relationships in program slicing or state machine. OCL (object constraint language) should be used to express the slicing criteria. A similar approach has been used to modularize the UML meta-model into groups of constituents that are related to the different UML diagram types in [6] although the predicate that are used to find out the slicing criteria has been secure in terms of traversing the meta-model elements starting with a collection of supplied classes. In conjunction with OCL invariants Class Models has been sliced, in [7] thereby decreasing the state-space explosion that would otherwise occur after using a model-checker to verify a class-model. UML state-charts can be sliced as described in [8] [9] [10] although these methods do not simplify the results to include other parts of the UML language family. Both static and dynamic aspects of UML can be combined and sliced as described in [11] [12] where class and sequence diagrams are merged into a single representation (a model dependency graph MDG) that can be consequently sliced to

    show partial dynamic and structural information resulting from criteria containing both structural and dynamic constraints. In order to generate test cases Slicing UML sequence diagrams has been described in [13] [14]. UML sequence diagrams (or scenarios) are basically an integral part of implementations of a program. It shows the objects and classes involved in the situation and the sequence of messages exchanged between the objects. Sequence diagrams are usually associated with use case realizations in the Logical View of the system under progress. It has been methodically analysed that for the procedure of slicing sequence diagram no consolidate technique have been developed to extract the point of interest from architecture of software to ease the software visualization that uses conditional predicate for finding out a relative slice. Generic view of functional behaviour of software models in the form of sequence diagram can be shown by Figure 1. Rectangular box states the objects within model diagram that are communicating with each other. Doted lines denote the life line of the objects on which instances of the objects has been created. Arrow tells about the particular action (in the form of messages) of objects and their direction.

    Figure 1: Generic view of Sequence diagram [1]

  3. PROPOSED METHODOLOGY AND IMPLEMENTATION

    The planned work addresses the slicing of sequence diagram to ease the software visualization by using conditional predicate for finding applicable slices.

    In the projected methodology, subsequent steps has been followed:

    1. From a particular constraint specification UML (Sequence) diagram has been generated.

      1. Rational rose, Visual paradigm for UML and Magic- draw, etc can be used to make the UML diagrams.

        Figure 2: Designing sequence diagram using visual paradigm

    2. From the specified UML diagram (Sequence diagram) generate XML.

      1. To import the diagrams into XML format Visual paradigm for UML 10.0 version provides the in-built functionality.

        Figure 3: XML file of Sequence diagram

    3. Document Object Model (DOM) parser for parsing XML code and create an output file (with .txt extension) having Object name, identifier, message name, message to & fro information.

      1. Java API DOM is used to parse the XML code file generated in step 2.

      2. DOM parser uses the function Document-Builder- Factory ( ) to create the instance of the class to parse the file.

      3. DOM parser will generate a txt file having information regarding object name and its identifier. This file also contains the information related to all the messages and the objects among which the message is floating.

      4. All the information generated by parser will be stored in separate .txt file.

        Figure 4: Output-file generated by parser

    4. Passing file obtained from step 3 and slicing criteria to a

      .java program (which act as slicer) for getting the relative/required chunk of information in a separate .txt file.

      1. Generated .txt file in step 3 as input taken by the

        Figure 5: Java program for finding out the specified chunk

        4.3. Computed slices will be store in separate .txt file which holds the information of messages, their guard condition and objects ids among which messages are being passed.

    5. Changing object id with relative object name among which message is passing so that information can be retrieved easily (this step will only deal with sliced part).

      1. To ease the retrieved of information objects ids will replaced by their corresponding object name (in the file retrieved from step 4.3).

      2. All the information will store in separate .txt file which holds the information of messages and the objects name (among which they are communicating relative to user defined slicing criteria).

        Slicer.

        4.2. Slicer will ask user to tell about the slicing criteria at run time to generate the slice as per requirements.

        Figure 6: computed slice after the conversion of object-id to object-name

    6. Passing txt file as obtained from step 5, to a .java program so that it can be converted into input file format for Quick Sequence Diagram Editor.

      Figure 7: Input file for quick sequence diagram editor

    7. Tool will generate the final and relatively small sequence diagram.

      1. Tool will take the input format defined at step 6 as input to convert into its equivalent diagram.

      2. Refined slice (small sequence diagram) will be generated as final output according to slicing criteria as per requirement to ease the software visualization.

        Figure 9: Overview of Methodology

  4. CONCLUSION

To create the refined model slices related to slicing criteria using conditional predicate in sequence diagram is the key contribution of the technique. To ease the software visualization practical implementation of technique that will extract the sub-model from architecture of software has been discussed. The foundation of the proposed technique is Slicing and UML. With this, the problem of visualization of large and complex software can be handled efficiently. The projected technique has focused on the generation of chunk using model based slicing but still there are the few points that can be explored further like model reduction in synchronized and dispersed software design.

Figure 8: Computed Sliced Sequence diagram

REFERENCES

      1. Grady Booch, James Rumbaugh, Ivar Jacobson, The Unified Modeling Language User Guide," 2nd Edition, May 2005, Publisher. Addison Wesley.

      2. Jianjun Zhao, "Slicing Software Architecture," Technical Report 97- SE-117, pp.85-92, Information Processing Society of Japan, Nov 1997.

      3. Rupinder Singh and VinayArora, Literature Analysis on Model based Slicing, International Journal of Computer Applications, vol. 70(16), pp: 45-51, May 2013. Published by Foundation of Computer Science, New York, USA.

      4. K. Androutsopoulos, D. Clark, M. Harman, Z. Li, and L. Tratt. Control dependence for extended finite state machines. Fundamental Approaches to Software Engineering, pp. 216230, 2009.

      5. H. Kagdi, J.I. Maletic, and A. Sutton, Context-Free Slicing of UML Class Models, Proc. 21st IEEE Intl Conf. Software Maintenance, pp. 635-638, 2005.

      6. J.H. Bae, K.M. Lee, and H.S. Chae. Modularization of the UML metamodel using model slicing. In Information Technology: New Generations, 2008. ITNG 2008. Fifth International Conference on, pages 12531254. IEEE, 2008.

      7. A. Shaikh, R. Clarisó, U.K. Wiil, and N. Memon, Verification- driven slicing of UML/OCL models, In Proceedings of the IEEE/ACM international conference on Automated software engineering, pages 185194. ACM, 2010.

      8. KevinLano Crest, Slicing of UML State Machines, Proceedings of the 9th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC '09), 2009.

      9. V. Ojala, A slicer for UML state machines, Helsinki University of Technology, 2007.

      10. S. Van Langenhove, Towards the Correctness of Software Behavior in UML: A Model Checking Approach Based on Slicing, Dissertation, Department of Mathematics, Ghent University, 2006.

      11. J.T. Lallchandani and R. Mall, Slicing UML architectural models, ACM SIGSOFT Software Engineering Notes, vol.33, no.3, pp. 19, 2008.

      12. J.T. Lallchandani and R. Mall, Integrated state-based dynamic slicing technique for UML models, Software, IET, vol. 4, no. 1, pp. 5578, 2010.

      13. P. Samuel and R. Mall. A Novel Test Case Design Technique Using Dynamic Slicing of UML Sequence Diagrams.e-Informatica Software Engineering Journal Selected full texts, vol. 2, no. 1, pp. 6177, 2008.

      14. P. Samuel, R. Mall, and S. Sahoo, UML Sequence Diagram Based Testing Using Slicing, IEEE Indicon 2005 Conference, pages 176 178, IEEE, 2005.

      15. R. V. Binder, Testing object-oriented software: a survey, Software Testing Verification and Reliability, vol. 6(3/4), pp: 125 252, 1996.

Leave a Reply