## Combining Logic and Control to Characterize Global Invariants of Prolog Programs (1994)

Venue: | CWI Report, The |

Citations: | 1 - 1 self |

### BibTeX

@ARTICLE{Colussi94combininglogic,

author = {Livio Colussi and Massimo Marchiori and Elena Marchiori},

title = {Combining Logic and Control to Characterize Global Invariants of Prolog Programs},

journal = {CWI Report, The},

year = {1994}

}

### OpenURL

### Abstract

The behaviour of logic programs (with various built-in's) is described in terms of sets of substitutions associated with the control points of the program. These sets are defined by means of an operational semantics O, based on a description of unification as predicate transformer. It is shown that O subsumes the semantics of logic programs consisting of the set of computed substitutions obtained from finite prefixes of SLD-derivations with Prolog selection rule. Moreover O is used as base semantics for performing dataflow analysis of logic programs. 1 Introduction The standard view of logic programming is declarative, i.e., a program is a static description of some predicate or function, and there is no reference to the computational mechanism used to compute it. In the declarative interpretation, the meaning of a program is given model-theoretically as the set of all its logical consequences in the Herbrand domain of ground atoms ([vEK76]). Nevertheless, despite of its simplicity an...

### Citations

2004 |
Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints
- Cousot, Cousot
- 1977
(Show Context)
Citation Context ... Dataflow information is useful for debugging, code optimization, program transformation and even for correctness proofs. We introduce a practical framework based on the approach of P. and R. Cousot (=-=[CC77]-=-, [CC79]) to derive a global invariant for every control point of the program. An abstraction O(k) a of the partial semantics O(k) is given by applying a proper abstraction to the OE's, to the path st... |

1535 |
A Discipline of Programming
- DIJKSTRA
- 1976
(Show Context)
Citation Context ...2 vars(E) g: 2.2 Unification In the imperative setting, the basic statements of a programming language can be described by means of a mapping �� : 2 State ! 2 State acting on sets of states ([Flo6=-=7], [Dij76]-=-, [dB80]). This map is called predicate transformer because a set of states can be represented by means of a predicate of a suitable assertion language. In logic programming, the basic computational m... |

977 |
A machine-oriented logic based on the resolution principle
- Robinson
- 1965
(Show Context)
Citation Context ...icate transformer because a set of states can be represented by means of a predicate of a suitable assertion language. In logic programming, the basic computational mechanism is unification ([Her30], =-=[Rob65]-=-). As observed in [CM93], (elementary) unification can be viewed as a predicate transformer, where states are replaced with substitutions. Formally, for a pair U = (A; B) of atoms define a unifier of ... |

791 | Constraint Logic Programming: A Survey
- Jaffar, Maher
(Show Context)
Citation Context ...bstitutions ff which are in OE and which satisfy A. In such a way the semantics of logic programs defined in the following section can be easily extended to logic programs containing constraints (cf. =-=[JM94]-=-). 4 Control Points and Paths In the procedural interpretation of logic programming, a clause is viewed as a sequence of procedure calls, corresponding to the sequence of atoms of its body. This can b... |

735 | The semantics of predicate logic as a programming language
- Emden, Kowalski
- 1976
(Show Context)
Citation Context ...chanism used to compute it. In the declarative interpretation, the meaning of a program is given model-theoretically as the set of all its logical consequences in the Herbrand domain of ground atoms (=-=[vEK76]-=-). Nevertheless, despite of its simplicity and elegance, this approach has some drawbacks. The soundness and completeness results relating the declarative and operational semantics show that there is ... |

667 | Systematic design of program analysis frameworks
- COUSOT, COUSOT
(Show Context)
Citation Context ...w information is useful for debugging, code optimization, program transformation and even for correctness proofs. We introduce a practical framework based on the approach of P. and R. Cousot ([CC77], =-=[CC79]-=-) to derive a global invariant for every control point of the program. An abstraction O(k) a of the partial semantics O(k) is given by applying a proper abstraction to the OE's, to the path strongest ... |

610 |
Assigning meaning to programs
- Floyd
- 1967
(Show Context)
Citation Context ...or all x 2 vars(E) g: 2.2 Unification In the imperative setting, the basic statements of a programming language can be described by means of a mapping �� : 2 State ! 2 State acting on sets of stat=-=es ([Flo67]-=-, [Dij76], [dB80]). This map is called predicate transformer because a set of states can be represented by means of a predicate of a suitable assertion language. In logic programming, the basic comput... |

294 | Abstract interpretation and application to logic programs
- Cousot, Cousot
- 1992
(Show Context)
Citation Context ... work on abstract interpretation was intended for imperative programs ([CC77]), it has been widely applied to declarative programming languages, due to the generality of its basic scheme (cf. [AH87], =-=[CC92]-=-). First, the concrete domain Conc equipped with a partial order ` is approximated by an abstract domain Abs equipped with a partial order v, such that there is a Galois connection (f a ; f c ) betwee... |

199 |
A Practical Framework for the Abstract Interpretation of Logic Programs
- Bruynooghe
- 1991
(Show Context)
Citation Context ... of the observable logical terms. In [JS87] only the entry point of clauses are considered and a denotational semantics of Prolog programs is defined. Our approach presents similarities with those of =-=[Bru91]-=- and [Nil90], where the same notion of control point is considered as here. In [Bru91] an SLD-derivation of a goal is described by means of a proof tree, which is then generalized to consider executio... |

116 |
Recherches sur la théorie de la démonstration. La Société des Sciences et des Lettres de Varsovie
- Herbrand
- 1930
(Show Context)
Citation Context ...lled predicate transformer because a set of states can be represented by means of a predicate of a suitable assertion language. In logic programming, the basic computational mechanism is unification (=-=[Her30]-=-, [Rob65]). As observed in [CM93], (elementary) unification can be viewed as a predicate transformer, where states are replaced with substitutions. Formally, for a pair U = (A; B) of atoms define a un... |

104 |
A semantics-based framework for the abstract interpretation of Prolog
- Jones, Sondergaard
- 1987
(Show Context)
Citation Context ...ns and a semantics is given, that associates a set of (equivalence classes under variance of) logical terms to a control point. This semantics describes a superset of the observable logical terms. In =-=[JS87]-=- only the entry point of clauses are considered and a denotational semantics of Prolog programs is defined. Our approach presents similarities with those of [Bru91] and [Nil90], where the same notion ... |

74 |
Abastract Interpretation of Prolog Programs
- Mellish
- 1987
(Show Context)
Citation Context ...m and the semantical concepts of (S)LD-resolution. A number of alternative semantics of logic programs based on control points have been introduced, as base semantics to perform dataflow analysis. In =-=[Mel87]-=- control points are associated with procedure definitions and a semantics is given, that associates a set of (equivalence classes under variance of) logical terms to a control point. This semantics de... |

54 |
Mathematical Theory of Program Correctness
- Bakker
- 1980
(Show Context)
Citation Context ... g: 2.2 Unification In the imperative setting, the basic statements of a programming language can be described by means of a mapping �� : 2 State ! 2 State acting on sets of states ([Flo67], [Dij7=-=6], [dB80]-=-). This map is called predicate transformer because a set of states can be represented by means of a predicate of a suitable assertion language. In logic programming, the basic computational mechanism... |

31 |
Declarative modeling of the operational behaviour of logic languages
- Falaschi, Levi, et al.
- 1989
(Show Context)
Citation Context ...g O(k) a from k = 0 until a fixpoint is reached. Related work Various alternative semantics for logic programming languages have been given. Non-standard declarative semantics have been introduced in =-=[FLMP89]-=- and [AMP92], the first to fill the gap between declarative and operational semantics of logic programs, the second to deal also with some metalogical, built-in relations. Our contribution is related ... |

17 |
Comparative semantics for flow of control in logic programming without logic
- Bakker
- 1991
(Show Context)
Citation Context ...-in relations. Our contribution is related to those approaches which employ mathematical concepts and techniques traditionally applied in the imperative setting. In particular, in [dV90], [dBK90] and =-=[dB91]-=- the semantics of various logic programming languages is investigated by distinguishing between the logic and the control part of a program. Since their aim is to compare logic programming languages w... |

14 |
Systematic semantic approximations of logic programs
- Nilsson
- 1990
(Show Context)
Citation Context ...rvable logical terms. In [JS87] only the entry point of clauses are considered and a denotational semantics of Prolog programs is defined. Our approach presents similarities with those of [Bru91] and =-=[Nil90]-=-, where the same notion of control point is considered as here. In [Bru91] an SLD-derivation of a goal is described by means of a proof tree, which is then generalized to consider executions of a clas... |

13 |
An introduction to abstract interpretation
- Abramsky, Hankin
- 1990
(Show Context)
Citation Context ...zation of such a procedural interpretation. As a consequence various approaches have been proposed and a number of semantics for Prolog programs have been introduced to perform dataflow analysis (cf. =-=[AH87]-=-). This paper does not introduce a new approach: instead, it gives a novel use of techniques originally developed for imperative programs, to describe the meaning of Prolog programs. The novelty amoun... |

8 |
Comparative metric semantics for concurrent prolog
- Bakker, Kok
- 1990
(Show Context)
Citation Context ...gical, built-in relations. Our contribution is related to those approaches which employ mathematical concepts and techniques traditionally applied in the imperative setting. In particular, in [dV90], =-=[dBK90]-=- and [dB91] the semantics of various logic programming languages is investigated by distinguishing between the logic and the control part of a program. Since their aim is to compare logic programming ... |

3 |
Unification as predicate transformer. Submitted
- Colussi, Marchiori
- 1993
(Show Context)
Citation Context ... a set of states can be represented by means of a predicate of a suitable assertion language. In logic programming, the basic computational mechanism is unification ([Her30], [Rob65]). As observed in =-=[CM93]-=-, (elementary) unification can be viewed as a predicate transformer, where states are replaced with substitutions. Formally, for a pair U = (A; B) of atoms define a unifier of U to be a substitution #... |

2 |
A theory of first order built-in's of Prolog. Res
- Apt, Marchiori, et al.
- 1992
(Show Context)
Citation Context ... k = 0 until a fixpoint is reached. Related work Various alternative semantics for logic programming languages have been given. Non-standard declarative semantics have been introduced in [FLMP89] and =-=[AMP92]-=-, the first to fill the gap between declarative and operational semantics of logic programs, the second to deal also with some metalogical, built-in relations. Our contribution is related to those app... |

1 |
Comparative metric semantics of concurrent prolog
- Vink
- 1990
(Show Context)
Citation Context ...e metalogical, built-in relations. Our contribution is related to those approaches which employ mathematical concepts and techniques traditionally applied in the imperative setting. In particular, in =-=[dV90]-=-, [dBK90] and [dB91] the semantics of various logic programming languages is investigated by distinguishing between the logic and the control part of a program. Since their aim is to compare logic pro... |