Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning (KR 2020) Main Track
An ExpTime Upper Bound for with Integers ALC
Nadia Labai , Magdalena Ortiz , Mantas Simkusˇ Faculty of Informatics, TU Wien, Austria labai, simkus @dbai.tuwien.ac.at, [email protected] { }
Abstract them has been often singled out as an open challenge with Concrete domains, especially those that allow to compare fea- significant practical implications (Lutz 2002a, 2002b). tures with numeric values, have long been recognized as a To our knowledge, there are two decidability results for very desirable extension of description logics (DLs), and sig- extensions of with non-dense domains based on the ALC nificant efforts have been invested into adding them to usual integer numbers Z. For some domains that support com- DLs while keeping the complexity of reasoning in check. parisons over the integers, decidability can be inferred from For expressive DLs and in the presence of general TBoxes, results on fragments of CTL∗ with constraints (Bozzelli and for standard reasoning tasks like consistency, the most gen- Gascon 2006). More recently, Carapelle and Turhan (2016) eral decidability results are for the so-called ω-admissible do- mains, which are required to be dense. Supporting non-dense proved decidability for concrete domains that have the so- domains for features that range over integers or natural num- called EHD-property (for existence of a homomorphism is bers remained largely open, despite often being singled out as definable), which applies in particular to Z with comparison a highly desirable extension. The decidability of some exten- relations like ‘=’ and ‘<’. However, neither of these works sions of ALC with non-dense domains has been shown, but allow to infer any elementary bounds on the complexity of existing results rely on powerful machinery that does not al- reasoning. The former result applies the theory of well- low to infer any elementary bounds on the complexity of the quasi-orders to some dedicated graphose inequality systems. problem. In this paper, we study an extension of ALC with The latter result reduces the satisfaction of the numeric con- a rich integer domain that allows for comparisons (between straints to satisfiability of a formula in a powerful extension features, and between features and constants coded in unary), of monadic second order logic with a bounding quantifier, and prove that consistency can be solved using automata- theoretic techniques in single exponential time, and thus has which has been proved decidable over trees (Bojanczyk´ and no higher worst-case complexity than standard ALC. Our Torunczyk´ 2012). In both cases, the machinery stems from formalisms stronger than , and yields little insight on upper bounds apply to some extensions of DLs with concrete ALC domains known from the literature, support general TBoxes, what is the additional cost of the concrete domain. and allow for comparing values along paths of ordinary (not In this paper we propose an automata-theoretic algorithm necessarily functional) roles. tightly tailored for the DL P ( ), an extension of ALCF Zc with a domain based on Z that follows the work of 1 Introduction CarapelleALCF and Turhan (2016). Not only do we obtain the first Concrete domains, especially those allowing to compare elementary complexity upper bounds, but in fact we obtain features with numeric values, are a very natural and use- the best results that we could have hoped for: satisfiability ful extension of description logics. Their relevance was is decidable in single exponential time, and thus not harder than for plain . The upper bound also applies to other recognized since the early days of DLs (Baader and Han- ALC schke 1991), and they arise in all kinds of application do- approaches to concrete domains, and it extends to some do- mains. Identifying extensions of DLs that keep the com- mains over the real numbers that include unary predicates plexity of reasoning in check has been an ever present chal- for asserting that some numbers must be integer or natural. lenge for the DL community, and major research efforts have Crucially, our setting accommodates general TBoxes, and been devoted to that goal, see (Lutz 2002b) and its refer- allows to access the concrete domain along arbitrary paths ences. The best-known results so far are for the so-called ω- of ordinary roles, and not only of functional ones. To our admissible domains which, among other requirements, must knowledge, this is the first decidability result with both of be dense. Decidability and tight complexity results have these features, even for ω-admissible domains. been established for several expressive DLs extended with Our upper bound is obtained using automata-theoretic ω-admissible domains based on the real or the rational num- techniques. Concretely, we rely on a suitable notion of the bers. However, non-dense numeric domains with the inte- tree model property, and build a non-deterministic automa- ger or natural numbers are not ω-admissible, and supporting ton on infinite trees that accepts representations of models
614 Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning (KR 2020) Main Track of the input. The key challenge in the presence of TBoxes fulness of allowing referral to the concrete domains also comes from verifying whether an assignment of integer val- along paths of regular roles, but this easily results in unde- ues along infinite paths exists. While an infinite path of ever cidability. For example, such an extension of known increasing or ever decreasing values always exists, unsatis- as ( ) is undecidable for any so-calledALCarithmetic ALCFP D fiability of non-dense domains can arise from requiring an domain (Lutz 2004b). However, c and its analogue over infinite number of integers that are larger than some integer the real numbersD are not arithmetic,Z and the correspond- Rc and smaller than another. However, identifying that a given ing DLs ( c) and ( c) do not seem to input enforces an infinite sequence of integers between two have beenALCFP studiedZ before. ByALCFP encodingR these logics into bounds may require us to identify, for example, if two infi- P ( c) and P ( c), we prove that their satis- nite paths in the model meet at ever increasing distances. It ALCFfiability problemZ isALCF decidableR and obtain upper complexity is far from apparent how to detect this kind of very non-local bounds (which are tight under some restrictions). behavior in standard automata, and we could not identify an Finally, we remark that the extensions of DLs with con- automata-verifiable condition that precisely characterizes it. crete domains that we consider here are closely related to Instead, we use a condition similar to the one proposed for constraint temporal logics. Our logic P ( c) sub- constraint LTL by Demri and D’Souza (2007), which is nec- sumes constraint LTL as defined in (DemriALCF andZ D’Souza essary on all trees, and sufficient on regular ones, and appeal 2007), whose satisfiability problem is PSPACE complete. It to Rabin’s theorem to obtain a sound and complete satisfi- is in turn subsumed by constraint CTL∗, and more specifi- ability test. The full proofs can be found in the extended cally, by a fragment of it called CEF+ in (Bozzelli and Gas- version (Labai, Ortiz, and Simkusˇ 2020). con 2006), which unlike full CTL∗, has a decidable satisfi- ability problem, but for which no tight complexity bounds are known. Although much of the work on concrete do- Related work The first DLs with concrete domains were mains in the last decade has focused on lightweight DLs introduced by Baader and Hanschke (1991), where concrete like DL-Lite (e.g. (Baader, Borgwardt, and Lippmann 2017; values are connected via paths of functional roles, often Poggi et al. 2008; Savkovic and Calvanese 2012; Artale, called feature paths. They showed that pure concept sat- Ryzhikov, and Kontchakov 2012)), some advances in the isfiability is decidable for concrete domains that are ad- area of constraint CTL (Carapelle, Kartzow, and Lohrey missible, that is, satisfiability of conjunctionsD of predicates 2016) have inspired the study of expressive extensions that from is decidable, and its predicates are closed under had long remained an open problem, like the ones consid- negation.D Generalizations of this result and tight complex- ered here (Carapelle and Turhan 2016). ity bounds for specific settings were obtained in the follow- P ing years. For example, concept satisfiability is PSPACE- 2 The ( c) Description Logic complete under certain assumptions (Lutz 2002c). Adding ALCF Z The DL P ( ) was introduced by Carapelle and acyclic TBoxes increases the complexity to NEXPTIME, and Turhan (2016)ALCF for arbitraryD domains . Here we instanti- general TBoxes easily result in undecidability (Lutz 2004b). D ate this DL with the concrete domain c that is defined as Z It remains decidable if the paths to concrete domains are equipped with the standard binary equalityZ and comparison restricted to single functional roles (Haarslev, Moller,¨ and relations ‘=’ and ‘<’, as well as a family of unary relations Wessel 2001). Lutz also studied specific concrete domains, for comparing with an integer constant. for example for temporal reasoning (2004a), and summa- Reg rized key results in a survey paper (2002b). Definition 1 (Syntax of P ( c)). Let be a count- ably infinite set of registersALCF(alsoZ known as concrete fea- Later research relaxed the requirements on the concrete tures). A register term is an expression of the form Skx, domain, and the most general results so far are for exten- where x Reg and k 0 is an integer. An atomic con- sions of ( ) with ω-admissible domains, where con- straint is∈ an expression≥ of the form (i) t = t , (ii) t < t , cept satisfiabilityALC C w.r.t. to general TBoxes remains decidable 0 0 or (iii) t = c, where t, t are register terms, and c .A (Lutz and Milicic 2007). However, this and related results 0 Z (complex) constraint Θ is an expression built from∈ atomic assume two key restrictions that we relax in our work: the constraints using the Boolean connectives , and . The concrete domain is dense, and only functional roles occur in depth of Θ (in symbols, depth(Θ)) is the¬ maximal∧ ∨d such the paths connecting to the concrete domains. Both restric- that some register term Sdx appears in Θ. tions are also present in - , an extension of Q Let N and N be countably infinite sets of concept and with comparison predicatesSHIQ over the rational numbers,SHIQ for C R role names, respectively. We further assume an infinite set which concept satisfiability w.r.t. general TBoxes is EXP- NF NR of functional role names. A role path P is any TIME-complete. The logic we consider is closely related to finite⊆ sequence r r of role names, with n 0. We use - . It includes the fragment of - , 1 n Q Q P to denote the··· length of P , i.e. P = n. Note≥ that the butSHIQ additionally allows us toALCF replace the rational numbersSHIQ by empty| | sequence is also a role path,| which| we denote with . integers or naturals. Our EXPTIME upper bound also applies P ( c) concepts are defined as follows: to the extension of Q- with an int or nat predicate to ALCF Z make only some valuesSHIQ integer or natural, and, under certain C := A C (C C) r.C P. Θ | ¬ | u | ∃ | ∃ J K restrictions, to its extension with arbitrary role paths. where A NC, r NR, P is a role path, and Θ is a con- Concerning the latter extension, already the seminal work straint with∈ depth(Θ)∈ P . We use C D as an abbre- of Baader and Hanschke (1991) points out the potential use- viation of ( C D≤), | and| r.C as ant abbreviation of ¬ ¬ u ¬ ∀
615 Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning (KR 2020) Main Track
r. C. Moreover, we use P. Θ instead of P. Θ . Theorem 3 ((Carapelle and Turhan 2016)). Let ˆ, ˆ be in ¬∃Concepts¬ of the form D = ∀P.JΘK and D = ¬∃P. ΘJ¬ areK negation normal form, where d is the maximal depthC T of an ∃ ∀ called path constraints, and we letJ depthK (D) = P .J K existential path constraint in ˆ or ˆ, and e the number of | | C T A TBox is any finite set of axioms, where each axiom existentially quantified subconcepts in ˆ or ˆ. If ˆ is satis- T C T C has the form C D for some concepts C and D. fiable w.r.t. ˆ, then it has an n-tree model where n = d e. (Plain) v concepts and TBoxes are defined as in T · ALCF P ( ) but do not allow path constraints. ALCF Zc 3 A Tight Upper Bound for Satisfiability We can now define the semantics of the considered DL. In this section we present our main result: an algorithm for Definition 2 (Semantics). An interpretation is a tuple = I deciding P ( c) concept satisfiability w.r.t. to general (∆I , I , β), consisting of a non-empty set ∆I (called do- ALCF Z · TBoxes in single exponential time. The algorithm uses au- main), a register function β : ∆I Reg Z, and a (plain) × → tomata on infinite trees, and reduces the satisfiability test interpretation function I that assigns CI ∆I to every · ⊆ to the emptiness of a suitable automata. But first we bring concept name C NC, rI ∆I ∆I to every role name ∈ ⊆ × P ( c) concepts and TBoxes into a simpler shape that r NR. We further require that (v, v0), (v, v00) rI im- ALCF Z ∈ { } ⊆ facilitates the later developments. plies v0 = v00 for all r NF. Role paths denote tuples of ∈ elements. For a role path r1 rn, we define (r1 rn)I ··· n+1 ··· 3.1 Atomic Normal Form as the set of all tuples (v0, . . . , vn) ∆ such that ∈ Here we go from a concept 0 and TBox 0 in general form (v0, v1) r1I ,..., (vn 1, vn) rnI . C T ∈ − ∈ to equisatisfiable ˆ and ˆ in atomic normal form, where the For an interpretation and a tuple ~v = (v0, . . . , vn) of I C T 1 elements in ∆I , we define the following, where θ =, < path constraint are of length and the register constraints ∈ { } and c Z: are atomic. This conversion relies on the tree model prop- ∈ i j erty of P and on c being negation-closed. That is, • ,~v = θ(S x, S y) iff β(vi, x)θβ(vj, y); ALCF Z I | the negation of an atomic relation can be expressed without • ,~v = Six = c iff β(v , x) = c; I | i negation via other relations; for < and = negation can be • ,~v = Θ1 Θ2 iff ,~v = Θ1 and ,~v = Θ2; removed using only one disjunction, and for = c negation I | ∧ I | I | • ,~v = Θ Θ iff ,~v = Θ or ,~v = Θ ; can be removed using one conjunction with one disjunction I | 1 ∨ 2 I | 1 I | 2 • ,~v = Θ iff ,~v = Θ. and one fresh register name. I | ¬ I 6| Now the function is extended to complex concepts as Definition 4 (Atomic normal form). An P ( c)- I ALCF Z follows: · concept is in atomic normal form (ANF) if for every P. Θ and P. Θ that appears in it, Θ is an atomic constraint∃ J K • ( C)I = ∆I CI and (C D)I = CI DI , ¬ \ u ∩ and ∀P J K 1. A TBox is in ANF if the TBox-concept • ( r.C)I = v (v, v0) rI , v0 CI , and | | ≤ T ∃ { | ∈ ∈ } dC D ( C D) is in ANF. • ( P. Θ )I = u (u,~v) P I and , (u,~v) = Θ . v ∈T ¬ t ∃ { | ∈ I | } J K Lemma 5. Let 0 and 0 be a concept and a TBox in An interpretation is a model of a TBox , if CI DI C T for all C D .I We say that a conceptTC is satisfiable⊆ P ( c). Then 0 and 0 can be transformed in poly- v ∈ T ALCFnomial timeZ into andC inT ANF such that is satisfiable w.r.t. if there is a model of with CI = . C T C T I T 6 ∅ w.r.t. iff 0 is satisfiable w.r.t. 0. Example 1. The TBox with the axiom r. S0x < T C T 1 > v ∃ J S x enforces an infinite chain of objects whose x regis- Proof sketch. We can convert 0 and 0 to negation normal tersK store increasing integer values. This witnesses that form and then remove negationC fromT atomic constraints us- P ( c) does not enjoy the finite model property. ing , , and at most one fresh register name per constraint, ALCF Z ∧ ∨ The next axiom identifies active departments all in linear time. Therefore we assume that 0 and 0 are Example 2. C T whose employees lead projects started in the last two years: negation free. Next, relying on the tree model property, we employs leadsProject S2year > 2018 ActiveDept copy at each node u the registers of its ancestors that may In∃ general, the roles ‘employsJ ’ and ‘leadsProjectK v ’ need not occur in the same constraints as u’s own registers. For this be functional, but this is not a problem in P ( c). we propagate the register values of the ancestors one step at ALCF Z a time with axioms Tree model property The automata-based techniques we 1 k 0 k 1 r. S xi,P = S xi,P− employ in this paper rely on the tree model property of > v ∀ J K P ( c). We recall the definition of tree-shaped mod- We define a TBox prop that contains such an axiom for elsALCF (cf. CarapelleZ and Turhan (2016)). For n 1, let each appropriate roleT name r and (fresh) register names as- ≥ [n] = 1, . . . , n . We say = (∆I , I , β) is an (n-)tree sociated with role paths P and depth k of path constraints { } ? I · interpretation if ∆I = [n] for some n 1, and for every used in 0 and 0. Note that along every path P , the TBox ≥ C T u, v ∆I , we have that (u, v) rI for some r NR iff prop propagates values into copy-registers associated with ∈ ∈ ∈ T v = uγ for some γ [n]. Let γ , . . . , γ [n]. If uγ ∆I , all paths appearing in 0 or 0, not just into the copy- ∈ 1 k ∈ k ∈ C T we call u the parent of uγk, and if v = uγ1 γk ∆I , we registers associated with P . We will later restrict our at- call u the k-th ancestor of v. ··· ∈ tention to the relevant registers depending on context. The The following theorem will allow us to focus on n-trees following claim is proved with a straightforward inductive for our technical developments: construction:
616 Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning (KR 2020) Main Track
Claim 6. Every tree model of 0 w.r.t. 0 prop contains 3.2 Abstractions and Constraint Graphs C T ∪ T a tree model of 0 w.r.t. 0, and every tree model of 0 w.r.t. C T C To check satisfiability of w.r.t. , we follow the approach 0 can be expanded to a tree model of 0 w.r.t. 0 prop. C T T C T ∪ T of (Carapelle and Turhan 2016) and split the task into two checks: a satisfiability check for an abstracted version of For a role path P and an atomic constraint Θ, let , , which is in plain , and an embeddability check loc(Θ,P ) denote the constraint obtained from Θ by replac- TforC so-called constraintALCF graphs. We recall the definitions j 0 0 P j ing each occurrence of S x with S x| |− . In the next of abstracted P ( c) concepts and constraint graphs i i,P ALCF Z step, we create some “test” concept names and axioms that from (Carapelle and Turhan 2016), adapted to our context. will allow to check whether a given constraint is satisfied in Definition 9 (Abstraction). Consider a path constraint E = a certain path in a tree model. For each (sub)constraint Θ r. Θ , where Θ is an atomic constraint. Let B B be a ∃ ∈ and a role path P that appear in 0 or 0, take a fresh con- freshJ conceptK name, which we call the placeholder of Θ. The C T cept name TP,Θ and add to a TBox loc the following axioms abstraction of E is defined as T (recall that 0 and 0 are negation free): C T Ea = r.B ∃ E = r. Θ (A1) TP,Θ TP,Θ TP,Θ if Θ = Θ1 Θ2 The abstraction of a universal path constraint 0 0 ≡ 1 u 2 ∧ is analogous. If r = , then the abstraction is simply∀B.J K (A ) TP,Θ TP,Θ TP,Θ if Θ = Θ1 Θ2 2 ≡ 1 t 1 ∨ The abstractions of concepts and TBoxes given in ANF (A3) TP,Θ loc(Θ,P ) if Θ is an atomic constraint. are the (plain ) concepts and TBoxes obtained by re- ≡ ∃ J K placing all pathALCF constraints with their abstracted versions. We make two claims about combining prop with loc. The Let a, a be the abstractions of and , respectively. first is that we can continue expanding theT initial treeT model: C T C T Let Reg , be the set of register names used in and . The constraintC T graph of a plain tree-shaped interpretationC T Claim 7. Every tree model of 0 w.r.t. 0 prop can be C T ∪ T indicates how the values of its registers participate in rel- expanded to a tree model of 0 w.r.t. 0 prop loc, and C T ∪ T ∪ T evant relations. (In)equalities between registers are repre- every tree model of 0 w.r.t. 0 prop loc is a tree model C T ∪ T ∪ T sented as graph edges, and (in)equalities with constants are of 0 w.r.t 0 prop. C T ∪ T stored as node labels. a a Definition 10 (Constraint graph). Let a = (∆I , I ) be The above claim follows by induction on Θ. Next, we I · a plain tree-shaped interpretation of a, a. The constraint claim that prop loc indeed relates the satisfaction of path C T T ∪ T graph of a is the directed partially labeled graph a = constraints to membership in the test concepts: I a BGI (V, E, λ) where V = ∆I Reg , , λ : V 2 , and × C T → E = E< E= is such that, for every (v, y), (u, x) V , Claim 8. Let be a tree model of prop loc, and let P be J T ∪ T ∪ ∈ a role path and Θ a constraint appearing in 0 or 0. Then 1. ((v, y), (u, x)) E< if and only if either ∈ 0 it holds that C T • u = v, v BIa and B is a placeholder for S y < S0x, ∈ • u is the parent of v BIa and B is a placeholder for 1. contains a P -path e0, . . . , e P and if e P TP,JΘ, then J | | | | ∈ S1y < S0x, or ∈ the path e0, . . . , e P satisfies Θ in ; | | J • v is the parent of u BIa and B is a placeholder for 2. if contains a P -path e0, . . . , e P that satisfies Θ, then S0y < S1x ∈ J | | . e P TP,JΘ. 2. ((v, y), (u, x)) E= if and only if | | ∈ ∈ 0 • u = v, v BIa and B is a placeholder for S y = 0 ∈ Now we are ready to rewrite 0 and 0 into ANF using the S x, C T a locally available copy-registers and the test concept names; • u is the parent of v BI and B is a placeholder for 1 0 ∈ Given a concept D and a role path P = r1 rn, we write S y = S x, or ··· a P.D as shorthand for r1( r2( ( rn.D) )), and sim- • v is the parent of u BI and B is a placeholder for ∃ ∃ ∃ ··· ∃ ··· 0 1 ∈ ilarly for P.D. Let and ∗ be obtained from 0 and 0, S y = S x. respectively,∀ by replacingC everyT concept P. Θ byC P.TT 0 ∃ ∃ P,Θ In addition, for a placeholder B for S x = c, we have that and every P. Θ by P.T . Our desiredJ normalizationK a ∀ ∀ P,Θ B λ(u, x) if and only if u BI . is equipped withJ K the TBox = ∗ prop loc. ∈ ∈ C T T ∪ T ∪ T When the interpretation is clear from context, we write . Given a tree model of 0 w.r.t. 0, by chaining Claim 6 G C T We say a constraint graph is embeddable into c if and Claim 7, we get a tree model of 0 w.r.t. 0 prop G Z J C T ∪ T ∪ there is an integer assignment κ to the vertices V of such loc, and by applying Claim 8 we get that G T that for every (u, x), (v, y) V , if ((v, y), (u, x)) E< ∈ ∈ then κ(u, w) < κ(v, y) (and similarly for E=), and if ( P. Θ )J = ( P.T )J , ( P. Θ )J = ( P.T )J ∃ ∃ P,Θ ∀ ∀ P,Θ B λ(u, x) is a placeholder for S0x = c, then κ(u, x) = c. J K J K ∈ Hence is also a tree model of w.r.t. . Example 3. The left hand side of Figure 1 shows a con- J C T Given a tree model of w.r.t. , again by applying straint graph for an interpretation where each element sat- J C T 0 0 Claim 8 we get that is also a tree model of 0 w.r.t. 0 isfies . S x < S y , the root and its right child sat- J C T ∪ ∃ 0 1 prop loc (and in particular w.r.t. 0). isfy r. SJ y > S x ,K the root and its left child satisfy T ∪ T T ∃ J K
617 ,⌃ Theorem 2. Let (V, ,I) be finite enriched system of linear The checking part of T consists of the rules that, for each E Psol inequalities in which all constants and coefficients are in inequality in the system,, calculate⌃ the LHS and the RHS Theorem 2. Let (V, ,I) be finite enriched system of linear The checking part of solT consists of the rules that, for each 0, 1,..., inequalitiesa . If (V, in,I which) hasE all a constants solution and over coefficientsN⇤, then are in and compareinequality them. in the system,TheP idea calculate is to compute the LHS the and LHS the RHS (resp. {it also± has a± solution} overE where all finite values are 0, 1,..., a .N If⇤(V, ,I) has a solution over N⇤, then RHS)and of compare the inequalities them. The incrementally, idea is to compute by iterating the LHS through (resp. { ± ± } E 2( + I )+1 bounded by (itV also+ hasI + a solution) (( over+N⇤I where) a) all|E| finite| | values. are the variablesRHS) ofthe and inequalities at each iteration incrementally, storing by the iterating result throughof adding | | | | |E| · |E| | | · 2( + I )+1 bounded by ( V + I + ) (( + I ) a) |E| | | . up allthe the variables variables andconsidered at each iteration so storingfar that the occur result on of theadding LHS Proof sketch. In order to| decide| | | the|E| existence· |E| of| | a· solution up all the variables considered so far that occur on the LHS Proof sketch. In order to decide the existence of a solution (resp. RHS). In orderProceedings to iterate through of the the 17th variables International we need Conference on Principles of Knowledge Representation and Reasoning (KR 2020) over N⇤ to an enriched system of linear inequalities (V, ,I) to define(resp. a RHS). linear In order order to over iterate them. through We the guess variables a linear we need order over N⇤ to an enriched system of linear inequalitiesE (V, ,I) we can construct a set of (ordinary) linear inequality systems E to define a linear order over them. We guess a linear1 order Main Track we can construct a set of (ordinary) linear inequality systems over the constants in Cst using the predicate LEQ1 denoting and check whether at least one of them has a solution over over the constants in Cst using the predicate LEQ denoting and check whether at least one of them has a solution over that a constant is less than or equal to another constant: N⇤. Such a solution is also a solution of (V, ,I). Each one that a constant is less than or equal to another constant: N⇤. Such a solution is also a solutionE of (V, ,I). Each one 1 of these systems is of the form (V, ˆ), whereˆ ˆ isE builtˆ by LEQLEQ(1x,(x, x x)) CstCst(x) of these systems is of the form (V, ), where is built by Definition 12 (Tree representation of constraint graph). Let E [ E E [ E E E 1 1 2 2 11 adding to it eitheraddingy1 to+ it either+yym1 + 0+orymx1 +0 or+x1x+n >+0x,n for> 0, for LEQLEQ(x,( yx,) y) CstCst(x,(x, y y)),,notnot LEQ ((y,y, x x) ) ··· ··· ··· ··· be the constraint graph of some plain interpretation a. each implicationeachy implication+ + yy1 + 0=+ ym x0=+ x+1 +x >+0xn > 0 3 1 1 1 1 ··· m ··· ) 1 )··· n··· Cst3Cst(x, y,(x, z y,), zLEQ), LEQ1(x,(x, y) y,)LEQ, LEQ1((y, z)),,notnotLEQLEQ(1x,(x, z) z) G I in I. Thus, toin solveI. Thus, each to solve one of each these one systems of these systems it is enough it is enough For u ∆I with parent v, define X(u) as the subgraph of to consider the solutions whose finite values are bounded by From the guessed order, we can extract the successor relation ∈ G to consider the solutions whose finite values are bounded by From the guessed order, we can extract1 the successor relation induced by (u, x) x Reg (v, x) x Reg . ˆ ˆ 2( ˆ )+1 stored using the predicate Succ1 as well as the first and the , , ˆ ( V + ˆ) (( 2( ,⌃)ˆ )+1a) |E[E| . The result follows { | ∈ C T } ∪ { | ∈ C T } Theorem 2. Let (V, ,I) be finite enriched system of linear( V + The|) checking|(( |E [ E| part)· ofa|E) [|ETE|[E|·consists. The of result the rules follows that, for eachstored using the predicate Succ as well as the first and the | | |E [ E|from· the|E fact[ E| that· ˆ,⌃=solI . last constant w.r.t. to the order, stored using the predicates For u = ε, define X(u) as the subgraph of induced by Theorem 2. Letinequalities(V, ,I) inbe which finiteE all enriched constants system and coefficients of linear are inThe checking partˆ of |TE|P consists| | of the rules that, for eachlast constant1 w.r.t.1 to the order, stored using the predicates from the factinequality that in= theI . system,sol calculate the LHS and the RHS First1 and Last1 , respectively. Next, we lift the order to G E |E| | |P i (u, x) x Reg . Let Y (u) be the following partially inequalities in which0, 1,..., all constantsa . If (V, and,I) has coefficients a solution are over inN⇤, theninequalityand compareFor in the the given system, them. system The calculate idea, let is the to numberthe compute LHS of constants the and LHS the in (resp. RHSFirststringsand Last over Cst, respectively., i =1,...3l. Next, These we rules lift are the standard order to , ,⌃ S i { | ∈ C T } { ± ± } E For the givenCst be systemd and let, let the the arity number of Var, Iq of, and constantsIm be lv in,le and 0, 1,..., ait also. If Theorem( hasV, a,I solution) 2. hasLet (aV, over solution,IN) be⇤ where finite over enriched all finite⇤, system then values of linear areand compareTheRHS) checking of them. the part inequalities of ThesolT ideaconsists incrementally, is of to the compute rules by that, iterating thefor each LHS through (resp.stringsand over can beCst found, i in,=1 e.g.,,... (Dantsin3l. These et al. 2001). rules Finally,are standard not U-labeled graph: E N S P lv { ± ± } inequalitiesE in which all constants and coefficients2( + I are)+1Cst in be dinequalityandli, let respectively. the in the arity system, Thenof Var calculate,hasIq, at and most theIm LHSd bedifferent andlv,l thee and RHSvariables, lv bounded by ( V + I + ) (( + I ) a) |E| | | . the variablesl and at eachS iteration storing the resultl of addingand canevery be string found over in,Cst e.g.,represents (Dantsin a et variable al. 2001). in . Finally, There are not it also has a solution over N⇤ where all finite values are RHS) ofat the most inequalitiesd e different incrementally, inequalitieslv and at by most iteratingd i different through S 0, 1,...,| | |a |. If |E|(V, ·,I)|E|has2( a| solution|+·I )+1 over N⇤, thenli, respectively.andup compare all the Then variables them.has The at considered ideamost isd to computedifferent so far that the variables, occurLHS (resp. on the LHS different ways of ensuringlv that we only consider the actual • The vertices of Y (u) are obtained from X(u) by renaming bounded by ( V + I{ +± ) ±((} + IE ) a) . the variablesle implications. and atS In each view iteration of Theorem storing 2 and underli the the result assumption of addingevery string over Cst represents a variable in . There are Proof sketch.it also hasIn order a solution to decide over N the⇤ where existence|E| all| finite| of a values solutionat are most dRHS)different of the inequalities inequalities incrementally, and at most by iteratingd different through variables. We use the linear order above to define a successor bot top | | | | |E| · |E| | | · 2( + I )+1 (resp. RHS). In order to iterate through the variables we need S (u, x) x and (v, x) x for every x Reg . bounded by ( V + I + ) (( + I ) a) |E| | | . the variablesthat at least and one at each of lv,l iteratione,li storing1, in order the to result determine of adding whether different ways of ensuring that we only consider the actual , over N⇤ to an enriched system of linear inequalities (V, implications.,I)up all the In variables view of Theorem considered 2 and so under far the that assumption occur on the LHSrelation over the variables in the 2lv-ary relation SuccV. C T Proof sketch. In order to decide| | the| existence| |E| · |E| of a| solution| · E upto all define thehas variables a a solution linear considered orderit suffices over so tofar them. consider that occurWe the guess solutionson the a LHS linear whose ordervariables. We use the linear order above to define a successor 7→ 7→ ∈ 2(lv +le+li) Next, we add the facts and rules that define bit-by-bit we canProof construct sketch. a setIn orderof (ordinary) to decide linear the existence inequality of a systems solutionthat(resp. at least RHS). onefiniteS of In valueslv,l ordere,l doi not to1exceed iterate, in order2d through to determine. the The variables maximum whether1 finite we need • The edges of Y (u) are exactly those of X(u) (under the over N⇤ to an enriched system of linear inequalities (V, ,I) (resp.over RHS). the constants In order to in iterateCst using through the the predicate variables weLEQ needdenotingrelationaddition over of the binary variables numbers. in the To2lv this-ary end, relation we useSucc a 6-aryV. and checkover whetherN⇤ to an enriched at least system one of of them linear has inequalities a solution(V, over,Ihas)to define a solutionvalue a linear it obtainable suffices order to by overconsider adding them. up the the variablessolutions We guess in whose the a system linear is order E to define a linear order2( overlv +le them.+li) We guess a linear order ES that a constant is lessd 3(l than+l +l or) equal to another constant: Next,predicate we addAdd, the where facts(x, and y, z, rulesc, r) thatAdd defineif thex result bit-by-bit ofy renaming). we can constructN⇤ a. Such setwe of acan (ordinary)solution construct is a also setlinear of a(ordinary) solution inequality of linear(V, systems inequality,I). Each systems onefinite values do not exceed 2 d v e i . The maximum1 finite1 Figure 1: A constraint graph with registers and for each logical E over theover constantsthus the constants bounded in in byCstCst2 usingusing1 the the. predicate predicateLEQ LEQdenotingdenotingadditionadding of bits binaryx, y, numbers. and z is bit Tor with this2 the end, carry wec. use Asa these 6-ary bot and check whetherof these atand systems least check oneis whether of of the them at form least has(V, one a of solution themˆ), where has aover solutionˆ is built overvalue by obtainable by adding upLEQ the( variablesx, x) Cst in the(x) systemd3l is element (left) and its tree representation (right). The label λ is • We have Uc(x ) if and only if (u, x) is labeled with a that a constantLet l =( islv less+ l thane + l ori). equal To represent to another the constant: value 2 using a rules are standard, we(x, omit y,z, them c, r here.) We also add rules to N⇤. Such a solution is also a solutionE [ E of (V, ,IE). Each onethat a constant3( islv less+1le+li than) or equal2 to another1 constant: predicate Add, where Add if the result of y + +y (V, 0 ,Ix) + +x > 0 d 1 3l top N⇤. Such a solutionadding is to also it either a solution1 ofm or .1ˆ EachE oneˆn ,thus for boundedbinary by 2LEQ encoding(x,LEQ yof). integers,(x, xCst) ( weCstx, would( yx)), not needLEQd (bits,y, x which) emptyaddingsupport for bits all additionx, nodes y, and with andz infiniteis bitnotr values shown.with that2 the do carry the following:c. As these If placeholder for equality with c, and similarly for x . of these systems is··· of the form (EV, ),··· where is built by 1 3l each implication y1 + +ˆym 0=ˆ x1 + + xn > 0 would makeLEQ the translation( x, x ) exponential.Cst(x)d Thus, we encode any of the bits we are adding up is set to , we set both the of these systems is ofadding the form to it either(V, y + ),+ wherey E0 or[ Eisx + built+ byEx > 0, forLet l =(lv + le3 +1li). To represent12 the value1 12 using a 1 rules are standard, we omit them here. We also add rules to ···1 m ) 1 ··· n theCst addressLEQ(x,( y,x, of yz) these), LEQCstd3l((bitsx, y as)),,not aLEQ stringLEQ(y, of(y, z length) x, )not3lLEQover the(x, z) result and the carry to . We are now ready@ to calculate and in I. Thus,each implication to solve eachyE +[ oneE···+ ofy these 0=E systemsx···+ it is+ enoughx >binary0 encoding of1 integers, we would2 need d3l bits,1 which The tree representation Tr( ) of is the tree over Σ adding to it either y1 + +ym 01 or x1 +m +xn >10, for n LEQconstants3(x,( y,x, inz) y,Cst) . To1(Cstx, encode y),(x, the y1()y, values, not z), not ofLEQ the variables,1((y,x, xz)) we supportcompare addition the RHS with and infinite@ the LHS values of the that inequalities. do the following: We only If to considerin···I. the Thus, solutions to solve whose each··· one finite··· of these values) systems are bounded··· it is enough by FromCst the guessedLEQ order, weLEQ can extract theLEQ successor relation ….. G G y + + y 0= x + + x > 0 would make the translationl +3l +1 exponential.1 Thus, we(~x, encode~z,b) any of the0 bits we1 are adding0 up is set1 to , we set both the where Tr( )(u) = Y (u). each implication 1 m 2( 1 ˆ )+1 n 3 use a v 3l -ary1 predicate Val1 , with Val1 if r. (presentS x < the S rulesx for) LHS(S (RHSy = definedS y) analogously)., and the To right child of the ( V + toˆ consider) (( the solutionsˆ ) a whose) finite values. The are result bounded follows by CstFromstored(x, the usingy, guessed z), theLEQ order, predicate( wex, can y)Succ, extractLEQ theas(y, successor well3l z), asnot the relationLEQ first2 and(x, the z) @ G ··· ) |E[E|··· the address of these d bits as a string1 of length 3l over the resultstore and the the intermediate carry to results,. We are we now use a ready(l + l to+3 calculatel + 1)-ary and in I. Thus, to solve| | each|E [ E| oneˆ· of|E these[ E| · systemsˆ 2( itˆ )+1 is enough storedthe using bit encoded the predicate by theSucc stringas~z wellCst as thein first the valueand the of the∃ J ∧ e0K v 1 0 1 ( V + ˆ) =(( I ) a) |E[E| . The result followsconstantslast in Cst constant. To encode w.r.t. the to the values order, of2 stored the variables, using the we predicatesroot additionally satisfies@ r. (S(~y,x~x, <~z,b S) x) (S y < S x) . Rather than considering tree representations where nodes from the| fact| | thatE [ E| · |E [.E| · From thevariable guessed1 encoded order,1 by we~x has can the extract value b. the successor relationcomparepredicate the RHSUptoL and. Intuitively, the LHS the of tuple the inequalities. WeUpto onlyL to consider the solutions whose|E| finiteˆ| | values are bounded by last constant w.r.t.,⌃ to the order, stored using the predicates ∃ 2 ∧ from the fact that = I . use a lv +3Firstl1+1and-aryLast predicate1 , respectively.Val, with ( Next,~x, ~z,b) we liftVal theif orderpresent to if, for the the rules LHS for of LHS inequality (RHS~y, defined theJ~z-th bitanalogously). in the sum of To K |E|ˆ | | The solT guesses the value1 of each variable and checks This constraint graph is embeddable into Z. Consider, are labeled with arbitrary graphs from Σ, it will be conve- ˆ For theˆ given system2( )+1, let the number of constants instoredFirst usingand theLastP predicate, respectively.i Succ Next,3l as we well lift as the2 the order first to and thevariables up until ~x has the value b. We do this until we reach ( V + ) (( For) thea given) |E[ systemE|S ., The let the result number follows of constantsthe in bit encodedstringswhether by over the theCst stringi guess, i~z is=1 a validCst,... solution3inl. the These tovalue the rulessystem. of the are standard The store the intermediate results, we use a (le + lv +3l + 1)-ary | | |E [ E| Cst· |Ebe [d E|and· let the arity of Var, Iq, and Im be l ,l and strings over Cst , i =1,...3l. These rules are standard however,the last variable.an infinite When performing interpretation the addition, atin each which step the leftmost nient to consider trees over a restricted alphabet that contains ˆ d S , vl ,le last constantandguessing can w.r.t. be foundpart to is in,the rather e.g.,2 order, straightforward. (Dantsin stored et usingal. To2001). accommodate the Finally, predicates notpredicate Upto . Intuitively, the tuple (~y,~x, ~z,b) Upto from the fact that Cst= beI . and let the arity of Var Iqlv, and Im be v e andvariable encodedand can be by found~x has in, the e.g., value (Dantsinb. et al. 2001). Finally, not L L li, respectively. Then has at most d ldifferentv variables, 1 1 lv we need to mark the value of the carry bit. For this we2 use the |E|li, respectively.| | Then has at most d different variables, ,⌃ infinite values, inlv addition to constants 0 and 1, we assumebranchif, for the of LHS the of constraint inequality ~y graph, the ~z-th repeats bit in the infinitely. sum of Then we only graphs that have been enriched with either additional or le S li TheFirst TeveryandguessesLast string the over, respectively. valueCst ofrepresents each variable Next, a variable we and lift checks in the. There order are to at most d differentle inequalitiesS and at most d lidifferent solevery string over Cst represents a variable in . There are (le + lv +3l + 1)-ary predicate CarryL, where (~y,~x, ~z,c) For the given systemat most,d letdifferent the number inequalities ofand constants at most d in different P differenta special ways constanti of ensuring. We use that the we relation onlyS considerExtBitSto the store actualvariables up until ~x has the value b. Wex do this untily we reach2 implicit information in a maximal consistent way. whetherstringsdifferent the over guess waysCst is ofa, validi ensuring=1@ solution,... that we3l. to only These the consider system.i rules the Theactual are standardwouldCarry haveL if adding paths up the from bit at the positionto~z theof the variableregister~x of the root implications.implications.S In view In viewof Theorem of Theorem 2 and 2 and under under the the assumption assumption these constants. Further, we write Cst (x1,...,xi) as an Cst be d and let the arity of Var, Iq, and Im be lv,le and guessingvariables. partvariables. is rather We We use use straightforward. the linearthe linear order order above To above to accommodate define to a define successor a successorthe lastand variable. the intermediate When resultperforming obtained the so addition, far results at in each a carry step that at leastthat at one least of onelv,l ofe,llv,li e,li1, in1, order in order to todetermine determine whether whetherand can beabbreviation found in, for e.g.,Cst(x (Dantsin1),...Cst( etxi) al, for. 2001).i 1. Finally, We firstinvolving not any finite number of edges from E<, which would lv relationrelation over over the the variables variables in the in2l thev-ary2l relationv-ary relationSucc V. Succ .we needbit with to mark the value the valuec. This of bit the needs carry to bit. be taken For this into we account use the Definition 13 (Frame). A frame is a graph in Σ such that: li, respectively. Thenhas a solutionhashas a solution at it sufficesmost it sufficesd todifferent consider to consider the variables, the solutions solutions whose whoseinfinite values,guess in additionwhether al to variablev constants has a0 finiteand or1, an we infinite assume value: V 2(l +2(llv++lle)+li) every stringNext, overwe addCst the factsrepresents and rules a that variable define bit-by-bit in . Thereimply arewhen that adding theup integer the bits at values the next assignedposition. to these registers must le S finiteS S values do not exceedd 2vd e i li . The maximum finitea special constantNext, we.add We usethe factsthe relation and rulesExtBit thatto define store bit-by-bit(le + lv +3l + 1)-ary predicate CarryL, where (~y,~x, ~z,c) at most d differentfinite values inequalities do not exceed and2 at most d. Thedifferent maximum finite additionFin(~x of) binaryVar(~x numbers.), not Inf( To~x) thisInf( end,~x) weVar use(~x), anotS 6-aryFin(~x) 3l 2 1. there is an edge between every pair of vertices differentaddition ways of@ of binary ensuring numbers. that wei To only this end, consider we use the a actual 6-aryhaveCarry infinitelyUptoL if adding(~y,~x, ~z, up many0) theIq bit(~y different at), First the position(~x), Cst integer~z(~zof), thenot values variableIq (~y) between~x them. value obtainable by adding up the variables in the systemthese is constants. Further, we write Cst (x1,...,xi) as an L V L1 implications. Invalue view obtainable of Theorem by adding 2 and3(lv +up underle+l thei) variables the assumption in the system is predicateIf a variableAdd, where is assigned(x, y, an z, c,infinite r) value,Add if each thebit result is set of to : 3(l +dl +l ) predicate Add, where (x, y, z,2 c, r) Add if the resultand of the intermediate result obtained so far results in a carry thus boundedd byv2 e i . abbreviationvariables.adding for We bitsCst usex,( yx the,1 and),... linearz Cstis bit( orderxri)with, for above thei carry to1.c define We. As first these a successor@Thus in this case, the graph would3l not be embeddable. 2. there are no strict cycles, i.e. no cycles that include an that at least one of l ,l ,l 12, in order to determine whether3l 2 3l UptoL(~y,~x, ~z,1) Iq(~y), FirstV(~x), First (~z), IqL1(~y) thusv boundede i by . d adding bits Valx,( y~x,, and~z, )z isVar bit(~xr),withInf( ~x) the, Cst carry(~z) c. As thesebit with the value c. This bit needs to be taken into account Let l =(lv + le + li). To represent the value d23l usingguess arelation whetherrules over are a variable standard, the variables has we omit a@ finite in them the or here. an2l infinitev We-ary also relation value: add rulesSucc to V. edge from E has a solutionLet it sufficesl =(l + tol consider+ l ). To representthe solutions the value whose32l using a when adding up the bits at the next position.3l < binaryv encoding2(elv +le ofi + integers,l ) we would need d bits, which supportrulesOtherwise, are addition standard, we with guess infinite we its omit valuevalues them bit that by here. do bit. the However,We following: also add we If only rules toAbstractionsUptoL(~y,~x, ~z,0) andIq( constraint~y), FirstV(~x), Cst graphs(~z), allow us to reduce S d i 3l Fin(~xNext,) Var we(~x), addnot Inf the(~x2l facts) Inf( and~x) rulesVar(~x that), not defineFin(~x) bit-by-bit finite values dobinary not exceedwould encoding make2 of the integers, translation. Thewe exponential. would maximum need Thus,d finitebits, weencode which anysupport ofguess the addition thebits first we ared with addingbits infinite and up set is thevalues set rest to tothat, we 0. doThis set the both ensures following: the that If 3l 3l 3. if (x, y) E= then also (y, x) E= 3l addition of binary numbers. To this end, we use a 6-aryUptoL(P~y,(~x, ~z,c)0)satisfiabilityIq(Iq~yL)1,(First~y), notV( to~xFirst), twoCst(~z)( separate~z), not IqL checks:1(~y) value obtainablewould by adding makethe address the up translation of the these variablesd bits exponential. as in a string the system of Thus, length we is3l over encodeIf the a variableresultany iswe ofand assigned have the the enoughbits carry an we to infinite free are. We bits adding arevalue, to accommodate now up each ready is@ set bit to tois calculate addition. set, we to set and: bothALCF the Z ∈ ∈ 3l @ 3l 3l 3l U 3(constantslv +le+li) in Cst. To encode the values of the variables, wepredicatecompareAdd the, RHS where and the(x, LHS y, z, of c, the r) inequalities.3Addl @ if We the only@ result of Carry (~y,~x, ~z,0) Iq(~y), Var(~x), Cst (~z), First (~z) 4. every vertex must have exactly one of the labels in the addressd of these d bits as a string of length 3l over the resultVal and(~x, the~z0, ~z, carry0) toVar(.~x We), Fin are(~x) now, Cst3l ready(~z0), to calculateTheorem andUptoL(~y,L~x, 11~z,1)(CarapelleIq(~y), First andV(~x) Turhan,, First (~z), 2016)IqL1(~y). is satisfiable thus bounded by 2 use a l +3. l +1-ary predicate Val, with (~x, ~z,b) Val if Val(~x, ~z, ) Var (~x)@, Inf(~x), Cst2(~z) constants in Cstv . To encode the values of the variables, weaddingpresent bits thex, rulesy, and for LHSz is (RHS bit2l r definedwith analogously).thel carry c. To As these C 33l 2 compare the@ RHS and the LHS of the inequalities. We only ~ ~ 5. if (x, y) E then x and y have the same label from U, d store the intermediate results,Cst we(~z) use, not a (Firstle +(l~zv0+3) l + 1)-ary w.r.t. UptoifL( and~y,~x, ~z,b only) Upto if thereL(~y, x0, is~z,b a), Succ tree-shaped3l V(x0, ~x), a = a a such = Let l =(lv +usele a+lvthel+3i) bit. Tol encoded+1 represent-ary by predicate the the string valueVal~z , withCst2 (inusing~x, the~z,b value) a Val ofOtherwise, theifrules arepresent we standard, guess the its rules wevalue for omit bit LHS by them (RHSbit. here.However, defined Weweanalogously). also only add rules ToUpto to L(~y,~x, ~z,0) Iq(~y), FirstV(~x), Cst (~z), 2 2l 3l T I | T C ∈ variable encoded by ~x has the value3l 3bl. 2 predicateVal(Upto~x, ~z,L0). Intuitively,Var(~x), Fin the(~x tuple), Cst(~y,(~x,~z)~z,b, not) ValUpto(~x, ~z,L 1) not IqL(~y,~x) and if x and y have the same label from U U