36 research outputs found

    Term-Graph Anti-Unification

    Get PDF
    We study anti-unification for possibly cyclic, unranked term-graphs and develop an algorithm, which computes a minimal complete set of generalizations for them. For bisimilar graphs the algorithm computes the join in the lattice generated by a functional bisimulation. These results generalize anti-unification for ranked and unranked terms to the corresponding term-graphs, and solve also anti-unification problems for rational terms and dags. Our results open a way to widen anti-unification based code clone detection techniques from a tree representation to a graph representation of the code

    Anti-unification and Generalization: A Survey

    Full text link
    Anti-unification (AU), also known as generalization, is a fundamental operation used for inductive inference and is the dual operation to unification, an operation at the foundation of theorem proving. Interest in AU from the AI and related communities is growing, but without a systematic study of the concept, nor surveys of existing work, investigations7 often resort to developing application-specific methods that may be covered by existing approaches. We provide the first survey of AU research and its applications, together with a general framework for categorizing existing and future developments.Comment: Accepted at IJCAI 2023 - Survey Trac

    One or Nothing: Anti-unification over the Simply-Typed Lambda Calculus

    Full text link
    Generalization techniques have many applications, such as template construction, argument generalization, and indexing. Modern interactive provers can exploit advancement in generalization methods over expressive-type theories to further develop proof generalization techniques and other transformations. So far, investigations concerned with anti-unification (AU) over lambda terms and similar type theories have focused on developing algorithms for well-studied variants. These variants forbid the nesting of generalization variables, restrict the structure of their arguments, and are unitary. Extending these methods to more expressive variants is important to applications. We consider the case of nested generalization variables and show that the AU problem is nullary (using capture-avoiding substitutions), even when the arguments to free variables are severely restricted.Comment: 12 pages, submitted to Journal (a revised version of the previous submission with more precise proofs

    ACUOS: A System for Modular ACU Generalization with Subtyping and Inheritance

    Full text link
    The final publication is available at Springer via http://dx.doi.org/10.1007/978-3-319-11558-0_40Computing generalizers is relevant in a wide spectrum of automated reasoning areas where analogical reasoning and inductive inference are needed. The ACUOS system computes a complete and minimal set of semantic generalizers (also called “anti-unifiers”) of two structures in a typed language modulo a set of equational axioms. By supporting types and any (modular) combination of associativity (A), commutativity (C), and unity (U) algebraic axioms for function symbols, ACUOS allows reasoning about typed data structures, e.g. lists, trees, and (multi-)sets, and typical hierarchical/structural relations such as is a and part of. This paper discusses the modular ACU generalization tool ACUOS and illustrates its use in a classical artificial intelligence problem.This work has been partially supported by the EU (FEDER) and the Spanish MINECO under grants TIN 2010-21062-C02-02 and TIN 2013-45732-C4-1-P, by Generalitat Valenciana PROMETEO2011/052, and by NSF Grant CNS 13-10109. J. Espert has also been supported by the Spanish FPU grant FPU12/06223.Alpuente Frasnedo, M.; Escobar Román, S.; Espert Real, J.; Meseguer, J. (2014). ACUOS: A System for Modular ACU Generalization with Subtyping and Inheritance. En Logics in Artificial Intelligence. Springer. 573-581. https://doi.org/10.1007/978-3-319-11558-0_40S573581Alpuente, M., Escobar, S., Espert, J., Meseguer, J.: A Modular Order-sorted Equational Generalization Algorithm. Information and Computation 235, 98–136 (2014)Alpuente, M., Escobar, S., Meseguer, J., Ojeda, P.: A Modular Equational Generalization Algorithm. In: Hanus, M. (ed.) LOPSTR 2008. LNCS, vol. 5438, pp. 24–39. Springer, Heidelberg (2009)Alpuente, M., Escobar, S., Meseguer, J., Ojeda, P.: Order–Sorted Generalization. ENTCS 246, 27–38 (2009)Alpuente, M., Espert, J., Escobar, S., Meseguer, J.: ACUOS: A System for Modular ACU Generalization with Subtyping and Inheritance. Tech. rep., DSIC-UPV (2013), http://www.dsic.upv.es/users/elp/papers.htmlArmengol, E.: Usages of Generalization in Case-Based Reasoning. In: Weber, R.O., Richter, M.M. (eds.) ICCBR 2007. LNCS (LNAI), vol. 4626, pp. 31–45. Springer, Heidelberg (2007)Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C. (eds.): All About Maude - A High-Performance Logical Framework. LNCS, vol. 4350. Springer, Heidelberg (2007)Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.L.: Reflection, metalevel computation, and strategies. In: All About Maude [6], pp. 419–458Gentner, D.: Structure-Mapping: A Theoretical Framework for Analogy*. Cognitive Science 7(2), 155–170 (1983)Krumnack, U., Schwering, A., Gust, H., Kühnberger, K.-U.: Restricted higher order anti unification for analogy making. In: Orgun, M.A., Thornton, J. (eds.) AI 2007. LNCS (LNAI), vol. 4830, pp. 273–282. Springer, Heidelberg (2007)Kutsia, T., Levy, J., Villaret, M.: Anti-Unification for Unranked Terms and Hedges. Journal of Automated Reasoning 520, 155–190 (2014)Meseguer, J.: Conditioned rewriting logic as a united model of concurrency. Theor. Comput. Sci. 96(1), 73–155 (1992)Muggleton, S.: Inductive Logic Programming: Issues, Results and the Challenge of Learning Language in Logic. Artif. Intell. 114(1-2), 283–296 (1999)Ontañón, S., Plaza, E.: Similarity measures over refinement graphs. Machine Learning 87(1), 57–92 (2012)Plotkin, G.: A note on inductive generalization. In: Machine Intelligence, vol. 5, pp. 153–163. Edinburgh University Press (1970)Pottier, L.: Generalisation de termes en theorie equationelle: Cas associatif-commutatif. Tech. Rep. INRIA 1056, Norwegian Computing Center (1989)Schmid, U., Hofmann, M., Bader, F., Häberle, T., Schneider, T.: Incident Mining using Structural Prototypes. In: García-Pedrajas, N., Herrera, F., Fyfe, C., Benítez, J.M., Ali, M. (eds.) IEA/AIE 2010, Part II. LNCS, vol. 6097, pp. 327–336. Springer, Heidelberg (2010

    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

    A Modular Order-sorted Equational Generalization Algorithm

    Full text link
    Generalization, also called anti-unification, is the dual of unification. Given terms t and t , a generalizer is a term t of which t and t are substitution instances. The dual of a most general unifier (mgu) is that of least general generalizer (lgg). In this work, we extend the known untyped generalization algorithm to, first, an order-sorted typed setting with sorts, subsorts, and subtype polymorphism; second, we extend it to work modulo equational theories, where function symbols can obey any combination of associativity, commutativity, and identity axioms (including the empty set of such axioms); and third, to the combination of both, which results in a modular, order-sorted equational generalization algorithm. Unlike the untyped case, there is in general no single lgg in our framework, due to order-sortedness or to the equational axioms. Instead, there is a finite, minimal and complete set of lggs, so that any other generalizer has at least one of them as an instance. Our generalization algorithms are expressed by means of inference systems for which we give proofs of correctness. This opens up new applications to partial evaluation, program synthesis, and theorem proving for typed equational reasoning systems and typed rulebased languages such as ASF+SDF, Elan, OBJ, Cafe-OBJ, and Maude. © 2014 Elsevier Inc. All rights reserved. 1.M. Alpuente, S. Escobar, and J. Espert have been partially supported by the EU (FEDER) and the Spanish MEC/MICINN under grant TIN 2010-21062-C02-02, and by Generalitat Valenciana PROMETEO2011/052. J. Meseguer has been supported by NSF Grants CNS 09-04749, and CCF 09-05584.Alpuente Frasnedo, M.; Escobar Román, S.; Espert Real, J.; Meseguer, J. (2014). A Modular Order-sorted Equational Generalization Algorithm. Information and Computation. 235:98-136. https://doi.org/10.1016/j.ic.2014.01.006S9813623

    ACUOS: A System for Order-Sorted Modular ACU Generalization

    Full text link
    [ES] La generalización, también denominada anti-unificación, es la operación dual de la unificación. Dados dos términos t y t' , un generalizador es un término t'' del cual t y t' son instancias de sustitución. El concepto dual del unificador más general (mgu) es el de generalizador menos general (lgg). En esta tesina extendemos el conocido algoritmo de generalización sin tipos a, primero, una configuración order-sorted con sorts, subsorts y polimorfismo de subtipado; en segundo lugar, la extendemos para soportar generalización módulo teorías ecuacionales, donde los símbolos de función pueden obedecer cualquier combinación de axiomas de asociatividad, conmutatividad e identidad (incluyendo el conjunto vacío de dichos axiomas); y, en tercer lugar, a la combinación de ambos, que resulta en un algoritmo modular de generalización order-sorted ecuacional. A diferencia de las configuraciones sin tipos, en nuestro marco teórico en general el lgg no es único, lo que se debe tanto al tipado como a los axiomas ecuacionales. En su lugar, existe un conjunto finito y mínimo de lggs, tales que cualquier otra generalización tiene a alguno de ellos como instancia. Nuestros algoritmos de generalización se expresan mediante reglas de inferencia para las cuales damos demostraciones de corrección. Ello abre la puerta a nuevas aplicaciones en campos como la evaluación parcial, la síntesis de programas, la minería de datos y la demostración de teoremas para sistemas de razonamiento ecuacional y lenguajes tipados basados en reglas tales como ASD+SDF, Elan, OBJ, CafeOBJ y Maude. Esta tesis también describe una herramienta para el cómputo automatizado de los generalizadores de un conjunto dado de estructuras en un lenguaje tipado módulo un conjunto de axiomas dado. Al soportar la combinación modular de atributos ecuacionales de asociatividad, conmutatividad y existencia de elemento neutro (ACU) para símbolos de función arbitrarios, la generalización ACU modular aporta suficiente poder expresivo a la generalización ordinaria para razonar sobre estructuras de datos tipadas tales como listas, conjuntos y multiconjuntos. La técnica ha sido implementada con generalidad y eficiencia en el sistema ACUOS y puede ser fácilmente integrada con software de terceros.[EN] Generalization, also called anti-uni cation, is the dual of uni cation. Given terms t and t 0 , a generalization is a term t 00 of which t and t 0 are substitution instances. The dual of a most general uni er (mgu) is that of least general generalization (lgg). In this thesis, we extend the known untyped generalization algorithm to, rst, an order-sorted typed setting with sorts, subsorts, and subtype polymorphism; second, we extend it to work modulo equational theories, where function symbols can obey any combination of associativity, commutativity, and identity axioms (includ- ing the empty set of such axioms); and third, to the combination of both, which results in a modular, order-sorted equational generalization algo- rithm. Unlike the untyped case, there is in general no single lgg in our framework, due to order-sortedness or to the equational axioms. Instead, there is a nite, minimal set of lggs, so that any other generalization has at least one of them as an instance. Our generalization algorithms are expressed by means of inference systems for which we give proofs of cor- rectness. This opens up new applications to partial evaluation, program synthesis, data mining, and theorem proving for typed equational rea- soning systems and typed rule-based languages such as ASF+SDF, Elan, OBJ, Cafe-OBJ, and Maude. This thesis also describes a tool for automatically computing the gen- eralizers of a given set of structures in a typed language modulo a set of axioms. By supporting the modular combination of associative, com- mutative and unity (ACU) equational attributes for arbitrary function symbols, modular ACU generalization adds enough expressive power to ordinary generalization to reason about typed data structures such as lists, sets and multisets. The ACU generalization technique has been generally and e ciently implemented in the ACUOS system and can be easily integrated with third-party software.Espert Real, J. (2012). ACUOS: A System for Order-Sorted Modular ACU Generalization. http://hdl.handle.net/10251/1921
    corecore