A Structured Presentation of a Closure-Based Compilation Method for a Scoping Notion in Logic Programming

We present a systematic reconstruction of a compilation method for an extension to logic programming that permits procedure de nitions to be given a scope. At a logical level, this possibility is realized by permitting implications to be embedded in goals. Program clauses that appear in the antecedents of such implications may contain variables that are bound by external quanti ers, leading to non-local variables in procedure declarations. In compiling programs in this extended language, there is, therefore, a need to consider the addition to given programs of program clauses that are parameterized by bindings for some of their variables. A proposed approach to dealing with this aspect uses a closure representation for clauses. This representation separates an instance of a clause with parameterized bindings into a skeleton part that is xed at compile-time and an environment that maintains the part that is dynamically determined. A development of this implementation scheme is provided here by starting with an abstract interpreter for the language and then re ning this to arrive at an interpreter that uses the closure representation for clauses. The abstract state machine formalism of Gurevich is used in specifying the interpreters that are of interest at the two di erent stages. We also justify this re nement by showing that the essential notion of a computation is preserved by the re nement and thus the re nement is a correct one.

[1]  Gopalan Nadathur,et al.  Scoping Constructs in Logic Programming: Implementation Problems and their Solutions , 1995, J. Log. Program..

[2]  Dov M. Gabbay,et al.  N-Prolog: An Extension of Prolog with Hypothetical Implications I , 1984, J. Log. Program..

[3]  Evelina Lamma,et al.  An Extended Warren Abstract Machine for the Execution of Structured Logic Programs , 1992, J. Log. Program..

[4]  L. Thorne McCarty,et al.  Clausal Intuitionistic Logic II - Tableau Proof Procedures , 1988, J. Log. Program..

[5]  Gopalan Nadathur,et al.  Hereditary Harrop Formulas and Uniform Proof Systems , 1987, Logic in Computer Science.

[6]  Yuri Gurevich,et al.  Algebraic Operational Semantics and Occam , 1990, CSL.

[7]  Egon Börger,et al.  The WAM - Definition and Compiler Correctness , 1995, Logic Programming: Formal Methods and Practical Applications.

[8]  Dale Miller,et al.  A Logical Analysis of Modules in Logic Programming , 1989, J. Log. Program..

[9]  Egon Börger,et al.  A Logical Operational Semantics of Full Prolog. Part I: Selection Core and Control , 1989, CSL.

[10]  Dale A. Miller,et al.  AN OVERVIEW OF PROLOG , 1988 .

[11]  Gopalan Nadathur,et al.  Uniform Proofs as a Foundation for Logic Programming , 1991, Ann. Pure Appl. Log..

[12]  L. Thorne McCarty,et al.  Clausal Intuitionistic Logic I - Fixed-Point Semantics , 1988, J. Log. Program..

[13]  Luís Monteiro,et al.  Contextual Logic Programming , 1989, ICLP.

[14]  Egon Börger,et al.  A Logical Operational Semantics of Full Prolog, Part II: Built-in Predicates for Database Manipulation , 1990, MFCS.

[15]  Yuri Gurevich,et al.  Algebraic Operational Semantics and Modula-2 , 1987, CSL.

[16]  Dale Miller,et al.  Logic Programming in a Fragment of Intuitionistic Linear Logic , 1994, Inf. Comput..

[17]  Dale Miller,et al.  A multiple-conclusion meta-logic , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.