Results 1 - 10
of
16
Higher-order logic programming
- HANDBOOK OF LOGIC IN AI AND LOGIC PROGRAMMING, VOLUME 5: LOGIC PROGRAMMING. OXFORD (1998
"... ..."
Implementing Tactics and Tacticals in a Higher-Order Logic Programming Language
- Journal of Automated Reasoning
, 1993
"... We argue that a logic programming language with a higher-order intuitionistic logic as its foundation can be used both to naturally specify and implement tactic style theorem provers. The language extends traditional logic programming languages by replacing first-order terms with simply-typed -terms ..."
Abstract
-
Cited by 61 (11 self)
- Add to MetaCart
We argue that a logic programming language with a higher-order intuitionistic logic as its foundation can be used both to naturally specify and implement tactic style theorem provers. The language extends traditional logic programming languages by replacing first-order terms with simply-typed -terms, replacing first-order unification with higher-order unification, and allowing implication and universal quantification in queries and the bodies of clauses. Inference rules for a variety of inference systems can be naturally specified in this language. The higher-order features of the language contribute to a concise specification of provisos concerning variable occurrences in formulas and the discharge of assumptions present in many inference systems. Tactics and tacticals, which provide a framework for high-level control over search for proofs, can be directly and naturally implemented in the extended language. This framework serves as a starting point for implementing theorem provers an...
Backtrackable State with Linear Assumptions, Continuations and Hidden Accumulator Grammars
"... A set of executable specifications and efficient implementations of backtrackable state persisting over the current AND-continuation is investigated. At specification level, our primitive operations are a variant of linear and intuitionistic implications, having as consequent the current continuati ..."
Abstract
-
Cited by 18 (11 self)
- Add to MetaCart
A set of executable specifications and efficient implementations of backtrackable state persisting over the current AND-continuation is investigated. At specification level, our primitive operations are a variant of linear and intuitionistic implications, having as consequent the current continuation. On top of them, we introduce a form of hypothetical assumptions which use no explicit quantifiers and have an easy and efficient implementation on top of logic programming systems featuring backtrackable destructive assignment, global variables and simple specifications in term of translation to side-effect free Prolog. A variant of Extended DCGs handling multiple streams without the need of a preprocessing technique, Hidden Accumulator Grammars (HAGs), are specified in terms of linear assumptions. For HAGs, efficiency comparable to that of preprocessing techniques is obtained through a WAM-level implementation of backtrackable destructive assignment, supporting non-deterministic execut...
Implementation Considerations for Higher-Order Features in Logic Programming
, 1993
"... This paper examines implementation problems that arise from providing for aspects of higher-order programming within and enhancing the meta-language abilities of logic programming. One issue of concern is a representation for the simply-typed lambda terms that replace the usual first-order terms as ..."
Abstract
-
Cited by 14 (10 self)
- Add to MetaCart
This paper examines implementation problems that arise from providing for aspects of higher-order programming within and enhancing the meta-language abilities of logic programming. One issue of concern is a representation for the simply-typed lambda terms that replace the usual first-order terms as data structures; this representation must support an efficient realization of ...-conversion operations on these terms. Another issue is the handling of higher-order unification that becomes an integral part of the computational model. An implementation must cater to the branching nature of this operation and also provide a means for temporarily suspending the solution of a unification problem. A final issue concerns the treatment of goals whose structure is not statically apparent. These problems are discussed in detail and solutions to them are described. A representation for lambda terms is presented that uses the de Bruijn "nameless" notation and also permits reduction substitutions to be performed lazily. This notation obviates ...-conversion and also supports an efficient implementation of ...-reduction. Branching in unification is implemented by using a depth-first search strategy with backtracking. A structure that is called a branch point record and is akin to the choice point record of the Warren Abstract Machine (WAM) is described for remembering alternatives in unification. An explicit representation for unification problems is presented that permits sharing and also supports the rapid reinstatement of earlier versions of the problem. The implementation of unification is tuned to yield an efficient solution to first-order like problems, in fact through the use of compiled code as in the WAM. A compilation method is also discussed for goals whose structure changes during execution. Th...
Partial Translation: Towards a Portable and Efficient Prolog Implementation Technology
- Journal of Logic Programming
, 1996
"... We describe a new language translation framework (partial translation) and the application of one of its instances: the C-ification of Binary Prolog. Our partial translation framework compiles selected sequences of emulator instructions down to native code. The technique can be seen as an automatic ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
We describe a new language translation framework (partial translation) and the application of one of its instances: the C-ification of Binary Prolog. Our partial translation framework compiles selected sequences of emulator instructions down to native code. The technique can be seen as an automatic specialization with respect to a given program of the traditional instruction folding techniques used to speed-up emulators. In our implementation, the complex control structure, some large instructions and the management of the symbol table are left to the emulator while the translated code deals with relatively long sequences of simple instructions. After compilation, the generated code is linked with a target language representation of the emulator's byte-code and the emulator itself to form a stand-alone application. The composite runtime system's behavior can be seen as a form of `coroutining' between emulated and native code. The framework supports modular compilation, allows programm...
A Proposal for Modules in λProlog
- WORKSHOP EXTENSIONS OF LOGIC PROGRAMMING, LNAI 798
, 1993
"... Higher-order hereditary Harrop formulas, the underlying logical foundation of λProlog [NM88], are more expressive than first-order Horn clauses, the logical foundation of Prolog. In particular, various forms of scoping and abstraction are supported by the logic of higherorder hereditary Harrop formu ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Higher-order hereditary Harrop formulas, the underlying logical foundation of λProlog [NM88], are more expressive than first-order Horn clauses, the logical foundation of Prolog. In particular, various forms of scoping and abstraction are supported by the logic of higherorder hereditary Harrop formulas while they are not supported by firstorder Horn clauses. Various papers have argued that the scoping and abstraction available in this richer logic can be used to provide for modular programming [Mil89b], abstract data types [Mil89a], and state encapsulation [HM90]. None of these papers, however, have dealt with the problems of programming-in-the-large, that is, the essentially linguistic problems of putting together various different textual sources of code found, say, in different files on a persistent store into one logic program. In this paper, I propose a module system for λProlog and shall focus mostly on its static semantics.
A Proposal for Modules in λProlog
- Workshop Extensions of Logic Programming, LNAI 798
, 1993
"... . Higher-order hereditary Harrop formulas, the underlying logical foundation of Prolog [NM88], are more expressive than first-order Horn clauses, the logical foundation of Prolog. In particular, various forms of scoping and abstraction are supported by the logic of higherorder hereditary Harrop form ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
. Higher-order hereditary Harrop formulas, the underlying logical foundation of Prolog [NM88], are more expressive than first-order Horn clauses, the logical foundation of Prolog. In particular, various forms of scoping and abstraction are supported by the logic of higherorder hereditary Harrop formulas while they are not supported by firstorder Horn clauses. Various papers have argued that the scoping and abstraction available in this richer logic can be used to provide for modular programming [Mil89b], abstract data types [Mil89a], and state encapsulation [HM90]. None of these papers, however, have dealt with the problems of programming-in-the-large, that is, the essentially linguistic problems of putting together various different textual sources of code found, say, in different files on a persistent store into one logic program. In this paper, I propose a module system for Prolog and shall focus mostly on its static semantics. 1 Module syntax should be declarative Several modern p...
Backtrackable Updates
"... Extending (syntactic) unification is essential to the implementation of Logic Programming extensions such as coroutining, constraints, rational terms, and -terms. In most cases, including the above-mentioned extensions, extended (semantic) unification requires a means to perform backtrackable update ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Extending (syntactic) unification is essential to the implementation of Logic Programming extensions such as coroutining, constraints, rational terms, and -terms. In most cases, including the above-mentioned extensions, extended (semantic) unification requires a means to perform backtrackable updates, whichever the way extended unification is provided, i.e. hidden in the language run-time system, or accessible at the language level through a generic interface. There are two main ways of performing backtrackable updates, either through variable substitution or through destructive assignment combined with value-trailing. We review both options and show destructive assignment to be superior. Different value-trailing schemes are compared, including interesting alternatives to the standard time-stamping scheme. The semantics of the infamous built-in predicate setarg/3 is also clarified. Keywords: WAM, attributed variable, destructive assignment, value-trail, time-stamping, extensible unifi...
Avoiding Dynamic Type Checking in a Polymorphic Logic Programming Language
"... For obvious efficiency reasons, it is good to avoid dynamic type-checking in a programming language. The Prolog type system proposed by Mycroft and O'keefe has some good properties which avoid such a runtime overhead. One of this property called type preserving or transparency is a restriction of th ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
For obvious efficiency reasons, it is good to avoid dynamic type-checking in a programming language. The Prolog type system proposed by Mycroft and O'keefe has some good properties which avoid such a runtime overhead. One of this property called type preserving or transparency is a restriction of the polymorphism. This restriction is not compatible with some programming techniques, for example with higher-order predicates.
The Architecture of an Implementation of λProlog: Prolog/Mali
, 1992
"... Prolog is a logic programming language accepting a more general clause form than standard Prolog (namely hereditary Harrop formulas instead of Horn formulas) and using simply typed λ-terms as a term domain instead of first order terms. Despite these extensions, it is still amenable to goal-directed ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Prolog is a logic programming language accepting a more general clause form than standard Prolog (namely hereditary Harrop formulas instead of Horn formulas) and using simply typed λ-terms as a term domain instead of first order terms. Despite these extensions, it is still amenable to goal-directed proofs and can still be given procedural semantics. However, the execution of λProlog programs requires several departures from the standard resolution scheme. First, the augmented clause form causes the program (a set of clauses) and the signature (a set of constants) to be changeable, but in a very disciplined way. Second, the new term domain has a semi-decidable and infinitary unification theory, and it introduces the need for a fi-reduction operation at run-time. MALI is an abstract memory that is suitable for storing the search-state of depth-first search processes. Its main feature is its efficient memory management. We have used an original Prolog-to-C translation: predicates are trans...

