6,312 research outputs found

    Slicing of Aspect-Oriented Software and Its Application to Software Refactoring

    Get PDF
    This thesis first presents some program slicing techniques for Aspect-Oriented Programs (AOPs) and then presents a technique for refactoring of software using the proposed slicing technique. Main aim of all the proposed slicing algorithms in this thesis is to compute accurate and precise dynamic slices of AOPs. In order to compute the slices of aspect-oriented programs, first we extend the System Dependence Graph (SDG) for Object-Oriented Programs (OOPs) to handle AOPs. We have named the extended SDG Extended Aspect-Oriented System Dependence Graph (EAOSDG). The EAOSDG successfully represents different aspect- oriented features such as class representation, method invocation, inheritance, aspect declaration, point-cuts, advices etc. The EAOSDG of an aspect-oriented program consists of System Dependence Graph (SDG) for the non-aspect code, a group of Aspect-Oriented Dependence Graphs (ADGs) for aspect code and some additional dependence edges that are used to connect the SDG of the non-aspect code (base code) to ADG of the aspect code. Then, we propose an extended two-phase algorithm to compute the static slices of AOPs, using the proposed EAOSDG. Subsequently, we present a context-sensitive slicing algorithm to compute the dynamic slices of AOPs, using the proposed EAOSDG. The context-sensitivity makes the computed slice more precise and accurate. We have developed a slicer to implement our proposed algorithms. We have compared the performance of extended two-phase algorithm and context-sensitive algorithm, in terms of the average slice extraction time. We have considered five open source projects for comparison of slicing algorithms. We have observed that the context-sensitive algorithm computes the slices faster than the extended-two phase algorithm. Next, we extends our intermediate representation (EAOSDG) to be able to represent concurrent aspect-oriented programs. We have named this intermediate representation Multithreaded Aspect-Oriented Dependence Graph (MAODG). Our MAODG correcly represents the concurrency dependencies in concurrent AOPs. Then, we extend our context-sensitive dynamic slicing technique to handle concurrent AOPs having multiple threads. We have named our algorithm Context-Sensitive Concurrent Aspect (CSCA) slicing algorithm. Due to the presence of inter-thread synchronization and communication dependencies, some control and data flows in the threads become interdependent. This interdependency causes difficulty in finding accurate slices of concurrent AOPs. Our algorithm takes the MAODG of the concurrent AOP and a slicing criterion as input and vii computes the dynamic slice for the given concurrent AOP. We have developed a slicer Concurrent AspectJ slicer to implement our proposed CSCA algorithm. We have compared CSCA algorithm with two other existing algorithms using five case studies. The experiment shows that, our proposed CSCA algorithm computes precise slices in less time as compared to the other two existing algorithms. Further, we propose an approach for dynamic slicing of distributed AOPs. We first represent distributed aspect-oriented program using dependence based intermediate representation which we have named Distributed Aspect Dependence Graph (DADG). Based on the DADG, we present a slicing algorithm Parallel Context-sensitive Dynamic Slicing (PCDS) algorithm for distributed AOPs. We introduce parallelism in our algorithm to make slice computation faster. We have developed a tool called D-AspectJ slicer to implement the PCDS algorithm. The proposed slicing algorithm is compared with two other existing algorithms using seven case studies. The experimentation shows that our proposed PCDS algorithm generates smaller slices in less time as compared to the other two existing algorithms. Finally, we present a technique for software refactoring using program slicing. We use slice-based cohesion metrics to identify the target methods of a software that require refactoring. After identifying the target methods, we use program slicing to divide the target method into two parts. Then, we use the concept of aspects to alter the code structure in a manner that does not change the external behavior of the original module. We have implemented our proposed refactoring technique and evaluated its effectiveness through eleven case studies. We have also evaluated the effect of our proposed refactoring technique based on an open source code coverage tool EclEmm

    Distributed Subtyping

    Get PDF
    One of the most frequent operations in object-oriented programs is the "instanceof" test, also called the "subtyping" test or the "type inclusion" test. This test determines if a given object is an instance of some type. Surprisingly, despite a lot of research on distributed object-oriented languages and systems, almost no work has been devoted to the implementation of this test in a distributed environment. This paper presents the first algorithm to implement the "subtyping" test on an object received through the wire, without having to download the full code of the object type, nor to deserialize the object. We use a slicing technique that encodes a (multiple-subtyping) hierarchy using as little memory as the best known centralized implementation of the "subtyping" test. Our slicing technique is however different than centralized ones and allows for the dynamic addition of types without global reconfiguration. We convey the practicality of our algorithm through performance measures obtained from a fully distributed implementation of our algorithm which we experiment on standard Java hierarchies. In particular, we show that we can perform a subtyping test between 3 and 12 times faster than the code downloading approach without hampering the time taken for deserialization. Moreover, we require the same subtyping time as a string-based approach while reducing the encoding length by a factor of 50

    Bringing Back-in-Time Debugging Down to the Database

    Full text link
    With back-in-time debuggers, developers can explore what happened before observable failures by following infection chains back to their root causes. While there are several such debuggers for object-oriented programming languages, we do not know of any back-in-time capabilities at the database-level. Thus, if failures are caused by SQL scripts or stored procedures, developers have difficulties in understanding their unexpected behavior. In this paper, we present an approach for bringing back-in-time debugging down to the SAP HANA in-memory database. Our TARDISP debugger allows developers to step queries backwards and inspecting the database at previous and arbitrary points in time. With the help of a SQL extension, we can express queries covering a period of execution time within a debugging session and handle large amounts of data with low overhead on performance and memory. The entire approach has been evaluated within a development project at SAP and shows promising results with respect to the gathered developer feedback.Comment: 24th IEEE International Conference on Software Analysis, Evolution, and Reengineerin

    Development of a Tool for Slicing of Object-Oriented Program

    Get PDF
    Program slicing has many applications in a software development environment such as debugging, testing, anomaly detection, program understanding and many more. The concept being introduced by Weiser and it was started with static slicing calculation. Talking about static slicing, it is a subset of statements of a program which directly or indirectly affect the values of the variables computed providing a slicing criterion. Dynamic slicing is the counterpart of the static slicing i.e finding the statements which are really affected by giving the particular input value of the variable. Object-Oriented Program(OOP) has been the most widely used software development technique. OOP is still popular among many companies for their product development.There are some drawbacks of the OOP implementation. One of them is cross-cutting concerns. Aspect-Oriented Program provides separation of cross-cutting concerns from the core modules by introducing a new unit of modularization, called Aspect. In this project, we have developed a Tool which creates System dependence Graph(SDG) which is the intermediate representation of an OOP and AOP , then takes that SDG as input to compute the slicing of that program with respect to slicing criterion

    Slicing Object Oriented Programs for Maintenance Purposes

    Get PDF
    Object oriented approach is growing very fast in various applications of the computer science. Those applications may contain a lot of entity relationships which, need to be understood by the maintainers. These relationships (involving classes, message, variables, etc.) will make maintainers and developers face several problems to understand, make changes, modify, or enhance a huge software system that contains thousands of classes without automatic aids. Therefore several problems arise in the maintenance of object oriented program that is software understanding, complex dependencies, inheritance, polymorphism and dynamic binding. An approach for formally defining slices for object oriented programs is an important problem in the maintenance phase. This thesis proposes definitions of slices for object oriented programs. Basic relations such as Usage, Affect and Inheritance are defined, and they are extended to a family of dependence relations between entities in object oriented programs and defines slicing techniques based on these relations. Slice collection methods for specified slice criteria are given. This approach shows how the proposed slicing concepts and rules can be applied within the software maintenance process by giving an illustration through examples written by Java and Delphi programming languages. The research also develop a prototype of an object oriented system tool (02SMt) which represent an automatically extractable and captures an object oriented software system dependencies i n order to aid in maintenance phase. The dependencies occurs and explain in this research are control dependence, statement dependence on a variable, statement dependence on a method, variable dependence on statement, variable dependent on a method, Class-Class dependence through usage, Class-Class dependence through inheritance, Class-Class dependence for causing side effects, method dependence on another method, and method dependence on a variable. The 02SMt captures program slicing according to the slicing concepts, rules and definitions to feature out the dependencies with the basic object oriented relations. This research also, discusses an object oriented dependence graph (02DG). The 02DG categorized according levels. The first category is class-level involving a class to another class. The second category is method-level involving a method or a statement within a method to another method or variable in a class. The final category is statement level which is basically intra-method involving statements within a given method. Slices, intum, can also be categorized according to such levels of dependencies they intend to capture
    corecore