; of The Royal Institute of Technology; Department of Telecommunication and Computer Systems; The Royal Institute of Technology (KTH) SICS; Department of Telecommunication and Swedish Institute of Computer Science
SVM HeaderParse 0.2
AUTHOR ADDR
; Stockholm, Sweden; Computer Systems Box 1263; S-100 44 Stockholm S-164 28 Kista; Sweden Sweden
SVM HeaderParse 0.1
ABSTRACT
A partial evaluator for Prolog takes a program and a query and returns a program specialized for all instances of that query. The intention is that the generated program will execute more efficiently than the original one for those instances. This thesis presents "Mixtus", an automatic partial evaluator for full Prolog, i.e. including non-logical features such as cut, assert, var, write etc. Mixtus does not need any annotations to guide it in its process, but will automatically generate a program given only an input program and a query. A definition of partial evaluation based on the procedural semantics rather than declarative semantics is presented. A program transformed by Mixtus will behave identically as the original one, including side-effects and the order of the solutions returned. The three basic program transformations "unfolding", "folding" and "definition" are adapted to full Prolog. The most important transformation is "unfolding" which is used by all partial evaluators to...