/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 parts(g,g,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToIRSwTTransformerProof [SOUND, 25 ms] (2) TRUE ---------------------------------------- (0) Obligation: Clauses: parts(P, Q, Ret) :- ','(=<(P, 0), ','(!, is(Ret, 1))). parts(P, Q, Ret) :- ','(=<(Q, 0), ','(!, is(Ret, 0))). parts(P, Q, Ret) :- ','(>(Q, P), ','(!, ','(parts(P, P, Ret1), is(Ret, Ret1)))). parts(P, Q, Ret) :- ','(!, ','(is(P1, -(P, 1)), ','(parts(P1, Q, Ret1), ','(is(Q2, -(Q, 1)), ','(parts(P, Q2, Ret2), is(Ret, +(Ret1, Ret2))))))). Query: parts(g,g,a) ---------------------------------------- (1) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 3, "program": { "directives": [], "clauses": [ [ "(parts P Q Ret)", "(',' (=< P (0)) (',' (!) (is Ret (1))))" ], [ "(parts P Q Ret)", "(',' (=< Q (0)) (',' (!) (is Ret (0))))" ], [ "(parts P Q Ret)", "(',' (> Q P) (',' (!) (',' (parts P P Ret1) (is Ret Ret1))))" ], [ "(parts P Q Ret)", "(',' (!) (',' (is P1 (- P (1))) (',' (parts P1 Q Ret1) (',' (is Q2 (- Q (1))) (',' (parts P Q2 Ret2) (is Ret (+ Ret1 Ret2)))))))" ] ] }, "graph": { "nodes": { "type": "Nodes", "2801": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T15", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" } ] }, "ground": ["T15"], "free": [], "exprvars": [ "T11", "T15" ] } }, "2800": { "goal": [{ "clause": -1, "scope": -1, "term": "(is T14 (1))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" }] }, "ground": [], "free": [], "exprvars": ["T11"] } }, "2799": { "goal": [ { "clause": 1, "scope": 1, "term": "(parts T11 T12 T3)" }, { "clause": 2, "scope": 1, "term": "(parts T11 T12 T3)" }, { "clause": 3, "scope": 1, "term": "(parts T11 T12 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }] }, "ground": [ "T12", "T11" ], "free": [], "exprvars": ["T11"] } }, "3": { "goal": [{ "clause": -1, "scope": -1, "term": "(parts T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "2798": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_1) (is T14 (1)))" }, { "clause": 1, "scope": 1, "term": "(parts T11 T12 T3)" }, { "clause": 2, "scope": 1, "term": "(parts T11 T12 T3)" }, { "clause": 3, "scope": 1, "term": "(parts T11 T12 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" }] }, "ground": [ "T12", "T11" ], "free": [], "exprvars": ["T11"] } }, "6": { "goal": [ { "clause": 0, "scope": 1, "term": "(parts T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(parts T1 T2 T3)" }, { "clause": 2, "scope": 1, "term": "(parts T1 T2 T3)" }, { "clause": 3, "scope": 1, "term": "(parts T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "8": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (=< T11 (0)) (',' (!_1) (is T14 (1))))" }, { "clause": 1, "scope": 1, "term": "(parts T11 T12 T3)" }, { "clause": 2, "scope": 1, "term": "(parts T11 T12 T3)" }, { "clause": 3, "scope": 1, "term": "(parts T11 T12 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T11", "T12" ], "free": [], "exprvars": [] } }, "2819": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "2818": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (=< T24 (0)) (',' (!_1) (is T26 (0))))" }, { "clause": 2, "scope": 1, "term": "(parts T23 T24 T3)" }, { "clause": 3, "scope": 1, "term": "(parts T23 T24 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" } ] }, "ground": [ "T23", "T24" ], "free": [], "exprvars": [ "T23", "T11" ] } }, "2805": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T15", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" } ] }, "ground": [], "free": [], "exprvars": [ "T11", "T15" ] } }, "10": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "2802": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" }] }, "ground": [], "free": [], "exprvars": ["T11"] } } }, "edges": [ { "from": 3, "to": 6, "label": "CASE" }, { "from": 6, "to": 8, "label": "ONLY EVAL with clause\nparts(X7, X8, X9) :- ','(=<(X7, 0), ','(!_1, is(X9, 1))).\nand substitutionT1 -> T11,\nX7 -> T11,\nT2 -> T12,\nX8 -> T12,\nT3 -> T14,\nX9 -> T14,\nT13 -> T14" }, { "from": 8, "to": 10, "label": "IS ERROR" }, { "from": 8, "to": 2798, "label": "ARITHCOMP SUCCESS" }, { "from": 8, "to": 2799, "label": "ARITHCOMP FAIL" }, { "from": 2798, "to": 2800, "label": "CUT" }, { "from": 2799, "to": 2818, "label": "ONLY EVAL with clause\nparts(X16, X17, X18) :- ','(=<(X17, 0), ','(!_1, is(X18, 0))).\nand substitutionT11 -> T23,\nX16 -> T23,\nT12 -> T24,\nX17 -> T24,\nT3 -> T26,\nX18 -> T26,\nT25 -> T26" }, { "from": 2800, "to": 2801, "label": "\nT14 -> T15" }, { "from": 2800, "to": 2802, "label": "IS FAIL" }, { "from": 2801, "to": 2805, "label": "SUCCESS" }, { "from": 2818, "to": 2819, "label": "IS ERROR" } ], "type": "Graph" } } ---------------------------------------- (2) TRUE