Logic Program Synthesis and Transformation pp 147-166 | Cite as
Abstract Intepretation and recursive behaviour of logic programs
Abstract
We propose a general abstract interpretation based on the recursive behaviour study of Prolog programs. This abstract interpretation allows both the dataflow analysis of a program execution and the automatic derivation of some program properties.
First, we introduce a new notion: the limited-unfolding loop (abbreviated to lul). Roughly speaking, a tree t satisfies a lul m iff the leaf of the branch corresponding to the unfolding of the loop m is labelled with a constant. Instead of a term-groundedness analysis, our study can be seen as a “branch-groundedness” analysis. A finite set of luls can be regarded as a type which may be associated with a variable. Thus, a new algebra of atoms is built and substitution, unification (lub) and anti-unification (gib) operations are redefined in an easy way.
Then, a general abstract resolution (called abstract OLDT resolution) based on the work of H. Tamaki and T. Sato is presented. This abstract resolution always terminates and allows the collection of some information about the concrete resolution (i.e., the standard Prolog interpretation) of all program.
The three stages for our Prolog program abstract interpretation are: 1) computation of a finite set of “significant” luls by looking into the structure of a given Prolog program. 2) abstract resolution from a given call-pattern. 3) analysis of the abstract structure (result of the previous step) for establishing properties like, e.g., solution pattern(s), termination, boundedness, determinism, complexity, ...
Preview
Unable to display preview. Download preview PDF.
References
- [Bru 91]Bruynooghe M. A practical framework for the abstract interpretation of logic programs. Journal of Logic Programming, Feb 1991, pp 91-124.Google Scholar
- [CC 77]Cousot P. and Cousot R. Abstract Interpretation: a unified lattice for static analysis of programs by construction of approximation of fixpoints. POPL 1977, Sigact Sigplan, 1977, pp 238-252.Google Scholar
- [Cor 89]Corsini MM. Interprétation abstraite en programmation logique: théorie et applications. PhD thesis, Université de Bordeaux I, Jan 1989.Google Scholar
- [Dev 88a]Devienne P. Weighted Graphs, a tool for expressing the behaviour of recursive rules in Logic Programming. FGCS conferences, Nov. 1988.Google Scholar
- [Dev 88b]Devienne P. Weighted Graphs, a tool for studying the halting problem and time complexity in term rewriting systems and Logic Programming. ICOT technical report TR-437, 1988.Google Scholar
- [DVB 90]De Schreye D., Verschaetse K. and Bruynooghe M. A practical technique for detecting non-terminating queries for a restricted class of Horn clauses using directed, weighted graphs. Report CW-109, Mar 1990.Google Scholar
- [GCS 88]Gallagher J., Codish M. and Shapiro E. Specialisation of Prolog and FCP Programs using Abstract Interpretation. New Generation Computing, OHMSHA LTD and Springer-Verlag, 1988, pp 159-186.Google Scholar
- [JS 87]Jones N. and Sondergaard H. A semantics-based framework for the abstract interpretation of Prolog. In Abstract interpretation of declarative languages, S. Abramsky and C. Hankin (Eds), Ellis Horwood, 1987.Google Scholar
- [KK 87]Kanamori T. and Kawamura T. Analysing success patterns of logic programs by abstract hybrid interpretation. ICOT Technical Report, 1987.Google Scholar
- [LDL 91]Lecoutre C, Devienne P. and Lebegue P. Abstract Interpretation and recursive behaviour of logic programs. LIFL Technical Report, Oct 1991.Google Scholar
- [Leb 88]Lebègue P. Contribution à l’étude de la Programmation Logique par les Graphes Orientés Pondérés. PhD thesis, Université de LILLE I, Nov 1988.Google Scholar
- [Mel.86]_Mellish CS. Abstract Interpretation of Prolog programs. In Abstract interpretation of declarative languages, S. Abramsky and C. Hankin (Eds), Ellis Horwood, 1987.Google Scholar
- [MS.88]_Marriot K. and Sondergaard H. Bottom-up abstract interpretation of logic programs. Proceedings of the fifth ILCP, Seattle, August 1988, pp 733-748.Google Scholar
- [TS.86]_Tamaki H., Sato T. OLD resolution with Tabulation. Proceedings of the third ICLP, LNCS, 225, Springer-Verlag, 1986.Google Scholar