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