3,865 research outputs found
Understanding object-oriented source code from the behavioural perspective
Comprehension is a key activity that underpins a variety of software maintenance and engineering tasks. The task of understanding object-oriented systems is hampered by the fact that the code segments that are related to a user-level function tend to be distributed across the system. We introduce a tool-supported code extraction technique that addresses this issue. Given a minimal amount of information about a behavioural element of the system that is of interest (such as a use-case), it extracts a trail of the methods (and method invocations) through the system that are needed in order to achieve an understanding of the implementation of the element of interest. We demonstrate the feasibility of our approach by implementing it as part of a code extraction tool, presenting a case study and evaluating the approach and tool against a set of established criteria for program comprehension tools
Node coarsening calculi for program slicing
Several approaches to reverse and re-engineering are based upon program slicing. Unfortunately, for large systems, such as those which typically form the subject of reverse engineering activities, the space and time requirements of slicing can be a barrier to successful application. Faced with this problem, several authors have found it helpful to merge control flow graph (CFG) nodes, thereby improving the space and time requirements of standard slicing algorithms. The node-merging process essentially creates a 'coarser' version of the original CFG. The paper introduces a theory for defining control flow graph node coarsening calculi. The theory formalizes properties of interest, when coarsening is used as a precursor to program slicing. The theory is illustrated with a case study of a coarsening calculus, which is proved to have the desired properties of sharpness and consistency
Amorphous procedure extraction
The procedure extraction problem is concerned with the meaning preserving formation of a procedure from a (not necessarily contiguous) selected set of statements. Previous approaches to the problem have used dependence analysis to identify the non-selected statements which must be 'promoted' (also selected) in order to preserve semantics. All previous approaches to the problem have been syntax preserving. This work shows that by allowing transformation of the program's syntax it is possible to extract both procedures and functions in an amorphous manner. That is, although the amorphous extraction process is meaning preserving it is not necessarily syntax preserving. The amorphous approach is advantageous in a variety of situations. These include when it is desirable to avoid promotion, when a value-returning function is to be extracted from a scattered set of assignments to a variable, and when side effects are present in the program from which the procedure is to be extracted
Amorphous procedure extraction
The procedure extraction problem is concerned with the meaning preserving formation of a procedure from a (not necessarily contiguous) selected set of statements. Previous approaches to the problem have used dependence analysis to identify the non-selected statements which must be 'promoted' (also selected) in order to preserve semantics. All previous approaches to the problem have been syntax preserving. This work shows that by allowing transformation of the program's syntax it is possible to extract both procedures and functions in an amorphous manner. That is, although the amorphous extraction process is meaning preserving it is not necessarily syntax preserving. The amorphous approach is advantageous in a variety of situations. These include when it is desirable to avoid promotion, when a value-returning function is to be extracted from a scattered set of assignments to a variable, and when side effects are present in the program from which the procedure is to be extracted
Abstract Program Slicing: an Abstract Interpretation-based approach to Program Slicing
In the present paper we formally define the notion of abstract program
slicing, a general form of program slicing where properties of data are
considered instead of their exact value. This approach is applied to a language
with numeric and reference values, and relies on the notion of abstract
dependencies between program components (statements).
The different forms of (backward) abstract slicing are added to an existing
formal framework where traditional, non-abstract forms of slicing could be
compared. The extended framework allows us to appreciate that abstract slicing
is a generalization of traditional slicing, since traditional slicing (dealing
with syntactic dependencies) is generalized by (semantic) non-abstract forms of
slicing, which are actually equivalent to an abstract form where the identity
abstraction is performed on data.
Sound algorithms for computing abstract dependencies and a systematic
characterization of program slices are provided, which rely on the notion of
agreement between program states
Syntactic Abstraction of B Models to Generate Tests
In a model-based testing approach as well as for the verification of
properties, B models provide an interesting solution. However, for industrial
applications, the size of their state space often makes them hard to handle. To
reduce the amount of states, an abstraction function can be used, often
combining state variable elimination and domain abstractions of the remaining
variables. This paper complements previous results, based on domain abstraction
for test generation, by adding a preliminary syntactic abstraction phase, based
on variable elimination. We define a syntactic transformation that suppresses
some variables from a B event model, in addition to a method that chooses
relevant variables according to a test purpose. We propose two methods to
compute an abstraction A of an initial model M. The first one computes A as a
simulation of M, and the second one computes A as a bisimulation of M. The
abstraction process produces a finite state system. We apply this abstraction
computation to a Model Based Testing process.Comment: Tests and Proofs 2010, Malaga : Spain (2010
- …