(0) Obligation:
Clauses:
f(X) :- ','(p(X), q(X)).
p(a) :- !.
p(X) :- p(Y).
q(b).
Query: f(a)
(1) PrologToPrologProblemTransformerProof (SOUND transformation)
Built Prolog problem from termination graph ICLP10.
(2) Obligation:
Clauses:
pA(a).
fB(T9) :- pA(X7).
fB(b) :- pA(T10).
Query: fB(a)
(3) PrologToPiTRSProof (SOUND transformation)
We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
fB_in: (f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
fB_in_a(T9) → U1_a(T9, pA_in_a(X7))
pA_in_a(a) → pA_out_a(a)
U1_a(T9, pA_out_a(X7)) → fB_out_a(T9)
fB_in_a(b) → U2_a(pA_in_a(T10))
U2_a(pA_out_a(T10)) → fB_out_a(b)
The argument filtering Pi contains the following mapping:
fB_in_a(
x1) =
fB_in_a
U1_a(
x1,
x2) =
U1_a(
x2)
pA_in_a(
x1) =
pA_in_a
pA_out_a(
x1) =
pA_out_a(
x1)
fB_out_a(
x1) =
fB_out_a
U2_a(
x1) =
U2_a(
x1)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(4) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
fB_in_a(T9) → U1_a(T9, pA_in_a(X7))
pA_in_a(a) → pA_out_a(a)
U1_a(T9, pA_out_a(X7)) → fB_out_a(T9)
fB_in_a(b) → U2_a(pA_in_a(T10))
U2_a(pA_out_a(T10)) → fB_out_a(b)
The argument filtering Pi contains the following mapping:
fB_in_a(
x1) =
fB_in_a
U1_a(
x1,
x2) =
U1_a(
x2)
pA_in_a(
x1) =
pA_in_a
pA_out_a(
x1) =
pA_out_a(
x1)
fB_out_a(
x1) =
fB_out_a
U2_a(
x1) =
U2_a(
x1)
(5) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:
FB_IN_A(T9) → U1_A(T9, pA_in_a(X7))
FB_IN_A(T9) → PA_IN_A(X7)
FB_IN_A(b) → U2_A(pA_in_a(T10))
FB_IN_A(b) → PA_IN_A(T10)
The TRS R consists of the following rules:
fB_in_a(T9) → U1_a(T9, pA_in_a(X7))
pA_in_a(a) → pA_out_a(a)
U1_a(T9, pA_out_a(X7)) → fB_out_a(T9)
fB_in_a(b) → U2_a(pA_in_a(T10))
U2_a(pA_out_a(T10)) → fB_out_a(b)
The argument filtering Pi contains the following mapping:
fB_in_a(
x1) =
fB_in_a
U1_a(
x1,
x2) =
U1_a(
x2)
pA_in_a(
x1) =
pA_in_a
pA_out_a(
x1) =
pA_out_a(
x1)
fB_out_a(
x1) =
fB_out_a
U2_a(
x1) =
U2_a(
x1)
FB_IN_A(
x1) =
FB_IN_A
U1_A(
x1,
x2) =
U1_A(
x2)
PA_IN_A(
x1) =
PA_IN_A
U2_A(
x1) =
U2_A(
x1)
We have to consider all (P,R,Pi)-chains
(6) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
FB_IN_A(T9) → U1_A(T9, pA_in_a(X7))
FB_IN_A(T9) → PA_IN_A(X7)
FB_IN_A(b) → U2_A(pA_in_a(T10))
FB_IN_A(b) → PA_IN_A(T10)
The TRS R consists of the following rules:
fB_in_a(T9) → U1_a(T9, pA_in_a(X7))
pA_in_a(a) → pA_out_a(a)
U1_a(T9, pA_out_a(X7)) → fB_out_a(T9)
fB_in_a(b) → U2_a(pA_in_a(T10))
U2_a(pA_out_a(T10)) → fB_out_a(b)
The argument filtering Pi contains the following mapping:
fB_in_a(
x1) =
fB_in_a
U1_a(
x1,
x2) =
U1_a(
x2)
pA_in_a(
x1) =
pA_in_a
pA_out_a(
x1) =
pA_out_a(
x1)
fB_out_a(
x1) =
fB_out_a
U2_a(
x1) =
U2_a(
x1)
FB_IN_A(
x1) =
FB_IN_A
U1_A(
x1,
x2) =
U1_A(
x2)
PA_IN_A(
x1) =
PA_IN_A
U2_A(
x1) =
U2_A(
x1)
We have to consider all (P,R,Pi)-chains
(7) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 0 SCCs with 4 less nodes.
(8) TRUE