3.51/1.73 YES 3.51/1.75 proof of /export/starexec/sandbox/benchmark/theBenchmark.pl 3.51/1.75 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.51/1.75 3.51/1.75 3.51/1.75 Left Termination of the query pattern 3.51/1.75 3.51/1.75 p(g) 3.51/1.75 3.51/1.75 w.r.t. the given Prolog program could successfully be proven: 3.51/1.75 3.51/1.75 (0) Prolog 3.51/1.75 (1) PrologToDTProblemTransformerProof [SOUND, 0 ms] 3.51/1.75 (2) TRIPLES 3.51/1.75 (3) TriplesToPiDPProof [SOUND, 8 ms] 3.51/1.75 (4) PiDP 3.51/1.75 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 3.51/1.75 (6) PiDP 3.51/1.75 (7) PiDPToQDPProof [SOUND, 0 ms] 3.51/1.75 (8) QDP 3.51/1.75 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 3.51/1.75 (10) YES 3.51/1.75 3.51/1.75 3.51/1.75 ---------------------------------------- 3.51/1.75 3.51/1.75 (0) 3.51/1.75 Obligation: 3.51/1.75 Clauses: 3.51/1.75 3.51/1.75 p(0). 3.51/1.75 p(s(X)) :- ','(geq(X, Y), p(Y)). 3.51/1.75 geq(X, X). 3.51/1.75 geq(s(X), Y) :- geq(X, Y). 3.51/1.75 3.51/1.75 3.51/1.75 Query: p(g) 3.51/1.75 ---------------------------------------- 3.51/1.75 3.51/1.75 (1) PrologToDTProblemTransformerProof (SOUND) 3.51/1.75 Built DT problem from termination graph DT10. 3.51/1.75 3.51/1.75 { 3.51/1.75 "root": 5, 3.51/1.75 "program": { 3.51/1.75 "directives": [], 3.51/1.75 "clauses": [ 3.51/1.75 [ 3.51/1.75 "(p (0))", 3.51/1.75 null 3.51/1.75 ], 3.51/1.75 [ 3.51/1.75 "(p (s X))", 3.51/1.75 "(',' (geq X Y) (p Y))" 3.51/1.75 ], 3.51/1.75 [ 3.51/1.75 "(geq X X)", 3.51/1.75 null 3.51/1.75 ], 3.51/1.75 [ 3.51/1.75 "(geq (s X) Y)", 3.51/1.75 "(geq X Y)" 3.51/1.75 ] 3.51/1.75 ] 3.51/1.75 }, 3.51/1.75 "graph": { 3.51/1.75 "nodes": { 3.51/1.75 "160": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": -1, 3.51/1.75 "scope": -1, 3.51/1.75 "term": "(',' (geq T11 X18) (p X18))" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T11"], 3.51/1.75 "free": ["X18"], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "type": "Nodes", 3.51/1.75 "161": { 3.51/1.75 "goal": [], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": [], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "140": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": -1, 3.51/1.75 "scope": -1, 3.51/1.75 "term": "(p T8)" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T8"], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "122": { 3.51/1.75 "goal": [ 3.51/1.75 { 3.51/1.75 "clause": -1, 3.51/1.75 "scope": -1, 3.51/1.75 "term": "(true)" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "clause": 1, 3.51/1.75 "scope": 1, 3.51/1.75 "term": "(p (0))" 3.51/1.75 } 3.51/1.75 ], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": [], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "123": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": 1, 3.51/1.75 "scope": 1, 3.51/1.75 "term": "(p T1)" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [[ 3.51/1.75 "(p T1)", 3.51/1.75 "(p (0))" 3.51/1.75 ]], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T1"], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "124": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": 1, 3.51/1.75 "scope": 1, 3.51/1.75 "term": "(p (0))" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": [], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "136": { 3.51/1.75 "goal": [], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": [], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "5": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": -1, 3.51/1.75 "scope": -1, 3.51/1.75 "term": "(p T1)" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T1"], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "126": { 3.51/1.75 "goal": [], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": [], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "137": { 3.51/1.75 "goal": [ 3.51/1.75 { 3.51/1.75 "clause": 2, 3.51/1.75 "scope": 2, 3.51/1.75 "term": "(',' (geq T3 X4) (p X4))" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "clause": 3, 3.51/1.75 "scope": 2, 3.51/1.75 "term": "(',' (geq T3 X4) (p X4))" 3.51/1.75 } 3.51/1.75 ], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T3"], 3.51/1.75 "free": ["X4"], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "6": { 3.51/1.75 "goal": [ 3.51/1.75 { 3.51/1.75 "clause": 0, 3.51/1.75 "scope": 1, 3.51/1.75 "term": "(p T1)" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "clause": 1, 3.51/1.75 "scope": 1, 3.51/1.75 "term": "(p T1)" 3.51/1.75 } 3.51/1.75 ], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T1"], 3.51/1.75 "free": [], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "138": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": 2, 3.51/1.75 "scope": 2, 3.51/1.75 "term": "(',' (geq T3 X4) (p X4))" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T3"], 3.51/1.75 "free": ["X4"], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "128": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": -1, 3.51/1.75 "scope": -1, 3.51/1.75 "term": "(',' (geq T3 X4) (p X4))" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T3"], 3.51/1.75 "free": ["X4"], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "139": { 3.51/1.75 "goal": [{ 3.51/1.75 "clause": 3, 3.51/1.75 "scope": 2, 3.51/1.75 "term": "(',' (geq T3 X4) (p X4))" 3.51/1.75 }], 3.51/1.75 "kb": { 3.51/1.75 "nonunifying": [], 3.51/1.75 "intvars": {}, 3.51/1.75 "arithmetic": { 3.51/1.75 "type": "PlainIntegerRelationState", 3.51/1.75 "relations": [] 3.51/1.75 }, 3.51/1.75 "ground": ["T3"], 3.51/1.75 "free": ["X4"], 3.51/1.75 "exprvars": [] 3.51/1.75 } 3.51/1.75 } 3.51/1.75 }, 3.51/1.75 "edges": [ 3.51/1.75 { 3.51/1.75 "from": 5, 3.51/1.75 "to": 6, 3.51/1.75 "label": "CASE" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 6, 3.51/1.75 "to": 122, 3.51/1.75 "label": "EVAL with clause\np(0).\nand substitutionT1 -> 0" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 6, 3.51/1.75 "to": 123, 3.51/1.75 "label": "EVAL-BACKTRACK" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 122, 3.51/1.75 "to": 124, 3.51/1.75 "label": "SUCCESS" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 123, 3.51/1.75 "to": 128, 3.51/1.75 "label": "EVAL with clause\np(s(X3)) :- ','(geq(X3, X4), p(X4)).\nand substitutionX3 -> T3,\nT1 -> s(T3)" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 123, 3.51/1.75 "to": 136, 3.51/1.75 "label": "EVAL-BACKTRACK" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 124, 3.51/1.75 "to": 126, 3.51/1.75 "label": "BACKTRACK\nfor clause: p(s(X)) :- ','(geq(X, Y), p(Y))because of non-unification" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 128, 3.51/1.75 "to": 137, 3.51/1.75 "label": "CASE" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 137, 3.51/1.75 "to": 138, 3.51/1.75 "label": "PARALLEL" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 137, 3.51/1.75 "to": 139, 3.51/1.75 "label": "PARALLEL" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 138, 3.51/1.75 "to": 140, 3.51/1.75 "label": "ONLY EVAL with clause\ngeq(X9, X9).\nand substitutionT3 -> T8,\nX9 -> T8,\nX4 -> T8" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 139, 3.51/1.75 "to": 160, 3.51/1.75 "label": "EVAL with clause\ngeq(s(X16), X17) :- geq(X16, X17).\nand substitutionX16 -> T11,\nT3 -> s(T11),\nX4 -> X18,\nX17 -> X18" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 139, 3.51/1.75 "to": 161, 3.51/1.75 "label": "EVAL-BACKTRACK" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 140, 3.51/1.75 "to": 5, 3.51/1.75 "label": "INSTANCE with matching:\nT1 -> T8" 3.51/1.75 }, 3.51/1.75 { 3.51/1.75 "from": 160, 3.51/1.75 "to": 128, 3.51/1.75 "label": "INSTANCE with matching:\nT3 -> T11\nX4 -> X18" 3.51/1.75 } 3.51/1.75 ], 3.51/1.75 "type": "Graph" 3.51/1.75 } 3.51/1.75 } 3.51/1.75 3.51/1.75 ---------------------------------------- 3.51/1.75 3.51/1.75 (2) 3.51/1.75 Obligation: 3.51/1.75 Triples: 3.51/1.75 3.51/1.75 pB(X1, X1) :- pA(X1). 3.51/1.75 pB(s(X1), X2) :- pB(X1, X2). 3.51/1.75 pA(s(X1)) :- pB(X1, X2). 3.51/1.75 3.51/1.75 Clauses: 3.51/1.75 3.51/1.75 pcA(0). 3.51/1.75 pcA(s(X1)) :- qcB(X1, X2). 3.51/1.75 qcB(X1, X1) :- pcA(X1). 3.51/1.75 qcB(s(X1), X2) :- qcB(X1, X2). 3.51/1.75 3.51/1.75 Afs: 3.51/1.75 3.51/1.75 pA(x1) = pA(x1) 3.51/1.75 3.51/1.75 3.51/1.75 ---------------------------------------- 3.51/1.75 3.51/1.75 (3) TriplesToPiDPProof (SOUND) 3.51/1.75 We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: 3.51/1.75 3.51/1.75 pA_in_1: (b) 3.51/1.75 3.51/1.75 pB_in_2: (b,f) 3.51/1.75 3.51/1.75 Transforming TRIPLES into the following Term Rewriting System: 3.51/1.75 3.51/1.75 Pi DP problem: 3.51/1.75 The TRS P consists of the following rules: 3.51/1.75 3.51/1.75 PA_IN_G(s(X1)) -> U3_G(X1, pB_in_ga(X1, X2)) 3.51/1.75 PA_IN_G(s(X1)) -> PB_IN_GA(X1, X2) 3.51/1.75 PB_IN_GA(X1, X1) -> U1_GA(X1, pA_in_g(X1)) 3.51/1.75 PB_IN_GA(X1, X1) -> PA_IN_G(X1) 3.51/1.75 PB_IN_GA(s(X1), X2) -> U2_GA(X1, X2, pB_in_ga(X1, X2)) 3.51/1.75 PB_IN_GA(s(X1), X2) -> PB_IN_GA(X1, X2) 3.51/1.75 3.51/1.75 R is empty. 3.51/1.75 The argument filtering Pi contains the following mapping: 3.51/1.75 pA_in_g(x1) = pA_in_g(x1) 3.51/1.75 3.51/1.75 s(x1) = s(x1) 3.51/1.75 3.51/1.75 pB_in_ga(x1, x2) = pB_in_ga(x1) 3.51/1.75 3.51/1.75 PA_IN_G(x1) = PA_IN_G(x1) 3.51/1.75 3.51/1.75 U3_G(x1, x2) = U3_G(x1, x2) 3.51/1.75 3.51/1.75 PB_IN_GA(x1, x2) = PB_IN_GA(x1) 3.51/1.75 3.51/1.75 U1_GA(x1, x2) = U1_GA(x1, x2) 3.51/1.75 3.51/1.75 U2_GA(x1, x2, x3) = U2_GA(x1, x3) 3.51/1.75 3.51/1.75 3.51/1.75 We have to consider all (P,R,Pi)-chains 3.51/1.75 3.51/1.75 3.51/1.75 Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES 3.51/1.75 3.51/1.75 3.51/1.75 3.51/1.75 ---------------------------------------- 3.51/1.75 3.51/1.75 (4) 3.51/1.75 Obligation: 3.51/1.75 Pi DP problem: 3.51/1.75 The TRS P consists of the following rules: 3.51/1.75 3.51/1.75 PA_IN_G(s(X1)) -> U3_G(X1, pB_in_ga(X1, X2)) 3.51/1.75 PA_IN_G(s(X1)) -> PB_IN_GA(X1, X2) 3.51/1.75 PB_IN_GA(X1, X1) -> U1_GA(X1, pA_in_g(X1)) 3.51/1.75 PB_IN_GA(X1, X1) -> PA_IN_G(X1) 3.51/1.75 PB_IN_GA(s(X1), X2) -> U2_GA(X1, X2, pB_in_ga(X1, X2)) 3.51/1.75 PB_IN_GA(s(X1), X2) -> PB_IN_GA(X1, X2) 3.51/1.75 3.51/1.75 R is empty. 3.51/1.75 The argument filtering Pi contains the following mapping: 3.51/1.75 pA_in_g(x1) = pA_in_g(x1) 3.51/1.75 3.51/1.75 s(x1) = s(x1) 3.51/1.75 3.51/1.75 pB_in_ga(x1, x2) = pB_in_ga(x1) 3.51/1.75 3.51/1.75 PA_IN_G(x1) = PA_IN_G(x1) 3.51/1.75 3.51/1.75 U3_G(x1, x2) = U3_G(x1, x2) 3.51/1.75 3.51/1.75 PB_IN_GA(x1, x2) = PB_IN_GA(x1) 3.51/1.75 3.51/1.75 U1_GA(x1, x2) = U1_GA(x1, x2) 3.51/1.75 3.51/1.75 U2_GA(x1, x2, x3) = U2_GA(x1, x3) 3.51/1.75 3.51/1.75 3.51/1.75 We have to consider all (P,R,Pi)-chains 3.51/1.75 ---------------------------------------- 3.51/1.75 3.51/1.75 (5) DependencyGraphProof (EQUIVALENT) 3.51/1.75 The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 3 less nodes. 3.51/1.75 ---------------------------------------- 3.51/1.76 3.51/1.76 (6) 3.51/1.76 Obligation: 3.51/1.76 Pi DP problem: 3.51/1.76 The TRS P consists of the following rules: 3.51/1.76 3.51/1.76 PA_IN_G(s(X1)) -> PB_IN_GA(X1, X2) 3.51/1.76 PB_IN_GA(X1, X1) -> PA_IN_G(X1) 3.51/1.76 PB_IN_GA(s(X1), X2) -> PB_IN_GA(X1, X2) 3.51/1.76 3.51/1.76 R is empty. 3.51/1.76 The argument filtering Pi contains the following mapping: 3.51/1.76 s(x1) = s(x1) 3.51/1.76 3.51/1.76 PA_IN_G(x1) = PA_IN_G(x1) 3.51/1.76 3.51/1.76 PB_IN_GA(x1, x2) = PB_IN_GA(x1) 3.51/1.76 3.51/1.76 3.51/1.76 We have to consider all (P,R,Pi)-chains 3.51/1.76 ---------------------------------------- 3.51/1.76 3.51/1.76 (7) PiDPToQDPProof (SOUND) 3.51/1.76 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 3.51/1.76 ---------------------------------------- 3.51/1.76 3.51/1.76 (8) 3.51/1.76 Obligation: 3.51/1.76 Q DP problem: 3.51/1.76 The TRS P consists of the following rules: 3.51/1.76 3.51/1.76 PA_IN_G(s(X1)) -> PB_IN_GA(X1) 3.51/1.76 PB_IN_GA(X1) -> PA_IN_G(X1) 3.51/1.76 PB_IN_GA(s(X1)) -> PB_IN_GA(X1) 3.51/1.76 3.51/1.76 R is empty. 3.51/1.76 Q is empty. 3.51/1.76 We have to consider all (P,Q,R)-chains. 3.51/1.76 ---------------------------------------- 3.51/1.76 3.51/1.76 (9) QDPSizeChangeProof (EQUIVALENT) 3.51/1.76 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.51/1.76 3.51/1.76 From the DPs we obtained the following set of size-change graphs: 3.51/1.76 *PB_IN_GA(X1) -> PA_IN_G(X1) 3.51/1.76 The graph contains the following edges 1 >= 1 3.51/1.76 3.51/1.76 3.51/1.76 *PB_IN_GA(s(X1)) -> PB_IN_GA(X1) 3.51/1.76 The graph contains the following edges 1 > 1 3.51/1.76 3.51/1.76 3.51/1.76 *PA_IN_G(s(X1)) -> PB_IN_GA(X1) 3.51/1.76 The graph contains the following edges 1 > 1 3.51/1.76 3.51/1.76 3.51/1.76 ---------------------------------------- 3.51/1.76 3.51/1.76 (10) 3.51/1.76 YES 3.51/1.78 EOF