/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Left Termination of the query pattern interleave(g,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, 4 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: interleave([], Xs, Xs). interleave(.(X, Xs), Ys, .(X, Zs)) :- interleave(Ys, Xs, Zs). Query: interleave(g,g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 7, "program": { "directives": [], "clauses": [ [ "(interleave ([]) Xs Xs)", null ], [ "(interleave (. X Xs) Ys (. X Zs))", "(interleave Ys Xs Zs)" ] ] }, "graph": { "nodes": { "34": { "goal": [ { "clause": 0, "scope": 1, "term": "(interleave T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(interleave T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "56": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "46": { "goal": [ { "clause": -1, "scope": -1, "term": "(true)" }, { "clause": 1, "scope": 1, "term": "(interleave ([]) T5 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": [], "exprvars": [] } }, "57": { "goal": [{ "clause": -1, "scope": -1, "term": "(interleave T12 T11 T14)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T11", "T12" ], "free": [], "exprvars": [] } }, "47": { "goal": [{ "clause": 1, "scope": 1, "term": "(interleave T1 T2 T3)" }], "kb": { "nonunifying": [[ "(interleave T1 T2 T3)", "(interleave ([]) X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": ["X2"], "exprvars": [] } }, "58": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "59": { "goal": [ { "clause": 0, "scope": 2, "term": "(interleave T12 T11 T14)" }, { "clause": 1, "scope": 2, "term": "(interleave T12 T11 T14)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T11", "T12" ], "free": [], "exprvars": [] } }, "type": "Nodes", "100": { "goal": [{ "clause": -1, "scope": -1, "term": "(interleave T30 T29 T32)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T29", "T30" ], "free": [], "exprvars": [] } }, "101": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "7": { "goal": [{ "clause": -1, "scope": -1, "term": "(interleave T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "60": { "goal": [{ "clause": 0, "scope": 2, "term": "(interleave T12 T11 T14)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T11", "T12" ], "free": [], "exprvars": [] } }, "61": { "goal": [{ "clause": 1, "scope": 2, "term": "(interleave T12 T11 T14)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T11", "T12" ], "free": [], "exprvars": [] } }, "63": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "96": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "53": { "goal": [{ "clause": 1, "scope": 1, "term": "(interleave ([]) T5 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": [], "exprvars": [] } }, "97": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 7, "to": 34, "label": "CASE" }, { "from": 34, "to": 46, "label": "EVAL with clause\ninterleave([], X2, X2).\nand substitutionT1 -> [],\nT2 -> T5,\nX2 -> T5,\nT3 -> T5" }, { "from": 34, "to": 47, "label": "EVAL-BACKTRACK" }, { "from": 46, "to": 53, "label": "SUCCESS" }, { "from": 47, "to": 57, "label": "EVAL with clause\ninterleave(.(X11, X12), X13, .(X11, X14)) :- interleave(X13, X12, X14).\nand substitutionX11 -> T10,\nX12 -> T11,\nT1 -> .(T10, T11),\nT2 -> T12,\nX13 -> T12,\nX14 -> T14,\nT3 -> .(T10, T14),\nT13 -> T14" }, { "from": 47, "to": 58, "label": "EVAL-BACKTRACK" }, { "from": 53, "to": 56, "label": "BACKTRACK\nfor clause: interleave(.(X, Xs), Ys, .(X, Zs)) :- interleave(Ys, Xs, Zs)because of non-unification" }, { "from": 57, "to": 59, "label": "CASE" }, { "from": 59, "to": 60, "label": "PARALLEL" }, { "from": 59, "to": 61, "label": "PARALLEL" }, { "from": 60, "to": 63, "label": "EVAL with clause\ninterleave([], X19, X19).\nand substitutionT12 -> [],\nT11 -> T19,\nX19 -> T19,\nT14 -> T19" }, { "from": 60, "to": 96, "label": "EVAL-BACKTRACK" }, { "from": 61, "to": 100, "label": "EVAL with clause\ninterleave(.(X28, X29), X30, .(X28, X31)) :- interleave(X30, X29, X31).\nand substitutionX28 -> T28,\nX29 -> T29,\nT12 -> .(T28, T29),\nT11 -> T30,\nX30 -> T30,\nX31 -> T32,\nT14 -> .(T28, T32),\nT31 -> T32" }, { "from": 61, "to": 101, "label": "EVAL-BACKTRACK" }, { "from": 63, "to": 97, "label": "SUCCESS" }, { "from": 100, "to": 7, "label": "INSTANCE with matching:\nT1 -> T30\nT2 -> T29\nT3 -> T32" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: interleaveA(.(X1, X2), .(X3, X4), .(X1, .(X3, X5))) :- interleaveA(X2, X4, X5). Clauses: interleavecA([], X1, X1). interleavecA(.(X1, X2), [], .(X1, X2)). interleavecA(.(X1, X2), .(X3, X4), .(X1, .(X3, X5))) :- interleavecA(X2, X4, X5). Afs: interleaveA(x1, x2, x3) = interleaveA(x1, x2) ---------------------------------------- (3) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: interleaveA_in_3: (b,b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: INTERLEAVEA_IN_GGA(.(X1, X2), .(X3, X4), .(X1, .(X3, X5))) -> U1_GGA(X1, X2, X3, X4, X5, interleaveA_in_gga(X2, X4, X5)) INTERLEAVEA_IN_GGA(.(X1, X2), .(X3, X4), .(X1, .(X3, X5))) -> INTERLEAVEA_IN_GGA(X2, X4, X5) R is empty. The argument filtering Pi contains the following mapping: interleaveA_in_gga(x1, x2, x3) = interleaveA_in_gga(x1, x2) .(x1, x2) = .(x1, x2) INTERLEAVEA_IN_GGA(x1, x2, x3) = INTERLEAVEA_IN_GGA(x1, x2) U1_GGA(x1, x2, x3, x4, x5, x6) = U1_GGA(x1, x2, x3, x4, 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: INTERLEAVEA_IN_GGA(.(X1, X2), .(X3, X4), .(X1, .(X3, X5))) -> U1_GGA(X1, X2, X3, X4, X5, interleaveA_in_gga(X2, X4, X5)) INTERLEAVEA_IN_GGA(.(X1, X2), .(X3, X4), .(X1, .(X3, X5))) -> INTERLEAVEA_IN_GGA(X2, X4, X5) R is empty. The argument filtering Pi contains the following mapping: interleaveA_in_gga(x1, x2, x3) = interleaveA_in_gga(x1, x2) .(x1, x2) = .(x1, x2) INTERLEAVEA_IN_GGA(x1, x2, x3) = INTERLEAVEA_IN_GGA(x1, x2) U1_GGA(x1, x2, x3, x4, x5, x6) = U1_GGA(x1, x2, x3, x4, 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: INTERLEAVEA_IN_GGA(.(X1, X2), .(X3, X4), .(X1, .(X3, X5))) -> INTERLEAVEA_IN_GGA(X2, X4, X5) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) INTERLEAVEA_IN_GGA(x1, x2, x3) = INTERLEAVEA_IN_GGA(x1, x2) 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: INTERLEAVEA_IN_GGA(.(X1, X2), .(X3, X4)) -> INTERLEAVEA_IN_GGA(X2, X4) 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: *INTERLEAVEA_IN_GGA(.(X1, X2), .(X3, X4)) -> INTERLEAVEA_IN_GGA(X2, X4) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (10) YES