(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) LPReorderTransformerProof (EQUIVALENT transformation)

Reordered facts before rules in definite LP [PROLOG].

(2) Obligation:

Clauses:

equal(X, X).
-(terminal, string(nil)).
terminal(a).
terminal(b).
terminal(c).
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)))).
-(terminal, string(and(A, X))) :- ','(terminal(A), -(terminal, string(X))).
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)

(3) PrologToCdtProblemTransformerProof (UPPER BOUND (ID) transformation)

Built complexity over-approximating cdt problems from derivation graph.

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:none

Compound Symbols:none

(5) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(6) BOUNDS(O(1), O(1))

(7) PrologToCdtProblemTransformerProof (UPPER BOUND (ID) transformation)

Built complexity over-approximating cdt problems from derivation graph.

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:none

Compound Symbols:none