/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 q(g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToIRSwTTransformerProof [SOUND, 0 ms] (2) TRUE ---------------------------------------- (0) Obligation: Clauses: q(X) :- ','(grammar(G), ','(-(terminal, string(X)), produces(G, X))). grammar(S) :- ','(equal(S, or(N, and(a, and(S, b)))), equal(N, or(c, and(c, N)))). equal(X, X). -(terminal, string(nil)). -(terminal, string(and(A, X))) :- ','(terminal(A), -(terminal, string(X))). terminal(a). terminal(b). terminal(c). produces(G, X) :- gives(G, X, nil). gives(or(P, Q), X, Y) :- gives(P, X, Y). gives(or(P, Q), X, Y) :- gives(Q, X, Y). gives(and(P, Q), X, Z) :- ','(gives(P, X, Y), gives(Q, Y, Z)). gives(A, and(A, X), X) :- terminal(A). Query: q(g) ---------------------------------------- (1) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 1, "program": { "directives": [], "clauses": [ [ "(q X)", "(',' (grammar G) (',' (- (terminal) (string X)) (produces G X)))" ], [ "(grammar S)", "(',' (equal S (or N (and (a) (and S (b))))) (equal N (or (c) (and (c) N))))" ], [ "(equal X X)", null ], [ "(- (terminal) (string (nil)))", null ], [ "(- (terminal) (string (and A X)))", "(',' (terminal A) (- (terminal) (string X)))" ], [ "(terminal (a))", null ], [ "(terminal (b))", null ], [ "(terminal (c))", null ], [ "(produces G X)", "(gives G X (nil))" ], [ "(gives (or P Q) X Y)", "(gives P X Y)" ], [ "(gives (or P Q) X Y)", "(gives Q X Y)" ], [ "(gives (and P Q) X Z)", "(',' (gives P X Y) (gives Q Y Z))" ], [ "(gives A (and A X) X)", "(terminal A)" ] ] }, "graph": { "nodes": { "33": { "goal": [{ "clause": 1, "scope": 2, "term": "(',' (grammar X5) (',' (- (terminal) (string T4)) (produces X5 T4)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": ["X5"], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(q T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "34": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (',' (equal X13 (or X12 (and (a) (and X13 (b))))) (equal X12 (or (c) (and (c) X12)))) (',' (- (terminal) (string T4)) (produces X13 T4)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": [ "X13", "X12" ], "exprvars": [] } }, "35": { "goal": [{ "clause": 2, "scope": 3, "term": "(',' (',' (equal X13 (or X12 (and (a) (and X13 (b))))) (equal X12 (or (c) (and (c) X12)))) (',' (- (terminal) (string T4)) (produces X13 T4)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": [ "X13", "X12" ], "exprvars": [] } }, "36": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "4": { "goal": [{ "clause": 0, "scope": 1, "term": "(q T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "type": "Nodes", "32": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (grammar X5) (',' (- (terminal) (string T4)) (produces X5 T4)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": ["X5"], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 4, "label": "CASE" }, { "from": 4, "to": 32, "label": "ONLY EVAL with clause\nq(X4) :- ','(grammar(X5), ','(-(terminal, string(X4)), produces(X5, X4))).\nand substitutionT1 -> T4,\nX4 -> T4" }, { "from": 32, "to": 33, "label": "CASE" }, { "from": 33, "to": 34, "label": "ONLY EVAL with clause\ngrammar(X11) :- ','(equal(X11, or(X12, and(a, and(X11, b)))), equal(X12, or(c, and(c, X12)))).\nand substitutionX5 -> X13,\nX11 -> X13" }, { "from": 34, "to": 35, "label": "CASE" }, { "from": 35, "to": 36, "label": "BACKTRACK\nfor clause: equal(X, X)because of non-unification" } ], "type": "Graph" } } ---------------------------------------- (2) TRUE