/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- Graph construction failed Graph construction failed Graph construction failed YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern countAll(g,g,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) UnifyTransformerProof [EQUIVALENT, 0 ms] (2) Prolog (3) UndefinedPredicateHandlerProof [SOUND, 0 ms] (4) Prolog (5) PrologToPiTRSProof [SOUND, 20 ms] (6) PiTRS (7) DependencyPairsProof [EQUIVALENT, 0 ms] (8) PiDP (9) DependencyGraphProof [EQUIVALENT, 0 ms] (10) PiDP (11) PiDPToQDPProof [SOUND, 26 ms] (12) QDP (13) QDPSizeChangeProof [EQUIVALENT, 0 ms] (14) YES ---------------------------------------- (0) Obligation: Clauses: countAll(Item, [], 0). countAll(Item, Other, 1) :- ','(atomic(Other), =(Other, Item)). countAll(Item, Other, 0) :- ','(atomic(Other), ','(\=(Other, []), \=(Other, Item))). countAll(Item, .(X, Xs), Result) :- ','(countAll(Item, X, HeadCount), ','(countAll(Item, Xs, TailCount), is(Result, +(HeadCount, TailCount)))). Query: countAll(g,g,a) ---------------------------------------- (1) UnifyTransformerProof (EQUIVALENT) Added a fact for the built-in = predicate [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: countAll(Item, [], 0). countAll(Item, Other, 1) :- ','(atomic(Other), =(Other, Item)). countAll(Item, Other, 0) :- ','(atomic(Other), ','(\=(Other, []), \=(Other, Item))). countAll(Item, .(X, Xs), Result) :- ','(countAll(Item, X, HeadCount), ','(countAll(Item, Xs, TailCount), is(Result, +(HeadCount, TailCount)))). =(X, X). Query: countAll(g,g,a) ---------------------------------------- (3) UndefinedPredicateHandlerProof (SOUND) Added facts for all undefined predicates [PROLOG]. ---------------------------------------- (4) Obligation: Clauses: countAll(Item, [], 0). countAll(Item, Other, 1) :- ','(atomic(Other), =(Other, Item)). countAll(Item, Other, 0) :- ','(atomic(Other), ','(\=(Other, []), \=(Other, Item))). countAll(Item, .(X, Xs), Result) :- ','(countAll(Item, X, HeadCount), ','(countAll(Item, Xs, TailCount), is(Result, +(HeadCount, TailCount)))). =(X, X). atomic(X0). \=(X0, X1). is(X0, X1). Query: countAll(g,g,a) ---------------------------------------- (5) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: countAll_in_3: (b,b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: countAll_in_gga(Item, [], 0) -> countAll_out_gga(Item, [], 0) countAll_in_gga(Item, Other, 1) -> U1_gga(Item, Other, atomic_in_g(Other)) atomic_in_g(X0) -> atomic_out_g(X0) U1_gga(Item, Other, atomic_out_g(Other)) -> U2_gga(Item, Other, =_in_gg(Other, Item)) =_in_gg(X, X) -> =_out_gg(X, X) U2_gga(Item, Other, =_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 1) countAll_in_gga(Item, Other, 0) -> U3_gga(Item, Other, atomic_in_g(Other)) U3_gga(Item, Other, atomic_out_g(Other)) -> U4_gga(Item, Other, \=_in_gg(Other, [])) \=_in_gg(X0, X1) -> \=_out_gg(X0, X1) U4_gga(Item, Other, \=_out_gg(Other, [])) -> U5_gga(Item, Other, \=_in_gg(Other, Item)) U5_gga(Item, Other, \=_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 0) countAll_in_gga(Item, .(X, Xs), Result) -> U6_gga(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) U6_gga(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> U7_gga(Item, X, Xs, Result, HeadCount, countAll_in_gga(Item, Xs, TailCount)) U7_gga(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_in_ag(Result, +(HeadCount, TailCount))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_out_ag(Result, +(HeadCount, TailCount))) -> countAll_out_gga(Item, .(X, Xs), Result) The argument filtering Pi contains the following mapping: countAll_in_gga(x1, x2, x3) = countAll_in_gga(x1, x2) [] = [] countAll_out_gga(x1, x2, x3) = countAll_out_gga U1_gga(x1, x2, x3) = U1_gga(x1, x2, x3) atomic_in_g(x1) = atomic_in_g(x1) atomic_out_g(x1) = atomic_out_g U2_gga(x1, x2, x3) = U2_gga(x3) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U3_gga(x1, x2, x3) = U3_gga(x1, x2, x3) U4_gga(x1, x2, x3) = U4_gga(x1, x2, x3) \=_in_gg(x1, x2) = \=_in_gg(x1, x2) \=_out_gg(x1, x2) = \=_out_gg U5_gga(x1, x2, x3) = U5_gga(x3) .(x1, x2) = .(x1, x2) U6_gga(x1, x2, x3, x4, x5) = U6_gga(x1, x3, x5) U7_gga(x1, x2, x3, x4, x5, x6) = U7_gga(x6) U8_gga(x1, x2, x3, x4, x5, x6, x7) = U8_gga(x7) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag +(x1, x2) = + Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (6) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: countAll_in_gga(Item, [], 0) -> countAll_out_gga(Item, [], 0) countAll_in_gga(Item, Other, 1) -> U1_gga(Item, Other, atomic_in_g(Other)) atomic_in_g(X0) -> atomic_out_g(X0) U1_gga(Item, Other, atomic_out_g(Other)) -> U2_gga(Item, Other, =_in_gg(Other, Item)) =_in_gg(X, X) -> =_out_gg(X, X) U2_gga(Item, Other, =_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 1) countAll_in_gga(Item, Other, 0) -> U3_gga(Item, Other, atomic_in_g(Other)) U3_gga(Item, Other, atomic_out_g(Other)) -> U4_gga(Item, Other, \=_in_gg(Other, [])) \=_in_gg(X0, X1) -> \=_out_gg(X0, X1) U4_gga(Item, Other, \=_out_gg(Other, [])) -> U5_gga(Item, Other, \=_in_gg(Other, Item)) U5_gga(Item, Other, \=_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 0) countAll_in_gga(Item, .(X, Xs), Result) -> U6_gga(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) U6_gga(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> U7_gga(Item, X, Xs, Result, HeadCount, countAll_in_gga(Item, Xs, TailCount)) U7_gga(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_in_ag(Result, +(HeadCount, TailCount))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_out_ag(Result, +(HeadCount, TailCount))) -> countAll_out_gga(Item, .(X, Xs), Result) The argument filtering Pi contains the following mapping: countAll_in_gga(x1, x2, x3) = countAll_in_gga(x1, x2) [] = [] countAll_out_gga(x1, x2, x3) = countAll_out_gga U1_gga(x1, x2, x3) = U1_gga(x1, x2, x3) atomic_in_g(x1) = atomic_in_g(x1) atomic_out_g(x1) = atomic_out_g U2_gga(x1, x2, x3) = U2_gga(x3) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U3_gga(x1, x2, x3) = U3_gga(x1, x2, x3) U4_gga(x1, x2, x3) = U4_gga(x1, x2, x3) \=_in_gg(x1, x2) = \=_in_gg(x1, x2) \=_out_gg(x1, x2) = \=_out_gg U5_gga(x1, x2, x3) = U5_gga(x3) .(x1, x2) = .(x1, x2) U6_gga(x1, x2, x3, x4, x5) = U6_gga(x1, x3, x5) U7_gga(x1, x2, x3, x4, x5, x6) = U7_gga(x6) U8_gga(x1, x2, x3, x4, x5, x6, x7) = U8_gga(x7) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag +(x1, x2) = + ---------------------------------------- (7) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem: Pi DP problem: The TRS P consists of the following rules: COUNTALL_IN_GGA(Item, Other, 1) -> U1_GGA(Item, Other, atomic_in_g(Other)) COUNTALL_IN_GGA(Item, Other, 1) -> ATOMIC_IN_G(Other) U1_GGA(Item, Other, atomic_out_g(Other)) -> U2_GGA(Item, Other, =_in_gg(Other, Item)) U1_GGA(Item, Other, atomic_out_g(Other)) -> =_IN_GG(Other, Item) COUNTALL_IN_GGA(Item, Other, 0) -> U3_GGA(Item, Other, atomic_in_g(Other)) COUNTALL_IN_GGA(Item, Other, 0) -> ATOMIC_IN_G(Other) U3_GGA(Item, Other, atomic_out_g(Other)) -> U4_GGA(Item, Other, \=_in_gg(Other, [])) U3_GGA(Item, Other, atomic_out_g(Other)) -> \=_IN_GG(Other, []) U4_GGA(Item, Other, \=_out_gg(Other, [])) -> U5_GGA(Item, Other, \=_in_gg(Other, Item)) U4_GGA(Item, Other, \=_out_gg(Other, [])) -> \=_IN_GG(Other, Item) COUNTALL_IN_GGA(Item, .(X, Xs), Result) -> U6_GGA(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) COUNTALL_IN_GGA(Item, .(X, Xs), Result) -> COUNTALL_IN_GGA(Item, X, HeadCount) U6_GGA(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> U7_GGA(Item, X, Xs, Result, HeadCount, countAll_in_gga(Item, Xs, TailCount)) U6_GGA(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> COUNTALL_IN_GGA(Item, Xs, TailCount) U7_GGA(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> U8_GGA(Item, X, Xs, Result, HeadCount, TailCount, is_in_ag(Result, +(HeadCount, TailCount))) U7_GGA(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> IS_IN_AG(Result, +(HeadCount, TailCount)) The TRS R consists of the following rules: countAll_in_gga(Item, [], 0) -> countAll_out_gga(Item, [], 0) countAll_in_gga(Item, Other, 1) -> U1_gga(Item, Other, atomic_in_g(Other)) atomic_in_g(X0) -> atomic_out_g(X0) U1_gga(Item, Other, atomic_out_g(Other)) -> U2_gga(Item, Other, =_in_gg(Other, Item)) =_in_gg(X, X) -> =_out_gg(X, X) U2_gga(Item, Other, =_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 1) countAll_in_gga(Item, Other, 0) -> U3_gga(Item, Other, atomic_in_g(Other)) U3_gga(Item, Other, atomic_out_g(Other)) -> U4_gga(Item, Other, \=_in_gg(Other, [])) \=_in_gg(X0, X1) -> \=_out_gg(X0, X1) U4_gga(Item, Other, \=_out_gg(Other, [])) -> U5_gga(Item, Other, \=_in_gg(Other, Item)) U5_gga(Item, Other, \=_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 0) countAll_in_gga(Item, .(X, Xs), Result) -> U6_gga(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) U6_gga(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> U7_gga(Item, X, Xs, Result, HeadCount, countAll_in_gga(Item, Xs, TailCount)) U7_gga(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_in_ag(Result, +(HeadCount, TailCount))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_out_ag(Result, +(HeadCount, TailCount))) -> countAll_out_gga(Item, .(X, Xs), Result) The argument filtering Pi contains the following mapping: countAll_in_gga(x1, x2, x3) = countAll_in_gga(x1, x2) [] = [] countAll_out_gga(x1, x2, x3) = countAll_out_gga U1_gga(x1, x2, x3) = U1_gga(x1, x2, x3) atomic_in_g(x1) = atomic_in_g(x1) atomic_out_g(x1) = atomic_out_g U2_gga(x1, x2, x3) = U2_gga(x3) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U3_gga(x1, x2, x3) = U3_gga(x1, x2, x3) U4_gga(x1, x2, x3) = U4_gga(x1, x2, x3) \=_in_gg(x1, x2) = \=_in_gg(x1, x2) \=_out_gg(x1, x2) = \=_out_gg U5_gga(x1, x2, x3) = U5_gga(x3) .(x1, x2) = .(x1, x2) U6_gga(x1, x2, x3, x4, x5) = U6_gga(x1, x3, x5) U7_gga(x1, x2, x3, x4, x5, x6) = U7_gga(x6) U8_gga(x1, x2, x3, x4, x5, x6, x7) = U8_gga(x7) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag +(x1, x2) = + COUNTALL_IN_GGA(x1, x2, x3) = COUNTALL_IN_GGA(x1, x2) U1_GGA(x1, x2, x3) = U1_GGA(x1, x2, x3) ATOMIC_IN_G(x1) = ATOMIC_IN_G(x1) U2_GGA(x1, x2, x3) = U2_GGA(x3) =_IN_GG(x1, x2) = =_IN_GG(x1, x2) U3_GGA(x1, x2, x3) = U3_GGA(x1, x2, x3) U4_GGA(x1, x2, x3) = U4_GGA(x1, x2, x3) \=_IN_GG(x1, x2) = \=_IN_GG(x1, x2) U5_GGA(x1, x2, x3) = U5_GGA(x3) U6_GGA(x1, x2, x3, x4, x5) = U6_GGA(x1, x3, x5) U7_GGA(x1, x2, x3, x4, x5, x6) = U7_GGA(x6) U8_GGA(x1, x2, x3, x4, x5, x6, x7) = U8_GGA(x7) IS_IN_AG(x1, x2) = IS_IN_AG(x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (8) Obligation: Pi DP problem: The TRS P consists of the following rules: COUNTALL_IN_GGA(Item, Other, 1) -> U1_GGA(Item, Other, atomic_in_g(Other)) COUNTALL_IN_GGA(Item, Other, 1) -> ATOMIC_IN_G(Other) U1_GGA(Item, Other, atomic_out_g(Other)) -> U2_GGA(Item, Other, =_in_gg(Other, Item)) U1_GGA(Item, Other, atomic_out_g(Other)) -> =_IN_GG(Other, Item) COUNTALL_IN_GGA(Item, Other, 0) -> U3_GGA(Item, Other, atomic_in_g(Other)) COUNTALL_IN_GGA(Item, Other, 0) -> ATOMIC_IN_G(Other) U3_GGA(Item, Other, atomic_out_g(Other)) -> U4_GGA(Item, Other, \=_in_gg(Other, [])) U3_GGA(Item, Other, atomic_out_g(Other)) -> \=_IN_GG(Other, []) U4_GGA(Item, Other, \=_out_gg(Other, [])) -> U5_GGA(Item, Other, \=_in_gg(Other, Item)) U4_GGA(Item, Other, \=_out_gg(Other, [])) -> \=_IN_GG(Other, Item) COUNTALL_IN_GGA(Item, .(X, Xs), Result) -> U6_GGA(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) COUNTALL_IN_GGA(Item, .(X, Xs), Result) -> COUNTALL_IN_GGA(Item, X, HeadCount) U6_GGA(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> U7_GGA(Item, X, Xs, Result, HeadCount, countAll_in_gga(Item, Xs, TailCount)) U6_GGA(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> COUNTALL_IN_GGA(Item, Xs, TailCount) U7_GGA(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> U8_GGA(Item, X, Xs, Result, HeadCount, TailCount, is_in_ag(Result, +(HeadCount, TailCount))) U7_GGA(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> IS_IN_AG(Result, +(HeadCount, TailCount)) The TRS R consists of the following rules: countAll_in_gga(Item, [], 0) -> countAll_out_gga(Item, [], 0) countAll_in_gga(Item, Other, 1) -> U1_gga(Item, Other, atomic_in_g(Other)) atomic_in_g(X0) -> atomic_out_g(X0) U1_gga(Item, Other, atomic_out_g(Other)) -> U2_gga(Item, Other, =_in_gg(Other, Item)) =_in_gg(X, X) -> =_out_gg(X, X) U2_gga(Item, Other, =_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 1) countAll_in_gga(Item, Other, 0) -> U3_gga(Item, Other, atomic_in_g(Other)) U3_gga(Item, Other, atomic_out_g(Other)) -> U4_gga(Item, Other, \=_in_gg(Other, [])) \=_in_gg(X0, X1) -> \=_out_gg(X0, X1) U4_gga(Item, Other, \=_out_gg(Other, [])) -> U5_gga(Item, Other, \=_in_gg(Other, Item)) U5_gga(Item, Other, \=_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 0) countAll_in_gga(Item, .(X, Xs), Result) -> U6_gga(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) U6_gga(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> U7_gga(Item, X, Xs, Result, HeadCount, countAll_in_gga(Item, Xs, TailCount)) U7_gga(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_in_ag(Result, +(HeadCount, TailCount))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_out_ag(Result, +(HeadCount, TailCount))) -> countAll_out_gga(Item, .(X, Xs), Result) The argument filtering Pi contains the following mapping: countAll_in_gga(x1, x2, x3) = countAll_in_gga(x1, x2) [] = [] countAll_out_gga(x1, x2, x3) = countAll_out_gga U1_gga(x1, x2, x3) = U1_gga(x1, x2, x3) atomic_in_g(x1) = atomic_in_g(x1) atomic_out_g(x1) = atomic_out_g U2_gga(x1, x2, x3) = U2_gga(x3) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U3_gga(x1, x2, x3) = U3_gga(x1, x2, x3) U4_gga(x1, x2, x3) = U4_gga(x1, x2, x3) \=_in_gg(x1, x2) = \=_in_gg(x1, x2) \=_out_gg(x1, x2) = \=_out_gg U5_gga(x1, x2, x3) = U5_gga(x3) .(x1, x2) = .(x1, x2) U6_gga(x1, x2, x3, x4, x5) = U6_gga(x1, x3, x5) U7_gga(x1, x2, x3, x4, x5, x6) = U7_gga(x6) U8_gga(x1, x2, x3, x4, x5, x6, x7) = U8_gga(x7) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag +(x1, x2) = + COUNTALL_IN_GGA(x1, x2, x3) = COUNTALL_IN_GGA(x1, x2) U1_GGA(x1, x2, x3) = U1_GGA(x1, x2, x3) ATOMIC_IN_G(x1) = ATOMIC_IN_G(x1) U2_GGA(x1, x2, x3) = U2_GGA(x3) =_IN_GG(x1, x2) = =_IN_GG(x1, x2) U3_GGA(x1, x2, x3) = U3_GGA(x1, x2, x3) U4_GGA(x1, x2, x3) = U4_GGA(x1, x2, x3) \=_IN_GG(x1, x2) = \=_IN_GG(x1, x2) U5_GGA(x1, x2, x3) = U5_GGA(x3) U6_GGA(x1, x2, x3, x4, x5) = U6_GGA(x1, x3, x5) U7_GGA(x1, x2, x3, x4, x5, x6) = U7_GGA(x6) U8_GGA(x1, x2, x3, x4, x5, x6, x7) = U8_GGA(x7) IS_IN_AG(x1, x2) = IS_IN_AG(x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (9) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 13 less nodes. ---------------------------------------- (10) Obligation: Pi DP problem: The TRS P consists of the following rules: COUNTALL_IN_GGA(Item, .(X, Xs), Result) -> U6_GGA(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) U6_GGA(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> COUNTALL_IN_GGA(Item, Xs, TailCount) COUNTALL_IN_GGA(Item, .(X, Xs), Result) -> COUNTALL_IN_GGA(Item, X, HeadCount) The TRS R consists of the following rules: countAll_in_gga(Item, [], 0) -> countAll_out_gga(Item, [], 0) countAll_in_gga(Item, Other, 1) -> U1_gga(Item, Other, atomic_in_g(Other)) atomic_in_g(X0) -> atomic_out_g(X0) U1_gga(Item, Other, atomic_out_g(Other)) -> U2_gga(Item, Other, =_in_gg(Other, Item)) =_in_gg(X, X) -> =_out_gg(X, X) U2_gga(Item, Other, =_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 1) countAll_in_gga(Item, Other, 0) -> U3_gga(Item, Other, atomic_in_g(Other)) U3_gga(Item, Other, atomic_out_g(Other)) -> U4_gga(Item, Other, \=_in_gg(Other, [])) \=_in_gg(X0, X1) -> \=_out_gg(X0, X1) U4_gga(Item, Other, \=_out_gg(Other, [])) -> U5_gga(Item, Other, \=_in_gg(Other, Item)) U5_gga(Item, Other, \=_out_gg(Other, Item)) -> countAll_out_gga(Item, Other, 0) countAll_in_gga(Item, .(X, Xs), Result) -> U6_gga(Item, X, Xs, Result, countAll_in_gga(Item, X, HeadCount)) U6_gga(Item, X, Xs, Result, countAll_out_gga(Item, X, HeadCount)) -> U7_gga(Item, X, Xs, Result, HeadCount, countAll_in_gga(Item, Xs, TailCount)) U7_gga(Item, X, Xs, Result, HeadCount, countAll_out_gga(Item, Xs, TailCount)) -> U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_in_ag(Result, +(HeadCount, TailCount))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U8_gga(Item, X, Xs, Result, HeadCount, TailCount, is_out_ag(Result, +(HeadCount, TailCount))) -> countAll_out_gga(Item, .(X, Xs), Result) The argument filtering Pi contains the following mapping: countAll_in_gga(x1, x2, x3) = countAll_in_gga(x1, x2) [] = [] countAll_out_gga(x1, x2, x3) = countAll_out_gga U1_gga(x1, x2, x3) = U1_gga(x1, x2, x3) atomic_in_g(x1) = atomic_in_g(x1) atomic_out_g(x1) = atomic_out_g U2_gga(x1, x2, x3) = U2_gga(x3) =_in_gg(x1, x2) = =_in_gg(x1, x2) =_out_gg(x1, x2) = =_out_gg U3_gga(x1, x2, x3) = U3_gga(x1, x2, x3) U4_gga(x1, x2, x3) = U4_gga(x1, x2, x3) \=_in_gg(x1, x2) = \=_in_gg(x1, x2) \=_out_gg(x1, x2) = \=_out_gg U5_gga(x1, x2, x3) = U5_gga(x3) .(x1, x2) = .(x1, x2) U6_gga(x1, x2, x3, x4, x5) = U6_gga(x1, x3, x5) U7_gga(x1, x2, x3, x4, x5, x6) = U7_gga(x6) U8_gga(x1, x2, x3, x4, x5, x6, x7) = U8_gga(x7) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag +(x1, x2) = + COUNTALL_IN_GGA(x1, x2, x3) = COUNTALL_IN_GGA(x1, x2) U6_GGA(x1, x2, x3, x4, x5) = U6_GGA(x1, x3, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (11) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: COUNTALL_IN_GGA(Item, .(X, Xs)) -> U6_GGA(Item, Xs, countAll_in_gga(Item, X)) U6_GGA(Item, Xs, countAll_out_gga) -> COUNTALL_IN_GGA(Item, Xs) COUNTALL_IN_GGA(Item, .(X, Xs)) -> COUNTALL_IN_GGA(Item, X) The TRS R consists of the following rules: countAll_in_gga(Item, []) -> countAll_out_gga countAll_in_gga(Item, Other) -> U1_gga(Item, Other, atomic_in_g(Other)) atomic_in_g(X0) -> atomic_out_g U1_gga(Item, Other, atomic_out_g) -> U2_gga(=_in_gg(Other, Item)) =_in_gg(X, X) -> =_out_gg U2_gga(=_out_gg) -> countAll_out_gga countAll_in_gga(Item, Other) -> U3_gga(Item, Other, atomic_in_g(Other)) U3_gga(Item, Other, atomic_out_g) -> U4_gga(Item, Other, \=_in_gg(Other, [])) \=_in_gg(X0, X1) -> \=_out_gg U4_gga(Item, Other, \=_out_gg) -> U5_gga(\=_in_gg(Other, Item)) U5_gga(\=_out_gg) -> countAll_out_gga countAll_in_gga(Item, .(X, Xs)) -> U6_gga(Item, Xs, countAll_in_gga(Item, X)) U6_gga(Item, Xs, countAll_out_gga) -> U7_gga(countAll_in_gga(Item, Xs)) U7_gga(countAll_out_gga) -> U8_gga(is_in_ag(+)) is_in_ag(X1) -> is_out_ag U8_gga(is_out_ag) -> countAll_out_gga The set Q consists of the following terms: countAll_in_gga(x0, x1) atomic_in_g(x0) U1_gga(x0, x1, x2) =_in_gg(x0, x1) U2_gga(x0) U3_gga(x0, x1, x2) \=_in_gg(x0, x1) U4_gga(x0, x1, x2) U5_gga(x0) U6_gga(x0, x1, x2) U7_gga(x0) is_in_ag(x0) U8_gga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (13) QDPSizeChangeProof (EQUIVALENT) By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs: *U6_GGA(Item, Xs, countAll_out_gga) -> COUNTALL_IN_GGA(Item, Xs) The graph contains the following edges 1 >= 1, 2 >= 2 *COUNTALL_IN_GGA(Item, .(X, Xs)) -> COUNTALL_IN_GGA(Item, X) The graph contains the following edges 1 >= 1, 2 > 2 *COUNTALL_IN_GGA(Item, .(X, Xs)) -> U6_GGA(Item, Xs, countAll_in_gga(Item, X)) The graph contains the following edges 1 >= 1, 2 > 2 ---------------------------------------- (14) YES