/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern app2(a,g,g) 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: app1(.(X, Xs), Ys, .(X, Zs)) :- app1(Xs, Ys, Zs). app1([], Ys, Ys). app2(.(X, Xs), Ys, .(X, Zs)) :- app2(Xs, Ys, Zs). app2([], Ys, Ys). Query: app2(a,g,g) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(app1 (. X Xs) Ys (. X Zs))", "(app1 Xs Ys Zs)" ], [ "(app1 ([]) Ys Ys)", null ], [ "(app2 (. X Xs) Ys (. X Zs))", "(app2 Xs Ys Zs)" ], [ "(app2 ([]) Ys Ys)", null ] ] }, "graph": { "nodes": { "11": { "goal": [{ "clause": 3, "scope": 1, "term": "(app2 T1 T2 T3)" }], "kb": { "nonunifying": [[ "(app2 T1 T2 T3)", "(app2 (. X5 X6) X7 (. X5 X8))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T2", "T3" ], "free": [ "X5", "X6", "X7", "X8" ], "exprvars": [] } }, "33": { "goal": [ { "clause": 3, "scope": 2, "term": "(app2 T12 T10 T11)" }, { "clause": -1, "scope": 2, "term": null }, { "clause": 3, "scope": 1, "term": "(app2 T1 T10 (. T8 T11))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T8", "T11" ], "free": [], "exprvars": [] } }, "46": { "goal": [{ "clause": 3, "scope": 2, "term": "(app2 T12 T10 T11)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T11" ], "free": [], "exprvars": [] } }, "36": { "goal": [{ "clause": -1, "scope": -1, "term": "(app2 T33 T31 T32)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T31", "T32" ], "free": [], "exprvars": [] } }, "47": { "goal": [ { "clause": -1, "scope": 2, "term": null }, { "clause": 3, "scope": 1, "term": "(app2 T1 T10 (. T8 T11))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T8", "T11" ], "free": [], "exprvars": [] } }, "37": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "48": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "49": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "150": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "151": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "152": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "153": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "154": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(app2 T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T2", "T3" ], "free": [], "exprvars": [] } }, "155": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "2": { "goal": [ { "clause": 2, "scope": 1, "term": "(app2 T1 T2 T3)" }, { "clause": 3, "scope": 1, "term": "(app2 T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T2", "T3" ], "free": [], "exprvars": [] } }, "50": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "51": { "goal": [{ "clause": 3, "scope": 1, "term": "(app2 T1 T10 (. T8 T11))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T8", "T11" ], "free": [], "exprvars": [] } }, "31": { "goal": [ { "clause": 2, "scope": 2, "term": "(app2 T12 T10 T11)" }, { "clause": 3, "scope": 2, "term": "(app2 T12 T10 T11)" }, { "clause": -1, "scope": 2, "term": null }, { "clause": 3, "scope": 1, "term": "(app2 T1 T10 (. T8 T11))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T8", "T11" ], "free": [], "exprvars": [] } }, "10": { "goal": [ { "clause": -1, "scope": -1, "term": "(app2 T12 T10 T11)" }, { "clause": 3, "scope": 1, "term": "(app2 T1 T10 (. T8 T11))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T8", "T11" ], "free": [], "exprvars": [] } }, "32": { "goal": [{ "clause": 2, "scope": 2, "term": "(app2 T12 T10 T11)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T11" ], "free": [], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 2, "label": "CASE" }, { "from": 2, "to": 10, "label": "EVAL with clause\napp2(.(X5, X6), X7, .(X5, X8)) :- app2(X6, X7, X8).\nand substitutionX5 -> T8,\nX6 -> T12,\nT1 -> .(T8, T12),\nT2 -> T10,\nX7 -> T10,\nX8 -> T11,\nT3 -> .(T8, T11),\nT9 -> T12" }, { "from": 2, "to": 11, "label": "EVAL-BACKTRACK" }, { "from": 10, "to": 31, "label": "CASE" }, { "from": 11, "to": 153, "label": "EVAL with clause\napp2([], X42, X42).\nand substitutionT1 -> [],\nT2 -> T53,\nX42 -> T53,\nT3 -> T53" }, { "from": 11, "to": 154, "label": "EVAL-BACKTRACK" }, { "from": 31, "to": 32, "label": "PARALLEL" }, { "from": 31, "to": 33, "label": "PARALLEL" }, { "from": 32, "to": 36, "label": "EVAL with clause\napp2(.(X25, X26), X27, .(X25, X28)) :- app2(X26, X27, X28).\nand substitutionX25 -> T29,\nX26 -> T33,\nT12 -> .(T29, T33),\nT10 -> T31,\nX27 -> T31,\nX28 -> T32,\nT11 -> .(T29, T32),\nT30 -> T33" }, { "from": 32, "to": 37, "label": "EVAL-BACKTRACK" }, { "from": 33, "to": 46, "label": "PARALLEL" }, { "from": 33, "to": 47, "label": "PARALLEL" }, { "from": 36, "to": 1, "label": "INSTANCE with matching:\nT1 -> T33\nT2 -> T31\nT3 -> T32" }, { "from": 46, "to": 48, "label": "EVAL with clause\napp2([], X37, X37).\nand substitutionT12 -> [],\nT10 -> T42,\nX37 -> T42,\nT11 -> T42" }, { "from": 46, "to": 49, "label": "EVAL-BACKTRACK" }, { "from": 47, "to": 51, "label": "FAILURE" }, { "from": 48, "to": 50, "label": "SUCCESS" }, { "from": 51, "to": 150, "label": "EVAL with clause\napp2([], X40, X40).\nand substitutionT1 -> [],\nT10 -> .(T50, T51),\nX40 -> .(T50, T51),\nT8 -> T50,\nT11 -> T51,\nT49 -> .(T50, T51)" }, { "from": 51, "to": 151, "label": "EVAL-BACKTRACK" }, { "from": 150, "to": 152, "label": "SUCCESS" }, { "from": 153, "to": 155, "label": "SUCCESS" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: app2A(.(X1, .(X2, X3)), X4, .(X1, .(X2, X5))) :- app2A(X3, X4, X5). Clauses: app2cA(.(X1, .(X2, X3)), X4, .(X1, .(X2, X5))) :- app2cA(X3, X4, X5). app2cA(.(X1, []), X2, .(X1, X2)). app2cA([], .(X1, X2), .(X1, X2)). app2cA([], X1, X1). Afs: app2A(x1, x2, x3) = app2A(x2, x3) ---------------------------------------- (3) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: app2A_in_3: (f,b,b) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: APP2A_IN_AGG(.(X1, .(X2, X3)), X4, .(X1, .(X2, X5))) -> U1_AGG(X1, X2, X3, X4, X5, app2A_in_agg(X3, X4, X5)) APP2A_IN_AGG(.(X1, .(X2, X3)), X4, .(X1, .(X2, X5))) -> APP2A_IN_AGG(X3, X4, X5) R is empty. The argument filtering Pi contains the following mapping: app2A_in_agg(x1, x2, x3) = app2A_in_agg(x2, x3) .(x1, x2) = .(x1, x2) APP2A_IN_AGG(x1, x2, x3) = APP2A_IN_AGG(x2, x3) U1_AGG(x1, x2, x3, x4, x5, x6) = U1_AGG(x1, x2, x4, x5, x6) 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: APP2A_IN_AGG(.(X1, .(X2, X3)), X4, .(X1, .(X2, X5))) -> U1_AGG(X1, X2, X3, X4, X5, app2A_in_agg(X3, X4, X5)) APP2A_IN_AGG(.(X1, .(X2, X3)), X4, .(X1, .(X2, X5))) -> APP2A_IN_AGG(X3, X4, X5) R is empty. The argument filtering Pi contains the following mapping: app2A_in_agg(x1, x2, x3) = app2A_in_agg(x2, x3) .(x1, x2) = .(x1, x2) APP2A_IN_AGG(x1, x2, x3) = APP2A_IN_AGG(x2, x3) U1_AGG(x1, x2, x3, x4, x5, x6) = U1_AGG(x1, x2, x4, x5, x6) 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: APP2A_IN_AGG(.(X1, .(X2, X3)), X4, .(X1, .(X2, X5))) -> APP2A_IN_AGG(X3, X4, X5) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) APP2A_IN_AGG(x1, x2, x3) = APP2A_IN_AGG(x2, x3) 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: APP2A_IN_AGG(X4, .(X1, .(X2, X5))) -> APP2A_IN_AGG(X4, X5) 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: *APP2A_IN_AGG(X4, .(X1, .(X2, X5))) -> APP2A_IN_AGG(X4, X5) The graph contains the following edges 1 >= 1, 2 > 2 ---------------------------------------- (10) YES