Deep logic program transformation using abstract interpretation

Author(s):  
Dmitri Yu. Boulanger
2002 ◽  
Vol 2 (4-5) ◽  
pp. 517-547 ◽  
Author(s):  
ANDY KING ◽  
LUNJIN LU

One recurring problem in program development is that of understanding how to re-use code developed by a third party. In the context of (constraint) logic programming, part of this problem reduces to figuring out how to query a program. If the logic program does not come with any documentation, then the programmer is forced to either experiment with queries in an ad hoc fashion or trace the control-flow of the program (backward) to infer the modes in which a predicate must be called so as to avoid an instantiation error. This paper presents an abstract interpretation scheme that automates the latter technique. The analysis presented in this paper can infer moding properties which if satisfied by the initial query, come with the guarantee that the program and query can never generate any moding or instantiation errors. Other applications of the analysis are discussed. The paper explains how abstract domains with certain computational properties (they condense) can be used to trace control-flow backward (right-to-left) to infer useful properties of initial queries. A correctness argument is presented and an implementation is reported.


2013 ◽  
Vol 129 ◽  
pp. 186-210 ◽  
Author(s):  
Emanuele De Angelis ◽  
Fabio Fioravanti ◽  
Alberto Pettorossi ◽  
Maurizio Proietti

2010 ◽  
Vol 19 (01) ◽  
pp. 39-63
Author(s):  
EMMANUIL MARAKAKIS ◽  
KOSTAS VASSILAKIS ◽  
NIKOS PAPADAKIS

This paper studies the problem of removing unused arguments from logic programs which have been constructed by a schema-based method. Our schema-based method constructs logic programs semi-automatically. These programs have clear structure which depicts the design decisions that have been taken for their construction. On the other hand, these programs have unused arguments. We propose a method that automatically removes the unused arguments from such programs. This method is based on fold-unfold transformations. We have developed a tool which implements our method and evaluates the initial and the transformed programs. This logic program transformation tool is presented as well.


2007 ◽  
Vol 7 (1-2) ◽  
pp. 153-182
Author(s):  
JULIO MARIÑO ◽  
ÁNGEL HERRANZ ◽  
JUAN JOSÉ MORENO-NAVARRO

AbstractTo alleviate the inefficiencies caused by the interaction of the logic and functional sides, integrated languages may take advantage of demand information, i.e. knowing in advance which computations are needed and, to which extent, in a particular context. This work studies demand analysis – which is closely related to backwards strictness analysis – in a semantic framework of partial predicates, which in turn are constructive realizations of ideals in a domain. This will allow us to give a concise, unified presentation of demand analysis, to relate it to other analyses based on abstract interpretation or strictness logics, some hints for the implementation, and, more important, to prove the soundness of our analysis based on demand equations. There are also some innovative results. One of them is that a set constraint-based analysis has been derived in a stepwise manner using ideas taken from the area of program transformation. The other one is the possibility of using program transformation itself to perform the analysis, specially in those domains of properties where algorithms based on constraint solving are too weak.


Sign in / Sign up

Export Citation Format

Share Document