3,618 research outputs found

    A comparison of tree- and line-oriented observational slicing

    Get PDF
    Observation-based slicing and its generalization observational slicing are recently-introduced, language-independent dynamic slicing techniques. They both construct slices based on the dependencies observed during program execution, rather than static or dynamic dependence analysis. The original implementation of the observation-based slicing algorithm used lines of source code as its program representation. A recent variation, developed to slice modelling languages (such as Simulink), used an XML representation of an executable model. We ported the XML slicer to source code by constructing a tree representation of traditional source code through the use of srcML. This work compares the tree- and line-based slicers using four experiments involving twenty different programs, ranging from classic benchmarks to million-line production systems. The resulting slices are essentially the same size for the majority of the programs and are often identical. However, structural constraints imposed by the tree representation sometimes force the slicer to retain enclosing control structures. It can also “bog down” trying to delete single-token subtrees. This occasionally makes the tree-based slices larger and the tree-based slicer slower than a parallelised version of the line-based slicer. In addition, a Java versus C comparison finds that the two languages lead to similar slices, but Java code takes noticeably longer to slice. The initial experiments suggest two improvements to the tree-based slicer: the addition of a size threshold, for ignoring small subtrees, and subtree replacement. The former enables the slicer to run 3.4 times faster while producing slices that are only about 9% larger. At the same time the subtree replacement reduces size by about 8–12% and allows the tree-based slicer to produce more natural slices

    MOBS: Multi-operator Observation-Based Slicing using lexical approximation of program dependence

    Get PDF
    Observation-Based Slicing (ORBS) is a recently-introduced program slicing technique based on direct observation of program semantics. Previous ORBS implementations slice a the program by iteratively deleting adjacent lines of code. This paper introduces two new deletion operators based on lexical similarity. Furthermore, it presents a generalization of ORBS that can exploit multiple deletion operators: Multi-operator Observation-Based Slicing (MOBS). Empirical evaluation of MOBS using three real world Java projects finds that the use of lexical information, improves the efficiency of ORBS: MOBS can delete up to 87% of lines while taking only about 33% of the execution time with respect to the original ORBS implementation

    Evaluating Lexical Approximation of Program Dependence

    Get PDF
    Complex dependence analysis typically provides an underpinning approximation of true program dependence. We investigate the effectiveness of using lexical information to approximate such dependence, introducing two new deletion operators to Observation-Based Slicing (ORBS). ORBS provides direct observation of program dependence, computing a slice using iterative, speculative deletion of program parts. Deletions become permanent if they do not affect the slicing criterion. The original ORBS uses a bounded deletion window operator that attempts to delete consecutive lines together. Our new deletion operators attempt to delete multiple, non-contiguous lines that are lexically similar to each other. We evaluate the lexical dependence approximation by exploring the trade-off between the precision and the speed of dependence analysis performed with new deletion operators. The deletion operators are evaluated independently, as well as collectively via a novel generalization of ORBS that exploits multiple deletion operators: Multi-operator Observation-Based Slicing (MOBS). An empirical evaluation using three Java projects, six C projects, and one multi-lingual project written in Python and C finds that the lexical information provides a useful approximation to the underlying dependence. On average, MOBS can delete 69% of lines deleted by the original ORBS, while taking only 36% of the wall clock time required by ORBS

    Control dependence for extended finite state machines

    Get PDF
    Though there has been nearly three decades of work on program slicing, there has been comparatively little work on slicing for state machines. One of the primary challenges that currently presents a barrier to wider application of state machine slicing is the problem of determining control dependence. We survey existing related definitions, introducing a new definition that subsumes one and extends another. We illustrate that by using this new definition our slices respect Weiser slicing’s termination behaviour. We prove results that clarify the relationships between our definition and older ones, following this up with examples to motivate the need for these differences

    An Empirical Study on Dependence Clusters for Effort-Aware Fault-Proneness Prediction

    Get PDF
    A dependence cluster is a set of mutually inter-dependent program elements. Prior studies have found that large dependence clusters are prevalent in software systems. It has been suggested that dependence clusters have potentially harmful effects on software quality. However, little empirical evidence has been provided to support this claim. The study presented in this paper investigates the relationship between dependence clusters and software quality at the function-level with a focus on effort-aware fault-proneness prediction. The investigation first analyzes whether or not larger dependence clusters tend to be more fault-prone. Second, it investigates whether the proportion of faulty functions inside dependence clusters is significantly different from the proportion of faulty functions outside dependence clusters. Third, it examines whether or not functions inside dependence clusters playing a more important role than others are more fault-prone. Finally, based on two groups of functions (i.e., functions inside and outside dependence clusters), the investigation considers a segmented fault-proneness prediction model. Our experimental results, based on five well-known open-source systems, show that (1) larger dependence clusters tend to be more fault-prone; (2) the proportion of faulty functions inside dependence clusters is significantly larger than the proportion of faulty functions outside dependence clusters; (3) functions inside dependence clusters that play more important roles are more fault-prone; (4) our segmented prediction model can significantly improve the effectiveness of effort-aware fault-proneness prediction in both ranking and classification scenarios. These findings help us better understand how dependence clusters influence software quality

    Self‐consistent molecular orbital methods. XXIII. A polarization‐type basis set for second‐row elements

    Get PDF
    The 6‐31G* and 6‐31G** basis sets previously introduced for first‐row atoms have been extended through the second‐row of the periodic table. Equilibrium geometries for one‐heavy‐atom hydrides calculated for the two‐basis sets and using Hartree–Fock wave functions are in good agreement both with each other and with the experimental data. HF/6‐31G* structures, obtained for two‐heavy‐atom hydrides and for a variety of hypervalent second‐row molecules, are also in excellent accord with experimental equilibrium geometries. No large deviations between calculated and experimental single bond lengths have been noted, in contrast to previous work on analogous first‐row compounds, where limiting Hartree–Fock distances were in error by up to a tenth of an angstrom. Equilibrium geometries calculated at the HF/6‐31G level are consistently in better agreement with the experimental data than are those previously obtained using the simple split‐valance 3‐21G basis set for both normal‐ and hypervalent compounds. Normal‐mode vibrational frequencies derived from 6‐31G* level calculations are consistently larger than the corresponding experimental values, typically by 10%–15%; they are of much more uniform quality than those obtained from the 3‐21G basis set. Hydrogenation energies calculated for normal‐ and hypervalent compounds are in moderate accord with experimental data, although in some instances large errors appear. Calculated energies relating to the stabilities of single and multiple bonds are in much better accord with the experimental energy differences

    Coherent clusters in source code

    Get PDF
    This paper presents the results of a large scale empirical study of coherent dependence clusters. All statements in a coherent dependence cluster depend upon the same set of statements and affect the same set of statements; a coherent cluster's statements have 'coherent' shared backward and forward dependence. We introduce an approximation to efficiently locate coherent clusters and show that it has a minimum precision of 97.76%. Our empirical study also finds that, despite their tight coherence constraints, coherent dependence clusters are in abundance: 23 of the 30 programs studied have coherent clusters that contain at least 10% of the whole program. Studying patterns of clustering in these programs reveals that most programs contain multiple substantial coherent clusters. A series of subsequent case studies uncover that all clusters of significant size map to a logical functionality and correspond to a program structure. For example, we show that for the program acct, the top five coherent clusters all map to specific, yet otherwise non-obvious, functionality. Cluster visualization also brings out subtle deficiencies in program structure and identifies potential refactoring candidates. A study of inter-cluster dependence is used to highlight how coherent clusters are connected to each other, revealing higher-level structures, which can be used in reverse engineering. Finally, studies are presented to illustrate how clusters are not correlated with program faults as they remain stable during most system evolution. © 2013 The Authors. All rights reserved

    From 'River Cottage' to 'Chicken Run': Hugh Fearnley-Whttingstall and the class politics of ethical consumption

    Get PDF
    Lifestyle television provides a key site through which to explore the dilemmas of ethical consumption, as the genre shifts to consider the ethics of different consumption practices and taste cultures. UK television cook Hugh Fearnley-Whittingstall's TV programmes offer fertile ground not only for thinking about television personalities as lifestyle experts and moral entrepreneurs, but also for thinking about how the meanings and uses of their television image are inflected by genre. In this article we explore how the shift from the lifestyled downshifting narrative of the River Cottage series to the 'campaigning culinary documentary' Hugh's Chicken Run exposes issues of celebrity, class and ethics. While both series are concerned with ethical consumption, they work in different ways to reveal a distinction between 'ethical' and 'unethical' consumption practices and positions - positions that are inevitably classed
    • 

    corecore