/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 isPrime(g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) BuiltinConflictTransformerProof [EQUIVALENT, 0 ms] (2) Prolog (3) PrologToTRSTransformerProof [SOUND, 0 ms] (4) QTRS (5) RisEmptyProof [EQUIVALENT, 0 ms] (6) YES ---------------------------------------- (0) Obligation: Clauses: is_prime(2). is_prime(3). is_prime(P) :- ','(integer(P), ','(>(P, 3), ','(=\=(mod(P, 2), 0), \+(has_factor(P, 3))))). integer(X1). has_factor(N, L) :- =:=(mod(N, L), 0). has_factor(N, L) :- ','(<(*(L, L), N), ','(is(L2, +(L, 2)), has_factor(N, L2))). Query: isPrime(g) ---------------------------------------- (1) BuiltinConflictTransformerProof (EQUIVALENT) Renamed defined predicates conflicting with built-in predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: is_prime(2). is_prime(3). is_prime(P) :- ','(user_defined_integer(P), ','(>(P, 3), ','(=\=(mod(P, 2), 0), \+(has_factor(P, 3))))). user_defined_integer(X1). has_factor(N, L) :- =:=(mod(N, L), 0). has_factor(N, L) :- ','(<(*(L, L), N), ','(is(L2, +(L, 2)), has_factor(N, L2))). Query: isPrime(g) ---------------------------------------- (3) PrologToTRSTransformerProof (SOUND) Transformed Prolog program to TRS. { "root": 2, "program": { "directives": [], "clauses": [ [ "(is_prime (2))", null ], [ "(is_prime (3))", null ], [ "(is_prime P)", "(',' (user_defined_integer P) (',' (> P (3)) (',' (=\\= (mod P (2)) (0)) (\\+ (has_factor P (3))))))" ], [ "(user_defined_integer X1)", null ], [ "(has_factor N L)", "(=:= (mod N L) (0))" ], [ "(has_factor N L)", "(',' (< (* L L) N) (',' (is L2 (+ L (2))) (has_factor N L2)))" ] ] }, "graph": { "nodes": { "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(isPrime T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "4": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes" }, "edges": [{ "from": 2, "to": 4, "label": "UNDEFINED ERROR" }], "type": "Graph" } } ---------------------------------------- (4) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (5) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (6) YES