/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 rec2(g,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToIRSwTTransformerProof [SOUND, 24 ms] (2) TRUE ---------------------------------------- (0) Obligation: Clauses: rec1(I, Ret) :- ','(=<(I, 0), ','(!, is(Ret, 0))). rec1(I, Ret) :- ','(!, ','(is(I1, +(I, 1)), ','(rec1(I1, Ret1), ','(rec2(Ret1, Ret2), is(Ret, Ret2))))). rec2(J, Ret) :- ','(=<(J, 0), ','(!, is(Ret, 0))). rec2(J, Ret) :- ','(!, ','(is(I1, -(I, 1)), ','(rec2(I1, Ret1), ','(rec1(Ret1, Ret2), is(Ret, Ret2))))). Query: rec2(g,a) ---------------------------------------- (1) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 2, "program": { "directives": [], "clauses": [ [ "(rec1 I Ret)", "(',' (=< I (0)) (',' (!) (is Ret (0))))" ], [ "(rec1 I Ret)", "(',' (!) (',' (is I1 (+ I (1))) (',' (rec1 I1 Ret1) (',' (rec2 Ret1 Ret2) (is Ret Ret2)))))" ], [ "(rec2 J Ret)", "(',' (=< J (0)) (',' (!) (is Ret (0))))" ], [ "(rec2 J Ret)", "(',' (!) (',' (is I1 (- I (1))) (',' (rec2 I1 Ret1) (',' (rec1 Ret1 Ret2) (is Ret Ret2)))))" ] ] }, "graph": { "nodes": { "11": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "391": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_1) (is T10 (0)))" }, { "clause": 3, "scope": 1, "term": "(rec2 T8 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" }] }, "ground": ["T8"], "free": [], "exprvars": ["T8"] } }, "type": "Nodes", "392": { "goal": [{ "clause": 3, "scope": 1, "term": "(rec2 T8 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }] }, "ground": ["T8"], "free": [], "exprvars": ["T8"] } }, "393": { "goal": [{ "clause": -1, "scope": -1, "term": "(is T10 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" }] }, "ground": [], "free": [], "exprvars": ["T8"] } }, "394": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" } ] }, "ground": ["T11"], "free": [], "exprvars": [ "T11", "T8" ] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(rec2 T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "4": { "goal": [ { "clause": 2, "scope": 1, "term": "(rec2 T1 T2)" }, { "clause": 3, "scope": 1, "term": "(rec2 T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "458": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "=" }, { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" } ] }, "ground": [], "free": [], "exprvars": [ "T11", "T8" ] } }, "603": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (!_1) (',' (is X17 (- X18 (1))) (',' (rec2 X17 X19) (',' (rec1 X19 X20) (is T19 X20)))))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" } ] }, "ground": [], "free": [ "X17", "X18", "X19", "X20" ], "exprvars": [ "T17", "T8" ] } }, "604": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (is X17 (- X18 (1))) (',' (rec2 X17 X19) (',' (rec1 X19 X20) (is T19 X20))))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" } ] }, "ground": [], "free": [ "X17", "X18", "X19", "X20" ], "exprvars": [ "T17", "T8" ] } }, "418": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T8", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" }] }, "ground": [], "free": [], "exprvars": ["T8"] } }, "605": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "10": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (=< T8 (0)) (',' (!_1) (is T10 (0))))" }, { "clause": 3, "scope": 1, "term": "(rec2 T8 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T8"], "free": [], "exprvars": [] } } }, "edges": [ { "from": 2, "to": 4, "label": "CASE" }, { "from": 4, "to": 10, "label": "ONLY EVAL with clause\nrec2(X5, X6) :- ','(=<(X5, 0), ','(!_1, is(X6, 0))).\nand substitutionT1 -> T8,\nX5 -> T8,\nT2 -> T10,\nX6 -> T10,\nT9 -> T10" }, { "from": 10, "to": 11, "label": "IS ERROR" }, { "from": 10, "to": 391, "label": "ARITHCOMP SUCCESS" }, { "from": 10, "to": 392, "label": "ARITHCOMP FAIL" }, { "from": 391, "to": 393, "label": "CUT" }, { "from": 392, "to": 603, "label": "ONLY EVAL with clause\nrec2(X15, X16) :- ','(!_1, ','(is(X17, -(X18, 1)), ','(rec2(X17, X19), ','(rec1(X19, X20), is(X16, X20))))).\nand substitutionT8 -> T17,\nX15 -> T17,\nT2 -> T19,\nX16 -> T19,\nT18 -> T19" }, { "from": 393, "to": 394, "label": "\nT10 -> T11" }, { "from": 393, "to": 418, "label": "IS FAIL" }, { "from": 394, "to": 458, "label": "SUCCESS" }, { "from": 603, "to": 604, "label": "CUT" }, { "from": 604, "to": 605, "label": "IS ERROR" } ], "type": "Graph" } } ---------------------------------------- (2) TRUE