We address the problem of proving total correctness of transformation rules for definite logic programs. We consider a general transformation rule, called clause replacement, which consists in transforming a program P into a new program Q by replacing a set Î“1 of clauses occurring in P by a new set Î“2 of clauses, provided that Î“1 and Î“2 are equivalent in the least Herbrand model M (P) of the program P. We propose a general method for proving that clause replacement is totally correct, that is, M (P) = M (Q). Our method consists in showing that the transformation of P into Q can be performed by: (i) adding extra arguments to predicates, thereby constructing from the given program P an annotated program Î± (P), (ii) applying clause replacements and transforming the annotated program Î± (P) into a terminating annotated program Î²(Q), and (iii) erasing the annotations from Î²(Q), thereby getting Q. Our method does not require that either P or Q terminates and it is parametric w.r.t. the annotations. By providing different definitions for these annotations, we can easily prove the total correctness of many versions of the unfolding, folding, and goal replacement rules proposed in the literature.
Pettorossi, A., & Proietti, M. (2004). A theory of totally correct logic program transformations. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (pp.159-168).
|Autori:||Pettorossi, A; Proietti, M|
|Titolo:||A theory of totally correct logic program transformations|
|Nome del convegno:||Proceedings of the 2004 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM'04|
|Luogo del convegno:||Verona|
|Anno del convegno:||2004|
|Enti collegati al convegno:||ACM SIGPLAN|
|Data di pubblicazione:||2004|
|Digital Object Identifier (DOI):||http://dx.doi.org/10.1145/1014007.1014023|
|Settore Scientifico Disciplinare:||Settore ING-INF/05 - Sistemi di Elaborazione delle Informazioni|
|Tipologia:||Intervento a convegno|
|Citazione:||Pettorossi, A., & Proietti, M. (2004). A theory of totally correct logic program transformations. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (pp.159-168).|
|Appare nelle tipologie:||02 - Intervento a convegno|