/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 main() w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToDTProblemTransformerProof [SOUND, 54 ms] (2) TRIPLES (3) TPisEmptyProof [EQUIVALENT, 0 ms] (4) YES ---------------------------------------- (0) Obligation: Clauses: main :- main(0, 0). main(I, C) :- ','(<(I, 10), loop(I, 3, C)). main(I, C) :- >=(I, 10). loop(I, J, C) :- ','(<(J, 12), ','(is(J1, -(J, 1)), ','(is(C1, +(C, 1)), ','(is(J2, +(J1, 2)), loop(I, J2, C1))))). loop(I, J, C) :- ','(>=(J, 12), ','(is(I1, +(I, 1)), main(I1, C))). Query: main() ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 5, "program": { "directives": [], "clauses": [ [ "(main)", "(main (0) (0))" ], [ "(main I C)", "(',' (< I (10)) (loop I (3) C))" ], [ "(main I C)", "(>= I (10))" ], [ "(loop I J C)", "(',' (< J (12)) (',' (is J1 (- J (1))) (',' (is C1 (+ C (1))) (',' (is J2 (+ J1 (2))) (loop I J2 C1)))))" ], [ "(loop I J C)", "(',' (>= J (12)) (',' (is I1 (+ I (1))) (main I1 C)))" ] ] }, "graph": { "nodes": { "11": { "goal": [{ "clause": 2, "scope": 2, "term": "(main (0) (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "2583": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (< (3) (12)) (',' (is X38 (- (3) (1))) (',' (is X39 (+ (0) (1))) (',' (is X40 (+ X38 (2))) (loop (0) X40 X39)))))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" }, { "lhs": { "type": "PlainIntegerConstant", "value": "10" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" } ] }, "ground": [], "free": [ "X38", "X39", "X40" ], "exprvars": [] } }, "2880": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (>= (3) (12)) (',' (is X51 (+ (0) (1))) (main X51 (0))))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" }, { "lhs": { "type": "PlainIntegerConstant", "value": "10" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" } ] }, "ground": [], "free": ["X51"], "exprvars": [] } }, "2582": { "goal": [{ "clause": 4, "scope": 3, "term": "(loop (0) (3) (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" }] }, "ground": [], "free": [], "exprvars": [] } }, "2581": { "goal": [{ "clause": 3, "scope": 3, "term": "(loop (0) (3) (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" }] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "2580": { "goal": [ { "clause": 3, "scope": 3, "term": "(loop (0) (3) (0))" }, { "clause": 4, "scope": 3, "term": "(loop (0) (3) (0))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" }] }, "ground": [], "free": [], "exprvars": [] } }, "2579": { "goal": [{ "clause": -1, "scope": -1, "term": "(loop (0) (3) (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "10" }, "operation": "<" }] }, "ground": [], "free": [], "exprvars": [] } }, "2885": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "type": "PlainIntegerConstant", "value": "10" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }] }, "ground": [], "free": [], "exprvars": [] } }, "5": { "goal": [{ "clause": -1, "scope": -1, "term": "(main)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "6": { "goal": [{ "clause": 0, "scope": 1, "term": "(main)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "2882": { "goal": [{ "clause": -1, "scope": -1, "term": "(>= (0) (10))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "8": { "goal": [{ "clause": -1, "scope": -1, "term": "(main (0) (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "9": { "goal": [ { "clause": 1, "scope": 2, "term": "(main (0) (0))" }, { "clause": 2, "scope": 2, "term": "(main (0) (0))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "10": { "goal": [{ "clause": 1, "scope": 2, "term": "(main (0) (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "21": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (< (0) (10)) (loop (0) (3) (0)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 5, "to": 6, "label": "CASE" }, { "from": 6, "to": 8, "label": "ONLY EVAL with clause\nmain :- main(0, 0).\nand substitution" }, { "from": 8, "to": 9, "label": "CASE" }, { "from": 9, "to": 10, "label": "PARALLEL" }, { "from": 9, "to": 11, "label": "PARALLEL" }, { "from": 10, "to": 21, "label": "ONLY EVAL with clause\nmain(X9, X10) :- ','(<(X9, 10), loop(X9, 3, X10)).\nand substitutionX9 -> 0,\nX10 -> 0" }, { "from": 11, "to": 2882, "label": "ONLY EVAL with clause\nmain(X56, X57) :- >=(X56, 10).\nand substitutionX56 -> 0,\nX57 -> 0" }, { "from": 21, "to": 2579, "label": "ARITHCOMP SUCCESS" }, { "from": 2579, "to": 2580, "label": "CASE" }, { "from": 2580, "to": 2581, "label": "PARALLEL" }, { "from": 2580, "to": 2582, "label": "PARALLEL" }, { "from": 2581, "to": 2583, "label": "ONLY EVAL with clause\nloop(X35, X36, X37) :- ','(<(X36, 12), ','(is(X38, -(X36, 1)), ','(is(X39, +(X37, 1)), ','(is(X40, +(X38, 2)), loop(X35, X40, X39))))).\nand substitutionX35 -> 0,\nX36 -> 3,\nX37 -> 0" }, { "from": 2582, "to": 2880, "label": "ONLY EVAL with clause\nloop(X48, X49, X50) :- ','(>=(X49, 12), ','(is(X51, +(X48, 1)), main(X51, X50))).\nand substitutionX48 -> 0,\nX49 -> 3,\nX50 -> 0" }, { "from": 2882, "to": 2885, "label": "ARITHCOMP FAIL" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: Clauses: Afs: ---------------------------------------- (3) TPisEmptyProof (EQUIVALENT) There are no more dependency triples. Hence, the dependency triple problem trivially terminates. ---------------------------------------- (4) YES