3.52/1.71 YES 3.67/1.72 proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl 3.67/1.72 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.67/1.72 3.67/1.72 3.67/1.72 Left Termination of the query pattern 3.67/1.72 3.67/1.72 plus(g,a,a) 3.67/1.72 3.67/1.72 w.r.t. the given Prolog program could successfully be proven: 3.67/1.72 3.67/1.72 (0) Prolog 3.67/1.72 (1) PrologToDTProblemTransformerProof [SOUND, 0 ms] 3.67/1.72 (2) TRIPLES 3.67/1.72 (3) TriplesToPiDPProof [SOUND, 0 ms] 3.67/1.72 (4) PiDP 3.67/1.72 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 3.67/1.72 (6) PiDP 3.67/1.72 (7) PiDPToQDPProof [SOUND, 0 ms] 3.67/1.72 (8) QDP 3.67/1.72 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 3.67/1.72 (10) YES 3.67/1.72 3.67/1.72 3.67/1.72 ---------------------------------------- 3.67/1.72 3.67/1.72 (0) 3.67/1.72 Obligation: 3.67/1.72 Clauses: 3.67/1.72 3.67/1.72 plus(0, Y, Y). 3.67/1.72 plus(s(X), Y, Z) :- plus(X, s(Y), Z). 3.67/1.72 3.67/1.72 3.67/1.72 Query: plus(g,a,a) 3.67/1.72 ---------------------------------------- 3.67/1.72 3.67/1.72 (1) PrologToDTProblemTransformerProof (SOUND) 3.67/1.72 Built DT problem from termination graph DT10. 3.67/1.72 3.67/1.72 { 3.67/1.72 "root": 1, 3.67/1.72 "program": { 3.67/1.72 "directives": [], 3.67/1.72 "clauses": [ 3.67/1.72 [ 3.67/1.72 "(plus (0) Y Y)", 3.67/1.72 null 3.67/1.72 ], 3.67/1.72 [ 3.67/1.72 "(plus (s X) Y Z)", 3.67/1.72 "(plus X (s Y) Z)" 3.67/1.72 ] 3.67/1.72 ] 3.67/1.72 }, 3.67/1.72 "graph": { 3.67/1.72 "nodes": { 3.67/1.72 "88": { 3.67/1.72 "goal": [ 3.67/1.72 { 3.67/1.72 "clause": 0, 3.67/1.72 "scope": 2, 3.67/1.72 "term": "(plus T9 (s T13) T12)" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "clause": 1, 3.67/1.72 "scope": 2, 3.67/1.72 "term": "(plus T9 (s T13) T12)" 3.67/1.72 } 3.67/1.72 ], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T9"], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "89": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": 0, 3.67/1.72 "scope": 2, 3.67/1.72 "term": "(plus T9 (s T13) T12)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T9"], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "type": "Nodes", 3.67/1.72 "1": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": -1, 3.67/1.72 "scope": -1, 3.67/1.72 "term": "(plus T1 T2 T3)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T1"], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "90": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": 1, 3.67/1.72 "scope": 2, 3.67/1.72 "term": "(plus T9 (s T13) T12)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T9"], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "91": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": -1, 3.67/1.72 "scope": -1, 3.67/1.72 "term": "(true)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "92": { 3.67/1.72 "goal": [], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "82": { 3.67/1.72 "goal": [ 3.67/1.72 { 3.67/1.72 "clause": -1, 3.67/1.72 "scope": -1, 3.67/1.72 "term": "(true)" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "clause": 1, 3.67/1.72 "scope": 1, 3.67/1.72 "term": "(plus (0) T2 T3)" 3.67/1.72 } 3.67/1.72 ], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "93": { 3.67/1.72 "goal": [], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "83": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": 1, 3.67/1.72 "scope": 1, 3.67/1.72 "term": "(plus T1 T2 T3)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [[ 3.67/1.72 "(plus T1 T2 T3)", 3.67/1.72 "(plus (0) X2 X2)" 3.67/1.72 ]], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T1"], 3.67/1.72 "free": ["X2"], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "94": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": -1, 3.67/1.72 "scope": -1, 3.67/1.72 "term": "(plus T25 (s (s T29)) T28)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T25"], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "84": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": 1, 3.67/1.72 "scope": 1, 3.67/1.72 "term": "(plus (0) T2 T3)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "95": { 3.67/1.72 "goal": [], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "85": { 3.67/1.72 "goal": [], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "86": { 3.67/1.72 "goal": [{ 3.67/1.72 "clause": -1, 3.67/1.72 "scope": -1, 3.67/1.72 "term": "(plus T9 (s T13) T12)" 3.67/1.72 }], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T9"], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "32": { 3.67/1.72 "goal": [ 3.67/1.72 { 3.67/1.72 "clause": 0, 3.67/1.72 "scope": 1, 3.67/1.72 "term": "(plus T1 T2 T3)" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "clause": 1, 3.67/1.72 "scope": 1, 3.67/1.72 "term": "(plus T1 T2 T3)" 3.67/1.72 } 3.67/1.72 ], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": ["T1"], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "87": { 3.67/1.72 "goal": [], 3.67/1.72 "kb": { 3.67/1.72 "nonunifying": [], 3.67/1.72 "intvars": {}, 3.67/1.72 "arithmetic": { 3.67/1.72 "type": "PlainIntegerRelationState", 3.67/1.72 "relations": [] 3.67/1.72 }, 3.67/1.72 "ground": [], 3.67/1.72 "free": [], 3.67/1.72 "exprvars": [] 3.67/1.72 } 3.67/1.72 } 3.67/1.72 }, 3.67/1.72 "edges": [ 3.67/1.72 { 3.67/1.72 "from": 1, 3.67/1.72 "to": 32, 3.67/1.72 "label": "CASE" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 32, 3.67/1.72 "to": 82, 3.67/1.72 "label": "EVAL with clause\nplus(0, X2, X2).\nand substitutionT1 -> 0,\nT2 -> T5,\nX2 -> T5,\nT3 -> T5" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 32, 3.67/1.72 "to": 83, 3.67/1.72 "label": "EVAL-BACKTRACK" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 82, 3.67/1.72 "to": 84, 3.67/1.72 "label": "SUCCESS" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 83, 3.67/1.72 "to": 86, 3.67/1.72 "label": "EVAL with clause\nplus(s(X9), X10, X11) :- plus(X9, s(X10), X11).\nand substitutionX9 -> T9,\nT1 -> s(T9),\nT2 -> T13,\nX10 -> T13,\nT3 -> T12,\nX11 -> T12,\nT11 -> T12,\nT10 -> T13" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 83, 3.67/1.72 "to": 87, 3.67/1.72 "label": "EVAL-BACKTRACK" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 84, 3.67/1.72 "to": 85, 3.67/1.72 "label": "BACKTRACK\nfor clause: plus(s(X), Y, Z) :- plus(X, s(Y), Z)because of non-unification" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 86, 3.67/1.72 "to": 88, 3.67/1.72 "label": "CASE" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 88, 3.67/1.72 "to": 89, 3.67/1.72 "label": "PARALLEL" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 88, 3.67/1.72 "to": 90, 3.67/1.72 "label": "PARALLEL" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 89, 3.67/1.72 "to": 91, 3.67/1.72 "label": "EVAL with clause\nplus(0, X16, X16).\nand substitutionT9 -> 0,\nT13 -> T18,\nX16 -> s(T18),\nT12 -> s(T18)" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 89, 3.67/1.72 "to": 92, 3.67/1.72 "label": "EVAL-BACKTRACK" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 90, 3.67/1.72 "to": 94, 3.67/1.72 "label": "EVAL with clause\nplus(s(X23), X24, X25) :- plus(X23, s(X24), X25).\nand substitutionX23 -> T25,\nT9 -> s(T25),\nT13 -> T29,\nX24 -> s(T29),\nT12 -> T28,\nX25 -> T28,\nT27 -> T28,\nT26 -> T29" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 90, 3.67/1.72 "to": 95, 3.67/1.72 "label": "EVAL-BACKTRACK" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 91, 3.67/1.72 "to": 93, 3.67/1.72 "label": "SUCCESS" 3.67/1.72 }, 3.67/1.72 { 3.67/1.72 "from": 94, 3.67/1.72 "to": 1, 3.67/1.72 "label": "INSTANCE with matching:\nT1 -> T25\nT2 -> s(s(T29))\nT3 -> T28" 3.67/1.72 } 3.67/1.72 ], 3.67/1.72 "type": "Graph" 3.67/1.72 } 3.67/1.72 } 3.67/1.72 3.67/1.72 ---------------------------------------- 3.67/1.72 3.67/1.72 (2) 3.67/1.72 Obligation: 3.67/1.72 Triples: 3.67/1.72 3.67/1.72 plusA(s(s(X1)), X2, X3) :- plusA(X1, s(s(X2)), X3). 3.67/1.72 3.67/1.72 Clauses: 3.67/1.72 3.67/1.72 pluscA(0, X1, X1). 3.67/1.72 pluscA(s(0), X1, s(X1)). 3.67/1.72 pluscA(s(s(X1)), X2, X3) :- pluscA(X1, s(s(X2)), X3). 3.67/1.72 3.67/1.72 Afs: 3.67/1.72 3.67/1.72 plusA(x1, x2, x3) = plusA(x1) 3.67/1.72 3.67/1.72 3.67/1.72 ---------------------------------------- 3.67/1.72 3.67/1.72 (3) TriplesToPiDPProof (SOUND) 3.67/1.72 We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: 3.67/1.72 3.67/1.72 plusA_in_3: (b,f,f) 3.67/1.72 3.67/1.72 Transforming TRIPLES into the following Term Rewriting System: 3.67/1.72 3.67/1.72 Pi DP problem: 3.67/1.72 The TRS P consists of the following rules: 3.67/1.72 3.67/1.72 PLUSA_IN_GAA(s(s(X1)), X2, X3) -> U1_GAA(X1, X2, X3, plusA_in_gaa(X1, s(s(X2)), X3)) 3.67/1.72 PLUSA_IN_GAA(s(s(X1)), X2, X3) -> PLUSA_IN_GAA(X1, s(s(X2)), X3) 3.67/1.72 3.67/1.72 R is empty. 3.67/1.72 The argument filtering Pi contains the following mapping: 3.67/1.72 plusA_in_gaa(x1, x2, x3) = plusA_in_gaa(x1) 3.67/1.72 3.67/1.72 s(x1) = s(x1) 3.67/1.72 3.67/1.72 PLUSA_IN_GAA(x1, x2, x3) = PLUSA_IN_GAA(x1) 3.67/1.72 3.67/1.72 U1_GAA(x1, x2, x3, x4) = U1_GAA(x1, x4) 3.67/1.72 3.67/1.72 3.67/1.72 We have to consider all (P,R,Pi)-chains 3.67/1.72 3.67/1.72 3.67/1.72 Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES 3.67/1.72 3.67/1.72 3.67/1.72 3.67/1.72 ---------------------------------------- 3.67/1.72 3.67/1.72 (4) 3.67/1.72 Obligation: 3.67/1.72 Pi DP problem: 3.67/1.72 The TRS P consists of the following rules: 3.67/1.72 3.67/1.72 PLUSA_IN_GAA(s(s(X1)), X2, X3) -> U1_GAA(X1, X2, X3, plusA_in_gaa(X1, s(s(X2)), X3)) 3.67/1.72 PLUSA_IN_GAA(s(s(X1)), X2, X3) -> PLUSA_IN_GAA(X1, s(s(X2)), X3) 3.67/1.72 3.67/1.72 R is empty. 3.67/1.72 The argument filtering Pi contains the following mapping: 3.67/1.72 plusA_in_gaa(x1, x2, x3) = plusA_in_gaa(x1) 3.67/1.72 3.67/1.72 s(x1) = s(x1) 3.67/1.72 3.67/1.72 PLUSA_IN_GAA(x1, x2, x3) = PLUSA_IN_GAA(x1) 3.67/1.72 3.67/1.72 U1_GAA(x1, x2, x3, x4) = U1_GAA(x1, x4) 3.67/1.72 3.67/1.72 3.67/1.72 We have to consider all (P,R,Pi)-chains 3.67/1.72 ---------------------------------------- 3.67/1.72 3.67/1.72 (5) DependencyGraphProof (EQUIVALENT) 3.67/1.72 The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 1 less node. 3.67/1.72 ---------------------------------------- 3.67/1.72 3.67/1.72 (6) 3.67/1.72 Obligation: 3.67/1.72 Pi DP problem: 3.67/1.72 The TRS P consists of the following rules: 3.67/1.72 3.67/1.72 PLUSA_IN_GAA(s(s(X1)), X2, X3) -> PLUSA_IN_GAA(X1, s(s(X2)), X3) 3.67/1.72 3.67/1.72 R is empty. 3.67/1.72 The argument filtering Pi contains the following mapping: 3.67/1.72 s(x1) = s(x1) 3.67/1.72 3.67/1.72 PLUSA_IN_GAA(x1, x2, x3) = PLUSA_IN_GAA(x1) 3.67/1.72 3.67/1.72 3.67/1.72 We have to consider all (P,R,Pi)-chains 3.67/1.72 ---------------------------------------- 3.67/1.73 3.67/1.73 (7) PiDPToQDPProof (SOUND) 3.67/1.73 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 3.67/1.73 ---------------------------------------- 3.67/1.73 3.67/1.73 (8) 3.67/1.73 Obligation: 3.67/1.73 Q DP problem: 3.67/1.73 The TRS P consists of the following rules: 3.67/1.73 3.67/1.73 PLUSA_IN_GAA(s(s(X1))) -> PLUSA_IN_GAA(X1) 3.67/1.73 3.67/1.73 R is empty. 3.67/1.73 Q is empty. 3.67/1.73 We have to consider all (P,Q,R)-chains. 3.67/1.73 ---------------------------------------- 3.67/1.73 3.67/1.73 (9) QDPSizeChangeProof (EQUIVALENT) 3.67/1.73 By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 3.67/1.73 3.67/1.73 From the DPs we obtained the following set of size-change graphs: 3.67/1.73 *PLUSA_IN_GAA(s(s(X1))) -> PLUSA_IN_GAA(X1) 3.67/1.73 The graph contains the following edges 1 > 1 3.67/1.73 3.67/1.73 3.67/1.73 ---------------------------------------- 3.67/1.73 3.67/1.73 (10) 3.67/1.73 YES 3.75/1.77 EOF