Results 1 - 10
of
10
Meta-Programming in Logic Programming
- Handbook of Logic in Artificial Intelligence and Logic Programming
, 1994
"... data types are facilitated in Godel by its type and module systems. Thus, in order to describe the meta-programming facilities of Godel, a brief account of these systems is given. Each constant, function, predicate, and proposition in a Godel program must be specified by a language declaration. The ..."
Abstract
-
Cited by 43 (3 self)
- Add to MetaCart
data types are facilitated in Godel by its type and module systems. Thus, in order to describe the meta-programming facilities of Godel, a brief account of these systems is given. Each constant, function, predicate, and proposition in a Godel program must be specified by a language declaration. The type of a variable is not declared but inferred from its context within a particular program statement. To illustrate the type system, we give the language declarations that would be required for the program in Figure 1. BASE Name. CONSTANT Tom, Jerry : Name. PREDICATE Chase : Name * Name; Cat, Mouse : Name. Note that the declaration beginning BASE indicates that Name is a base type. In the statement Chase(x,y) !- Cat(x) & Mouse(y). the variables x and y are inferred to be of type Name. Polymorphic types can also be defined in Godel. They are constructed from the base types, type variables called parameters, and type constructors. Each constructor has an arity 1 attached to it. As an...
Specialising the ground representation in the logic programming language Gödel
- PROCEEDINGS OF LOPSTR 93
, 1994
"... Meta-programs form a class of logic programs of major importance. In the past it has proved very difficult to provide a declarative semantics for meta-programs in languages such as Prolog. These problems have been identified as largely being caused by the fact that Prolog fails to handle the necessa ..."
Abstract
-
Cited by 13 (0 self)
- Add to MetaCart
Meta-programs form a class of logic programs of major importance. In the past it has proved very difficult to provide a declarative semantics for meta-programs in languages such as Prolog. These problems have been identified as largely being caused by the fact that Prolog fails to handle the necessary representation requirements adequately. The ground representation is receiving increasing recognition as being necessary to adequately represent meta-programs. However, the expense it incurs has largely precluded its use to date. The logic programming language Gödel is a declarative successor to Prolog. Gödel provides considerable support for meta-programming, in the form of a ground repre-sentation. Using this representation, Gödel meta-programs have the advantage of having a declarative semantics and can be optimised by program specialisation, to execute in a time comparable to equivalent Prolog meta-programs which use a non-ground representation.
A Continuation-Passing Style for Prolog
, 1994
"... We propose a translation of Prolog (including cut, if-then-else and similar constructs) into a first-order continuation-passing style, where (almost) all predicates have one clause and all clauses are binary. The resulting programs can be used as a flexible intermediate representation for compilatio ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
We propose a translation of Prolog (including cut, if-then-else and similar constructs) into a first-order continuation-passing style, where (almost) all predicates have one clause and all clauses are binary. The resulting programs can be used as a flexible intermediate representation for compilation with a number of advantages as compared to Warren's abstract machine and other proposals. We discuss the advantages and disadvantages of this approach. A Continuation-Passing Style for Prolog Thomas Lindgren Computing Science Department, Uppsala University Box 311 751 05 Uppsala e-mail: thomasl@csd.uu.se 1 Introduction The purpose of this paper is to define an intermediate representation for the compilation of Prolog and related languages. Previous research in the functional language community has shown that the continuationpassing style (CPS) may express the control of a computation much in the same way as control flow graphs do in imperative languages. This is promising for advanced...
Efficient Implementation of Unification-Based Grammars
, 1999
"... Contemporary linguistic formalisms such as LFG or HPSG have become so rigorous that it is now possible to view them as very high level declarative programming languages. Consequently, grammars for natural languages can be viewed as programs; this view enables the application of various methods and t ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Contemporary linguistic formalisms such as LFG or HPSG have become so rigorous that it is now possible to view them as very high level declarative programming languages. Consequently, grammars for natural languages can be viewed as programs; this view enables the application of various methods and techniques that were proved useful for programming languages to the study of natural languages. This paper introduces such an application: an implementation technique that is common for logic programming languages, namely the use of an abstract machine, is applied to (a subset of) the ale formalism, originally designed for specifying feature-structure based phrase-structure grammars. Amalia (Abstract MAchine for LInguistic Applications) is an abstract machine specifically tailored for processing ale grammars. It is composed of data structures and a set of instructions, augmented by a compiler from the grammatical formalism to the abstract instructions, and a (portable) interpreter of the abs...
SatAM - An Abstract Machine for Model generation with PUHR Tableaux
, 1998
"... Machine for Model Generation with PUHR Tableaux Alexander von Drach David Sacher Fortgeschrittenenpraktikum Beginn der Arbeit: September 1997 Abgabe der Arbeit: September 1998 Aufgabensteller: Prof. Dr. Fran¸cois Bry Betreuer: Dipl.-Inf. Tim Geisler Dipl.-Inf. Sven Panne 3 Contents 1 Introductio ..."
Abstract
- Add to MetaCart
Machine for Model Generation with PUHR Tableaux Alexander von Drach David Sacher Fortgeschrittenenpraktikum Beginn der Arbeit: September 1997 Abgabe der Arbeit: September 1998 Aufgabensteller: Prof. Dr. Fran¸cois Bry Betreuer: Dipl.-Inf. Tim Geisler Dipl.-Inf. Sven Panne 3 Contents 1 Introduction 1 2 The PUHR Tableau Method 3 3 Systematic Development of an Abstract Machine 5 3.1 Definite Propositional Clauses . . . . . . . . . . . . . . . . . . 6 3.2 Propositional Clauses . . . . . . . . . . . . . . . . . . . . . . 9 3.3 Ground Clauses . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.4 Clauses with Non-Ground Bodies and Ground Heads . . . . . 11 3.5 Non-Ground, Range-restricted Clauses . . . . . . . . . . . . . 15 4 The Implementation -- An Overview 21 5 Concrete Realization of the Abstract Machine 23 5.1 Data Structures and Machine Registers . . . . . . . . . . . . 23 5.1.1 SymbolTable . . . . . . . . . . . . . . . . . . . . . . . 24 5.1.2 Heap . . . . . . . . . . . ....
Declarative Development of Abstract Machines - A Case Study in Bottom-up Execution . . .
, 1995
"... Machines -- A Case-Study in Bottom-up Execution for Logic Databases Lars Degerstedt larde@ida.liu.se Abstract We propose a new declarative method for development of abstract machines. Using this method the abstract machine can be designed by means of stepwise refinement of both control and dat ..."
Abstract
- Add to MetaCart
Machines -- A Case-Study in Bottom-up Execution for Logic Databases Lars Degerstedt larde@ida.liu.se Abstract We propose a new declarative method for development of abstract machines. Using this method the abstract machine can be designed by means of stepwise refinement of both control and data representation. The approach is declarative in the sense that each refinement of the initial computational model respects the declarative reading of its predecessor. The paper suggests to use fixed point characterizations based on a variant of chaotic iteration as computational models. Two classes of transformations of such models, called splittings and restrictions, are identified as the cornerstones of the method. We give sufficient criteria for when these transformations may be used. Ordinary bottomup computation of logic databases is used as an illustrative example throughout the paper. This work has been supported by the Swedish Research Council for Engineering Sciences (TFR). 1 Int...
Visualization as Debugging: Understanding/Debugging the Warren Abstract Machine
"... This paper presents a twofold proposal to understand the Warren Abstract Machine. A stepwise definition of the WAM by using abstract data types (for every WAM component) is briefly presented. Furthermore, we describe a visual environment which can be used for the emulation of the Warren Abstract Mac ..."
Abstract
- Add to MetaCart
This paper presents a twofold proposal to understand the Warren Abstract Machine. A stepwise definition of the WAM by using abstract data types (for every WAM component) is briefly presented. Furthermore, we describe a visual environment which can be used for the emulation of the Warren Abstract Machine. It has been designed as a high level debugger for object oriented programs, following a methodology sketched in the paper. The tool has the capability to show the user the internal behaviour of the WAM during a program execution by showing its components at the desired level of abstraction. The tool provides an interactive and friendly interface. Configurable tracing and dynamic breakpoint location can be used in a simple and coherent way. All the features included in the tool allow for an easy and powerful examination of the WAM.
Compiling Prolog - From the PLM to the WAM and Beyond
, 1990
"... Machine 18 4.1 Memory Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.1.1 WAM Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 WAM Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 ..."
Abstract
- Add to MetaCart
Machine 18 4.1 Memory Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.1.1 WAM Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 WAM Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2.1 Choice point Management Instructions . . . . . . . . . . . . . . . . . . . . . . 21 4.2.2 Environment Creation Instructions . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.3 Unification Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2.4 Unification Failure and Backtracking . . . . . . . . . . . . . . . . . . . . . . . 25 4.2.5 Clause Body Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3 A Complete WAM Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4 Basic WAM Optimizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.1 Environment Trimming . . . . . . . . . . . ...
Towards Computer-Verified Proofs of Correctness of Logic-Programming Interpreters Using Derivations
, 1997
"... of the Dissertation Towards computer-verified proofs of correctness of logic-programming interpreters using derivations by Vernon Ralph Austel Doctor of Philosophy in Computer Science University of California, Los Angeles, 1997 Professor D. Stott Parker, Chair This thesis presents sixteen ..."
Abstract
- Add to MetaCart
of the Dissertation Towards computer-verified proofs of correctness of logic-programming interpreters using derivations by Vernon Ralph Austel Doctor of Philosophy in Computer Science University of California, Los Angeles, 1997 Professor D. Stott Parker, Chair This thesis presents sixteen increasingly refined kinds of derivations and proves that they are equivalent using the HOL proof checker; the first is close to the common one (such as given by Lloyd), while the last is expressed using abstract machine states modeled after the Warren Abstract Machine (WAM). The concept of derivation has never been refined like this in the verification literature. We use these versions of derivation in the first part of a proof of correctness by refinement stages for a simple version of the WAM. Much of the complexity of the WAM is due to details concerning the representation of data (terms and substitutions). We argue that it is simpler to refine data representation before control, and that backtracking should be refined last. Our refinement technique should be applicable to other logic-programming languages such as full Prolog. xii CHAPTER 1
An Abstract Machine for Unification Grammars
, 1997
"... This work could never have been what it is without the support I received from my advisor, Nissim Francez. I am grateful to Nissim for introducing me to this subject, leading and advising me throughout the project, bearing with me when I messed things up and encouraging me all along the way. Many th ..."
Abstract
- Add to MetaCart
This work could never have been what it is without the support I received from my advisor, Nissim Francez. I am grateful to Nissim for introducing me to this subject, leading and advising me throughout the project, bearing with me when I messed things up and encouraging me all along the way. Many thanks are due to the members of my Thesis Committee: Bob Carpenter, Michael Elhadad, Alon Itai, Uzzi Ornan and Mori Rimon. I am especially indebted to Bob for his major help, mostly in the preliminary stages of this project. I also want to thank Uzzi for replacing Nissim when he was on sabbatical. While working on this thesis I spent a fruitful summer in the University of Tübingen, Seminar für Sprachwissenschaft, during which I learned a lot from many discussions. I wish to thank Paul King for his generosity and his wisdom. Thanks are also due to Erhard Hinrichs, Dale Gerdemann, Thilo Götz, Detmar Meurers, John Griffith and Frank Morawietz. I am grateful to Evgeniy Gabrilovich for many fruitful discussions and for going over my code. Special thanks to Holger Maier and Katrine Kirk for their hospitality and their company. Finally, I want to thank Yifat and Galia for being there when I needed it.

