11,514 research outputs found

    Coarse-grained dynamic predicate slicing for message passing programs

    Get PDF
    Comprehending distributed systems is a challenging task because of interdependency and non-determinability that exist in distributed systems. Program slicing, as a well-know decomposition and reduction technique, has been extended to assist during the comprehension of distributed application source code. Dynamic predicate slicing is a relatively new slicing technique that adopts the notion of global predicates as slicing criteria for distributed message passing programs. Dynamic predicate slicing focuses on identifying all these states during an execution of a message passing program, in which a particular predicate might be changed. In this research, a Coarse-Grained dynamic predicate slicing algorithm is implemented by using instrumentation techniques to insert extra instructions into applications for collecting and analyzing run-time information during executions. Dynamic predicated slicing is accomplished by multi-thread parallel computation utilizing both static information and dynamic information. An initial case study is presented to validate the applicability of the approach and to explore the overhead associated with collecting the dynamic information and the slice computation

    Towards an Interactive Debugging Tool for C++ Based on Program Slicing

    Get PDF
    The purpose of this thesis work was to develop an interactive debugging tool for programs written in a subset of C++, based on the program slicing method under the DYNIX/ptx operating system. The topics that were covered as background and context in this work consisted ofa review of debugging approaches, an introduction to program slicing and its types: static slicing and dynamic slicing, and a brief review of the different approaches used in implementing dynamic slicing. The programming part of this thesis work consisted of the design and implementation of a program slicing tool, called cppslicer, for debugging programs written in a subset of C++. The cppslicer software tool is an interactive debugging tool that can be used to help debug simple C++ programs. The cppslicer tool can be used to debug programs with or without classes, operator overloading, and pointers to int, char, float, and classes. The cppslicer program is written in C++. It has about 4900 lines of code distributed around four classes

    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
    corecore