3.39/1.74 YES 3.69/1.76 proof of /export/starexec/sandbox/benchmark/theBenchmark.pl 3.69/1.76 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.69/1.76 3.69/1.76 3.69/1.76 Left Termination of the query pattern 3.69/1.76 3.69/1.76 duplicate(g,a) 3.69/1.76 3.69/1.76 w.r.t. the given Prolog program could successfully be proven: 3.69/1.76 3.69/1.76 (0) Prolog 3.69/1.76 (1) PrologToDTProblemTransformerProof [SOUND, 0 ms] 3.69/1.76 (2) TRIPLES 3.69/1.76 (3) TriplesToPiDPProof [SOUND, 0 ms] 3.69/1.76 (4) PiDP 3.69/1.76 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 3.69/1.76 (6) PiDP 3.69/1.76 (7) PiDPToQDPProof [SOUND, 0 ms] 3.69/1.76 (8) QDP 3.69/1.76 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 3.69/1.76 (10) YES 3.69/1.76 3.69/1.76 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (0) 3.69/1.76 Obligation: 3.69/1.76 Clauses: 3.69/1.76 3.69/1.76 duplicate([], []). 3.69/1.76 duplicate(.(X, Y), .(X, .(X, Z))) :- duplicate(Y, Z). 3.69/1.76 3.69/1.76 3.69/1.76 Query: duplicate(g,a) 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (1) PrologToDTProblemTransformerProof (SOUND) 3.69/1.76 Built DT problem from termination graph DT10. 3.69/1.76 3.69/1.76 { 3.69/1.76 "root": 1, 3.69/1.76 "program": { 3.69/1.76 "directives": [], 3.69/1.76 "clauses": [ 3.69/1.76 [ 3.69/1.76 "(duplicate ([]) ([]))", 3.69/1.76 null 3.69/1.76 ], 3.69/1.76 [ 3.69/1.76 "(duplicate (. X Y) (. X (. X Z)))", 3.69/1.76 "(duplicate Y Z)" 3.69/1.76 ] 3.69/1.76 ] 3.69/1.76 }, 3.69/1.76 "graph": { 3.69/1.76 "nodes": { 3.69/1.76 "77": { 3.69/1.76 "goal": [ 3.69/1.76 { 3.69/1.76 "clause": 0, 3.69/1.76 "scope": 1, 3.69/1.76 "term": "(duplicate T1 T2)" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "clause": 1, 3.69/1.76 "scope": 1, 3.69/1.76 "term": "(duplicate T1 T2)" 3.69/1.76 } 3.69/1.76 ], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T1"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "88": { 3.69/1.76 "goal": [ 3.69/1.76 { 3.69/1.76 "clause": 0, 3.69/1.76 "scope": 2, 3.69/1.76 "term": "(duplicate T7 T9)" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "clause": 1, 3.69/1.76 "scope": 2, 3.69/1.76 "term": "(duplicate T7 T9)" 3.69/1.76 } 3.69/1.76 ], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T7"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "78": { 3.69/1.76 "goal": [ 3.69/1.76 { 3.69/1.76 "clause": -1, 3.69/1.76 "scope": -1, 3.69/1.76 "term": "(true)" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "clause": 1, 3.69/1.76 "scope": 1, 3.69/1.76 "term": "(duplicate ([]) T2)" 3.69/1.76 } 3.69/1.76 ], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "89": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": 0, 3.69/1.76 "scope": 2, 3.69/1.76 "term": "(duplicate T7 T9)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T7"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "79": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": 1, 3.69/1.76 "scope": 1, 3.69/1.76 "term": "(duplicate T1 T2)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [[ 3.69/1.76 "(duplicate T1 T2)", 3.69/1.76 "(duplicate ([]) ([]))" 3.69/1.76 ]], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T1"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "type": "Nodes", 3.69/1.76 "1": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": -1, 3.69/1.76 "scope": -1, 3.69/1.76 "term": "(duplicate T1 T2)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T1"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "90": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": 1, 3.69/1.76 "scope": 2, 3.69/1.76 "term": "(duplicate T7 T9)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T7"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "80": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": 1, 3.69/1.76 "scope": 1, 3.69/1.76 "term": "(duplicate ([]) T2)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "91": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": -1, 3.69/1.76 "scope": -1, 3.69/1.76 "term": "(true)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "81": { 3.69/1.76 "goal": [], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "92": { 3.69/1.76 "goal": [], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "93": { 3.69/1.76 "goal": [], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "94": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": -1, 3.69/1.76 "scope": -1, 3.69/1.76 "term": "(duplicate T17 T19)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T17"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "95": { 3.69/1.76 "goal": [], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "86": { 3.69/1.76 "goal": [{ 3.69/1.76 "clause": -1, 3.69/1.76 "scope": -1, 3.69/1.76 "term": "(duplicate T7 T9)" 3.69/1.76 }], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": ["T7"], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "87": { 3.69/1.76 "goal": [], 3.69/1.76 "kb": { 3.69/1.76 "nonunifying": [], 3.69/1.76 "intvars": {}, 3.69/1.76 "arithmetic": { 3.69/1.76 "type": "PlainIntegerRelationState", 3.69/1.76 "relations": [] 3.69/1.76 }, 3.69/1.76 "ground": [], 3.69/1.76 "free": [], 3.69/1.76 "exprvars": [] 3.69/1.76 } 3.69/1.76 } 3.69/1.76 }, 3.69/1.76 "edges": [ 3.69/1.76 { 3.69/1.76 "from": 1, 3.69/1.76 "to": 77, 3.69/1.76 "label": "CASE" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 77, 3.69/1.76 "to": 78, 3.69/1.76 "label": "EVAL with clause\nduplicate([], []).\nand substitutionT1 -> [],\nT2 -> []" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 77, 3.69/1.76 "to": 79, 3.69/1.76 "label": "EVAL-BACKTRACK" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 78, 3.69/1.76 "to": 80, 3.69/1.76 "label": "SUCCESS" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 79, 3.69/1.76 "to": 86, 3.69/1.76 "label": "EVAL with clause\nduplicate(.(X7, X8), .(X7, .(X7, X9))) :- duplicate(X8, X9).\nand substitutionX7 -> T6,\nX8 -> T7,\nT1 -> .(T6, T7),\nX9 -> T9,\nT2 -> .(T6, .(T6, T9)),\nT8 -> T9" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 79, 3.69/1.76 "to": 87, 3.69/1.76 "label": "EVAL-BACKTRACK" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 80, 3.69/1.76 "to": 81, 3.69/1.76 "label": "BACKTRACK\nfor clause: duplicate(.(X, Y), .(X, .(X, Z))) :- duplicate(Y, Z)because of non-unification" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 86, 3.69/1.76 "to": 88, 3.69/1.76 "label": "CASE" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 88, 3.69/1.76 "to": 89, 3.69/1.76 "label": "PARALLEL" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 88, 3.69/1.76 "to": 90, 3.69/1.76 "label": "PARALLEL" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 89, 3.69/1.76 "to": 91, 3.69/1.76 "label": "EVAL with clause\nduplicate([], []).\nand substitutionT7 -> [],\nT9 -> []" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 89, 3.69/1.76 "to": 92, 3.69/1.76 "label": "EVAL-BACKTRACK" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 90, 3.69/1.76 "to": 94, 3.69/1.76 "label": "EVAL with clause\nduplicate(.(X16, X17), .(X16, .(X16, X18))) :- duplicate(X17, X18).\nand substitutionX16 -> T16,\nX17 -> T17,\nT7 -> .(T16, T17),\nX18 -> T19,\nT9 -> .(T16, .(T16, T19)),\nT18 -> T19" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 90, 3.69/1.76 "to": 95, 3.69/1.76 "label": "EVAL-BACKTRACK" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 91, 3.69/1.76 "to": 93, 3.69/1.76 "label": "SUCCESS" 3.69/1.76 }, 3.69/1.76 { 3.69/1.76 "from": 94, 3.69/1.76 "to": 1, 3.69/1.76 "label": "INSTANCE with matching:\nT1 -> T17\nT2 -> T19" 3.69/1.76 } 3.69/1.76 ], 3.69/1.76 "type": "Graph" 3.69/1.76 } 3.69/1.76 } 3.69/1.76 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (2) 3.69/1.76 Obligation: 3.69/1.76 Triples: 3.69/1.76 3.69/1.76 duplicateA(.(X1, .(X2, X3)), .(X1, .(X1, .(X2, .(X2, X4))))) :- duplicateA(X3, X4). 3.69/1.76 3.69/1.76 Clauses: 3.69/1.76 3.69/1.76 duplicatecA([], []). 3.69/1.76 duplicatecA(.(X1, []), .(X1, .(X1, []))). 3.69/1.76 duplicatecA(.(X1, .(X2, X3)), .(X1, .(X1, .(X2, .(X2, X4))))) :- duplicatecA(X3, X4). 3.69/1.76 3.69/1.76 Afs: 3.69/1.76 3.69/1.76 duplicateA(x1, x2) = duplicateA(x1) 3.69/1.76 3.69/1.76 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (3) TriplesToPiDPProof (SOUND) 3.69/1.76 We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: 3.69/1.76 3.69/1.76 duplicateA_in_2: (b,f) 3.69/1.76 3.69/1.76 Transforming TRIPLES into the following Term Rewriting System: 3.69/1.76 3.69/1.76 Pi DP problem: 3.69/1.76 The TRS P consists of the following rules: 3.69/1.76 3.69/1.76 DUPLICATEA_IN_GA(.(X1, .(X2, X3)), .(X1, .(X1, .(X2, .(X2, X4))))) -> U1_GA(X1, X2, X3, X4, duplicateA_in_ga(X3, X4)) 3.69/1.76 DUPLICATEA_IN_GA(.(X1, .(X2, X3)), .(X1, .(X1, .(X2, .(X2, X4))))) -> DUPLICATEA_IN_GA(X3, X4) 3.69/1.76 3.69/1.76 R is empty. 3.69/1.76 The argument filtering Pi contains the following mapping: 3.69/1.76 duplicateA_in_ga(x1, x2) = duplicateA_in_ga(x1) 3.69/1.76 3.69/1.76 .(x1, x2) = .(x1, x2) 3.69/1.76 3.69/1.76 DUPLICATEA_IN_GA(x1, x2) = DUPLICATEA_IN_GA(x1) 3.69/1.76 3.69/1.76 U1_GA(x1, x2, x3, x4, x5) = U1_GA(x1, x2, x3, x5) 3.69/1.76 3.69/1.76 3.69/1.76 We have to consider all (P,R,Pi)-chains 3.69/1.76 3.69/1.76 3.69/1.76 Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES 3.69/1.76 3.69/1.76 3.69/1.76 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (4) 3.69/1.76 Obligation: 3.69/1.76 Pi DP problem: 3.69/1.76 The TRS P consists of the following rules: 3.69/1.76 3.69/1.76 DUPLICATEA_IN_GA(.(X1, .(X2, X3)), .(X1, .(X1, .(X2, .(X2, X4))))) -> U1_GA(X1, X2, X3, X4, duplicateA_in_ga(X3, X4)) 3.69/1.76 DUPLICATEA_IN_GA(.(X1, .(X2, X3)), .(X1, .(X1, .(X2, .(X2, X4))))) -> DUPLICATEA_IN_GA(X3, X4) 3.69/1.76 3.69/1.76 R is empty. 3.69/1.76 The argument filtering Pi contains the following mapping: 3.69/1.76 duplicateA_in_ga(x1, x2) = duplicateA_in_ga(x1) 3.69/1.76 3.69/1.76 .(x1, x2) = .(x1, x2) 3.69/1.76 3.69/1.76 DUPLICATEA_IN_GA(x1, x2) = DUPLICATEA_IN_GA(x1) 3.69/1.76 3.69/1.76 U1_GA(x1, x2, x3, x4, x5) = U1_GA(x1, x2, x3, x5) 3.69/1.76 3.69/1.76 3.69/1.76 We have to consider all (P,R,Pi)-chains 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (5) DependencyGraphProof (EQUIVALENT) 3.69/1.76 The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 1 less node. 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (6) 3.69/1.76 Obligation: 3.69/1.76 Pi DP problem: 3.69/1.76 The TRS P consists of the following rules: 3.69/1.76 3.69/1.76 DUPLICATEA_IN_GA(.(X1, .(X2, X3)), .(X1, .(X1, .(X2, .(X2, X4))))) -> DUPLICATEA_IN_GA(X3, X4) 3.69/1.76 3.69/1.76 R is empty. 3.69/1.76 The argument filtering Pi contains the following mapping: 3.69/1.76 .(x1, x2) = .(x1, x2) 3.69/1.76 3.69/1.76 DUPLICATEA_IN_GA(x1, x2) = DUPLICATEA_IN_GA(x1) 3.69/1.76 3.69/1.76 3.69/1.76 We have to consider all (P,R,Pi)-chains 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (7) PiDPToQDPProof (SOUND) 3.69/1.76 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (8) 3.69/1.76 Obligation: 3.69/1.76 Q DP problem: 3.69/1.76 The TRS P consists of the following rules: 3.69/1.76 3.69/1.76 DUPLICATEA_IN_GA(.(X1, .(X2, X3))) -> DUPLICATEA_IN_GA(X3) 3.69/1.76 3.69/1.76 R is empty. 3.69/1.76 Q is empty. 3.69/1.76 We have to consider all (P,Q,R)-chains. 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (9) QDPSizeChangeProof (EQUIVALENT) 3.69/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.69/1.76 3.69/1.76 From the DPs we obtained the following set of size-change graphs: 3.69/1.76 *DUPLICATEA_IN_GA(.(X1, .(X2, X3))) -> DUPLICATEA_IN_GA(X3) 3.69/1.76 The graph contains the following edges 1 > 1 3.69/1.76 3.69/1.76 3.69/1.76 ---------------------------------------- 3.69/1.76 3.69/1.76 (10) 3.69/1.76 YES 3.76/1.80 EOF