We present three methods to check CTRSs for non-confluence: (1) an ad hoc method for 4-CTRSs, (2) a specialized method for unconditional critical pairs, and finally, (3) a method that employs conditional narrowing to find non-confluence witnesses. We shortly describe our implementation of these methods in ConCon [8], then look into their certification with CeTA [11], and finally conclude with experiments on the confluence problems database (Cops). 1
PreliminariesWe assume familiarity with the basic notions of (conditional) term rewriting [1,4], but shortly recapitulate terminology and notation that we use in the remainder. Given an arbitrary binary relation →, we write ←, → + , → * for inverse, transitive closure, and reflexive transitive closure, respectively. We use V(•) to denote the set of variables occurring in a given syntactic object, like a term, a pair of terms, a list of terms, etc. The set of terms T (F , V) over a given signature of function symbols F and set of variables V is defined inductively: x ∈ T (F , V) for all variables x ∈ V, and for every n-ary function symbol f ∈ F and terms t 1 , . . . , t n ∈ T (F , V) also f (t 1 , . . . , t n ) ∈ T (F , V). We say that terms s and t unify if sσ = tσ for some substitution σ. The topmost part of a term that does not change under rewriting (sometimes called its "cap") can be approximated for example by the tcap function [2]. Informally, tcap(x) for a variable x results in a fresh variable, while tcap(t) for a non-variable term t = f (t 1 , . . . , t n ) is obtained by recursively computing u = f (tcap(t 1 ), . . . , tcap(t n )) and then asserting tcap(t) = u in case u does not unify with any left-hand side of rules in the TRS R, and a fresh variable, otherwise. We call a bijective variable substitution π : V → V a (variable) renaming. A CTRS R is a set of conditional rewrite rules of the shape ℓ → r ⇐ c where ℓ and r are terms and c is a (possibly empty) sequence of pairs of terms s 1 ≈ t 1 , . . . , s k ≈ t k . For all rules in R we have that ℓ / ∈ V. If additionally V(r) ⊆ V(ℓ, c) for all rules we call R a 3-CTRS otherwise a 4-CTRS. We restrict our attention to oriented CTRSs where conditions are interpreted as reachability requirements. The rewrite relation induced by an oriented CTRS R is structured into levels. For each level i, a TRS R i is defined recursively as follows: R 0 = ∅, andBy dropping all conditions from a CTRS R we obtain its underlying TRS, denoted R u . Note that → R ⊆ → Ru . We sometimes label rules like ρ : ℓ → r ⇐ c. Two variable-disjoint variants of ruleswith most general unifier (mgu) µ, constitute a conditional overlap. A conditional overlap that does not result from overlapping two variants of the same rule at the root, gives rise to a conditional critical pair← vσ for all substitutions σ such that sσ → * R tσ for all s ≈ t ∈ c. Moreover, a CCP u ≈ v ⇐ c is infeasible if there is no substitutions σ such that sσ → * R tσ for all s ≈ t ∈ c.