3.65/1.65 YES 3.65/1.67 proof of /export/starexec/sandbox/benchmark/theBenchmark.pl 3.65/1.67 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.65/1.67 3.65/1.67 3.65/1.67 Left Termination of the query pattern 3.65/1.67 3.65/1.67 even(g) 3.65/1.67 3.65/1.67 w.r.t. the given Prolog program could successfully be proven: 3.65/1.67 3.65/1.67 (0) Prolog 3.65/1.67 (1) PrologToDTProblemTransformerProof [SOUND, 0 ms] 3.65/1.67 (2) TRIPLES 3.65/1.67 (3) TriplesToPiDPProof [SOUND, 0 ms] 3.65/1.67 (4) PiDP 3.65/1.67 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 3.65/1.67 (6) PiDP 3.65/1.67 (7) PiDPToQDPProof [EQUIVALENT, 0 ms] 3.65/1.67 (8) QDP 3.65/1.67 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 3.65/1.67 (10) YES 3.65/1.67 3.65/1.67 3.65/1.67 ---------------------------------------- 3.65/1.67 3.65/1.67 (0) 3.65/1.67 Obligation: 3.65/1.67 Clauses: 3.65/1.67 3.65/1.67 even(0). 3.65/1.67 even(s(X)) :- odd(X). 3.65/1.67 odd(s(X)) :- even(X). 3.65/1.67 3.65/1.67 3.65/1.67 Query: even(g) 3.65/1.67 ---------------------------------------- 3.65/1.67 3.65/1.67 (1) PrologToDTProblemTransformerProof (SOUND) 3.65/1.67 Built DT problem from termination graph DT10. 3.65/1.67 3.65/1.67 { 3.65/1.67 "root": 7, 3.65/1.67 "program": { 3.65/1.67 "directives": [], 3.65/1.67 "clauses": [ 3.65/1.67 [ 3.65/1.67 "(even (0))", 3.65/1.67 null 3.65/1.67 ], 3.65/1.67 [ 3.65/1.67 "(even (s X))", 3.65/1.67 "(odd X)" 3.65/1.67 ], 3.65/1.67 [ 3.65/1.67 "(odd (s X))", 3.65/1.67 "(even X)" 3.65/1.67 ] 3.65/1.67 ] 3.65/1.67 }, 3.65/1.67 "graph": { 3.65/1.67 "nodes": { 3.65/1.67 "88": { 3.65/1.67 "goal": [{ 3.65/1.67 "clause": 1, 3.65/1.67 "scope": 1, 3.65/1.67 "term": "(even (0))" 3.65/1.67 }], 3.65/1.67 "kb": { 3.65/1.67 "nonunifying": [], 3.65/1.67 "intvars": {}, 3.65/1.67 "arithmetic": { 3.65/1.67 "type": "PlainIntegerRelationState", 3.65/1.67 "relations": [] 3.65/1.67 }, 3.65/1.67 "ground": [], 3.65/1.67 "free": [], 3.65/1.67 "exprvars": [] 3.65/1.67 } 3.65/1.67 }, 3.65/1.67 "89": { 3.65/1.67 "goal": [], 3.65/1.67 "kb": { 3.65/1.67 "nonunifying": [], 3.65/1.67 "intvars": {}, 3.65/1.67 "arithmetic": { 3.65/1.67 "type": "PlainIntegerRelationState", 3.65/1.67 "relations": [] 3.65/1.67 }, 3.65/1.67 "ground": [], 3.65/1.67 "free": [], 3.65/1.67 "exprvars": [] 3.65/1.67 } 3.65/1.67 }, 3.65/1.67 "14": { 3.65/1.67 "goal": [ 3.65/1.67 { 3.65/1.67 "clause": 0, 3.65/1.67 "scope": 1, 3.65/1.67 "term": "(even T1)" 3.65/1.67 }, 3.65/1.67 { 3.65/1.67 "clause": 1, 3.65/1.67 "scope": 1, 3.65/1.67 "term": "(even T1)" 3.65/1.67 } 3.65/1.67 ], 3.65/1.67 "kb": { 3.65/1.67 "nonunifying": [], 3.65/1.67 "intvars": {}, 3.65/1.67 "arithmetic": { 3.65/1.67 "type": "PlainIntegerRelationState", 3.65/1.67 "relations": [] 3.65/1.67 }, 3.65/1.67 "ground": ["T1"], 3.65/1.67 "free": [], 3.65/1.67 "exprvars": [] 3.65/1.67 } 3.65/1.67 }, 3.65/1.67 "7": { 3.65/1.67 "goal": [{ 3.65/1.67 "clause": -1, 3.65/1.67 "scope": -1, 3.65/1.68 "term": "(even T1)" 3.65/1.68 }], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": ["T1"], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "90": { 3.65/1.68 "goal": [{ 3.65/1.68 "clause": -1, 3.65/1.68 "scope": -1, 3.65/1.68 "term": "(odd T3)" 3.65/1.68 }], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": ["T3"], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "91": { 3.65/1.68 "goal": [], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": [], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "92": { 3.65/1.68 "goal": [{ 3.65/1.68 "clause": 2, 3.65/1.68 "scope": 2, 3.65/1.68 "term": "(odd T3)" 3.65/1.68 }], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": ["T3"], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "93": { 3.65/1.68 "goal": [{ 3.65/1.68 "clause": -1, 3.65/1.68 "scope": -1, 3.65/1.68 "term": "(even T6)" 3.65/1.68 }], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": ["T6"], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "94": { 3.65/1.68 "goal": [], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": [], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "type": "Nodes", 3.65/1.68 "86": { 3.65/1.68 "goal": [ 3.65/1.68 { 3.65/1.68 "clause": -1, 3.65/1.68 "scope": -1, 3.65/1.68 "term": "(true)" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "clause": 1, 3.65/1.68 "scope": 1, 3.65/1.68 "term": "(even (0))" 3.65/1.68 } 3.65/1.68 ], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": [], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "87": { 3.65/1.68 "goal": [{ 3.65/1.68 "clause": 1, 3.65/1.68 "scope": 1, 3.65/1.68 "term": "(even T1)" 3.65/1.68 }], 3.65/1.68 "kb": { 3.65/1.68 "nonunifying": [[ 3.65/1.68 "(even T1)", 3.65/1.68 "(even (0))" 3.65/1.68 ]], 3.65/1.68 "intvars": {}, 3.65/1.68 "arithmetic": { 3.65/1.68 "type": "PlainIntegerRelationState", 3.65/1.68 "relations": [] 3.65/1.68 }, 3.65/1.68 "ground": ["T1"], 3.65/1.68 "free": [], 3.65/1.68 "exprvars": [] 3.65/1.68 } 3.65/1.68 } 3.65/1.68 }, 3.65/1.68 "edges": [ 3.65/1.68 { 3.65/1.68 "from": 7, 3.65/1.68 "to": 14, 3.65/1.68 "label": "CASE" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 14, 3.65/1.68 "to": 86, 3.65/1.68 "label": "EVAL with clause\neven(0).\nand substitutionT1 -> 0" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 14, 3.65/1.68 "to": 87, 3.65/1.68 "label": "EVAL-BACKTRACK" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 86, 3.65/1.68 "to": 88, 3.65/1.68 "label": "SUCCESS" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 87, 3.65/1.68 "to": 90, 3.65/1.68 "label": "EVAL with clause\neven(s(X3)) :- odd(X3).\nand substitutionX3 -> T3,\nT1 -> s(T3)" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 87, 3.65/1.68 "to": 91, 3.65/1.68 "label": "EVAL-BACKTRACK" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 88, 3.65/1.68 "to": 89, 3.65/1.68 "label": "BACKTRACK\nfor clause: even(s(X)) :- odd(X)because of non-unification" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 90, 3.65/1.68 "to": 92, 3.65/1.68 "label": "CASE" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 92, 3.65/1.68 "to": 93, 3.65/1.68 "label": "EVAL with clause\nodd(s(X6)) :- even(X6).\nand substitutionX6 -> T6,\nT3 -> s(T6)" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 92, 3.65/1.68 "to": 94, 3.65/1.68 "label": "EVAL-BACKTRACK" 3.65/1.68 }, 3.65/1.68 { 3.65/1.68 "from": 93, 3.65/1.68 "to": 7, 3.65/1.68 "label": "INSTANCE with matching:\nT1 -> T6" 3.65/1.68 } 3.65/1.68 ], 3.65/1.68 "type": "Graph" 3.65/1.68 } 3.65/1.68 } 3.65/1.68 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (2) 3.65/1.68 Obligation: 3.65/1.68 Triples: 3.65/1.68 3.65/1.68 evenA(s(s(X1))) :- evenA(X1). 3.65/1.68 3.65/1.68 Clauses: 3.65/1.68 3.65/1.68 evencA(0). 3.65/1.68 evencA(s(s(X1))) :- evencA(X1). 3.65/1.68 3.65/1.68 Afs: 3.65/1.68 3.65/1.68 evenA(x1) = evenA(x1) 3.65/1.68 3.65/1.68 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (3) TriplesToPiDPProof (SOUND) 3.65/1.68 We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: 3.65/1.68 3.65/1.68 evenA_in_1: (b) 3.65/1.68 3.65/1.68 Transforming TRIPLES into the following Term Rewriting System: 3.65/1.68 3.65/1.68 Pi DP problem: 3.65/1.68 The TRS P consists of the following rules: 3.65/1.68 3.65/1.68 EVENA_IN_G(s(s(X1))) -> U1_G(X1, evenA_in_g(X1)) 3.65/1.68 EVENA_IN_G(s(s(X1))) -> EVENA_IN_G(X1) 3.65/1.68 3.65/1.68 R is empty. 3.65/1.68 Pi is empty. 3.65/1.68 We have to consider all (P,R,Pi)-chains 3.65/1.68 3.65/1.68 3.65/1.68 Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES 3.65/1.68 3.65/1.68 3.65/1.68 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (4) 3.65/1.68 Obligation: 3.65/1.68 Pi DP problem: 3.65/1.68 The TRS P consists of the following rules: 3.65/1.68 3.65/1.68 EVENA_IN_G(s(s(X1))) -> U1_G(X1, evenA_in_g(X1)) 3.65/1.68 EVENA_IN_G(s(s(X1))) -> EVENA_IN_G(X1) 3.65/1.68 3.65/1.68 R is empty. 3.65/1.68 Pi is empty. 3.65/1.68 We have to consider all (P,R,Pi)-chains 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (5) DependencyGraphProof (EQUIVALENT) 3.65/1.68 The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 1 less node. 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (6) 3.65/1.68 Obligation: 3.65/1.68 Pi DP problem: 3.65/1.68 The TRS P consists of the following rules: 3.65/1.68 3.65/1.68 EVENA_IN_G(s(s(X1))) -> EVENA_IN_G(X1) 3.65/1.68 3.65/1.68 R is empty. 3.65/1.68 Pi is empty. 3.65/1.68 We have to consider all (P,R,Pi)-chains 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (7) PiDPToQDPProof (EQUIVALENT) 3.65/1.68 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (8) 3.65/1.68 Obligation: 3.65/1.68 Q DP problem: 3.65/1.68 The TRS P consists of the following rules: 3.65/1.68 3.65/1.68 EVENA_IN_G(s(s(X1))) -> EVENA_IN_G(X1) 3.65/1.68 3.65/1.68 R is empty. 3.65/1.68 Q is empty. 3.65/1.68 We have to consider all (P,Q,R)-chains. 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (9) QDPSizeChangeProof (EQUIVALENT) 3.65/1.68 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.65/1.68 3.65/1.68 From the DPs we obtained the following set of size-change graphs: 3.65/1.68 *EVENA_IN_G(s(s(X1))) -> EVENA_IN_G(X1) 3.65/1.68 The graph contains the following edges 1 > 1 3.65/1.68 3.65/1.68 3.65/1.68 ---------------------------------------- 3.65/1.68 3.65/1.68 (10) 3.65/1.68 YES 3.80/1.72 EOF