/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 factorial(g,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToTRSTransformerProof [SOUND, 0 ms] (2) QTRS (3) RisEmptyProof [EQUIVALENT, 0 ms] (4) YES ---------------------------------------- (0) Obligation: Clauses: factorial1(N, F) :- ','(>(N, 0), ','(is(N1, -(N, 1)), ','(factorial1(N1, F1), is(F, *(N, F1))))). factorial1(0, 1). factorial2(N, F) :- factorial2(0, N, 1, F). factorial2(I, N, T, F) :- ','(<(I, N), ','(is(I1, +(I, 1)), ','(is(T1, *(T, I1)), factorial2(I1, N, T1, F)))). factorial2(N, N, F, F). factorial3(N, F) :- factorial3(N, 1, F). factorial3(N, T, F) :- ','(>(N, 0), ','(is(T1, *(T, N)), ','(is(N1, -(N, 1)), factorial3(N1, T1, F)))). factorial3(0, F, F). Query: factorial(g,a) ---------------------------------------- (1) PrologToTRSTransformerProof (SOUND) Transformed Prolog program to TRS. { "root": 2, "program": { "directives": [], "clauses": [ [ "(factorial1 N F)", "(',' (> N (0)) (',' (is N1 (- N (1))) (',' (factorial1 N1 F1) (is F (* N F1)))))" ], [ "(factorial1 (0) (1))", null ], [ "(factorial2 N F)", "(factorial2 (0) N (1) F)" ], [ "(factorial2 I N T F)", "(',' (< I N) (',' (is I1 (+ I (1))) (',' (is T1 (* T I1)) (factorial2 I1 N T1 F))))" ], [ "(factorial2 N N F F)", null ], [ "(factorial3 N F)", "(factorial3 N (1) F)" ], [ "(factorial3 N T F)", "(',' (> N (0)) (',' (is T1 (* T N)) (',' (is N1 (- N (1))) (factorial3 N1 T1 F))))" ], [ "(factorial3 (0) F F)", null ] ] }, "graph": { "nodes": { "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(factorial T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "5": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes" }, "edges": [{ "from": 2, "to": 5, "label": "UNDEFINED ERROR" }], "type": "Graph" } } ---------------------------------------- (2) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (3) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (4) YES