/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 p(g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToDTProblemTransformerProof [SOUND, 0 ms] (2) TRIPLES (3) TriplesToPiDPProof [SOUND, 1 ms] (4) PiDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) PiDP (7) PiDPToQDPProof [SOUND, 2 ms] (8) QDP (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] (10) YES ---------------------------------------- (0) Obligation: Clauses: p(0). p(s(X)) :- ','(geq(X, Y), p(Y)). geq(X, X). geq(s(X), Y) :- geq(X, Y). Query: p(g) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 2, "program": { "directives": [], "clauses": [ [ "(p (0))", null ], [ "(p (s X))", "(',' (geq X Y) (p Y))" ], [ "(geq X X)", null ], [ "(geq (s X) Y)", "(geq X Y)" ] ] }, "graph": { "nodes": { "type": "Nodes", "130": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (geq T3 X4) (p X4))" }, { "clause": 3, "scope": 2, "term": "(',' (geq T3 X4) (p X4))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T3"], "free": ["X4"], "exprvars": [] } }, "131": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (geq T3 X4) (p X4))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T3"], "free": ["X4"], "exprvars": [] } }, "132": { "goal": [{ "clause": 3, "scope": 2, "term": "(',' (geq T3 X4) (p X4))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T3"], "free": ["X4"], "exprvars": [] } }, "122": { "goal": [ { "clause": -1, "scope": -1, "term": "(true)" }, { "clause": 1, "scope": 1, "term": "(p (0))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "133": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T8)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T8"], "free": [], "exprvars": [] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "124": { "goal": [{ "clause": 1, "scope": 1, "term": "(p T1)" }], "kb": { "nonunifying": [[ "(p T1)", "(p (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "4": { "goal": [ { "clause": 0, "scope": 1, "term": "(p T1)" }, { "clause": 1, "scope": 1, "term": "(p T1)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "126": { "goal": [{ "clause": 1, "scope": 1, "term": "(p (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "137": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (geq T11 X18) (p X18))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T11"], "free": ["X18"], "exprvars": [] } }, "127": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "138": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "128": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (geq T3 X4) (p X4))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T3"], "free": ["X4"], "exprvars": [] } }, "129": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 2, "to": 4, "label": "CASE" }, { "from": 4, "to": 122, "label": "EVAL with clause\np(0).\nand substitutionT1 -> 0" }, { "from": 4, "to": 124, "label": "EVAL-BACKTRACK" }, { "from": 122, "to": 126, "label": "SUCCESS" }, { "from": 124, "to": 128, "label": "EVAL with clause\np(s(X3)) :- ','(geq(X3, X4), p(X4)).\nand substitutionX3 -> T3,\nT1 -> s(T3)" }, { "from": 124, "to": 129, "label": "EVAL-BACKTRACK" }, { "from": 126, "to": 127, "label": "BACKTRACK\nfor clause: p(s(X)) :- ','(geq(X, Y), p(Y))because of non-unification" }, { "from": 128, "to": 130, "label": "CASE" }, { "from": 130, "to": 131, "label": "PARALLEL" }, { "from": 130, "to": 132, "label": "PARALLEL" }, { "from": 131, "to": 133, "label": "ONLY EVAL with clause\ngeq(X9, X9).\nand substitutionT3 -> T8,\nX9 -> T8,\nX4 -> T8" }, { "from": 132, "to": 137, "label": "EVAL with clause\ngeq(s(X16), X17) :- geq(X16, X17).\nand substitutionX16 -> T11,\nT3 -> s(T11),\nX4 -> X18,\nX17 -> X18" }, { "from": 132, "to": 138, "label": "EVAL-BACKTRACK" }, { "from": 133, "to": 2, "label": "INSTANCE with matching:\nT1 -> T8" }, { "from": 137, "to": 128, "label": "INSTANCE with matching:\nT3 -> T11\nX4 -> X18" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: pB(X1, X1) :- pA(X1). pB(s(X1), X2) :- pB(X1, X2). pA(s(X1)) :- pB(X1, X2). Clauses: pcA(0). pcA(s(X1)) :- qcB(X1, X2). qcB(X1, X1) :- pcA(X1). qcB(s(X1), X2) :- qcB(X1, X2). Afs: pA(x1) = pA(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: pA_in_1: (b) pB_in_2: (b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: PA_IN_G(s(X1)) -> U3_G(X1, pB_in_ga(X1, X2)) PA_IN_G(s(X1)) -> PB_IN_GA(X1, X2) PB_IN_GA(X1, X1) -> U1_GA(X1, pA_in_g(X1)) PB_IN_GA(X1, X1) -> PA_IN_G(X1) PB_IN_GA(s(X1), X2) -> U2_GA(X1, X2, pB_in_ga(X1, X2)) PB_IN_GA(s(X1), X2) -> PB_IN_GA(X1, X2) R is empty. The argument filtering Pi contains the following mapping: pA_in_g(x1) = pA_in_g(x1) s(x1) = s(x1) pB_in_ga(x1, x2) = pB_in_ga(x1) PA_IN_G(x1) = PA_IN_G(x1) U3_G(x1, x2) = U3_G(x1, x2) PB_IN_GA(x1, x2) = PB_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x1, x2) U2_GA(x1, x2, x3) = U2_GA(x1, x3) 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: PA_IN_G(s(X1)) -> U3_G(X1, pB_in_ga(X1, X2)) PA_IN_G(s(X1)) -> PB_IN_GA(X1, X2) PB_IN_GA(X1, X1) -> U1_GA(X1, pA_in_g(X1)) PB_IN_GA(X1, X1) -> PA_IN_G(X1) PB_IN_GA(s(X1), X2) -> U2_GA(X1, X2, pB_in_ga(X1, X2)) PB_IN_GA(s(X1), X2) -> PB_IN_GA(X1, X2) R is empty. The argument filtering Pi contains the following mapping: pA_in_g(x1) = pA_in_g(x1) s(x1) = s(x1) pB_in_ga(x1, x2) = pB_in_ga(x1) PA_IN_G(x1) = PA_IN_G(x1) U3_G(x1, x2) = U3_G(x1, x2) PB_IN_GA(x1, x2) = PB_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x1, x2) U2_GA(x1, x2, x3) = U2_GA(x1, x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 3 less nodes. ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: PA_IN_G(s(X1)) -> PB_IN_GA(X1, X2) PB_IN_GA(X1, X1) -> PA_IN_G(X1) PB_IN_GA(s(X1), X2) -> PB_IN_GA(X1, X2) R is empty. The argument filtering Pi contains the following mapping: s(x1) = s(x1) PA_IN_G(x1) = PA_IN_G(x1) PB_IN_GA(x1, x2) = PB_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: PA_IN_G(s(X1)) -> PB_IN_GA(X1) PB_IN_GA(X1) -> PA_IN_G(X1) PB_IN_GA(s(X1)) -> PB_IN_GA(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: *PB_IN_GA(X1) -> PA_IN_G(X1) The graph contains the following edges 1 >= 1 *PB_IN_GA(s(X1)) -> PB_IN_GA(X1) The graph contains the following edges 1 > 1 *PA_IN_G(s(X1)) -> PB_IN_GA(X1) The graph contains the following edges 1 > 1 ---------------------------------------- (10) YES