To Parse or Not To Parse

In this paper, we reconsider the problem of specialising the vanilla meta interpreter through fully automatic and completely general partial deduction techniques. In particular, we study how the homeomorphic embedding relation guides specialisation of the interpreter. We focus on the so-called parsing problem, i.e. removing all parsing overhead from the program, and demonstrate that further refinements in the control of general partial deduction are necessary to properly deal with it. In particular, we modify local control on the basis of information imported from the global level. The resulting control strategy, while remaining fully general, leads to excellent specialisation of vanilla like meta programs. Parsing is always specialised, but — appropriately, as we will show — not always completely removed. As a concrete application, we subject an extended vanilla meta interpreter capable of dealing with compositions of programs to our techniques, showing we equal or surpass results obtained through a more ad hoc approach.

[1]  John P. Gallagher,et al.  Transforming Logic Programs by Specialising Interpreters , 1986, ECAI.

[2]  John P. Gallagher,et al.  Some low-level source transformations of logic programs , 1990 .

[3]  Akikazu Takeuchi,et al.  Partial Evaluation of Prolog Programs and its Application to Meta Programming , 1986, IFIP Congress.

[4]  John P. Gallagher,et al.  Tutorial on specialisation of logic programs , 1993, PEPM '93.

[5]  Leon Sterling,et al.  Metainterpreters for Expert System Construction , 1989, J. Log. Program..

[6]  Antonio Brogi,et al.  Specialising Meta-level Compositions of Logic Programs , 1996, APPIA-GULP-PRODE.

[7]  Roland N. Bol,et al.  Loop checking in partial deduction , 1993, J. Log. Program..

[8]  Robert Glück,et al.  An Algorithm of Generalization in Positive Supercompilation , 1995, ILPS.

[9]  Antonio Brogi,et al.  Meta for Modularising Logic Programming , 1992, META.

[10]  Danny De Schreye,et al.  Why Untyped Nonground Metaprogramming Is Not (Much Of) A Problem , 1995, J. Log. Program..

[11]  Semantics-Based Program Manipulation,et al.  Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM'93, Copenhagen, Denmark, June 14-16, 1993 , 1993, PEPM.

[12]  John W. Lloyd,et al.  Partial Evaluation in Logic Programming , 1991, J. Log. Program..

[13]  D. Pedreschi,et al.  Composition Operators for Logic Theories , 1990 .

[14]  Danny De Schreye,et al.  An almost perfect abstraction operation for partial deduction using characteristic trees , 1995 .

[15]  Corin A. Gurr,et al.  Towards fast and declarative meta-programming , 1995 .

[16]  John W. Lloyd,et al.  Analysis of Meta-Programs , 1989, META.

[17]  Robert Glück,et al.  Controlling Conjunctive Partial Deduction , 1996, PLILP.

[18]  Patricia M. Hill,et al.  Supporting Transformations for the Partial Evaluation of Logic Programs , 1993, J. Log. Comput..

[19]  Antonio Brogi,et al.  Gödel as a Meta-Language for Composing Logic Programs , 1994, META.

[20]  LogicJonas BarklundBox Metaprogramming in Logic , 1994 .

[21]  Bern Martens On the semantics of meta-programming and the control of partial deduction in logic programming , 1994 .

[22]  Harvey Abramson,et al.  Meta-programming in logic programming , 1989 .

[23]  Ehud Shapiro,et al.  Meta interpreters for real , 1988 .

[24]  Danny De Schreye,et al.  Automatic Finite Unfolding Using Well-Founded Measures , 1996, J. Log. Program..

[25]  Danny De Schreye,et al.  Why untyped non-ground meta-programming is not (much of) of problem , 1992 .

[26]  Michael Leuschel,et al.  Conjunctive Partial Deduction in Practice , 1996, LOPSTR.

[27]  Danny De Schreye,et al.  A Conceptual Embedding of Folding into Partial Deduction: Towards a Maximal Integration , 1996, JICSLP.

[28]  Leon Sterling,et al.  The Art of Prolog , 1987, IEEE Expert.

[29]  Michael Leuschel,et al.  Global Control for Partial Deduction through Characteristic Atoms and Global Trees , 1996, Dagstuhl Seminar on Partial Evaluation.

[30]  Danny De Schreye,et al.  Tutorial on Program Specialisation (Abstract) , 1995, ILPS.

[31]  P. M. Hill,et al.  Meta-Programming in Logic Progamming , 1998 .

[32]  Danny De Schreye,et al.  Controlling generalization and polyvariance in partial deduction of normal logic programs , 1998, TOPL.

[33]  Stephen Owen,et al.  Issues in the Partial Evaluation of Meta-Interpreters , 1989, META.

[34]  John P. Gallagher,et al.  Ensuring Global Termination of Partial Deduction while Allowing Flexible Polyvariance , 1995, ICLP.

[35]  Robert Glück,et al.  Controlling conjunctive partial deduction of definite logic programs , 1996 .

[36]  Michael Leuschel,et al.  Ecological Partial Deduction: Preserving Characteristic Trees Without Constraints , 1995, LOPSTR.