Efficient Functional Unification and Substitution
نویسندگان
چکیده
Implementations of language processing systems often use unification and substitution to compute desired properties of input language fragments; for example when inferring a type for an expression. Purely functional implementations of unification and substitution usually directly correspond to the formal specification of language properties. Unfortunately the concise and understandable formulation comes with gross inefficiencies. A seond appoach is to focus on efficiency of implementation. However, efficient implementations of unification and substitution forgo pure functionality and rely on side effects. We present a third, ‘best of both worlds’, solution, which is both purely functional and efficient by simulating side effects functionally. We compare the three approaches side by side on implementation and performance. Our work can be seen as the practical counterpart of explicit substitution in a functional setting.
منابع مشابه
Efficient representations for triangular substitutions: A comparison in miniKanren
Unification, a fundamental process for logic programming systems, relies on the ability to efficiently look up values of variables in a substitution. Triangular substitutions, which allow associations to variables that are themselves bound by another association, are an attractive choice for purely functional implementations of logic programming systems because of their fast extension time and ...
متن کاملEfficient Unification of Quantified Terms
D Conventional logic-programming languages rely fundamentally on symbolic computation with quantifier-free terms. Much theoretical logic uses the richer vocabulary of quantified terms, however. In this paper we sketch some first steps in a program of research for developing data structures and algorithms to support efficient computation directly on quantified terms. We describe a simple concept...
متن کاملParallel Processing of Resolution
In this paper, PArallel Resolution Algorithm (PARA) is described to improve the execution efficiency in resolution process. PARA consists of two parts: parallel unification and generation of a resolvent. The first part is characteristic of PARA, which partitions whole set of expressions W into independent clusters as pre-processing and unifies each cluster in parallel. The efficient implementat...
متن کاملHigher - Order Unification via Explicit Substitutions at a Distance
We adapted the unification procedure of Huet for a family of explicit substitutions (ES) calculi. The novelty of this adaptation is that it works for calculi with explicit substitutions that belong to the paradigm known as “at a distance”. In this kind of calculi, which have attracted quite some attention due to their simplicity and applicability, the substitution operation is not propagated ov...
متن کاملConjoinability and unification in Lambek categorial grammars
Recently, learning algorithms in Gold’s model have been proposed for some particular classes of classical categorial grammars [Kan98]. We are interested here in learning Lambek categorial grammars. In general grammatical inference uses unification and substitution. In the context of Lambek categorial grammars it seems appropriate to incorporate an operation on types based both on deduction (Lam...
متن کامل