/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 plus(g,a,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: p(s(X), X). plus(0, Y, Y). plus(s(X), Y, s(Z)) :- ','(p(s(X), U), plus(U, Y, Z)). Query: plus(g,a,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 11, "program": { "directives": [], "clauses": [ [ "(p (s X) X)", null ], [ "(plus (0) Y Y)", null ], [ "(plus (s X) Y (s Z))", "(',' (p (s X) U) (plus U Y Z))" ] ] }, "graph": { "nodes": { "11": { "goal": [{ "clause": -1, "scope": -1, "term": "(plus T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "12": { "goal": [ { "clause": 1, "scope": 1, "term": "(plus T1 T2 T3)" }, { "clause": 2, "scope": 1, "term": "(plus T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "144": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p (s T9) X12) (plus X12 T12 T13))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T9"], "free": ["X12"], "exprvars": [] } }, "134": { "goal": [{ "clause": 2, "scope": 1, "term": "(plus (0) T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "145": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "146": { "goal": [{ "clause": 0, "scope": 2, "term": "(',' (p (s T9) X12) (plus X12 T12 T13))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T9"], "free": ["X12"], "exprvars": [] } }, "147": { "goal": [{ "clause": -1, "scope": -1, "term": "(plus T18 T12 T13)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T18"], "free": [], "exprvars": [] } }, "128": { "goal": [ { "clause": -1, "scope": -1, "term": "(true)" }, { "clause": 2, "scope": 1, "term": "(plus (0) T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "139": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "129": { "goal": [{ "clause": 2, "scope": 1, "term": "(plus T1 T2 T3)" }], "kb": { "nonunifying": [[ "(plus T1 T2 T3)", "(plus (0) X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": ["X2"], "exprvars": [] } }, "type": "Nodes" }, "edges": [ { "from": 11, "to": 12, "label": "CASE" }, { "from": 12, "to": 128, "label": "EVAL with clause\nplus(0, X2, X2).\nand substitutionT1 -> 0,\nT2 -> T5,\nX2 -> T5,\nT3 -> T5" }, { "from": 12, "to": 129, "label": "EVAL-BACKTRACK" }, { "from": 128, "to": 134, "label": "SUCCESS" }, { "from": 129, "to": 144, "label": "EVAL with clause\nplus(s(X9), X10, s(X11)) :- ','(p(s(X9), X12), plus(X12, X10, X11)).\nand substitutionX9 -> T9,\nT1 -> s(T9),\nT2 -> T12,\nX10 -> T12,\nX11 -> T13,\nT3 -> s(T13),\nT10 -> T12,\nT11 -> T13" }, { "from": 129, "to": 145, "label": "EVAL-BACKTRACK" }, { "from": 134, "to": 139, "label": "BACKTRACK\nfor clause: plus(s(X), Y, s(Z)) :- ','(p(s(X), U), plus(U, Y, Z))because of non-unification" }, { "from": 144, "to": 146, "label": "CASE" }, { "from": 146, "to": 147, "label": "ONLY EVAL with clause\np(s(X17), X17).\nand substitutionT9 -> T18,\nX17 -> T18,\nX12 -> T18" }, { "from": 147, "to": 11, "label": "INSTANCE with matching:\nT1 -> T18\nT2 -> T12\nT3 -> T13" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: plusA(s(X1), X2, s(X3)) :- plusA(X1, X2, X3). Clauses: pluscA(0, X1, X1). pluscA(s(X1), X2, s(X3)) :- pluscA(X1, X2, X3). Afs: plusA(x1, x2, x3) = plusA(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: plusA_in_3: (b,f,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: PLUSA_IN_GAA(s(X1), X2, s(X3)) -> U1_GAA(X1, X2, X3, plusA_in_gaa(X1, X2, X3)) PLUSA_IN_GAA(s(X1), X2, s(X3)) -> PLUSA_IN_GAA(X1, X2, X3) R is empty. The argument filtering Pi contains the following mapping: plusA_in_gaa(x1, x2, x3) = plusA_in_gaa(x1) s(x1) = s(x1) PLUSA_IN_GAA(x1, x2, x3) = PLUSA_IN_GAA(x1) U1_GAA(x1, x2, x3, x4) = U1_GAA(x1, x4) 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: PLUSA_IN_GAA(s(X1), X2, s(X3)) -> U1_GAA(X1, X2, X3, plusA_in_gaa(X1, X2, X3)) PLUSA_IN_GAA(s(X1), X2, s(X3)) -> PLUSA_IN_GAA(X1, X2, X3) R is empty. The argument filtering Pi contains the following mapping: plusA_in_gaa(x1, x2, x3) = plusA_in_gaa(x1) s(x1) = s(x1) PLUSA_IN_GAA(x1, x2, x3) = PLUSA_IN_GAA(x1) U1_GAA(x1, x2, x3, x4) = U1_GAA(x1, x4) 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: PLUSA_IN_GAA(s(X1), X2, s(X3)) -> PLUSA_IN_GAA(X1, X2, X3) R is empty. The argument filtering Pi contains the following mapping: s(x1) = s(x1) PLUSA_IN_GAA(x1, x2, x3) = PLUSA_IN_GAA(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: PLUSA_IN_GAA(s(X1)) -> PLUSA_IN_GAA(X1) 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: *PLUSA_IN_GAA(s(X1)) -> PLUSA_IN_GAA(X1) The graph contains the following edges 1 > 1 ---------------------------------------- (10) YES