Skip to main navigation Skip to search Skip to main content

Imperative Program Specialisation: An Approach Using CLP

  • Peralta Julio C.
  • , Gallagher John P.

    Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

    6 Citations (Scopus)

    Abstract

    The semantics of an imperative programming language can be expressed as a program in a declarative constraint language. Not only does this render the semantics executable, but it opens up the possibility of applying to imperative languages the advances made in program analysis and transformation of declarative languages. We propose a method for carrying out partial evaluation of imperative programs, using partial evaluation in a declarative language, but returning the results in the syntax of the imperative program which is to be partially evaluated. The approach uses a special form of the semantics and program points to aid partial evaluation in the reconstruction of a specialised imperative program from a partially evaluated semantics program. Constraints provide a means through which information is propagated inside both branches of a conditional, the body of a loop, and along chains of def-use chains in the program. The method provides a framework for constructing a partial evaluator for any imperative programming language, by writing down its semantics as a declarative program (a constraint logic program, in the approach shown here).
    Translated title of the contributionImperative Program Specialisation: An Approach Using CLP
    Original languageEnglish
    Title of host publicationLogic-Based Program Synthesis and Transformation (LOPSTR'99), (ed. A. Bossi)
    PublisherSpringer Berlin Heidelberg
    Pages103 - 118
    Number of pages15
    ISBN (Print)3540676287
    Publication statusPublished - 2000

    Bibliographical note

    Other page information: 103-118
    Conference Proceedings/Title of Journal: Logic-Based Program Synthesis and Transformation (LOPSTR'99), (ed. A. Bossi)
    Other identifier: 1000449

    Fingerprint

    Dive into the research topics of 'Imperative Program Specialisation: An Approach Using CLP'. Together they form a unique fingerprint.

    Cite this