Abstract 1 Introduction 2 Preliminaries 3 Equational Generalization vs Free Generalization 4 Combined Generalization in Regular Collapse-Free Theories 5 Rule-Based Generalization in Finite Syntactic Theories 6 White-Box Combination of Rule-Based Generalization Algorithms 7 Conclusion References

Combining Generalization Algorithms
in Regular Collapse-Free Theories

Mauricio Ayala-Rincón ORCID Exact Sciences Institute, Universidade de Brasília, Brazil David M. Cerna ORCID Institute of Computer Science, Czech Academy of Sciences, Prague, Czechia Temur Kutsia ORCID Research Institute for Symbolic Computation, Johannes Kepler University, Linz, Austria Christophe Ringeissen ORCID Université de Lorraine, CNRS, Inria, LORIA, F-54000 Nancy, France
Abstract

We look at the generalization problem modulo some equational theories. This problem is dual to the unification problem: given two input terms, we want to find a common term whose respective two instances are equivalent to the original terms modulo the theory.

There exist algorithms for finding generalizations over various equational theories. We focus on modular construction of equational generalization algorithms for the union of signature-disjoint theories. Specifically, we consider the class of regular and collapse-free theories, showing how to combine existing generalization algorithms to produce specific solutions in these cases.

Additionally, we identify a class of theories that admit a generalization algorithm based on the application of axioms to resolve the problem. To define this class, we rely on the notion of syntactic theories, a concept originally introduced to develop unification procedures similar to the one known for syntactic unification. We demonstrate that syntactic theories are also helpful in developing generalization procedures similar to those used for syntactic generalization.

Keywords and phrases:
Generalization, Anti-unification, Equational theories, Combination
Funding:
Mauricio Ayala-Rincón: Brazilian National Council for Scientific and Technological Development (CNPq), Grant Universal 409003/21-2 and RG 313290/21-0.
David M. Cerna: Czech Science Foundation Grant 22-06414L; Cost Action CA20111 EuroProofNet.
Temur Kutsia: Austrian Science Fund (FWF), Project P 35530; Cost Action CA20111 EuroProofNet.
Copyright and License:
[Uncaptioned image] © Mauricio Ayala-Rincón, David M. Cerna, Temur Kutsia, and Christophe Ringeissen; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Equational logic and rewriting
; Computing methodologies Symbolic and algebraic manipulation
Editors:
Maribel Fernández

1 Introduction

The problem of generalization of two terms s and t asks to find a term r such that s and t are substitution instances of r. The generalizations of interest are those that maximally retain similarities between the given terms while abstracting their differences uniformly. In other words, they should be the least general among generalizations of the given terms. The generalization problem is also called the problem of anti-unification since it can be seen as a dual to unification: while unification focuses on making two expressions more specific by finding their common instance via unifiers, anti-unification abstracts them to a more general form.

The first generalization algorithms were developed in the 1970s [38, 41], motivated by the usefulness of this technique for inductive reasoning. Nowadays, application areas of anti-unification are quite diverse, including, e.g., automated program repair [8, 19, 44], software code or specification synthesis [21, 40, 49], code similarity detection and change analysis [48, 9, 33], learning-related tasks [18, 36, 39], natural language processing [3, 24, 45], indexing/compression [12, 37, 25], just to name a few. Generalization computation techniques have been investigated for various structures (see, e.g., the recent survey [16] for an overview), among them, for first-order equational theories, which is also the subject of this paper.

In equational anti-unification, syntactic equality is replaced by equality modulo the given equational theory. As a consequence, the given terms do not necessarily have a single least general generalization. Instead, problems are characterized by their minimal complete set of generalizations, which might be a singleton, a finite set, an infinite set, or might not exist at all due to a clash between the minimality and completeness requirements. Several authors considered (first-order) equational anti-unification, studying the problem in associative, commutative, associative-commutative, unital, idempotent, absorptive theories, semirings, theories that lead to regular congruence classes, etc. [1, 2, 4, 5, 11, 13, 14, 15, 31, 47].

A more general question is related to anti-unification in a combined equational theory: Is it possible to derive a generalization algorithm for a union of equational theories from the existing generalization algorithms for the component theories? This is called the combination problem for generalization algorithms and is very important for applications. To the best of our knowledge, our work is the first attempt to address the modular construction of generalization algorithms.

On the other hand, the combination problem has been studied quite intensively for unification; see, e.g., [7, 20, 22, 26, 28, 30, 42, 43, 46]. These modularity results impose certain restrictions on the component theories to guarantee the existence and good properties of the combined algorithm, the main restriction being that the theories are signature-disjoint. Considering regular collapse-free theories is also a classical restriction. In the class of regular collapse-free theories, the left-hand side and the right-hand side of any equational axiom are non-variable terms with exactly the same variables. A combination method is known for unification algorithms in any union of disjoint regular collapse-free theories [46], and another one exists for matching algorithms in any union of disjoint regular theories [35] where regular theories may have collapse axioms between a non-variable left-hand side and a variable right-hand side. It is important to notice that when we relax the restriction on equational theories, we may need to impose a stronger restriction on the kind of algorithms available in the component theories. Hence, the combination method introduced in [7] for the unification problem works in any union of disjoint theories. Still, as a counterpart, it assumes the existence of general unification procedures capable of dealing with free function symbols.

Our contributions

We consider the combination problem for generalization algorithms in the union of equational theories E1 and E2 over the signatures Σ1 and Σ2 and a set of free constants C, such that:

  • Σ1Σ2=, i.e., the theories are signature-disjoint (and EiC= holds for i=1,2, since C consists of free constants);

  • both E1 and E2 are regular collapse-free;

  • for each Ei, i=1,2, there exists a complete generalization algorithm 𝔊i which

    • handles ground terms built over ΣiC, and

    • for any given ground terms t and u returns a triple (r,ϕ,ψ), where r is a generalization of (t,u) with respective solved substitutions (ϕ,ψ), meaning that application of (ϕ,ψ) to r does not lead to further (more specific) generalizations.

For such equational theories E1 and E2, a combination algorithm for generalization problems in E1E2 is designed, which relies on Ei-generalization algorithms 𝔊i for i=1,2, and its completeness is shown. This is our main result, which we further refine in two ways, as explained below.

  1. 1.

    The class of finite theories (i.e., theories where every equivalence class is finite) satisfies the above-mentioned conditions, and we show that combined generalization problems in this class can be solved in a modular way. Furthermore, we provide a rule-based generalization algorithm for the subclass of finite syntactic theories. The notion of syntactic theories was originally introduced to develop unification procedures similar to the one known for syntactic unification (cf. [27, 29, 34]). We demonstrate that syntactic theories are also helpful in developing a rule-based generalization algorithm that extends syntactic generalization. This extension is obtained by introducing a new mutation rule where the resolvent axioms of the theory are applied to simplify the generalization problems.

  2. 2.

    For theories that admit rule-based generalization algorithms working on configurations of a special form, we design a combination algorithm that uses the rules of the component algorithms (instead of using them as black-boxes), thus obtaining a combined rule-based algorithm with rules of the same form as the component algorithms. We call it the white-box combination method. This leads to a modular result: a combined algorithm obtained in such a way can be used as a component algorithm for further white-box combinations. This white-box combination method applies to any instance of the rule-based generalization algorithm introduced for finite syntactic theories.

Organization

After this introduction, Section 2 presents the required background. Then, Section 3 presents some results connecting equational generalization to free generalization, showing that equational generalization in finite theories is reducible to free generalization, and so in finite theories equational generalization is finitary. In Section 4, we discuss the combination of generalization for regular collapse-free theories. Then, Section 5 explores the class of finite syntactic theories by showing a rule-based generalization algorithm. Section 6 considers the problem of combining rule-based generalization algorithms. Finally, Section 7 concludes and briefly discusses possible future work.

2 Preliminaries

2.1 Terms and Substitutions

We consider a first-order alphabet consisting of a signature Σ (set of fixed arity function symbols) and a set of variables 𝒱. The set of terms 𝒯(Σ,𝒱) over Σ and 𝒱 is defined in the standard way: t𝒯(Σ,𝒱) iff t is defined by the grammar t:=xf(t1,,tn), where x𝒱 and fΣ is an n-ary symbol with n0.

We denote arbitrary function symbols by f,g,h, constants by a,b,c, variables by x,y,z,v, and terms by s,t,r,u. The notions of term depth, term size, and a position in a term are defined in the standard way, see, e.g., [6]. By t|p, we denote the subterm of t at position p, and by t[s]p, a term obtained from t by replacing the subterm at position p with the term s. For any position p in a term t (including the root position ϵ), t(p) is the symbol at position p. The set of all variables in t is denoted by 𝑉𝑎𝑟(t). A term is called linear if no variable occurs in it more than once, and ground if 𝑉𝑎𝑟(t)=.

A sequence of terms t1,,tn may be written t¯ when n is clear from the context.

Given any signature Σ and any finite set of constants C such that ΣC=, the signature ΣC is denoted by ΣC.

A substitution is a mapping from 𝒱 to 𝒯(Σ,𝒱), which is the identity almost everywhere. We use the Greek letters σ,ϑ,φ to denote substitutions, except for the identity substitution, which is written as 𝐼𝑑. We represent substitutions using the usual set notation, e.g., σ={x1t1,,xntn} where {x1,,xn} is the domain of σ, denoted by 𝐷𝑜𝑚(σ). Application of a substitution σ to a term t, denoted by tσ, is defined as xσ=σ(x) and f(t1,,tn)σ=f(t1σ,,tnσ). Substitution composition is defined as a composition of mappings. It is associative but not commutative, with 𝐼𝑑 playing the role of the unit element. We write σϑ for the composition of σ with ϑ.

2.2 Equational Theories

Let E be a set of term pairs, i.e., elements of 𝒯(Σ,𝒱)×𝒯(Σ,𝒱). An equational Σ-theory generated by E, denoted by =E, is the least congruence relation on 𝒯(Σ,𝒱) that is closed under substitution application and contains E. We call E a presentation of =E, and the elements of E are called the axioms of =E, written as l=r. If t=Eu, we say that u is equal modulo E to t. When E=, every term is equal only to itself, and the theory is called the empty or free theory.

It is common to slightly abuse the terminology in the literature by calling both E and =E an equational theory. For a given E, we denote by 𝗌𝗂𝗀(E) the set of all function symbols occurring in E.

A sequence of E-equalities t1=Eu1,,tn=Eun may be written t¯=Eu¯ when n is clear from the context.

An axiom l=r is regular if 𝑉𝑎𝑟(l)=𝑉𝑎𝑟(r). An axiom l=r is collapse-free if l and r are non-variable terms. An axiom l=r is shallow if variables can only occur at a position at depth at most 1 in both l and r. An equational theory is regular (resp., collapse-free/shallow) if all its axioms are regular (resp., collapse-free/shallow). An equational theory E is finite if, for each term t, there are only finitely many terms u such that t=Eu. An equational theory E is subterm collapse-free if there are no terms t,u such that t=Eu and u is a strict subterm of t. A subterm collapse-free theory is necessarily collapse-free, and a finite theory is necessarily regular and subterm collapse-free.

A theory E is syntactic if it has a finite resolvent presentation RP, defined as a finite set of axioms RP such that each equality t=Eu has an equational proof tRPu with at most one equational step RP applied at the root position. Note that any axiom in RP can be applied in both directions: from the left to the right and from the right to the left. Any shallow theory is syntactic [17], and any collapse-free theory with finitary unification is syntactic [29].

One can easily check that A={x(yz)=(xy)z} (Associativity), C={xy=yx} (Commutativity), and AC=AC (Associativity-Commutativity) are regular and collapse-free. Moreover, A, C and AC are finite and syntactic [34, 29], but only C is shallow. Since A, C, and AC are finite theories, they are also subterm collapse-free.

2.3 Combination of Equational Theories

The rest of the paper assumes that Ei is a regular collapse-free Σi-theory for i=1,2, where Σ1 and Σ2 are disjoint signatures. For the sake of brevity, the combined signature Σ1Σ2 is abbreviated to Σ1,2, and the combined theory E1E2 is also denoted by E1,2.

A Σ-rooted term t is a term whose root symbol is in Σ. Given any Σ1,2C-term t where t is Σi-rooted, an alien subterm of t is any subterm s of t which is not Σi-rooted and such that any proper superterm of s in t is Σi-rooted. The set of alien subterms of t is denoted by Alien(t). Given any term t, its height of theory is formally defined as follows: ht(t)=1+max{ht(t)|tAlien(t)}. Given a finite set T of ground Σ1,2C-terms, we consider Aliens=tT𝐴𝑙𝑖𝑒𝑛(t) and a mapping π:AliensFC such that FC is a set of fresh free constants (FCC=) and for any a,aAliens, π(a)=π(a) iff a=E1E2a. Conversely, we define π1:FCAliens as a mapping such that for any aAliens, π1(π(a))=E1E2a. The i-abstraction of any term tT is denoted by tπi and is inductively defined as follows:

  • cπi=c if cC,

  • (f(t1,,tn))πi=f(t1πi,,tnπi) if fΣi,

  • (f(t1,,tn))πi=π(f(t1,,tn)) if fΣj for ji.

Lemma 1 (Correspondence for Equality [46]).

Let E1 and E2 be two signature-disjoint regular collapse-free theories. For i=1,2 and any ΣiC-rooted terms t and u, t=E1E2u iff tπi=Eiuπi.

Lemma 1 holds when the component theories E1 and E2 are regular collapse-free. In the general case where the component theories are arbitrary, we need to assume that t and u are in layer-reduced form [23] to have the same correspondence with their i-abstractions.

2.4 Generalization Problems

Given an equational theory E, a term t is more general than u modulo E, or is an E-generalization of u, if there exists a substitution σ such that tσ=Eu. In such a case, we write tEu and also say the term u is less general than t modulo E or that u is an E-instance of t. The relation E is a quasi-order and generates the equivalence relation, denoted by E. The strict part of E is denoted by E.

An equational generalization problem is formulated as follows:

Given:

an equational theory E and two terms t and u;

Find:

a term r such that rEt and rEu (r is said to be an E-generalization of t and u).

Given an equational theory E and two terms t and u, a set of terms 𝒢 is called a complete set of E-generalizations of t and u if it satisfies the following properties:

  1. 1.

    Soundness: every element of 𝒢 is an E-generalization of t and u,

  2. 2.

    Completeness: for every E-generalization q of t and u there exists r𝒢 such that qEr.

The set 𝒢 is called a minimal complete set of E-generalizations of t and u, denoted 𝑚𝑐𝑠𝑔E(t,u) if it, in addition, satisfies the following:

  1. 3.

    Minimality: if there exist r,q𝒢 such that rEq, then r=q.

The existence and cardinality of 𝑚𝑐𝑠𝑔E define what is called the generalization type of an equational theory E as follows: E has the generalization type 0 (or is nullary) if there are two terms t and u such that 𝑚𝑐𝑠𝑔E(t,u) does not exist. Otherwise, the generalization type of E is

  • unitary, if 𝑚𝑐𝑠𝑔E(t,u) is a singleton for all t and u (in this case, the sole element of 𝑚𝑐𝑠𝑔E(t,u) is called a least general E-generalization of t and u and is denoted by 𝑙𝑔𝑔E(t,u)),

  • finitary, if 𝑚𝑐𝑠𝑔E(t,u) is finite for all t and u, and there exists at least one pair of terms for which this set is not a singleton,

  • infinitary, if there exist t and u for which 𝑚𝑐𝑠𝑔E(t,u) is infinite.

In the rest of the paper, we consider generalization algorithms defined as terminating inference systems transforming anti-unification triples (AUTs, for short) written x:tu where x is a variable, and t and u are the two ground terms to generalize. More precisely, we are focusing on rule-based systems working on configurations 𝒞 of the form A;S;σ, where A and S are sets of AUTs, called the active set and store of 𝒞, respectively, and σ is a substitution, called the generalization component of 𝒞. From now on, 𝒞 is said to be a PSS-configuration; it consists of a problem together with a store and a substitution. Given a set of AUTs P=i=1n{xi:tiui}, we associate two substitutions: {x1t1,,xntn} is the left substitution of P and {x1u1,,xnun} is the right substitution of P. A set of AUTs may be written using the disjoint union symbol to isolate a specific AUT from that set.

3 Equational Generalization vs Free Generalization

The following two theorems characterize equational generalizations with the help of free least general generalizations.

Theorem 2 (Free 𝑙𝑔𝑔’s versus E-Generalizations).

Given an equational theory E and two terms t and u, if a term r is an E-generalization of t and u, then there exist terms t, u, and r such that t=Et, u=Eu, r is a free least general generalization of t and u, and rr.

Proof.

From r being an E-generalization of t and u we get the existence of two substitutions σ and ϑ such that rσ=Et and rϑ=Eu. Take t=rσ and u=rϑ. Then we have t=Et and u=Eu. Moreover, r is a free generalization of t and u. Then there exists a free least general generalization r of t and u, and we get rr.

Theorem 3 (Completeness and Finiteness through Free 𝑙𝑔𝑔’s).

Let E be an equational theory, t and u be two terms, and 𝒢 be the set of terms 𝒢E(t,u)={𝑙𝑔𝑔(t,u)t[t]E,u[u]E}. Then

  1. 1.

    𝒢E(t,u) is a complete set of E-generalizations of t and u.

  2. 2.

    𝒢E(t,u) is not necessarily minimal.

  3. 3.

    If E is a finite theory, then 𝒢E(t,u) is finite modulo variable renaming. Consequently, every finite theory E has the E-generalization type at most finitary.

  4. 4.

    For any E, if [t]E is finite, then 𝒢E(t,u) (as well as 𝒢E(u,t)) is also finite modulo variable renaming.

Proof.
  1. 1.

    Every element r𝒢 is an E-generalization of t and u, because there exist substitutions σ and ϑ such that rσ=t=Et and rϑ=u=Eu. Thus, together with Theorem 2, we may conclude that for every E-generalization r of t and u there exists an E-generalization r of t and u such that r𝒢 and rr, which implies the completeness of 𝒢.

  2. 2.

    Let E be the equational theory that asserts the commutativity of f, and take t=f(a,b) and u=f(a,b). Then 𝒢E(t,u)={f(a,b),f(x,y)}, because f(a,b)=𝑙𝑔𝑔(f(a,b),f(a,b)) and f(x,y)=𝑙𝑔𝑔(f(a,b),f(b,a)). Obviously, f(x,y) is more general than f(a,b) and, hence, 𝒢E(t,u) is not minimal.

  3. 3.

    If E is a finite theory, then [t]E and [u]E are finite sets. Free least general generalizations are unique (modulo variable renaming). Hence, 𝒢E(t,u) is finite modulo renaming. Since E-matching is finitary in any finite theory E, 𝒢E(t,u) can always be minimized, and we get that E-generalization type in finite theories is at most finitary.

  4. 4.

    First, note that the depth of a free generalization of two terms never exceeds the minimum of their depths, and such a generalization does not contain any function symbol that does not appear in both of them. Therefore, for a fixed t[t]E, the depth of 𝑙𝑔𝑔(t,u) is bounded by the depth of t, and the set of function symbols that potentially may appear in 𝑙𝑔𝑔(t,u) is restricted to the set of function symbols of t. Hence, only finitely many terms (over a fixed-arity alphabet like ours) can satisfy these conditions. Hence, whatever u we take, the candidates for 𝑙𝑔𝑔(t,u) may come only from a fixed finite (modulo variable renaming) set that depends on t only: the elements of this set are terms whose free instance is t. Therefore, for the given t, the set of all terms {𝑙𝑔𝑔(t,u)u𝒯(,𝒱)} is finite. Since by assumption [t]E is finite, we get that 𝒢E(t,u) is a finite union of finite sets, which implies that it is finite.

Example 4.

This example illustrates an infinite 𝒢E for E that is non-finite subterm-collapse free (the simplest class of non-finite theories according to [10]). Let E={f(a,g(x))=f(a,x),f(b,g(x))=f(b,x)}, t=f(a,c), and u=f(b,d). Then

𝒢E(t,u)={f(x,y),f(x,g(y)),f(x,g(g(y)),}.

In fact, this set contains an infinite chain

f(x,y)Ef(x,g(y))Ef(x,g(g(y))E.

4 Combined Generalization in Regular Collapse-Free Theories

In this section, we consider regular collapse-free theories E. When E is regular, the E-equivalence class of any ground term only contains ground terms. Thus, any solution of an E-matching problem necessarily maps a variable occurring in the problem to a ground term. As a consequence, the following property holds when E is assumed to be regular: given any generalization r of a pair of ground terms (t,u), any substitutions ϕ,ψ such that rϕ=Et and rψ=Eu satisfy that xϕ and xψ are ground for any variable x𝑉𝑎𝑟(r). This assumption is useful in the following definition, where the considered substitutions are necessarily ground.

Definition 5 (Generalizations with Solved Instantiations).

Let E be a regular Σ-theory. Given any pair of ground ΣC-terms (t,u), an E-generalization of (t,u) with respective instantiations (ϕ,ψ) is a ΣC-term r together with a pair of substitutions (ϕ,ψ) such that 𝑉𝑎𝑟(r)=𝐷𝑜𝑚(ϕ)=𝐷𝑜𝑚(ψ), rϕ=Et and rψ=Eu. Given any pair of ground ΣC-terms (t,u), a triple representing an E-generalization of (t,u) with solved instantiations (an E-GSI triple of (t,u), for short) is any triple (r,ϕ,ψ) such that

  • r is an E-generalization of (t,u) with respective instantiations (ϕ,ψ),

  • for any x𝑉𝑎𝑟(r), there is no non-variable E-generalization of (xϕ,xψ),

  • for any x,y𝑉𝑎𝑟(r), xϕ=Eyϕ and xψ=Eyψ implies x=y111This third condition may be dropped when considering linear generalizations..

A set ST of E-GSI triples of (t,u) is said to be complete if (r,ϕ,ψ)ST{r} is a complete set of E-generalizations of (t,u). We say that E admits an algorithm computing a complete set of E-generalizations with solved instantiations (GSI algorithm, for short) if there exists a computable function returning, for each input pair of ground ΣC-terms (t,u), a complete set of E-GSI triples of (t,u) denoted by GSIE(t,u).

A GSI algorithm can be constructed via the repeated application of a generalization algorithm together with a matching algorithm. In the case of a finite theory, the generalization problem is finitary, and the matching problem as well. Consequently, this iteration can be implemented, and it is necessarily terminating in the case of a finite theory since the size of any generalization is necessarily bounded. Thus, we have that:

Lemma 6.

Any finite theory admits a GSI algorithm.

 Remark 7.

In addition to the sketch of the proof given in the paragraph preceding Lemma 6, notice that another proof can be obtained using Theorem 3 and the existence of a GSI algorithm for the empty theory.

Example 8.

In Definition 5, the notion of GSI triple is introduced for any regular theory E. In particular, E can be the non-finite regular theory from Example 4. Continuing with that example where t=f(a,c), u=f(b,d), and 𝒢E(t,u)={f(x,y),f(x,g(y)),f(x,g(g(y)),}, one can check that

GSIE(t,u)={(r,ϕ,ψ)r𝒢E(t,u),ϕ={xa,yc},ψ={xb,yd}}.

Section 5 introduces another class of theories admitting a GSI algorithm. This class includes non-finite theories.

In general, for the theories we want to combine, we could imagine deriving GSI algorithms from existing rule-based generalization algorithms transforming PSS-configurations (see Section 6). Then, the resulting GSI algorithms can be combined directly as black-boxes, provided the theories are regular collapse-free.

Theorem 9 (Modular Property for GSI Algorithm).

The class of regular collapse-free theories admitting a GSI algorithm and with decidable equality is closed by disjoint union.

Proof.

The rule-based procedure given in Figure 1 can be shown terminating thanks to a complexity measure defined as follows: to each configuration (A;S;σ), we associate a pair (mht(A),|S|) where mht(A) is the multiset of heights of theory (x:tu)A{ht(t),ht(u)}, and |S| is the cardinality of S. These pairs are ordered lexicographically, the first component being ordered by the multiset extension of the (Noetherian) ordering on positive integers, while the second component is ordered by the (Noetherian) ordering on positive integers. One can easily verify that 𝑬𝒊-Gen and 𝑬𝟏,𝟐-Sol strictly decrease the first component of the pair, and E1,2-Mer does not increase the first component but strictly decreases the second one.

The normal forms with respect to the rule-based procedure are the configurations of the form (;S;σ) upon which 𝑬𝟏,𝟐-Mer does not apply. Indeed, any configuration (A;S;σ) with A is necessarily reducible by either 𝑬𝒊-Gen or 𝑬𝟏,𝟐-Sol.

For any derivation starting with the input configuration ({x:tu},,𝐼𝑑) and leading to a final configuration (;S;σ), we can associate a tuple (xσ,ϕS,ψS) where

  • ϕS={yt|y:tuS,y𝑉𝑎𝑟(xσ)},

  • ψS={yu|y:tuS,y𝑉𝑎𝑟(xσ)}.

Then, the set of all such tuples defines a GSIE1E2(t,u) as stated in Definition 5. This is a consequence of the following facts:

  • 𝑬𝒊-Gen is sound and complete by Lemma 10 and Corollary 11 (see below),

  • 𝑬𝟏,𝟐-Sol is sound and complete since E1 and E2 are collapse-free.

𝑬𝒊-Gen:Generalization in the Ei-theory
  {x:tu}A;S;σ(PSi)A;SiS;σ{x(rπ1)},

where

  • t(ϵ)ΣiC,u(ϵ)ΣiC,

  • (r,ϕ,ψ)GSIEi(tπi,uπi),

  • P={y:(yϕ)π1(yψ)π1|y𝑉𝑎𝑟(r)},

  • Si={y:tu|(y:tu)P,t(ϵ)ΣiC,u(ϵ)ΣiC}.

𝑬𝟏,𝟐-Sol:Solving in the combined theory
  {x:tu}A;S;σA;S{x:tu};σ,  if t(ϵ)Σi and u(ϵ)Σ3i.

𝑬𝟏,𝟐-Mer:Merging in the combined theory
  ;{x:tu,x:tu}S;σ;S{x:tu};σ{xx},  if t=E1E2t and u=E1E2u.

Figure 1: Combined Generalization Procedure for Regular Collapse-Free Theories.

We now show the completeness of the algorithm presented in Figure 1 by considering any generalization of the given terms over the combined theory E1E2 and showing that we can construct from it an Ei-generalization, where i depends on the root symbol, that uses the same variable instantiations as the combined generalization. In essence, our combination algorithm builds on the completeness of the algorithms for the individual theories and is thus complete as well.

The following technical lemma and corollary are used in the proof of Theorem 9.

Lemma 10 (Correspondence for Generalization).

Let E1 and E2 be two signature-disjoint regular collapse-free theories over respectively the signatures Σ1 and Σ2, t and u any ΣiC-rooted terms for some i=1,2, and r any E1E2-generalization r of (t,u) with respective instantiations (ϕ,ψ). Consider a bijective mapping ΠV:Alien(r)V where V is a set of fresh variables and the following terms and substitutions:

  • ri is the i-pure term obtained from r by replacing each rAlien(r) by ΠV(r).

  • ϕi and ψi are two substitutions such that 𝐷𝑜𝑚(ϕi)=𝐷𝑜𝑚(ψi)=𝑉𝑎𝑟(ri) and defined as follows:

    • for any x𝑉𝑎𝑟(ri)𝑉𝑎𝑟(r)xϕi=((ΠV1(x))ϕ)πi and xψi=((ΠV1(x))ψ)πi,

    • for any x𝑉𝑎𝑟(r), xϕi=(xϕ)πi.

Then, ri is an Ei-generalization of (tπi,uπi) with respective instantiations (ϕi,ψi), and for any x𝑉𝑎𝑟(ri)𝑉𝑎𝑟(r), ΠV1(x) is an E1E2-generalization of (xϕi)π1,(xψi)π1) with respective instantiations (ϕ,ψ).

Proof.

By assumption, rϕ=E1E2t and rψ=E1E2u. By Lemma 1, (rϕ)πi=E1E2tπi and (rψ)πi=E1E2uπi. Then, by definition of ri, ϕi and ψi, we have riϕi=(rϕ)πi and riψi=(rψ)πi. Consequently, riϕi=E1E2tπi and riψi=E1E2uπi.

For each x𝑉𝑎𝑟(ri)\𝑉𝑎𝑟(r), by definition of ϕi and ψi, we have that (ΠV1(x)ϕ)πi=xϕi and (ΠV1(x)ψ)πi=xψi. Applying π1 on these identities, we get (ΠV1(x)ϕ)πiπ1=(xϕi)π1 and (ΠV1(x)ψ)πiπ1=(xψi)π1. By definition of π1, s=E1E2sπiπ1 for any term s. Consequently, (ΠV1(x))ϕ=E1E2(xϕi)π1 and (ΠV1(x))ψ=E1E2(xψi)π1.

Corollary 11.

Let E1 and E2 be two signature-disjoint regular collapse-free theories over respectively the signatures Σ1 and Σ2, and any ΣiC-rooted terms t,u where i=1,2. Then, there is no non-variable E1E2-generalization of (t,u) iff there is no non-variable Ei-generalization of (tπi,uπi).

5 Rule-Based Generalization in Finite Syntactic Theories

In this section, we explore a class of equational theories admitting a rule-based generalization algorithm similar to the one known for the empty theory. For the class of finite syntactic theories, we construct a rule-based algorithm fully parametrized by the axioms of a resolvent presentation of a finite syntactic theory. A similar rule-based algorithm can be found in [27].

Example 12.

The class of finite syntactic theories includes A, C, AC, finite shallow theories [17] such as f(x)=g(x), and permutative theories closed by paramodulation [32]. Notice that {f(a)=a} and {f(f(x))=f(x)} are syntactic but not finite theories.

Lemma 13.

For any finite syntactic theory E with a resolvent presentation RP, the inference system given in Figure 4 provides an E-generalization algorithm, using the axioms of RP to

  • check E-equality (Figure 2),

  • solve E-matching problems (Figure 3),

  • control the construction of E-generalizations.

Proof.

The rule-based procedure in Figure 4 terminates since E is assumed to be finite. Indeed, the size of the generalizations associated with configurations is necessarily bounded, and so there are only finitely many applications of Mut. The rule Sol is sound and complete: when an AUT cannot be transformed by Mut or Dec, we cannot have a generalization rooted by a function symbol; a variable is the only possible way to get a generalization for this AUT. The soundness and completeness of Mut and Dec follow because RP is a resolvent presentation of E.

For any input PSS-configuration ({x:tu};;𝐼𝑑) where t,u are ground ΣC-terms, the procedure terminates by computing finitely many PSS-configurations of the form (;S;σ) and the union of all the terms xσ corresponds to a complete set of E-generalizations of tu, since all the rules are sound and complete.

 Remark 14.

For the inference system given in Figure 2, an input problem {s=t} is such that s=Et iff all the normal forms reached by this inference system are the empty set.

For the inference system in Figure 3, the set of solutions of an input E-matching problem {st} consists of all the normal forms reached by this inference system corresponding to solved forms i=1m{xiti} where x1,,xm are pairwise distinct variables.

Mut=:

{f(t¯)=g(u¯)}Γ{t¯=l¯θ}Γ  where f(l¯)=g(r¯) is a fresh renaming of an axiom in RP, and θ is a substitution such that r¯θ=RPu¯.

Dec=:

{f(t¯)=f(u¯)}Γ{t¯=u¯}Γ  where fΣC.

Figure 2: Procedure for Checking Equality in a finite theory with a resolvent presentation RP.

Mut:Mutation rule for matching
  {f(t¯)?g(u¯)}Γ{t¯?l¯θ}Γ  where f(l¯)=g(r¯) is a fresh renaming of an axiom in RP, and θ is a substitution such that r¯θ=RPu¯.

Dec:Decomposition rule for matching
  {f(t¯)?f(u¯)}Γ{t¯?u¯}Γ  where fΣC.

Mer:Merging rule for matching
  {x?t,x?t}Γ{x?t}Γ  if t=RPt.

Figure 3: Matching Procedure in a finite theory with a resolvent presentation RP.

MutLR:Left-Right Mutation rule for generalization
  {x:f(t¯)g(u¯)}A;S;σ{y:yθyθ|yy¯}A;S;σ{xh(y¯)}  where h(l¯)=f(r¯)RP, h(l¯)=g(r¯)RP, h(y¯)θ=RPf(t¯) and h(y¯)θ=RPg(u¯).

MutR:Right Mutation rule for generalization
  {x:f(t¯)g(u¯)}A;S;σ{y:yθyθ|yy¯}A;S;σ{xf(y¯)}  where f(l¯)=g(r¯)RP, θ={y¯t¯} and f(y¯)θ=RPg(u¯).

MutL:Left Mutation rule for generalization
  {x:f(t¯)g(u¯)}A;S;σ{y:yθyθ|yy¯}A;S;σ{xg(y¯)}  where g(r¯)=f(l¯)RP, g(y¯)θ=RPf(t¯) and θ={y¯u¯}.

Dec:Decomposition rule for generalization
  {x:f(t¯)f(u¯)}A;S;σ{y¯:t¯=u¯}A;S;σ{xf(y¯)}  where fΣC and y¯ are fresh variables.

Sol:Solving rule for generalization
  {x:tu}A;S;σA;S{x:tu};σ  if no rule in {𝐌𝐮𝐭LR,𝐌𝐮𝐭R,𝐌𝐮𝐭L,𝐃𝐞𝐜} applies.

Mer:Merging rule for generalization
  ;{x:tu,x:tu}S;σ;S{x:tu};σ{xx}  if t=RPt and u=RPu.

Figure 4: Generalization Procedure in a finite theory with a resolvent presentation RP.

The class of finite syntactic theories is known to be closed by disjoint union [34]. Actually, for a union of two disjoint finite theories with respective resolvent presentations RP1 and RP2, we have that RP1RP2 is a resolvent presentation corresponding to a finite theory. Consequently, the inference system in Figure 4 can be directly applied to any union of disjoint finite syntactic theories for which the resolvent presentations are known. However, finding a resolvent presentation may be a difficult task, especially if E-unification is not known to be finitary. In the case we already have a GSI algorithm for a finite theory E, we can combine it directly using the approach introduced in Section 4; we don’t have to find a resolvent presentation (if there exists one for E).

 Remark 15.

The empty theory is a finite syntactic theory, and its resolvent presentation is empty. In the case RP=, one can notice that the inference system from Figure 4 corresponds to the classical rule-based generalization algorithm known for the empty theory.

6 White-Box Combination of Rule-Based Generalization Algorithms

This section focuses on the modular construction of generalization algorithms transforming PSS-configurations. Let us now define precisely this kind of rule-based generalization algorithm.

Definition 16.

Let E be a regular theory. An E-generalization algorithm transforming PSS-configurations is an inference system 𝔊 such that for any initial configuration ({x:tu},,𝐼𝑑), it derives a finite set FC of final configurations of the form (;S;σ) for which {xσ|(;S;σ)FC} is a complete set of E-generalizations of (t,u). Furthermore, for any configuration (A;S;σ) derived from the initial configuration ({x:tu};;𝐼𝑑), the following (invariant) properties must hold:

  • xσ is an E-generalization of (t,u) with respective instantiations (ϕ,ψ) where ϕ (resp., ψ) is the left (resp., right) substitution of AS,

  • for any x:tu in S, there is no non-variable E-generalization of (t,u).

 Remark 17.

An E-generalization algorithm transforming PSS-configurations leads to a GSI-algorithm. Consider an initial configuration ({x:tu},,𝐼𝑑) and any triple (rσ,ϕS,ψS) such that (,S,σ)FC where FC is the set of final configurations given in Definition 16 and ϕS (resp., ψS) denotes the left (resp., right) substitution of S. Then, {(xσ,ϕS,ψS)|(,S,σ)FC} is actually a GSIE(t,u).

The inference procedure in Figure 4 corresponds to a generalization algorithm transforming PSS-configurations, thus leading to a GSI algorithm. Conversely, note that a GSI algorithm can be turned into a generalization algorithm transforming PSS-configurations where all derivations are of length 1.

Corollary 18.

A theory admits a generalization algorithm transforming PSS-configurations iff it admits a GSI algorithm.

Generalization algorithms transforming PSS-configurations correspond to GSI algorithms, and so they can be combined using the method given in Figure 1, provided that the respective theories E1 and E2 are regular collapse-free. Since this method is given as an inference system manipulating PSS-configurations, it can be reworded as an E1E2-generalization algorithm transforming PSS-configurations. In this new presentation, we do not directly use the triples from GSIEi-sets, but we just apply one step of the inference system corresponding to an Ei-generalization algorithm transforming PSS-configurations, see Figure 5. This is sufficient to move forward with a solution.

Given two generalization algorithms 𝔊1 and 𝔊2 transforming PSS-configurations, let 𝔊1𝔊2 be the inference system given by the set of rules {𝑬𝒊-Step𝑬𝟏,𝟐-Sol𝑬𝟏,𝟐-Mer } where 𝑬𝒊-Step is introduced in Figure 5 while E1,2-Sol and 𝑬𝟏,𝟐-Mer are from Figure 1.

𝑬𝒊-Step:

{x:tu}A;S;σ(Aiπ1)A;(Siπ1)S;σ(σiπ1)  where t(ϵ)ΣiC,u(ϵ)ΣiC and ({x:tπiuπi};;𝐼𝑑)𝔊i(Ai;Si;σi).

Figure 5: Rule calling a generalization algorithm 𝔊i transforming PSS-configurations.
Theorem 19 (Modular Construction for Rule-Based Generalization).

Let E1 and E2 be two signature-disjoint regular collapse-free theories. If 𝔊i is an Ei-generalization algorithm transforming PSS-configurations for i=1,2, then 𝔊1𝔊2 is an E1E2-generalization algorithm transforming PSS-configurations.

Proof.

The inference system 𝔊1𝔊2 is terminating since 𝔊1 and 𝔊2 are terminating, and there are finitely many alternations of calls to 𝔊1 and to 𝔊2 (see Lemma 10). Actually, 𝔊1𝔊2 corresponds to an E1E2-generalization algorithm transforming PSS-configurations since the 𝑬𝒊-Step rule from Figure 5 is sound and complete by Lemma 10 and Corollary 11.

 Remark 20.

In both rules 𝐄𝐢-Step and 𝐄𝐢-Gen, the constant abstraction ()πi and the term concretization ()π1 should be considered as transparent operations. With ()πi, aliens are viewed as free constants, with the restriction that two E1E2-equal aliens must be viewed as the same free constant. Conversely, with ()π1, these free constants are viewed back as terms in the combined theory E1E2. By slightly abusing notation, if we omit to apply these transformations, then the rules 𝐄𝐢-Step and 𝐄𝐢-Gen become easy to express.

Note that for free, associative, and commutative theories, all four algorithms for the combined theories ()(A), ()(C), (A)(C), ()(A)(C) described in [2] can be obtained as a combination of generalization algorithms transforming PSS-configurations.

Example 21.

Consider E1={f(x)=g(x)} and E2=AC(+). For E1, one can show the existence of an E1-generalization algorithm transforming PSS-configurations, say 𝔊1, given by the set of rules {Ei-Mut,Dec,Sol,Mer}, where Dec,Sol,Mer can be found in Figure 4, and the mutation rules E1-Mut is defined as follows:

𝑬𝟏-Mut:

{x:f(t)g(u)}A;S;σ{y:tu}A;S;σ{xf(y)}

For E2, we call 𝔊2 the E2-generalization algorithm transforming PSS-configurations given in Figure 4, with the following resolvent presentation of AC(+) shown in [29]:

RP={x1+(x2+x3)=(x1+x2)+x3x1+x2=x2+x1x1+(x2+x3)=(x1+x3)+x2(x1+x2)+x3=(x1+x3)+x2x1+(x2+x3)=x3+(x1+x2)(x1+x3)+(x2+x4)=(x1+x4)+(x2+x3)}

Let us now detail how the combined generalization algorithm 𝔊1𝔊2 is applied to solve

x:f(a+(f(a)+b))g((a+c)+f(a)).

We focus on two particular derivations leading to final PSS-configurations. The derived PSS-configurations are listed in the table below, where the rightmost column shows the configuration number, while the first column indicates how the configuration in that row is obtained (which generalization algorithm is applied to which configuration):

({x:f(a+(f(a)+b))g((a+c)+f(a))};;𝐼𝑑) (0)
𝔊1(0) ({y1:a+(f(a)+b)(a+c)+f(a)};;σ0{xf(y1)}) (1)
𝔊2(1) ({y2:aa+c,y3:f(a)+bf(a)};;σ1{y1y2+y3)}) (2)
𝔊2(2) ({y3:f(a)+bf(a)};{y2:aa+c};σ2) (3)
𝔊2(3) (;{y2:aa+c,y3:f(a)+bf(a)};σ3) (4)
𝔊2(1) ({y4:f(a)f(a),y5:b+aa+c};;σ1{y1y4+y5)}) (5)
𝔊1(5) ({y6:aa,y5:b+aa+c};;σ5{y4f(y6)}) (6)
𝔊1(6) ({y5:b+aa+c};;σ6{y6a}) (7)
𝔊2(7) ({y7:aa,y8:bc};;σ9{y5y7+y8}) (8)
𝔊1(8) ({y8:bc};;σ8{y7a}) (9)
𝔊1(9) (;{y8:bc};σ9) (10)

To get (5), MutLR is applied with the axioms x1+(x2+x3)=x3+(x1+x2) and x1+x2=x2+x1 in RP. To get (8), MutL is applied with the axiom x1+x2=x2+x1 in RP. Notice that 𝔊2 could be applied instead of 𝔊1 on (6), (8), (9) since both 𝔊1 and 𝔊2 can handle any AUT between two constants in C. Conversely, 𝔊1 could be applied instead of 𝔊2 on (3) since both 𝔊1 and 𝔊2 include a Sol rule. Eventually, (4) and (10) are two final configurations:

  • (;{y2:aa+c,y3:f(a)+bf(a)};{xf(y2+y3),},

  • (;{y8:bc};{xf(f(a)+(a+y8)),}).

The resulting generalizations are:

  • f(y2+y3), with respective instantiations ({y2a,y3f(a)+b},{y2a+c,y3f(a)}),

  • f(f(a)+(a+y8)), with respective instantiations ({y8b},{y8c}).

The combined generalization algorithm 𝔊1𝔊2 derives additional final configurations. Still, one can check that the corresponding generalizations are always more general than f(f(a)+(a+y8)), just like f(y2+y3) is more general than f(f(a)+(a+y8)).

7 Conclusion

We have introduced a combination method for the generalization problem in any union of disjoint regular collapse-free theories. Our framework requires regularity to ensure that any matching problem only has ground solutions. With this property, we have only to consider the generalization of ground terms involving possibly free constants. Collapse-freeness is also very useful for solving easily the generalization of two terms rooted in distinct theories. In future work, we plan to investigate the possibility of relaxing this regular and collapse-free assumption.

The study of non-disjoint unions of theories would also be a natural continuation. In particular, we plan to consider the case of shared constructors, relying on the combination results available for the matching problem in unions of theories sharing only constructors [23]. When the constructors do not appear in the root of either side of the axioms, it might be possible to solve the combined generalization problem similarly to the disjoint case. More generally, allowing only shared constants at the root of the axioms could also be helpful to solve the problem.

For the class of regular collapse-free theories, we have investigated the disjoint combination of rule-based generalization algorithms transforming PSS-configurations. For the subclass of finite syntactic theories, we have shown how the axioms of a resolvent presentation can be used to construct a generalization algorithm transforming PSS-configurations. More broadly, we are interested in identifying examples of non-finite (yet regular collapse-free) theories that admit a generalization algorithm transforming PSS-configurations, to which our combination approach would be applicable. Finally, we conjecture that this combination approach can be naturally extended to generalization procedures that are not necessarily terminating.

References

  • [1] María Alpuente, Demis Ballis, Angel Cuenca-Ortega, Santiago Escobar, and José Meseguer. ACUOS2: A High-Performance System for Modular ACU Generalization with Subtyping and Inheritance. In Francesco Calimeri, Nicola Leone, and Marco Manna, editors, Logics in Artificial Intelligence - 16th European Conference, JELIA 2019, Rende, Italy, May 7-11, 2019, Proceedings, volume 11468 of Lecture Notes in Computer Science, pages 171–181. Springer, 2019. doi:10.1007/978-3-030-19570-0_11.
  • [2] María Alpuente, Santiago Escobar, Javier Espert, and José Meseguer. A modular order-sorted equational generalization algorithm. Inf. Comput., 235:98–136, 2014. doi:10.1016/J.IC.2014.01.006.
  • [3] Nino Amiridze and Temur Kutsia. Anti-unification and natural language processing. EasyChair Preprint no. 203, EasyChair, 2018. doi:10.29007/fkrh.
  • [4] Mauricio Ayala-Rincón, David M. Cerna, Andres Felipe Gonzalez Barragan, and Temur Kutsia. Equational anti-unification over absorption theories. In Christoph Benzmüller, Marijn J. H. Heule, and Renate A. Schmidt, editors, Automated Reasoning - 12th International Joint Conference, IJCAR 2024, Nancy, France, July 3-6, 2024, Proceedings, Part II, volume 14740 of Lecture Notes in Computer Science, pages 317–337. Springer, 2024. doi:10.1007/978-3-031-63501-4_17.
  • [5] Franz Baader. Unification, weak unification, upper bound, lower bound, and generalization problems. In Ronald V. Book, editor, Rewriting Techniques and Applications, 4th International Conference, RTA-91, Como, Italy, April 10-12, 1991, Proceedings, volume 488 of Lecture Notes in Computer Science, pages 86–97. Springer, 1991. doi:10.1007/3-540-53904-2_88.
  • [6] Franz Baader and Tobias Nipkow. Term rewriting and all that. Cambridge University Press, 1998. doi:10.1017/CBO9781139172752.
  • [7] Franz Baader and Klaus U. Schulz. Unification in the union of disjoint equational theories: Combining decision procedures. J. Symb. Comput., 21(2):211–243, 1996. doi:10.1006/JSCO.1996.0009.
  • [8] Johannes Bader, Andrew Scott, Michael Pradel, and Satish Chandra. Getafix: learning to fix bugs automatically. Proc. ACM Program. Lang., 3(OOPSLA):159:1–159:27, 2019. doi:10.1145/3360585.
  • [9] Adam D. Barwell, Christopher Brown, and Kevin Hammond. Finding parallel functional pearls: Automatic parallel recursion scheme detection in Haskell functions via anti-unification. Future Gener. Comput. Syst., 79:669–686, 2018. doi:10.1016/j.future.2017.07.024.
  • [10] Hans-Jürgen Bürckert, Alexander Herold, and Manfred Schmidt-Schauß. On equational theories, unification, and (un)decidability. J. Symb. Comput., 8(1/2):3–49, 1989. doi:10.1016/S0747-7171(89)80021-5.
  • [11] Jochen Burghardt. E-generalization using grammars. Artif. Intell., 165(1):1–35, 2005. doi:10.1016/J.ARTINT.2005.01.008.
  • [12] David Cao, Rose Kunkel, Chandrakana Nandi, Max Willsey, Zachary Tatlock, and Nadia Polikarpova. babble: Learning Better Abstractions with E-Graphs and Anti-unification. Proceedings of the ACM on Programming Languages, 7(POPL):396–424, 2023. doi:10.1145/3571207.
  • [13] David M. Cerna. Anti-unification and the theory of semirings. Theor. Comput. Sci., 848:133–139, 2020. doi:10.1016/J.TCS.2020.10.020.
  • [14] David M. Cerna and Temur Kutsia. Idempotent anti-unification. ACM Trans. Comput. Log., 21(2):10:1–10:32, 2020. doi:10.1145/3359060.
  • [15] David M. Cerna and Temur Kutsia. Unital anti-unification: Type and algorithms. In Zena M. Ariola, editor, 5th International Conference on Formal Structures for Computation and Deduction, FSCD 2020, June 29-July 6, 2020, Paris, France (Virtual Conference), volume 167 of LIPIcs, pages 26:1–26:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.FSCD.2020.26.
  • [16] David M. Cerna and Temur Kutsia. Anti-unification and generalization: A survey. In Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI 2023, 19th-25th August 2023, Macao, SAR, China, pages 6563–6573. ijcai.org, 2023. doi:10.24963/IJCAI.2023/736.
  • [17] Hubert Comon, Marianne Haberstrau, and Jean-Pierre Jouannaud. Syntacticness, cycle-syntacticness, and shallow theories. Inf. Comput., 111(1):154–191, 1994. doi:10.1006/inco.1994.1043.
  • [18] Andrew Cropper, Sebastijan Dumancic, Richard Evans, and Stephen H. Muggleton. Inductive logic programming at 30. Mach. Learn., 111(1):147–172, 2022. doi:10.1007/S10994-021-06089-1.
  • [19] Reudismam Rolim de Sousa, Gustavo Soares, Rohit Gheyi, Titus Barik, and Loris D’Antoni. Learning quick fixes from code repositories. In Cristiano D. Vasconcellos, Karina Girardi Roggia, Vanessa Collere, and Paulo Bousfield, editors, 35th Brazilian Symposium on Software Engineering, SBES 2021, Joinville, Santa Catarina, Brazil, 27 September 2021 - 1 October 2021, pages 74–83. ACM, 2021. doi:10.1145/3474624.3474650.
  • [20] Eric Domenjoud, Francis Klay, and Christophe Ringeissen. Combination techniques for non-disjoint equational theories. In Alan Bundy, editor, Automated Deduction - CADE-12, 12th International Conference on Automated Deduction, Nancy, France, June 26 - July 1, 1994, Proceedings, volume 814 of Lecture Notes in Computer Science, pages 267–281. Springer, 1994. doi:10.1007/3-540-58156-1_19.
  • [21] Rui Dong, Zhicheng Huang, Ian Iong Lam, Yan Chen, and Xinyu Wang. WebRobot: web robotic process automation using interactive programming-by-demonstration. In Ranjit Jhala and Isil Dillig, editors, PLDI ’22: 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, San Diego, CA, USA, June 13 - 17, 2022, pages 152–167. ACM, 2022. doi:10.1145/3519939.3523711.
  • [22] Serdar Erbatur, Andrew M. Marshall, and Christophe Ringeissen. Non-disjoint combined unification and closure by equational paramodulation. In Boris Konev and Giles Reger, editors, Frontiers of Combining Systems - 13th International Symposium, FroCoS 2021, Birmingham, UK, September 8-10, 2021, Proceedings, volume 12941 of Lecture Notes in Computer Science, pages 25–42. Springer, 2021. doi:10.1007/978-3-030-86205-3_2.
  • [23] Serdar Erbatur, Andrew M. Marshall, and Christophe Ringeissen. Combined Hierarchical Matching: the Regular Case. In Amy P. Felty, editor, 7th International Conference on Formal Structures for Computation and Deduction, FSCD 2022, August 2-5, 2022, Haifa, Israel, volume 228 of LIPIcs, pages 6:1–6:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.FSCD.2022.6.
  • [24] Boris Galitsky. Developing Enterprise Chatbots - Learning Linguistic Structures. Springer, 2019. doi:10.1007/978-3-030-04299-8.
  • [25] Peter Graf. Substitution tree indexing. In Jieh Hsiang, editor, Rewriting Techniques and Applications, 6th International Conference, RTA-95, Kaiserslautern, Germany, April 5-7, 1995, Proceedings, volume 914 of Lecture Notes in Computer Science, pages 117–131. Springer, 1995. doi:10.1007/3-540-59200-8_52.
  • [26] Alexander Herold. Combination of unification algorithms in equational theories. PhD thesis, Kaiserslautern University of Technology, Germany, 1987. URL: https://d-nb.info/880327979.
  • [27] Jean-Pierre Jouannaud. Syntactic theories. In Branislav Rovan, editor, Mathematical Foundations of Computer Science 1990, MFCS’90, Banská Bystrica, Czechoslovakia, August 27-31, 1990, Proceedings, volume 452 of Lecture Notes in Computer Science, pages 15–25. Springer, 1990. doi:10.1007/BFB0029593.
  • [28] Claude Kirchner. Méthodes et outils de conception systématique d’algorithmes d’unification dans les théories équationnelles. Thèses d’état, Université de Nancy I, 1985.
  • [29] Claude Kirchner and Francis Klay. Syntactic theories and unification. In Proceedings of the Fifth Annual Symposium on Logic in Computer Science (LICS ’90), Philadelphia, Pennsylvania, USA, June 4-7, 1990, pages 270–277. IEEE Computer Society, 1990. doi:10.1109/LICS.1990.113753.
  • [30] Hélène Kirchner and Christophe Ringeissen. Combining symbolic constraint solvers on algebraic domains. J. Symb. Comput., 18(2):113–155, 1994. doi:10.1006/JSCO.1994.1040.
  • [31] Boris Konev and Temur Kutsia. Anti-unification of concepts in description logic EL. In Chitta Baral, James P. Delgrande, and Frank Wolter, editors, Principles of Knowledge Representation and Reasoning: Proceedings of the Fifteenth International Conference, KR 2016, Cape Town, South Africa, April 25-29, 2016, pages 227–236. AAAI Press, 2016. URL: http://www.aaai.org/ocs/index.php/KR/KR16/paper/view/12880.
  • [32] Christopher Lynch and Barbara Morawska. Basic syntactic mutation. In Andrei Voronkov, editor, Automated Deduction - CADE-18, 18th International Conference on Automated Deduction, Copenhagen, Denmark, July 27-30, 2002, Proceedings, volume 2392 of Lecture Notes in Computer Science, pages 471–485. Springer, 2002. doi:10.1007/3-540-45620-1_37.
  • [33] Sonu Mehta, Ranjita Bhagwan, Rahul Kumar, Chetan Bansal, Chandra Shekhar Maddila, B. Ashok, Sumit Asthana, Christian Bird, and Aditya Kumar. Rex: Preventing bugs and misconfiguration in large services using correlated change analysis. In Ranjita Bhagwan and George Porter, editors, 17th USENIX Symposium on Networked Systems Design and Implementation, NSDI 2020, Santa Clara, CA, USA, February 25-27, 2020, pages 435–448. USENIX Association, 2020. URL: https://www.usenix.org/conference/nsdi20/presentation/mehta.
  • [34] Tobias Nipkow. Proof transformations for equational theories. In Proceedings of the Fifth Annual Symposium on Logic in Computer Science (LICS ’90), Philadelphia, Pennsylvania, USA, June 4-7, 1990, pages 278–288. IEEE Computer Society, 1990. doi:10.1109/LICS.1990.113754.
  • [35] Tobias Nipkow. Combining matching algorithms: The regular case. J. Symb. Comput., 12(6):633–654, 1991. doi:10.1016/S0747-7171(08)80145-9.
  • [36] Julian Parsert and Elizabeth Polgreen. Reinforcement learning and data-generation for syntax-guided synthesis. In Michael J. Wooldridge, Jennifer G. Dy, and Sriraam Natarajan, editors, Thirty-Eighth AAAI Conference on Artificial Intelligence, AAAI 2024, Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2014, February 20-27, 2024, Vancouver, Canada, pages 10670–10678. AAAI Press, 2024. doi:10.1609/AAAI.V38I9.28938.
  • [37] Brigitte Pientka. Higher-order term indexing using substitution trees. ACM Trans. Comput. Log., 11(1):6:1–6:40, 2009. doi:10.1145/1614431.1614437.
  • [38] Gordon D. Plotkin. A note on inductive generalization. Machine Intel., 5(1):153–163, 1970.
  • [39] Stanislaw J. Purgal, David M. Cerna, and Cezary Kaliszyk. Learning higher-order logic programs from failures. In Luc De Raedt, editor, Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, IJCAI 2022, Vienna, Austria, 23-29 July 2022, pages 2726–2733. ijcai.org, 2022. doi:10.24963/IJCAI.2022/378.
  • [40] Mohammad Raza, Sumit Gulwani, and Natasa Milic-Frayling. Programming by Example Using Least General Generalizations. In Carla E. Brodley and Peter Stone, editors, Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, July 27 -31, 2014, Québec City, Québec, Canada, pages 283–290. AAAI Press, 2014. doi:10.1609/AAAI.V28I1.8744.
  • [41] John C. Reynolds. Transformational systems and the algebraic structure of atomic formulas. Machine Intel., 5(1):135–151, 1970.
  • [42] Manfred Schmidt-Schauß. Unification in a combination of arbitrary disjoint equational theories. J. Symb. Comput., 8(1/2):51–99, 1989. doi:10.1016/S0747-7171(89)80022-7.
  • [43] Erik Tidén. Unification in combinations of collapse-free theories with disjoint sets of function symbols. In Jörg H. Siekmann, editor, 8th International Conference on Automated Deduction, Oxford, England, July 27 - August 1, 1986, Proceedings, volume 230 of Lecture Notes in Computer Science, pages 431–449. Springer, 1986. doi:10.1007/3-540-16780-3_110.
  • [44] Emily Rowan Winter, Vesna Nowack, David Bowes, Steve Counsell, Tracy Hall, Sæmundur Óskar Haraldsson, John R. Woodward, Serkan Kirbas, Etienne Windels, Olayori McBello, Abdurahman Atakishiyev, Kevin Kells, and Matthew W. Pagano. Towards developer-centered automatic program repair: findings from Bloomberg. In Abhik Roychoudhury, Cristian Cadar, and Miryung Kim, editors, Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE, Singapore, November 14-18, 2022, pages 1578–1588. ACM, 2022. doi:10.1145/3540250.3558953.
  • [45] Kaiyu Yang and Jia Deng. Learning symbolic rules for reasoning in quasi-natural language. Trans. Mach. Learn. Res., 2023, 2023. URL: https://openreview.net/forum?id=gwRwHUZUgz.
  • [46] Katherine A. Yelick. Unification in combinations of collapse-free regular theories. J. Symb. Comput., 3(1/2):153–181, 1987. doi:10.1016/S0747-7171(87)80025-1.
  • [47] Gonzague Yernaux and Wim Vanhoof. Anti-unification of unordered goals. In Florin Manea and Alex Simpson, editors, 30th EACSL Annual Conference on Computer Science Logic, CSL 2022, February 14-19, 2022, Göttingen, Germany (Virtual Conference), volume 216 of LIPIcs, pages 37:1–37:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.CSL.2022.37.
  • [48] Gonzague Yernaux and Wim Vanhoof. On detecting semantic clones in constraint logic programs. In 16th IEEE International Workshop on Software Clones, IWSC 2022, Limassol, Cyprus, October 2, 2022, pages 32–38. IEEE, 2022. doi:10.1109/IWSC55060.2022.00014.
  • [49] Dongjun Youn, Wonho Shin, Jaehyun Lee, Sukyoung Ryu, Joachim Breitner, Philippa Gardner, Sam Lindley, Matija Pretnar, Xiaojia Rao, Conrad Watt, and Andreas Rossberg. Bringing the WebAssembly Standard up to Speed with SpecTec. Proc. ACM Program. Lang., 8(PLDI):1559–1584, 2024. doi:10.1145/3656440.