Transformations of Logic Programs with Goals as Arguments
Alberto Pettorossi, Maurizio Proietti

TL;DR
This paper introduces an extension to logic programming allowing goals as arguments, providing transformation rules that improve program efficiency while ensuring correctness and compatibility with standard Prolog execution.
Contribution
It proposes new transformation rules for logic programs with goals as arguments, extending traditional unfolding and folding techniques, and proves their correctness and termination.
Findings
Transformation rules preserve operational semantics.
Programs can be optimized using goal-argument manipulations.
Extended language remains compatible with Prolog systems.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
