4,443 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

    Unions of slices are not slices

    Get PDF
    Many approaches to slicing rely upon the 'fact' that the union of two static slices is a valid slice. It is known that static slices constructed using program dependence graph algorithms are valid slices (Reps and Yang, 1988). However, this is not true for other forms of slicing. For example, it has been established that the union of two dynamic slices is not necessarily a valid dynamic slice (Hall, 1995). In this paper this result is extended to show that the union of two static slices is not necessarily a valid slice, based on Weiser's definition of a (static) slice. We also analyse the properties that make the union of different forms of slices a valid slice

    Amorphous slicing of extended finite state machines

    Get PDF
    Slicing is useful for many Software Engineering applications and has been widely studied for three decades, but there has been comparatively little work on slicing Extended Finite State Machines (EFSMs). This paper introduces a set of dependency based EFSM slicing algorithms and an accompanying tool. We demonstrate that our algorithms are suitable for dependence based slicing. We use our tool to conduct experiments on ten EFSMs, including benchmarks and industrial EFSMs. Ours is the first empirical study of dependence based program slicing for EFSMs. Compared to the only previously published dependence based algorithm, our average slice is smaller 40% of the time and larger only 10% of the time, with an average slice size of 35% for termination insensitive slicing

    A survey of program slicing techniques

    Get PDF
    corecore