Results 1 - 10
of
12
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...
Run time type information in Mercury
- In Proceedings of the 1999 International Conference on the Principles and Practice of Declarative Programming
, 1999
"... . The logic/functional language Mercury uses a strong, mostly static type system based on polymorphic many-sorted logic. For eÆ- ciency, the Mercury compiler uses type specic representations of terms, and implements polymorphic operations such as unications via generic code invoked with descriptions ..."
Abstract
-
Cited by 14 (6 self)
- Add to MetaCart
. The logic/functional language Mercury uses a strong, mostly static type system based on polymorphic many-sorted logic. For eÆ- ciency, the Mercury compiler uses type specic representations of terms, and implements polymorphic operations such as unications via generic code invoked with descriptions of the actual types of the operands. These descriptions, which consist of automatically generated data and code, are the main components of the Mercury runtime type information (RTTI) system. We have used this system to implement several extensions of the Mercury system, including an escape mechanism from static type checking, generic input and output facilities, a debugger, and automatic memoization, and we are in the process of using it for an accurate, native garbage collector. We give detailed information on the implementation and uses of the Mercury RTTI system as well as measurements of the space costs of the system. 1 Introduction Many modern functional and logic programming lang...
Typed Hybrid Description Logic Programs with Order-Sorted Semantic Web Type Systems based on
- University Munich
, 2006
"... Abstract. In the recent years rule-based programming in terms of declarative logic programming has formed the basis for many Artificial Intelligence (AI) applications and is well integrated in the mainstream information technology capturing higher-level decision logics. Typically, the standard rule ..."
Abstract
-
Cited by 13 (6 self)
- Add to MetaCart
Abstract. In the recent years rule-based programming in terms of declarative logic programming has formed the basis for many Artificial Intelligence (AI) applications and is well integrated in the mainstream information technology capturing higher-level decision logics. Typically, the standard rule systems and rule-based logic programming languages such as Prolog derivatives are based on the untyped theory of predicate calculus with untyped logical objects (untyped terms), i.e. the logical reasoning algorithms apply pure syntactical reasoning. From a rule engineering perspective this is a serious restriction which lacks major Software Engineering principles such as data abstraction or modularization, which become more and more important when rule applications grow larger and more complex. To support such principles in logic programming and capture the rule engineer’s intended meaning of a logic program, types and typed objects play an important role. Moreover, from a computational point of view, the use of types drastically reduces the search space, i.e. proofs can be kept at a more abstract level and it offers the option to restrict the application of rules and to
Proof-Theoretic Foundation of Compilation in Logic Programming Languages
- Proceedings of the Joint International Conference and Symposium on Logic Programming (JICSLP’98
"... Commercial implementations of logic programming languages are engineered Appeared in the Proceedings of the 1998 Joint International Conference and Symposium on Logic Programming --- JICSLP'98 (J. Jaffar editor), pp ??--??, MIT Press, Manchester, UK, 16--19 June 1998. around a compiler based on War ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
Commercial implementations of logic programming languages are engineered Appeared in the Proceedings of the 1998 Joint International Conference and Symposium on Logic Programming --- JICSLP'98 (J. Jaffar editor), pp ??--??, MIT Press, Manchester, UK, 16--19 June 1998. around a compiler based on Warren's Abstract Machine (WAM) or a variant of it. In spite of various correctness proofs, the logical machinery relating the proof-theoretic specification of a logic programming language and its compiled form is still poorly understood. In this paper, we propose a logicindependent definition of compilation for logic programming languages. We apply this methodology to derive the first cut of a compiler and the corresponding abstract machine for the language of hereditary Harrop formulas and then for its linear refinement. 1 Introduction Compiled logic programs run over an order of magnitude faster than their interpreted source and constitute therefore a key step to combining the advantages of...
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 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.
Realizing Modularity in λProlog
- THE JOURNAL OF FUNCTIONAL AND LOGIC PROGRAMMING
, 1999
"... The language λProlog incorporates a module notion that permits the space of names and procedure declarations to be decomposed into smaller units. Interactions between these units can take place through either an accumulation or importation process. There are both static and dynamic e#ects to such in ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
The language λProlog incorporates a module notion that permits the space of names and procedure declarations to be decomposed into smaller units. Interactions between these units can take place through either an accumulation or importation process. There are both static and dynamic e#ects to such interactions: The parsing of expressions may require names declared in another module, and executable code may utilize procedures defined elsewhere. We describe a method for implementing this feature for modular programming that is based on the separate compilation of each module into an appropriate fragment of code. The dynamic semantics of module importation involves enhancing existing program contexts with the procedures defined in other modules. This effect is achieved through a run-time process for including the compiler-generated code for such procedures. Our implementation method partitions the code space into distinct chunks ...
Optimizing the runtime processing of types in a higher-order logic programming language
- Proceedings of the 12th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR’05
, 2005
"... Abstract. The traditional purpose of types in programming languages of providing correctness assurances at compile time is increasingly being supplemented by a direct role for them in the computational process. In the specific context of typed logic programming, this is manifest in their effect on t ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract. The traditional purpose of types in programming languages of providing correctness assurances at compile time is increasingly being supplemented by a direct role for them in the computational process. In the specific context of typed logic programming, this is manifest in their effect on the unification operation. Their influence takes two different forms. First, in a situation where polymorphism is permitted, type information is needed to determine if different occurrences of the same name in fact denote an identical constant. Second, type information may determine the specific form of a binding for a variable. When types are needed for the second purpose as in the case of higher-order unification, these have to be available with every variable and constant. However, in many situations such as first-order and higher-order pattern unification it turns out that types have no impact on the variable binding process. As a consequence, type examination is needed in these situations only for the first of the two purposes described and even here a careful preprocessing can considerably reduce their runtime footprint. We develop a scheme for treating types in these contexts that exploits this observation. Under this scheme, type information is elided in most cases and is embedded into term structure when this is not entirely possible. Our approach obviates types when properties known as definitional genericity and type preservation are satisfied and has the advantage of working even when these conditions are violated. 1

