/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 test_fun(g,g,g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToIRSwTTransformerProof [SOUND, 32 ms] (2) TRUE ---------------------------------------- (0) Obligation: Clauses: test_fun(X, Y, Z) :- ','(=<(Y, 0), !). test_fun(X, Y, Z) :- loop(X, Y, Z). loop(X, Y, Z) :- <(X, Z). loop(X, Y, Z) :- ','(>=(X, Z), loop_body(X, Y, Z)). loop_body(X, Y, Z) :- =<(Y, 0). loop_body(X, Y, Z) :- ','(>(Y, 0), ','(is(Z1, +(Z, Y)), loop(X, Y, Z1))). Query: test_fun(g,g,g) ---------------------------------------- (1) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 2, "program": { "directives": [], "clauses": [ [ "(test_fun X Y Z)", "(',' (=< Y (0)) (!))" ], [ "(test_fun X Y Z)", "(loop X Y Z)" ], [ "(loop X Y Z)", "(< X Z)" ], [ "(loop X Y Z)", "(',' (>= X Z) (loop_body X Y Z))" ], [ "(loop_body X Y Z)", "(=< Y (0))" ], [ "(loop_body X Y Z)", "(',' (> Y (0)) (',' (is Z1 (+ Z Y)) (loop X Y Z1)))" ] ] }, "graph": { "nodes": { "11": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (=< T11 (0)) (!_1))" }, { "clause": 1, "scope": 1, "term": "(test_fun T10 T11 T12)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T10", "T11", "T12" ], "free": [], "exprvars": [] } }, "12": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(test_fun T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2", "T3" ], "free": [], "exprvars": [] } }, "520": { "goal": [{ "clause": -1, "scope": -1, "term": "(< T40 T42)" }], "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": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" } ] }, "ground": [ "T40", "T42" ], "free": [], "exprvars": [ "T41", "T23", "T11" ] } }, "4": { "goal": [ { "clause": 0, "scope": 1, "term": "(test_fun T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(test_fun T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2", "T3" ], "free": [], "exprvars": [] } }, "521": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "512": { "goal": [{ "clause": 2, "scope": 2, "term": "(loop T22 T23 T24)" }], "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": [ "T22", "T23", "T24" ], "free": [], "exprvars": [ "T23", "T11" ] } }, "502": { "goal": [ { "clause": -1, "scope": -1, "term": "(!_1)" }, { "clause": 1, "scope": 1, "term": "(test_fun T10 T11 T12)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "<=" }] }, "ground": [ "T12", "T11", "T10" ], "free": [], "exprvars": ["T11"] } }, "513": { "goal": [{ "clause": 3, "scope": 2, "term": "(loop T22 T23 T24)" }], "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": [ "T22", "T23", "T24" ], "free": [], "exprvars": [ "T23", "T11" ] } }, "503": { "goal": [{ "clause": 1, "scope": 1, "term": "(test_fun T10 T11 T12)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }] }, "ground": [ "T12", "T11", "T10" ], "free": [], "exprvars": ["T11"] } }, "504": { "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": "<=" }] }, "ground": [], "free": [], "exprvars": ["T11"] } }, "505": { "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"] } }, "506": { "goal": [{ "clause": -1, "scope": -1, "term": "(loop T22 T23 T24)" }], "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": [ "T22", "T23", "T24" ], "free": [], "exprvars": [ "T23", "T11" ] } }, "508": { "goal": [ { "clause": 2, "scope": 2, "term": "(loop T22 T23 T24)" }, { "clause": 3, "scope": 2, "term": "(loop T22 T23 T24)" } ], "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": [ "T22", "T23", "T24" ], "free": [], "exprvars": [ "T23", "T11" ] } }, "1615": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "1614": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (>= T49 T51) (loop_body T49 T50 T51))" }], "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": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": ">" } ] }, "ground": [ "T49", "T50", "T51" ], "free": [], "exprvars": [ "T23", "T50", "T11" ] } } }, "edges": [ { "from": 2, "to": 4, "label": "CASE" }, { "from": 4, "to": 11, "label": "ONLY EVAL with clause\ntest_fun(X7, X8, X9) :- ','(=<(X8, 0), !_1).\nand substitutionT1 -> T10,\nX7 -> T10,\nT2 -> T11,\nX8 -> T11,\nT3 -> T12,\nX9 -> T12" }, { "from": 11, "to": 12, "label": "IS ERROR" }, { "from": 11, "to": 502, "label": "ARITHCOMP SUCCESS" }, { "from": 11, "to": 503, "label": "ARITHCOMP FAIL" }, { "from": 502, "to": 504, "label": "CUT" }, { "from": 503, "to": 506, "label": "ONLY EVAL with clause\ntest_fun(X19, X20, X21) :- loop(X19, X20, X21).\nand substitutionT10 -> T22,\nX19 -> T22,\nT11 -> T23,\nX20 -> T23,\nT12 -> T24,\nX21 -> T24" }, { "from": 504, "to": 505, "label": "SUCCESS" }, { "from": 506, "to": 508, "label": "CASE" }, { "from": 508, "to": 512, "label": "PARALLEL" }, { "from": 508, "to": 513, "label": "PARALLEL" }, { "from": 512, "to": 520, "label": "ONLY EVAL with clause\nloop(X37, X38, X39) :- <(X37, X39).\nand substitutionT22 -> T40,\nX37 -> T40,\nT23 -> T41,\nX38 -> T41,\nT24 -> T42,\nX39 -> T42" }, { "from": 513, "to": 1614, "label": "ONLY EVAL with clause\nloop(X46, X47, X48) :- ','(>=(X46, X48), loop_body(X46, X47, X48)).\nand substitutionT22 -> T49,\nX46 -> T49,\nT23 -> T50,\nX47 -> T50,\nT24 -> T51,\nX48 -> T51" }, { "from": 520, "to": 521, "label": "IS ERROR" }, { "from": 1614, "to": 1615, "label": "IS ERROR" } ], "type": "Graph" } } ---------------------------------------- (2) TRUE