/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 fac(a,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToIRSwTTransformerProof [SOUND, 32 ms] (2) TRUE ---------------------------------------- (0) Obligation: Clauses: fac(X, Y) :- ','(=:=(X, 1), ','(!, =:=(Y, 1))). fac(X, Y) :- ','(>(X, 1), ','(!, ','(fac(-(X, 1), Z), is(Y, *(Z, X))))). Query: fac(a,a) ---------------------------------------- (1) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 2, "program": { "directives": [], "clauses": [ [ "(fac X Y)", "(',' (=:= X (1)) (',' (!) (=:= Y (1))))" ], [ "(fac X Y)", "(',' (> X (1)) (',' (!) (',' (fac (- X (1)) Z) (is Y (* Z X)))))" ] ] }, "graph": { "nodes": { "1330": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "name": "T12", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" } ] }, "ground": [], "free": [], "exprvars": [ "T12", "T11" ] } }, "type": "Nodes", "230": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "1327": { "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": "1" }, "operation": "=" }, { "lhs": { "name": "T12", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" } ] }, "ground": ["T12"], "free": [], "exprvars": [ "T12", "T11" ] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(fac T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "1345": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "6": { "goal": [ { "clause": 0, "scope": 1, "term": "(fac T1 T2)" }, { "clause": 1, "scope": 1, "term": "(fac T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "226": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_1) (=:= T12 (1)))" }, { "clause": 1, "scope": 1, "term": "(fac T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }] }, "ground": ["T11"], "free": [], "exprvars": ["T11"] } }, "1343": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (> T21 (1)) (',' (!_1) (',' (fac (- T21 (1)) X14) (is T22 (* X14 T21)))))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "!=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "1" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "!=" } ] }, "ground": [], "free": ["X14"], "exprvars": ["T11"] } }, "7": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (=:= T11 (1)) (',' (!_1) (=:= T12 (1))))" }, { "clause": 1, "scope": 1, "term": "(fac T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "227": { "goal": [{ "clause": 1, "scope": 1, "term": "(fac T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "!=" }] }, "ground": ["T11"], "free": [], "exprvars": ["T11"] } }, "228": { "goal": [{ "clause": -1, "scope": -1, "term": "(=:= T12 (1))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }] }, "ground": [], "free": [], "exprvars": ["T11"] } }, "9": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "1329": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T11", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "=" }, { "lhs": { "name": "T12", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "1" }, "operation": "!=" } ] }, "ground": ["T12"], "free": [], "exprvars": [ "T12", "T11" ] } } }, "edges": [ { "from": 2, "to": 6, "label": "CASE" }, { "from": 6, "to": 7, "label": "ONLY EVAL with clause\nfac(X5, X6) :- ','(=:=(X5, 1), ','(!_1, =:=(X6, 1))).\nand substitutionT1 -> T11,\nX5 -> T11,\nT2 -> T12,\nX6 -> T12,\nT9 -> T11,\nT10 -> T12" }, { "from": 7, "to": 9, "label": "IS ERROR" }, { "from": 7, "to": 226, "label": "ARITHCOMP SUCCESS" }, { "from": 7, "to": 227, "label": "ARITHCOMP FAIL" }, { "from": 226, "to": 228, "label": "CUT" }, { "from": 227, "to": 1343, "label": "ONLY EVAL with clause\nfac(X12, X13) :- ','(>(X12, 1), ','(!_1, ','(fac(-(X12, 1), X14), is(X13, *(X14, X12))))).\nand substitutionT1 -> T21,\nX12 -> T21,\nT2 -> T22,\nX13 -> T22,\nT19 -> T21,\nT20 -> T22" }, { "from": 228, "to": 230, "label": "IS ERROR" }, { "from": 228, "to": 1327, "label": "ARITHCOMP SUCCESS" }, { "from": 228, "to": 1329, "label": "ARITHCOMP FAIL" }, { "from": 1327, "to": 1330, "label": "SUCCESS" }, { "from": 1343, "to": 1345, "label": "IS ERROR" } ], "type": "Graph" } } ---------------------------------------- (2) TRUE