@inproceedings{067f58bc31014d2fb3512587ca7a280b,
title = "Imperative program specialisation: An approach using CLP",
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. The partially evaluated semantics program is represented as a labelled directed graph. An algorithm for reconstructing an imperative program from the graph and the residual program is presented. Constraints provide a means through which information is propagated inside both branches of a conditional, the body of a loop, and along 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).",
author = "Peralta, {Julio C.} and Gallagher, {John P.}",
year = "2000",
doi = "10.1007/10720327_7",
language = "English",
isbn = "3540676287",
series = "Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)",
publisher = "Springer Verlag",
pages = "102--117",
editor = "Annalisa Bossi",
booktitle = "Logic-Based Program Synthesis and Transformation",
note = "9th International Workshop on Logic-Based Program Synthesis and Transformation, LOPSTR 1999 ; Conference date: 22-09-1999 Through 24-09-1999",
}