In this paper we present a new operational and denotational semantics for rewrite systems as logic programs. The main feature of our rewrite programs is that they allow us to define predicates not only by implications as in Prolog, but also by equivalences. We give a few examples showing how rewrite programs may turn out to be more effective than Prolog programs in capturing the user's intended semantics, because of this additional feature. Rewrite programs are interpreted by linear completion. Our definition of linear completion differs from the previous ones, because we allow simplification of goals by their ancestors. If simplification is allowed, programs given by equivalences and programs given by implications show a different behaviour. In the second part of the paper we give a fixpoint characterization of rewrite programs and we show that it captures both the proof theoretic and the model theoretic semantics. Rewrite programs and Prolog programs for the same predicates have the same fixpoint, i.e. the same set of ground true facts, although a rewrite program may give fewer answers. We show that this happens because if predicates are defined by equivalences, distinct Prolog answers turn out to be equivalent with respect to the rewrite program. However, for every Prolog answer there is an equivalent answer given by the rewrite program. This explains why a smaller set of answers covers the same set of ground true facts.

Operational and denotational semantics of rewrite programs

BONACINA, Maria Paola;
1990

Abstract

In this paper we present a new operational and denotational semantics for rewrite systems as logic programs. The main feature of our rewrite programs is that they allow us to define predicates not only by implications as in Prolog, but also by equivalences. We give a few examples showing how rewrite programs may turn out to be more effective than Prolog programs in capturing the user's intended semantics, because of this additional feature. Rewrite programs are interpreted by linear completion. Our definition of linear completion differs from the previous ones, because we allow simplification of goals by their ancestors. If simplification is allowed, programs given by equivalences and programs given by implications show a different behaviour. In the second part of the paper we give a fixpoint characterization of rewrite programs and we show that it captures both the proof theoretic and the model theoretic semantics. Rewrite programs and Prolog programs for the same predicates have the same fixpoint, i.e. the same set of ground true facts, although a rewrite program may give fewer answers. We show that this happens because if predicates are defined by equivalences, distinct Prolog answers turn out to be equivalent with respect to the rewrite program. However, for every Prolog answer there is an equivalent answer given by the rewrite program. This explains why a smaller set of answers covers the same set of ground true facts.
9780262540582
Linear completion, Prolog, simplification
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: http://hdl.handle.net/11562/16061
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? 0
social impact