10 research outputs found

    A Variant of Higher-Order Anti-Unification

    Get PDF
    We present a rule-based Huet's style anti-unification algorithm for simply-typed lambda-terms in η-long -normal form, 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. The algorithm computes it in cubic time within linear space. It has been implemented and the code is freely available. © Alexander Baumgartner, Temur Kutsia, Jordi Levy, and Mateu Villaret; licensed under Creative Commons License CC-BY 24th International Conference on Rewriting Techniques and Applications (RTA'13).This research has been partially supported by the projects HeLo (TIN2012-33042) and TASSAT (TIN2010-20967-C04-01), by the Austrian Science Fund (FWF) with the project SToUT (P 24087-N18) and by the Generalitat de Catalunya with the grant AGAUR 2009-SGR-1434.Peer Reviewe

    Higher-Order Pattern Anti-Unification in Linear Time

    Get PDF
    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

    Towards a Substitution Tree Based Index for Higher-order Resolution Theorem Provers

    Get PDF
    Abstract One of the reasons that forward search methods, like resolution, are efficient in practice is their ability to utilize many optimization techniques. One such technique is subsumption and one way of utilizing subsumption efficiently is by indexing terms using substitution trees. In this paper we describe an attempt to extend such indexes for the use of higher-order resolution theorem provers. Our attempt tries to handle two difficulties which arise when extending the indexes to higher-order. The first difficulty is the need for higher-order anti-unification. The second difficulty is the closure of clauses under associativity and commutativity. We present some techniques which attempt to solve these two problems

    Higher-Order Equational Pattern Anti-Unification

    Get PDF
    We consider anti-unification for simply typed lambda terms in associative, commutative, and associative-commutative theories and develop a sound and complete algorithm which takes two lambda terms and computes their generalizations in the form of higher-order patterns. The problem is finitary: the minimal complete set of generalizations contains finitely many elements. We define the notion of optimal solution and investigate special fragments of the problem for which the optimal solution can be computed in linear or polynomial time

    A Generic Framework for Higher-Order Generalizations

    Get PDF
    We consider a generic framework for anti-unification of simply typed lambda terms. It helps to compute generalizations which contain maximally common top part of the input expressions, without nesting generalization variables. The rules of the corresponding anti-unification algorithm are formulated, and their soundness and termination are proved. The algorithm depends on a parameter which decides how to choose terms under generalization variables. Changing the particular values of the parameter, we obtained four new unitary variants of higher-order anti-unification and also showed how the already known pattern generalization fits into the schema

    Towards a Substitution Tree Based Index for Higher-order Resolution Theorem Provers

    Get PDF
    International audienceOne of the reasons that forward search methods, like resolution, are efficient in practice is their ability to utilize many optimization techniques. One such technique is subsumption and one way of utilizing subsumption efficiently is by indexing terms using substitution trees. In this paper we describe an attempt to extend such indexes for the use of higher-order resolution theorem provers. Our attempt tries to handle two difficulties which arise when extending the indexes to higher-order. The first difficulty is the need for higher-order anti-unification. The second difficulty is the closure of clauses under associativity and com-mutativity. We present some techniques which attempt to solve these two problems

    Variants of unification considering compression and context variables

    Get PDF
    Term unification is a basic operation in several areas of computer science, specially in those related to logic. Generally speaking, it consists on solving equations over expressions called terms. Depending on the kind of variables allowed to occur in the terms and under which conditions two terms are considered to be equal, several frameworks of unification such as first-order unification, higher-order unification, syntactic unification, and unification modulo theories can be distinguished. Moreover, other variants of term unification arise when we consider nontrivial representations for terms. In this thesis we study variants of the classic first-order syntactic term unification problem resulting from the introduction of context variables, i.e. variables standing for contexts, and/or assuming that the input is given in some kind of compressed representation. More specifically, we focus on two of such compressed representations: the well-known Directed Acyclic Graphs (DAGs) and Singleton Tree Grammars (STGs). Similarly as DAGs allow compression by exploiting the reusement of repeated instances of a subterm in a term, STGs are a grammar-based compression mechanism based on the reusement of repeated (multi)contexts. An interesting property of the STG formalism is that many operations on terms can be efficiently performed directly in their compressed representation thus taking advantage of the compression also when computing with the represented terms. Although finding a minimal STG representation of a term is computationally difficult, this limitation has been successfully overcome is practice, and several STG-compressors for terms are available. The STG representation has been applied in XML processing and analysis of Term Rewrite Systems. Moreover, STGs are a very useful concept for the analysis of unification problems since, roughly speaking, allow to represent solutions in a succinct but still efficiently verifiable form.La unificació de termes és una operación básica en diverses àrees de la informática, especialment en aquelles relacionades amb la lógica. En termes generals, consisteix en resoldre equacions sobre expressions anomenades termes. Depenent del tipus de variables que apareguin en els termes i de sota quines condicions dos termes són considerats iguals, podem definir diverses variants del problema d'unificació de termes. A més a més, altres variants del problema d'unificació de termes sorgeixen quan considerem representacions no trivials per als termes. S'estudia variants del problema clàssic d'unificació sintáctica de primer ordre resultants de la introducció de variables de context i/o de l'assumpció de que l'entrada és donada en format comprimit. Ens centrem en l'estudi de dues representacions comprimides: els grafs dirigits acíclics i les gramàtiques d'arbre singletó. Similarment a com els grafs dirigits acíclics permeten compressió mitjançant el reús d'instàncies repetides d'un mateix subterme, les gramàtiques d'arbres singletó són un sistema de compressió basat en el reús de (multi)contexts. Una propietat interessant d'aquest formalisme és que moltes de les operacions comuns sobre termes es poden realizar directament sobre la versió comprimida d'aquests de forma eficient, sense cap mena de descompressió prèvia. Tot i que trobar una representació minimal d'un terme amb una gramática singletó és una tasca computacionalment difícil, aquesta limitació ha estat resolta de forma satisfactòria en la pràctica, hi ha disponibles diversos compressors per a termes. La representació de termes amb gramàtiques singletó ha estat útil per al processament de documents XML i l'anàlisi de sistemes de reescriptura de termes. Les gramàtiques singletó són concepte molt útil per a l'anàlisi de problemas d'unificació, ja que permeten representar solucions de forma comprimida sense renunciar a que puguin ser verificades de forma eficient. A la primera part d'aquesta tesi s'estudien els problemas d'unificació i matching de primer ordre sota l'assumpció de que els termes de l'entrada són representats fent servir gramàtiques singletó. Presentem algorismes de temps polinòmic per a aquests problemas, així com propostes d'implementacions i resultats experimentals. Aquests resultats s'utilitzen més endevant en aquesta tesi per a l'anàlisi de problemes d'unificació i matching amb variables de contexte i entrada comprimida. A la resta d'aquesta tesi ens centrem en variants d'unificació amb variables de contexte, que són un cas particular de variables d'ordre superior. Més concretament, a la segona part d'aquesta tesi, ens centrem en un cas particular d'unificació de contextes on nomès es permet una sola variable de context en l'entrada. Aquest problema s'anomena "one context unification". Mostrem que aquest problema es pot resoldre en temps polinòmic indeterminista, no només quan els termes de l'entrada són representats de forma explícita, sino també quan es representen fent servir grafs dirigits acíclics i gramàtiques singletó. També presentem un resultat parcial recent en la tasca de trobar un algorisme de temps polinòmic per a one context unification. Al final de la tesi, estudiem el problema de matching per a entrades amb variables de contexte, que és un cas particular d'unificació on només un dels dos termes de cada equació té variables. En contrast amb el problema general, matching de contextes ha estat classificat com a problema NP-complet. Mostrem que matching de contextes és NP-complet fins i tot quan es fan servir gramàtiques com a formalisme de representació de termes. Això implica que afegir compressió no ens porta a un augment dràstic de la complexitat del problema. També demostrem que la restricció de matching de contextes on el nombre de variables de contexte està afitat per una constant fixa del problema es pot resoldre en temps polinòmic, fins i tot quan es fan servir grafs dirigits acíclics com formalisme de representació de terme

    A Variant of Higher-Order Anti-Unification

    Get PDF
    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. The algorithm computes it in cubic time within linear space. It has been implemented and the code is freely available

    A Variant of Higher-Order Anti-Unification

    No full text
    We present a rule-based Huet’s style anti-unification algorithm for simply-typed lambda-terms in ɳ long β normal form, 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. The algorithm computes it in cubic time within linear space. It has been implemented and the code is freely availabl
    corecore