/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Left Termination of the query pattern minimum(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: minimum(tree(X, void, X1), X). minimum(tree(X2, Left, X3), X) :- minimum(Left, X). Query: minimum(g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 11, "program": { "directives": [], "clauses": [ [ "(minimum (tree X (void) X1) X)", null ], [ "(minimum (tree X2 Left X3) X)", "(minimum Left X)" ] ] }, "graph": { "nodes": { "11": { "goal": [{ "clause": -1, "scope": -1, "term": "(minimum T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "55": { "goal": [{ "clause": 1, "scope": 1, "term": "(minimum (tree T5 (void) T6) T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": [] } }, "99": { "goal": [ { "clause": 0, "scope": 3, "term": "(minimum T19 T22)" }, { "clause": 1, "scope": 3, "term": "(minimum T19 T22)" } ], "kb": { "nonunifying": [[ "(minimum (tree T18 T19 T20) T2)", "(minimum (tree X6 (void) X7) X6)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T18", "T19", "T20" ], "free": [ "X6", "X7" ], "exprvars": [] } }, "12": { "goal": [ { "clause": 0, "scope": 1, "term": "(minimum T1 T2)" }, { "clause": 1, "scope": 1, "term": "(minimum T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "56": { "goal": [{ "clause": -1, "scope": -1, "term": "(minimum (void) T13)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "100": { "goal": [{ "clause": 0, "scope": 3, "term": "(minimum T19 T22)" }], "kb": { "nonunifying": [[ "(minimum (tree T18 T19 T20) T2)", "(minimum (tree X6 (void) X7) X6)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T18", "T19", "T20" ], "free": [ "X6", "X7" ], "exprvars": [] } }, "101": { "goal": [{ "clause": 1, "scope": 3, "term": "(minimum T19 T22)" }], "kb": { "nonunifying": [[ "(minimum (tree T18 T19 T20) T2)", "(minimum (tree X6 (void) X7) X6)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T18", "T19", "T20" ], "free": [ "X6", "X7" ], "exprvars": [] } }, "102": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "103": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "104": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "105": { "goal": [{ "clause": -1, "scope": -1, "term": "(minimum T42 T45)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T42"], "free": [], "exprvars": [] } }, "106": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "92": { "goal": [ { "clause": 0, "scope": 2, "term": "(minimum (void) T13)" }, { "clause": 1, "scope": 2, "term": "(minimum (void) T13)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "93": { "goal": [{ "clause": 1, "scope": 2, "term": "(minimum (void) T13)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "95": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "53": { "goal": [ { "clause": -1, "scope": -1, "term": "(true)" }, { "clause": 1, "scope": 1, "term": "(minimum (tree T5 (void) T6) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": [] } }, "97": { "goal": [{ "clause": -1, "scope": -1, "term": "(minimum T19 T22)" }], "kb": { "nonunifying": [[ "(minimum (tree T18 T19 T20) T2)", "(minimum (tree X6 (void) X7) X6)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T18", "T19", "T20" ], "free": [ "X6", "X7" ], "exprvars": [] } }, "54": { "goal": [{ "clause": 1, "scope": 1, "term": "(minimum T1 T2)" }], "kb": { "nonunifying": [[ "(minimum T1 T2)", "(minimum (tree X6 (void) X7) X6)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [ "X6", "X7" ], "exprvars": [] } }, "98": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 11, "to": 12, "label": "CASE" }, { "from": 12, "to": 53, "label": "EVAL with clause\nminimum(tree(X6, void, X7), X6).\nand substitutionX6 -> T5,\nX7 -> T6,\nT1 -> tree(T5, void, T6),\nT2 -> T5" }, { "from": 12, "to": 54, "label": "EVAL-BACKTRACK" }, { "from": 53, "to": 55, "label": "SUCCESS" }, { "from": 54, "to": 97, "label": "EVAL with clause\nminimum(tree(X26, X27, X28), X29) :- minimum(X27, X29).\nand substitutionX26 -> T18,\nX27 -> T19,\nX28 -> T20,\nT1 -> tree(T18, T19, T20),\nT2 -> T22,\nX29 -> T22,\nT21 -> T22" }, { "from": 54, "to": 98, "label": "EVAL-BACKTRACK" }, { "from": 55, "to": 56, "label": "ONLY EVAL with clause\nminimum(tree(X12, X13, X14), X15) :- minimum(X13, X15).\nand substitutionT5 -> T10,\nX12 -> T10,\nX13 -> void,\nT6 -> T11,\nX14 -> T11,\nT2 -> T13,\nX15 -> T13,\nT12 -> T13" }, { "from": 56, "to": 92, "label": "CASE" }, { "from": 92, "to": 93, "label": "BACKTRACK\nfor clause: minimum(tree(X, void, X1), X)because of non-unification" }, { "from": 93, "to": 95, "label": "BACKTRACK\nfor clause: minimum(tree(X2, Left, X3), X) :- minimum(Left, X)because of non-unification" }, { "from": 97, "to": 99, "label": "CASE" }, { "from": 99, "to": 100, "label": "PARALLEL" }, { "from": 99, "to": 101, "label": "PARALLEL" }, { "from": 100, "to": 102, "label": "EVAL with clause\nminimum(tree(X38, void, X39), X38).\nand substitutionX38 -> T31,\nX39 -> T32,\nT19 -> tree(T31, void, T32),\nT22 -> T31" }, { "from": 100, "to": 103, "label": "EVAL-BACKTRACK" }, { "from": 101, "to": 105, "label": "EVAL with clause\nminimum(tree(X48, X49, X50), X51) :- minimum(X49, X51).\nand substitutionX48 -> T41,\nX49 -> T42,\nX50 -> T43,\nT19 -> tree(T41, T42, T43),\nT22 -> T45,\nX51 -> T45,\nT44 -> T45" }, { "from": 101, "to": 106, "label": "EVAL-BACKTRACK" }, { "from": 102, "to": 104, "label": "SUCCESS" }, { "from": 105, "to": 11, "label": "INSTANCE with matching:\nT1 -> T42\nT2 -> T45" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: minimumA(tree(X1, tree(X2, X3, X4), X5), X6) :- minimumA(X3, X6). Clauses: minimumcA(tree(X1, void, X2), X1). minimumcA(tree(X1, tree(X2, void, X3), X4), X2). minimumcA(tree(X1, tree(X2, X3, X4), X5), X6) :- minimumcA(X3, X6). Afs: minimumA(x1, x2) = minimumA(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: minimumA_in_2: (b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: MINIMUMA_IN_GA(tree(X1, tree(X2, X3, X4), X5), X6) -> U1_GA(X1, X2, X3, X4, X5, X6, minimumA_in_ga(X3, X6)) MINIMUMA_IN_GA(tree(X1, tree(X2, X3, X4), X5), X6) -> MINIMUMA_IN_GA(X3, X6) R is empty. The argument filtering Pi contains the following mapping: minimumA_in_ga(x1, x2) = minimumA_in_ga(x1) tree(x1, x2, x3) = tree(x1, x2, x3) MINIMUMA_IN_GA(x1, x2) = MINIMUMA_IN_GA(x1) U1_GA(x1, x2, x3, x4, x5, x6, x7) = U1_GA(x1, x2, x3, x4, x5, x7) 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: MINIMUMA_IN_GA(tree(X1, tree(X2, X3, X4), X5), X6) -> U1_GA(X1, X2, X3, X4, X5, X6, minimumA_in_ga(X3, X6)) MINIMUMA_IN_GA(tree(X1, tree(X2, X3, X4), X5), X6) -> MINIMUMA_IN_GA(X3, X6) R is empty. The argument filtering Pi contains the following mapping: minimumA_in_ga(x1, x2) = minimumA_in_ga(x1) tree(x1, x2, x3) = tree(x1, x2, x3) MINIMUMA_IN_GA(x1, x2) = MINIMUMA_IN_GA(x1) U1_GA(x1, x2, x3, x4, x5, x6, x7) = U1_GA(x1, x2, x3, x4, x5, x7) 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: MINIMUMA_IN_GA(tree(X1, tree(X2, X3, X4), X5), X6) -> MINIMUMA_IN_GA(X3, X6) R is empty. The argument filtering Pi contains the following mapping: tree(x1, x2, x3) = tree(x1, x2, x3) MINIMUMA_IN_GA(x1, x2) = MINIMUMA_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: MINIMUMA_IN_GA(tree(X1, tree(X2, X3, X4), X5)) -> MINIMUMA_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: *MINIMUMA_IN_GA(tree(X1, tree(X2, X3, X4), X5)) -> MINIMUMA_IN_GA(X3) The graph contains the following edges 1 > 1 ---------------------------------------- (10) YES