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

    Safe Concurrency Introduction through Slicing

    Get PDF
    Traditional refactoring is about modifying the structure of existing code without changing its behaviour, but with the aim of making code easier to understand, modify, or reuse. In this paper, we introduce three novel refactorings for retrofitting concurrency to Erlang applications, and demonstrate how the use of program slicing makes the automation of these refactorings possible

    Statechart Slicing

    Get PDF
    The paper discusses how to reduce a statechart model by slicing. We start with the discussion of control dependencies and data dependencies in statecharts. The and-or dependence graph is introduced to represent control and data dependencies for statecharts. We show how to slice statecharts by using this dependence graph. Our slicing approach helps systems analysts and system designers in understanding system specifications, maintaining software systems, and reusing parts of systems models

    Preemptive Thread Block Scheduling with Online Structural Runtime Prediction for Concurrent GPGPU Kernels

    Full text link
    Recent NVIDIA Graphics Processing Units (GPUs) can execute multiple kernels concurrently. On these GPUs, the thread block scheduler (TBS) uses the FIFO policy to schedule their thread blocks. We show that FIFO leaves performance to chance, resulting in significant loss of performance and fairness. To improve performance and fairness, we propose use of the preemptive Shortest Remaining Time First (SRTF) policy instead. Although SRTF requires an estimate of runtime of GPU kernels, we show that such an estimate of the runtime can be easily obtained using online profiling and exploiting a simple observation on GPU kernels' grid structure. Specifically, we propose a novel Structural Runtime Predictor. Using a simple Staircase model of GPU kernel execution, we show that the runtime of a kernel can be predicted by profiling only the first few thread blocks. We evaluate an online predictor based on this model on benchmarks from ERCBench, and find that it can estimate the actual runtime reasonably well after the execution of only a single thread block. Next, we design a thread block scheduler that is both concurrent kernel-aware and uses this predictor. We implement the SRTF policy and evaluate it on two-program workloads from ERCBench. SRTF improves STP by 1.18x and ANTT by 2.25x over FIFO. When compared to MPMax, a state-of-the-art resource allocation policy for concurrent kernels, SRTF improves STP by 1.16x and ANTT by 1.3x. To improve fairness, we also propose SRTF/Adaptive which controls resource usage of concurrently executing kernels to maximize fairness. SRTF/Adaptive improves STP by 1.12x, ANTT by 2.23x and Fairness by 2.95x compared to FIFO. Overall, our implementation of SRTF achieves system throughput to within 12.64% of Shortest Job First (SJF, an oracle optimal scheduling policy), bridging 49% of the gap between FIFO and SJF.Comment: 14 pages, full pre-review version of PACT 2014 poste
    corecore