Results 11  20
of
25
A FineGrained Notation for Lambda Terms and Its Use in Intensional Operations
 Journal of Functional and Logic Programming
, 1996
"... We discuss issues relevant to the practical use of a previously proposed notation for lambda terms in contexts where the intensions of such terms have to be manipulated. This notation uses the `nameless' scheme of de Bruijn, includes expressions for encoding terms together with substitutions to be p ..."
Abstract

Cited by 25 (9 self)
 Add to MetaCart
We discuss issues relevant to the practical use of a previously proposed notation for lambda terms in contexts where the intensions of such terms have to be manipulated. This notation uses the `nameless' scheme of de Bruijn, includes expressions for encoding terms together with substitutions to be performed on them and contains a mechanism for combining such substitutions so that they can be effected in a common structure traversal. The combination mechanism is a general one and consequently difficult to implement. We propose a simplification to it that retains its functionality in situations that occur commonly in fireduction. We then describe a system for annotating terms to determine if they can be affected by substitutions generated by external ficontractions. These annotations can lead to a conservation of space and time in implementations of reduction by permitting substitutions to be performed trivially in certain situations. The use of the resulting notation in the reduction...
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 21 (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 higherorder additions to the language. The ideas Work on this paper has been partially supported by NSF Grants CCR8905825 and CCR 9208465. Address correspondence to Gopalan Nadathur, Department of Compute...
Implementing Polymorphic Typing in a Logic Programming Language
 COMPUTER LANGUAGES
, 1993
"... Introducing types into a logic programming language leads to the need for typed unification within the computation model. In the presence of polymorphism and higherorder features, this aspect forces analysis of types at runtime. We propose extensions to the Warren Abstract Machine (WAM) that permi ..."
Abstract

Cited by 18 (11 self)
 Add to MetaCart
Introducing types into a logic programming language leads to the need for typed unification within the computation model. In the presence of polymorphism and higherorder features, this aspect forces analysis of types at runtime. We propose extensions to the Warren Abstract Machine (WAM) that permit such analysis to be done with reasonable efficiency. Much information about the structures of types is present at compiletime, and we show that this information can be used to considerably reduce the work during execution. We illustrate our ideas in the context of a typed version of Prolog. We describe a modified representation for terms, new instructions and additional data areas that in conjunction with existing WAM structures suffice to implement this language. The nature of compiled code is illustrated through examples, and the kind of runtime overheads that are incurred for processing types is analyzed, especially in those cases where others have shown that type checking can be eliminated during execution. The ideas
Implementation Considerations for HigherOrder Features in Logic Programming
, 1993
"... This paper examines implementation problems that arise from providing for aspects of higherorder programming within and enhancing the metalanguage abilities of logic programming. One issue of concern is a representation for the simplytyped lambda terms that replace the usual firstorder terms as ..."
Abstract

Cited by 14 (10 self)
 Add to MetaCart
This paper examines implementation problems that arise from providing for aspects of higherorder programming within and enhancing the metalanguage abilities of logic programming. One issue of concern is a representation for the simplytyped lambda terms that replace the usual firstorder terms as data structures; this representation must support an efficient realization of ...conversion operations on these terms. Another issue is the handling of higherorder 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 depthfirst 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 firstorder 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...
A Notation for Lambda Terms II: Refinements and Applications
, 1994
"... Issues that are relevant to the representation of lambda terms in contexts where their intensions have to be manipulated are examined. The basis for such a representation is provided by the suspension notation for lambda terms that is described in a companion paper. This notation obviates ffconver ..."
Abstract

Cited by 12 (2 self)
 Add to MetaCart
Issues that are relevant to the representation of lambda terms in contexts where their intensions have to be manipulated are examined. The basis for such a representation is provided by the suspension notation for lambda terms that is described in a companion paper. This notation obviates ffconversion in the comparison of terms by using the `nameless' scheme of de Bruijn and also permits a delaying of substitutions by including a class of terms that encode other terms together with substitutions to be performed on them. The suspension notation contains a mechanism for `merging' substitutions so that they can be effected in a common structure traversal. The mechanism is cumbersome to implement in its full generality and a simplification to it is considered. In particular, the old merging operations are eliminated in favor of new ones that capture some of their functionality and that permit a simplified syntax for terms. The resulting notation is refined by the addition of annotations ...
Unification via the ...Style of Explicit Substitutions
, 2001
"... A unication method based on the se style of explicit substitution is proposed. This method together with appropriate translations, provide a Higher Order Unication (HOU) procedure for the pure calculus. Our method is inuenced by the treatment introduced by Dowek, Hardin and Kirchner using the sty ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
A unication method based on the se style of explicit substitution is proposed. This method together with appropriate translations, provide a Higher Order Unication (HOU) procedure for the pure calculus. Our method is inuenced by the treatment introduced by Dowek, Hardin and Kirchner using the style of explicit substitution. Correctness and completeness properties of the proposed seunication method are shown and its advantages, inherited from the qualities of the se calculus, are pointed out. Our method needs only one sort of objects: terms. And in contrast to the HOU approach based on the calculus, it avoids the use of substitution objects. This makes our method closer to the syntax of the calculus. Furthermore, detection of redices depends on the search for solutions of simple arithmetic constraints which makes our method more operational than the one based on the style of explicit substitution. Keywords: Higher order unication, explicit substitution, lambdacalculi. 1
Lightweight Lemmas in λ Prolog
, 1999
"... λProlog is known to be wellsuited for expressing and implementing logics and inference systems. We show that lemmas and definitions in such logics can be implemented with a great economy of expression. The terms of the metalanguage (λProlog) can be used to express the statement of a lemma, and the ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
λProlog is known to be wellsuited for expressing and implementing logics and inference systems. We show that lemmas and definitions in such logics can be implemented with a great economy of expression. The terms of the metalanguage (λProlog) can be used to express the statement of a lemma, and the type checking of the metalanguage can directly implement the type checking of the lemma. The MLstyle prenex polymorphism of lProlog allows easy expression of polymorphic inference rules, but a more general polymorphism would be necessary to express polymorphic lemmas directly. We discuss both the Terzo and Teyjus implementations of λProlog as well as related systems such as Elf.
Polymorphic Lemmas and Definitions in λProlog and Twelf
 THEORY AND PRACTICE OF LOGIC PROGRAMMING
, 2004
"... λProlog is known to be wellsuited for expressing and implementing logics and inference systems. We show that lemmas and definitions in such logics can be implemented with a great economy of expression. We encode a higherorder logic using an encoding that maps both terms and types of the object log ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
λProlog is known to be wellsuited for expressing and implementing logics and inference systems. We show that lemmas and definitions in such logics can be implemented with a great economy of expression. We encode a higherorder logic using an encoding that maps both terms and types of the object logic (higherorder logic) to terms of the metalanguage (AProlog). We discuss both the Terzo and Teyjus implementations of AProlog. We also encode the same logic in Twelf and compare the features of these two metalanguages for our purposes.
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 goaldirected ..."
Abstract

Cited by 2 (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 goaldirected 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 semidecidable and infinitary unification theory, and it introduces the need for a fireduction operation at runtime. MALI is an abstract memory that is suitable for storing the searchstate of depthfirst search processes. Its main feature is its efficient memory management. We have used an original PrologtoC translation: predicates are trans...
Compilation of Head and Strong Reduction
 In ESOP
, 1994
"... : Functional language compilers implement only weakhead reduction. However, there are cases where head normal forms or full normal forms are needed. Here, we study how to use cps conversion for the compilation of head and strong reductions. We apply cps expressions to a special continuation so that ..."
Abstract
 Add to MetaCart
: Functional language compilers implement only weakhead reduction. However, there are cases where head normal forms or full normal forms are needed. Here, we study how to use cps conversion for the compilation of head and strong reductions. We apply cps expressions to a special continuation so that their head or strong normal form can be obtained by the usual weakhead reduction. We remain within the functional framework and no special abstract machine is needed. Used as a preliminary step our method allows a standard compiler to evaluate under l's. Keywords: lcalculus, Cps conversion, Head and Strong Reduction, Compilation (Rsum : tsvp) email: fradet@irisa.fr Compilation de la rduction forte et de tte Rsum : Les compilateurs de langages fonctionnels ne mettent en oeuvre que la rduction faible. En certaines occasions il est ncessaire d'valuer des formes normales ou des formes normales de tte. Nous tudions ici comment la transformation cps ("continuation passing style") peut tre...