102,381 research outputs found
Program transformation for development, verification, and synthesis of programs
This paper briefly describes the use of the program transformation methodology for the development of correct and efficient programs. In particular, we will refer to the case of constraint logic programs and, through some examples, we will show how by program transformation, one can improve, synthesize, and verify programs
Trustworthy Refactoring via Decomposition and Schemes: A Complex Case Study
Widely used complex code refactoring tools lack a solid reasoning about the
correctness of the transformations they implement, whilst interest in proven
correct refactoring is ever increasing as only formal verification can provide
true confidence in applying tool-automated refactoring to industrial-scale
code. By using our strategic rewriting based refactoring specification
language, we present the decomposition of a complex transformation into smaller
steps that can be expressed as instances of refactoring schemes, then we
demonstrate the semi-automatic formal verification of the components based on a
theoretical understanding of the semantics of the programming language. The
extensible and verifiable refactoring definitions can be executed in our
interpreter built on top of a static analyser framework.Comment: In Proceedings VPT 2017, arXiv:1708.0688
Transformations of Logic Programs with Goals as Arguments
We consider a simple extension of logic programming where variables may range
over goals and goals may be arguments of predicates. In this language we can
write logic programs which use goals as data. We give practical evidence that,
by exploiting this capability when transforming programs, we can improve
program efficiency.
We propose a set of program transformation rules which extend the familiar
unfolding and folding rules and allow us to manipulate clauses with goals which
occur as arguments of predicates. In order to prove the correctness of these
transformation rules, we formally define the operational semantics of our
extended logic programming language. This semantics is a simple variant of
LD-resolution. When suitable conditions are satisfied this semantics agrees
with LD-resolution and, thus, the programs written in our extended language can
be run by ordinary Prolog systems.
Our transformation rules are shown to preserve the operational semantics and
termination.Comment: 51 pages. Full version of a paper that will appear in Theory and
Practice of Logic Programming, Cambridge University Press, U
Proving theorems by program transformation
In this paper we present an overview of the unfold/fold proof method, a method for proving theorems about programs, based on program transformation. As a metalanguage for specifying programs and program properties we adopt constraint logic programming (CLP), and we present a set of transformation rules (including the familiar unfolding and folding rules) which preserve the semantics of CLP programs. Then, we show how program transformation strategies can be used, similarly to theorem proving tactics, for guiding the application of the transformation rules and inferring the properties to be proved. We work out three examples: (i) the proof of predicate equivalences, applied to the verification of equality between CCS processes, (ii) the proof of first order formulas via an extension of the quantifier elimination method, and (iii) the proof of temporal properties of infinite state concurrent systems, by using a transformation strategy that performs program specialization
- âŠ