Imperative program specialisation: An approach using CLP

Julio C. Peralta, John P. Gallagher

Publikation: Bidrag til bog/antologi/rapportKonferencebidrag i proceedingsForskningpeer review

6 Citationer (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. 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).
OriginalsprogEngelsk
TitelLogic-Based Program Synthesis and Transformation : 9th International Workshop, LOPSTR 1999, Selected Papers
RedaktørerAnnalisa Bossi
Antal sider16
ForlagSpringer Verlag
Publikationsdato2000
Sider102-117
ISBN (Trykt)3540676287, 9783540676287
DOI
StatusUdgivet - 2000
Udgivet eksterntJa
Begivenhed9th International Workshop on Logic-Based Program Synthesis and Transformation, LOPSTR 1999 - Venice, Italien
Varighed: 22 sep. 199924 sep. 1999

Konference

Konference9th International Workshop on Logic-Based Program Synthesis and Transformation, LOPSTR 1999
Land/OmrådeItalien
ByVenice
Periode22/09/199924/09/1999
NavnLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Vol/bind1817
ISSN0302-9743

Citer dette