Results 1 -
7 of
7
Higher-order logic programming
- HANDBOOK OF LOGIC IN AI AND LOGIC PROGRAMMING, VOLUME 5: LOGIC PROGRAMMING. OXFORD (1998
"... ..."
Scoping Constructs In Logic Programming: Implementation Problems And Their Solution
, 1995
"... Machine (WAM). The provision of implications in goals results in the possibility of program clauses being added to the program for the purpose of solving specific subgoals. A naive scheme based on asserting and retracting program clauses does not suffice for implementing such additions for two reaso ..."
Abstract
-
Cited by 19 (9 self)
- Add to MetaCart
Machine (WAM). The provision of implications in goals results in the possibility of program clauses being added to the program for the purpose of solving specific subgoals. A naive scheme based on asserting and retracting program clauses does not suffice for implementing such additions for two reasons. First, it is necessary to also support the resurrection of an earlier existing program in the face of backtracking. Second, the possibility for implication goals to be surrounded by quantifiers requires a consideration of the parameterization of program clauses by bindings for their free variables. Devices for supporting these additional requirements are described as also is the integration of these devices into the WAM. Further extensions to the machine are outlined for handling higher-order additions to the language. The ideas Work on this paper has been partially supported by NSF Grants CCR-89-05825 and CCR-- 92-08465. Address correspondence to Gopalan Nadathur, Department of Compute...
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...
Implementing a Notion of Modules in the Logic Programming Language Prolog
- In Evelina Lamma and Paola Mello, editors, Extensions of Logic Programming: Proceedings of the Third International Workshop
, 1993
"... Issues concerning the implementation of a notion of modules in the higher-order logic programming language Prolog are examined. A program in this language is a composite of type declarations and procedure definitions. The module construct that is considered permits large collections of such declarat ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
Issues concerning the implementation of a notion of modules in the higher-order logic programming language Prolog are examined. A program in this language is a composite of type declarations and procedure definitions. The module construct that is considered permits large collections of such declarations and definitions to be decomposed into smaller units. Mechanisms are provided for controlling the interaction of these units and for restricting the visibility of names used within any unit. The typical interaction between modules has both a static and a dynamic nature. The parsing of expressions in a module might require declarations in a module that it interacts with, and this information must be available during compilation. Procedure definitions within a module might utilize procedures presented in other modules and support must be provided for making the appropriate invocation during execution. Our concern here is largely with the dynamic aspects of module interaction. We describe a...
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...
A Treatment of Higher-Order Features in Logic Programming
, 2003
"... The logic programming paradigm provides the basis for a new intensional view of higher-order notions. This view is realized primarily by employing the terms of a typed lambda calculus as representational devices and by using a richer form of unification for probing their structures. These additions ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
The logic programming paradigm provides the basis for a new intensional view of higher-order notions. This view is realized primarily by employing the terms of a typed lambda calculus as representational devices and by using a richer form of unification for probing their structures. These additions have important meta-programming applications but they also pose non-trivial implementation problems. One issue concerns the machine representation of lambda terms suitable to their intended use: an adequate encoding must facilitate comparison operations over terms in addition to supporting the usual reduction computation. Another aspect relates to the treatment of a unification operation that has a branching character and that sometimes calls for the delaying of the solution of unification problems. A final issue concerns the execution of goals whose structures becomes apparent only in the course of computation. These various problems are exposed in this paper and solutions to them are described. A satisfactory representation for lambda terms is developed by exploiting the nameless notation of de Bruijn as well as explicit encodings of substitutions. Special mechanisms are molded into the structure of traditional Prolog implementations to support branching in unification and carrying of unication problems over other computation steps; a premium is placed in this context on exploiting determinism and on emulating usual first-order behaviour. An extended compilation model is presented that treats higher-order unification and also handles dynamically emergent goals. The ideas described here have been employed in the Teyjus implementation of the Prolog language, a fact that is used to obtain a preliminary assessment of their efficacy.

