1,452 research outputs found

    Assertion-based slicing and slice graphs

    Get PDF
    This paper revisits the idea of slicing programs based on their axiomatic semantics, rather than using criteria based on control/data dependencies. We show how the forward propagation of preconditions and the backward propagation of postconditions can be combined in a new slicing algorithm that is more precise than the existing specification-based algorithms. The algorithm is based on (i) a precise test for removable statements, and (ii) the construction of a \emph{slice graph}, a program control flow graph extended with semantic labels and additional edges that ``short-circuit'' removable commands. It improves on previous approaches in two aspects: it does not fail to identify removable commands; and it produces the smallest possible slice that can be obtained (in a sense that will be made precise). Iteration is handled through the use of loop invariants and variants to ensure termination. The paper also discusses in detail applications of these forms of slicing, including the elimination of (conditionally) unreachable and dead code, and compares them to other related notions.Fundação para a Ciência e a Tecnologia (FCT

    A survey of program slicing for software engineering

    Get PDF
    This research concerns program slicing which is used as a tool for program maintainence of software systems. Program slicing decreases the level of effort required to understand and maintain complex software systems. It was first designed as a debugging aid, but it has since been generalized into various tools and extended to include program comprehension, module cohesion estimation, requirements verification, dead code elimination, and maintainence of several software systems, including reverse engineering, parallelization, portability, and reuse component generation. This paper seeks to address and define terminology, theoretical concepts, program representation, different program graphs, developments in static slicing, dynamic slicing, and semantics and mathematical models. Applications for conventional slicing are presented, along with a prognosis of future work in this field

    Program Transformations for Information Personalization

    Get PDF
    Personalization constitutes the mechanisms necessary to automatically customize information content, structure, and presentation to the end user to reduce information overload. Unlike traditional approaches to personalization, the central theme of our approach is to model a website as a program and conduct website transformation for personalization by program transformation (e.g., partial evaluation, program slicing). The goal of this paper is study personalization through a program transformation lens and develop a formal model, based on program transformations, for personalized interaction with hierarchical hypermedia. The specific research issues addressed involve identifying and developing program representations and transformations suitable for classes of hierarchical hypermedia and providing supplemental interactions for improving the personalized experience. The primary form of personalization discussed is out-of-turn interaction—a technique that empowers a user navigating a hierarchical website to postpone clicking on any of the hyperlinks presented on the current page and, instead, communicate the label of a hyperlink nested deeper in the hierarchy. When the user supplies out-of-turn input, we personalize the hierarchy to reflect the user\u27s informational need. While viewing a website as a program and site transformation as program transformation is non-traditional, it offers a new way of thinking about personalized interaction, especially with hierarchical hypermedia. Our use of program transformations casts personalization in a formal setting and provides a systematic and implementation-neutral approach to designing systems. Moreover, this approach helped connect our work to human-computer dialog management and, in particular, mixed-initiative interaction. Putting personalized web interaction on a fundamentally different landscape gave birth to this new line of research. Relating concepts in the web domain (e.g., sites, interactions) to notions in the program-theoretic domain (e.g., programs, transformations) constitutes the creativity in this work

    A program slicing method for a wide spectrum language

    Get PDF
    This thesis describes the implementation of a program slicer for WSL - a Wide Spectrum Language - which is a language that allows different levels of abstraction to coexist in the same program. WSL contains constructs not found in conventional languages, e.g. action systems (which model a segment of code with GOTOs and labels) and non deterministic constructs. Program slicing is a method for restricting a program to a specified behaviour of interest. Usually this behaviour of interest is expressed in terms of a variable or a set of variables. The method used in the thesis to slice a program is different from the classical ones in that slices do not need to be computed from an output statement, and in that slices are computed on a wide spectrum language closer to a functional language, instead of being computed on a more conventional, procedural language. A slicer for a subset of WSL has been designed and implemented based on the data flow analysis techniques for while-programs of Bergeretti and Carré [10]. It has been necessary to modify the algorithm to permit incremental slicing. Modifications of their algorithm were also needed to accommodate the specific WSL constructs mentioned above. The implementation has been developed using a rapid prototyping approach. The prototype has provided new ideas and enhancements for a more comprehensive sheer which could be implemented in the future. The slicer has assisted the maintainer using ReForm - a reverse engineering project developed at Durham University - in understanding and debugging a program by decomposing it. At the end of this thesis results showing how slicing has helped the maintainer are presented. Conclusions on the method used, the validity of the tool, and its engineering are also summarized

    Conditional Elimination through Code Duplication

    Full text link
    We propose an optimizing transformation which reduces program runtime at the expense of program size by eliminating conditional jumps.Comment: 11 pages, 5 figure

    A formally verified compiler back-end

    Get PDF
    This article describes the development and formal verification (proof of semantic preservation) of a compiler back-end from Cminor (a simple imperative intermediate language) to PowerPC assembly code, using the Coq proof assistant both for programming the compiler and for proving its correctness. Such a verified compiler is useful in the context of formal methods applied to the certification of critical software: the verification of the compiler guarantees that the safety properties proved on the source code hold for the executable compiled code as well

    Mechanized semantics

    Get PDF
    The goal of this lecture is to show how modern theorem provers---in this case, the Coq proof assistant---can be used to mechanize the specification of programming languages and their semantics, and to reason over individual programs and over generic program transformations, as typically found in compilers. The topics covered include: operational semantics (small-step, big-step, definitional interpreters); a simple form of denotational semantics; axiomatic semantics and Hoare logic; generation of verification conditions, with application to program proof; compilation to virtual machine code and its proof of correctness; an example of an optimizing program transformation (dead code elimination) and its proof of correctness
    • …
    corecore