Hostname: page-component-74656f9884-j7cmm Total loading time: 0 Render date: 2026-11-09T22:52:14.904Z Has data issue: false hasContentIssue false

Transformations of logic programs with goals as arguments

Published online by Cambridge University Press:  07 June 2004

ALBERTO PETTOROSSI
Affiliation:
Dipartimento di Informatica, Sistemi e Produzione, Università di Roma Tor Vergata, Via del Politecnico 1, I-00133 Roma, Italy (e-mail: alberto.pettorossi@uniroma2.it)
MAURIZIO PROIETTI
Affiliation:
IASI-CNR, Viale Manzoni 30, I-00185 Roma, Italy (e-mail: proietti@iasi.rm.cnr.it)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

We consider a simple extension of logic programming where variables may range over goals and goals may be arguments of predicates. In this language we can write logic programs which use goals as data. We give practical evidence that, by exploiting this capability when transforming programs, we can improve program efficiency. We propose a set of program transformation rules which extend the familiar unfolding and folding rules and allow us to manipulate clauses with goals which occur as arguments of predicates. In order to prove the correctness of these transformation rules, we formally define the operational semantics of our extended logic programming language. This semantics is a simple variant of LD-resolution. When suitable conditions are satisfied this semantics agrees with LD-resolution and, thus, the programs written in our extended language can be run by ordinary Prolog systems. Our transformation rules are shown to preserve the operational semantics and termination.

Information

Type
Regular Papers
Copyright
© 2004 Cambridge University Press