2,741 research outputs found

    Semantical Equivalence of the Control Flow Graph and the Program Dependence Graph

    Get PDF
    The program dependence graph (PDG) represents data and control dependence between statements in a program. This paper presents an operational semantics of program dependence graphs. Since PDGs exclude artificial order of statements that resides in sequential programs, executions of PDGs are not unique. However, we identified a class of PDGs that have unique final states of executions, called deterministic PDGs. We prove that the operational semantics of control flow graphs is equivalent to that of deterministic PDGs. The class of deterministic PDGs properly include PDGs obtained from well-structured programs. Thus, our operational semantics of PDGs is more general than that of PDGs for well-structured programs, which are already established in literature.Comment: 30 page

    Interleaving and lock-step semantics for analysis and verification of GPU kernels

    No full text
    Graphics Processing Units (GPUs) from leading vendors employ predicated (or guarded) execution to eliminate branching and increase performance. Similarly, a recent GPU verification technique uses predication to reduce verification of GPU kernels (the massively parallel programs that run on GPUs) to verification of a sequential program. Prior work on the formal semantics of lock-step predicated execution for kernels focused on structured programs, where control is organised using if- and while-statements. We provide lock-step execution semantics for GPU kernels that are represented by arbitrary reducible control flow graphs. We present a traditional interleaving semantics and a novel lock-step semantics based on predication, and show that for terminating kernels either both semantics compute identical results or both behave erroneously. The method allows reducing GPU kernel verification to the verification of a sequential, lock-step program to be applied to GPU kernels with arbitrary reducible control flow. We have implemented the method in the GPUVerify tool, and present an evaluation using a set of 163 open source and commercial GPU kernels. Among these kernels, 42 exhibit unstructured control flow which our novel lock-step predication technique can handle fully automatically. This generality comes at a modest price: verification across our benchmark set was on average 2.25 times slower than using an existing approach that specifically targets structured kernels

    Engineering a static verification tool for GPU kernels

    Get PDF
    We report on practical experiences over the last 2.5 years related to the engineering of GPUVerify, a static verification tool for OpenCL and CUDA GPU kernels, plotting the progress of GPUVerify from a prototype to a fully functional and relatively efficient analysis tool. Our hope is that this experience report will serve the verification community by helping to inform future tooling efforts. © 2014 Springer International Publishing

    Towards a complete transformational toolkit for compilers

    Get PDF
    PIM is an equational logic designed to function as a ``transformational toolkit'' for compilers and other programming tools that analyze and manipulate imperative languages.It has been applied to such problems as program slicing, symbolic evaluation, conditional constant propagation, and dependence analysis.PIM consists of the untyped lambda calculus extended with an algebraic data type that characterizes the behavior of lazy stores and generalized conditionals.A graph form of PIM terms is by design closely related to several intermediate representations commonly used in optimizing compilers. In this paper, we show that PIM's core algebraic component, PIMt_t, possesses a complete equational axiomatization (under the assumption of certain reasonable restrictions on term formation). This has the practical consequence of guaranteeing that every semantics-preserving transformation on a program representable in PIMt_t can be derived by application of PIMt_t rules. We systematically derive the complete PIMt_t logic as the culmination of a sequence of increasingly powerful equational systems starting from a straightforward ``interpreter'' for closed PIMt_t terms. This work is an intermediate step in a larger program to develop a set of well-founded tools for manipulation of imperative programs by compilers and other systems that perform program analysis

    A complete transformational toolkit for compilers

    Get PDF
    In an earlier paper, one of the present authors presented a preliminary account of an equational logic called PIM. PIM is intended to function as a 'transformational toolkit' to be used by compilers and analysis tools for imperative languages, and has been applied to such problems as program slicing, symbolic evaluation, conditional constant propagation, and dependence analysis. PIM consists of the untyped lambda calculus extended with an algebraic rewriting system that characterizes the behavior of lazy stores and generalized conditionals. A major question left open in the earlier paper was whether there existed a complete equational axiomatization of PIM's semantics. In this paper, we answer this question in the affirmative for PIM's core algebraic component, PIMt, under the assumption of certain reasonable restrictions on term formation. We systematically derive the complete PIM logic as the culmination of a sequence of increasingly powerful equational systems starting from a straightforward 'interpreter' for closed PIM terms

    Component identification through program slicing

    Get PDF
    This paper reports on the development of specific slicing techniques for functional programs and their use for the identification of possible coherent components from monolithic code. An associated tool is also introduced. This piece of research is part of a broader project on program understanding and re-engineering of legacy code supported by formal methodsFundação para a Ciência e a Tecnologia (FCT) - POSI/ICHS/44304/2002, in the context of the PURe project
    • …
    corecore