/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 q(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 [EQUIVALENT, 0 ms] (8) QDP (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] (10) YES ---------------------------------------- (0) Obligation: Clauses: q(X) :- ','(not_zero(X), ','(p(X, Y), q(Y))). p(0, 0). p(s(X), X). zero(0). not_zero(X) :- ','(zero(X), ','(!, failure(a))). not_zero(X1). failure(b). Query: q(g) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 3, "program": { "directives": [], "clauses": [ [ "(q X)", "(',' (not_zero X) (',' (p X Y) (q Y)))" ], [ "(p (0) (0))", null ], [ "(p (s X) X)", null ], [ "(zero (0))", null ], [ "(not_zero X)", "(',' (zero X) (',' (!) (failure (a))))" ], [ "(not_zero X1)", null ], [ "(failure (b))", null ] ] }, "graph": { "nodes": { "11": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (',' (zero T6) (',' (!_2) (failure (a)))) (',' (p T6 X4) (q X4)))" }, { "clause": 5, "scope": 2, "term": "(',' (not_zero T6) (',' (p T6 X4) (q X4)))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X4"], "exprvars": [] } }, "33": { "goal": [ { "clause": 1, "scope": 5, "term": "(',' (p T9 X4) (q X4))" }, { "clause": 2, "scope": 5, "term": "(',' (p T9 X4) (q X4))" } ], "kb": { "nonunifying": [[ "(zero T9)", "(zero (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T9"], "free": ["X4"], "exprvars": [] } }, "13": { "goal": [ { "clause": 3, "scope": 3, "term": "(',' (',' (zero T6) (',' (!_2) (failure (a)))) (',' (p T6 X4) (q X4)))" }, { "clause": -1, "scope": 3, "term": null }, { "clause": 5, "scope": 2, "term": "(',' (not_zero T6) (',' (p T6 X4) (q X4)))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X4"], "exprvars": [] } }, "35": { "goal": [{ "clause": 2, "scope": 5, "term": "(',' (p T9 X4) (q X4))" }], "kb": { "nonunifying": [[ "(zero T9)", "(zero (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T9"], "free": ["X4"], "exprvars": [] } }, "26": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (failure (a)) (',' (p (0) X4) (q X4)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": ["X4"], "exprvars": [] } }, "27": { "goal": [{ "clause": 6, "scope": 4, "term": "(',' (failure (a)) (',' (p (0) X4) (q X4)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": ["X4"], "exprvars": [] } }, "17": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (',' (!_2) (failure (a))) (',' (p (0) X4) (q X4)))" }, { "clause": -1, "scope": 3, "term": null }, { "clause": 5, "scope": 2, "term": "(',' (not_zero (0)) (',' (p (0) X4) (q X4)))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": ["X4"], "exprvars": [] } }, "39": { "goal": [{ "clause": -1, "scope": -1, "term": "(q T12)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T12"], "free": [], "exprvars": [] } }, "18": { "goal": [ { "clause": -1, "scope": 3, "term": null }, { "clause": 5, "scope": 2, "term": "(',' (not_zero T6) (',' (p T6 X4) (q X4)))" } ], "kb": { "nonunifying": [[ "(zero T6)", "(zero (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X4"], "exprvars": [] } }, "29": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "3": { "goal": [{ "clause": -1, "scope": -1, "term": "(q T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "5": { "goal": [{ "clause": 0, "scope": 1, "term": "(q T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "7": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (not_zero T3) (',' (p T3 X4) (q X4)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T3"], "free": ["X4"], "exprvars": [] } }, "9": { "goal": [ { "clause": 4, "scope": 2, "term": "(',' (not_zero T3) (',' (p T3 X4) (q X4)))" }, { "clause": 5, "scope": 2, "term": "(',' (not_zero T3) (',' (p T3 X4) (q X4)))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T3"], "free": ["X4"], "exprvars": [] } }, "40": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "30": { "goal": [{ "clause": 5, "scope": 2, "term": "(',' (not_zero T6) (',' (p T6 X4) (q X4)))" }], "kb": { "nonunifying": [[ "(zero T6)", "(zero (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X4"], "exprvars": [] } }, "31": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T9 X4) (q X4))" }], "kb": { "nonunifying": [[ "(zero T9)", "(zero (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T9"], "free": ["X4"], "exprvars": [] } } }, "edges": [ { "from": 3, "to": 5, "label": "CASE" }, { "from": 5, "to": 7, "label": "ONLY EVAL with clause\nq(X3) :- ','(not_zero(X3), ','(p(X3, X4), q(X4))).\nand substitutionT1 -> T3,\nX3 -> T3" }, { "from": 7, "to": 9, "label": "CASE" }, { "from": 9, "to": 11, "label": "ONLY EVAL with clause\nnot_zero(X7) :- ','(zero(X7), ','(!_2, failure(a))).\nand substitutionT3 -> T6,\nX7 -> T6" }, { "from": 11, "to": 13, "label": "CASE" }, { "from": 13, "to": 17, "label": "EVAL with clause\nzero(0).\nand substitutionT6 -> 0" }, { "from": 13, "to": 18, "label": "EVAL-BACKTRACK" }, { "from": 17, "to": 26, "label": "CUT" }, { "from": 18, "to": 30, "label": "FAILURE" }, { "from": 26, "to": 27, "label": "CASE" }, { "from": 27, "to": 29, "label": "BACKTRACK\nfor clause: failure(b)because of non-unification" }, { "from": 30, "to": 31, "label": "ONLY EVAL with clause\nnot_zero(X16).\nand substitutionT6 -> T9,\nX16 -> T9" }, { "from": 31, "to": 33, "label": "CASE" }, { "from": 33, "to": 35, "label": "BACKTRACK\nfor clause: p(0, 0)\nwith clash: (zero(T9), zero(0))" }, { "from": 35, "to": 39, "label": "EVAL with clause\np(s(X22), X22).\nand substitutionX22 -> T12,\nT9 -> s(T12),\nX4 -> T12" }, { "from": 35, "to": 40, "label": "EVAL-BACKTRACK" }, { "from": 39, "to": 3, "label": "INSTANCE with matching:\nT1 -> T12" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: qA(s(X1)) :- qA(X1). Clauses: qcA(s(X1)) :- qcA(X1). Afs: qA(x1) = qA(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: qA_in_1: (b) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: QA_IN_G(s(X1)) -> U1_G(X1, qA_in_g(X1)) QA_IN_G(s(X1)) -> QA_IN_G(X1) R is empty. Pi is empty. 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: QA_IN_G(s(X1)) -> U1_G(X1, qA_in_g(X1)) QA_IN_G(s(X1)) -> QA_IN_G(X1) R is empty. Pi is empty. 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: QA_IN_G(s(X1)) -> QA_IN_G(X1) R is empty. Pi is empty. We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) PiDPToQDPProof (EQUIVALENT) 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: QA_IN_G(s(X1)) -> QA_IN_G(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: *QA_IN_G(s(X1)) -> QA_IN_G(X1) The graph contains the following edges 1 > 1 ---------------------------------------- (10) YES