3 research outputs found
Higher-Order Pattern Anti-Unification in Linear Time
We present a rule-based Huet’s style anti-unification algorithm for simply typed lambda-terms, which computes a least general higher-order pattern generalization. For a pair of arbitrary terms of the same type, such a generalization always exists and is unique modulo α-equivalence and variable renaming. With a minor modification, the algorithm works for untyped lambda-terms as well. The time complexity of both algorithms is linear.This research has been partially supported by the Austrian Science Fund (FWF) project SToUT (P 24087-N18), the Upper Austrian Government strategic program “Innovatives OÖ 2010plus”, the MINECO projects RASO (TIN2015-71799-C2-1-P) and HeLo (TIN2012-33042), the MINECO/FEDER UE project LoCoS (TIN2015-66293-R) and the UdG project MPCUdG2016/055.Peer Reviewe
Practical higher-order pattern unification with on-the-fly raising
Abstract. Higher-order pattern unification problems arise often in computations carried out within systems such as Twelf, λProlog and Isabelle. An important characteristic of such problems is that they are given by equations appearing under a prefix of alternating universal and existential quantifiers. Existing algorithms for solving these problems assume that such prefixes are simplified to a ∀∃ ∀ form by an a priori application of a transformation known as raising. There are drawbacks to this approach. Mixed quantifier prefixes typically manifest themselves in the course of computation, thereby requiring a dynamic form of preprocessing that is difficult to support in low-level implementations. Moreover, raising may be redundant in many cases and its effect may have to be undone by a subsequent pruning transformation. We propose a method to overcome these difficulties. In particular, a unification algorithm is described that proceeds by recursively descending through the structures of terms, performing raising and other transformations on-the-fly and only as needed. This algorithm also exploits an explicit substitution notation for lambda terms.
An Implementation of the Language Lambda Prolog Organized around Higher-Order Pattern Unification
This thesis concerns the implementation of Lambda Prolog, a higher-order
logic programming language that supports the lambda-tree syntax approach to
representing and manipulating formal syntactic objects. Lambda Prolog achieves
its functionality by extending a Prolog-like language by using typed lambda
terms as data structures that it then manipulates via higher-order unification
and some new program-level abstraction mechanisms. These additional features
raise new implementation questions that must be adequately addressed for Lambda
Prolog to be an effective programming tool. We consider these questions here,
providing eventually a virtual machine and compilation based realization. A key
idea is the orientation of the computation model of Lambda Prolog around a
restricted version of higher-order unification with nice algorithmic properties
and appearing to encompass most interesting applications. Our virtual machine
embeds a treatment of this form of unification within the structure of the
Warren Abstract Machine that is used in traditional Prolog implementations.
Along the way, we treat various auxiliary issues such as the low-level
representation of lambda terms, the implementation of reduction on such terms
and the optimized processing of types in computation. We also develop an actual
implementation of Lambda Prolog called Teyjus Version 2. A characteristic of
this system is that it realizes an emulator for the virtual machine in the C
language a compiler in the OCaml language. We present a treatment of the
software issues that arise from this kind of mixing of languages within one
system and we discuss issues relevant to the portability of our virtual machine
emulator across arbitrary architectures. Finally, we assess the the efficacy of
our various design ideas through experiments carried out using the system