/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) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToDTProblemTransformerProof [SOUND, 62 ms] (2) TRIPLES (3) TPisEmptyProof [EQUIVALENT, 0 ms] (4) YES ---------------------------------------- (0) Obligation: Clauses: test_fun(X, Y) :- ','(=\=(X, 0), loop(X, Y, 0)). loop(X, Y, I) :- ','(>(X, 0), ','(>(Y, 0), ','(is(I1, +(I, 1)), ','(is(X1, -(-(X, 1), -(Y, 1))), loop(X1, Y, I1))))). loop(X, Y, I) :- =<(X, 0). loop(X, Y, I) :- =<(Y, 0). Query: test_fun(g,g) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(test_fun X Y)", "(',' (=\\= X (0)) (loop X Y (0)))" ], [ "(loop X Y I)", "(',' (> X (0)) (',' (> Y (0)) (',' (is I1 (+ I (1))) (',' (is X1 (- (- X (1)) (- Y (1)))) (loop X1 Y I1)))))" ], [ "(loop X Y I)", "(=< X (0))" ], [ "(loop X Y I)", "(=< Y (0))" ] ] }, "graph": { "nodes": { "type": "Nodes", "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(test_fun T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "2503": { "goal": [{ "clause": 3, "scope": 2, "term": "(loop T5 T6 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": ["T5"] } }, "475": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "=" }] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": ["T5"] } }, "2524": { "goal": [{ "clause": -1, "scope": -1, "term": "(=< T25 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" } ] }, "ground": ["T25"], "free": [], "exprvars": [ "T25", "T5" ] } }, "2711": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "487": { "goal": [ { "clause": 1, "scope": 2, "term": "(loop T5 T6 (0))" }, { "clause": 2, "scope": 2, "term": "(loop T5 T6 (0))" }, { "clause": 3, "scope": 2, "term": "(loop T5 T6 (0))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": ["T5"] } }, "2501": { "goal": [{ "clause": 2, "scope": 2, "term": "(loop T5 T6 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": ["T5"] } }, "2710": { "goal": [{ "clause": -1, "scope": -1, "term": "(=< T32 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" } ] }, "ground": ["T32"], "free": [], "exprvars": [ "T31", "T5" ] } }, "4": { "goal": [{ "clause": 0, "scope": 1, "term": "(test_fun T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "400": { "goal": [{ "clause": -1, "scope": -1, "term": "(loop T5 T6 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": ["T5"] } }, "555": { "goal": [{ "clause": 1, "scope": 2, "term": "(loop T5 T6 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": ["T5"] } }, "556": { "goal": [ { "clause": 2, "scope": 2, "term": "(loop T5 T6 (0))" }, { "clause": 3, "scope": 2, "term": "(loop T5 T6 (0))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [{ "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": ["T5"] } }, "7": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (=\\= T5 (0)) (loop T5 T6 (0)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T5", "T6" ], "free": [], "exprvars": [] } }, "557": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (> T15 (0)) (',' (> T16 (0)) (',' (is X25 (+ (0) (1))) (',' (is X26 (- (- T15 (1)) (- T16 (1)))) (loop X26 T16 X25)))))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [ { "lhs": { "name": "T5", "type": "PlainIntegerVariable" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" }, { "lhs": { "type": "PlainIntegerConstant", "value": "0" }, "type": "PlainIntegerRelation", "rhs": { "type": "PlainIntegerConstant", "value": "0" }, "operation": "!=" } ] }, "ground": [ "T15", "T16" ], "free": [ "X25", "X26" ], "exprvars": [ "T5", "T15" ] } }, "8": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 4, "label": "CASE" }, { "from": 4, "to": 7, "label": "ONLY EVAL with clause\ntest_fun(X4, X5) :- ','(=\\=(X4, 0), loop(X4, X5, 0)).\nand substitutionT1 -> T5,\nX4 -> T5,\nT2 -> T6,\nX5 -> T6" }, { "from": 7, "to": 8, "label": "IS ERROR" }, { "from": 7, "to": 400, "label": "ARITHCOMP SUCCESS" }, { "from": 7, "to": 475, "label": "ARITHCOMP FAIL" }, { "from": 400, "to": 487, "label": "CASE" }, { "from": 487, "to": 555, "label": "PARALLEL" }, { "from": 487, "to": 556, "label": "PARALLEL" }, { "from": 555, "to": 557, "label": "ONLY EVAL with clause\nloop(X22, X23, X24) :- ','(>(X22, 0), ','(>(X23, 0), ','(is(X25, +(X24, 1)), ','(is(X26, -(-(X22, 1), -(X23, 1))), loop(X26, X23, X25))))).\nand substitutionT5 -> T15,\nX22 -> T15,\nT6 -> T16,\nX23 -> T16,\nX24 -> 0" }, { "from": 556, "to": 2501, "label": "PARALLEL" }, { "from": 556, "to": 2503, "label": "PARALLEL" }, { "from": 2501, "to": 2524, "label": "ONLY EVAL with clause\nloop(X39, X40, X41) :- =<(X39, 0).\nand substitutionT5 -> T25,\nX39 -> T25,\nT6 -> T26,\nX40 -> T26,\nX41 -> 0" }, { "from": 2503, "to": 2710, "label": "ONLY EVAL with clause\nloop(X48, X49, X50) :- =<(X49, 0).\nand substitutionT5 -> T31,\nX48 -> T31,\nT6 -> T32,\nX49 -> T32,\nX50 -> 0" }, { "from": 2710, "to": 2711, "label": "IS ERROR" } ], "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