/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.pl /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- MAYBE proof of /export/starexec/sandbox/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern len(g,a) w.r.t. the given Prolog program could not be shown: (0) Prolog (1) CutEliminatorProof [SOUND, 0 ms] (2) Prolog (3) PrologToPiTRSProof [SOUND, 0 ms] (4) PiTRS (5) DependencyPairsProof [EQUIVALENT, 0 ms] (6) PiDP (7) DependencyGraphProof [EQUIVALENT, 0 ms] (8) PiDP (9) UsableRulesProof [EQUIVALENT, 0 ms] (10) PiDP (11) PiDPToQDPProof [SOUND, 0 ms] (12) QDP (13) UsableRulesReductionPairsProof [EQUIVALENT, 19 ms] (14) QDP (15) TransformationProof [SOUND, 0 ms] (16) QDP (17) UsableRulesProof [EQUIVALENT, 0 ms] (18) QDP (19) QReductionProof [EQUIVALENT, 0 ms] (20) QDP (21) PrologToPiTRSProof [SOUND, 0 ms] (22) PiTRS (23) DependencyPairsProof [EQUIVALENT, 0 ms] (24) PiDP (25) DependencyGraphProof [EQUIVALENT, 0 ms] (26) PiDP (27) UsableRulesProof [EQUIVALENT, 0 ms] (28) PiDP (29) PiDPToQDPProof [SOUND, 0 ms] (30) QDP (31) TransformationProof [SOUND, 0 ms] (32) QDP (33) UsableRulesProof [EQUIVALENT, 0 ms] (34) QDP (35) QReductionProof [EQUIVALENT, 0 ms] (36) QDP (37) QDPOrderProof [EQUIVALENT, 21 ms] (38) QDP (39) TransformationProof [EQUIVALENT, 0 ms] (40) QDP (41) NonTerminationLoopProof [COMPLETE, 3 ms] (42) NO (43) PrologToTRSTransformerProof [SOUND, 0 ms] (44) QTRS (45) QTRSRRRProof [EQUIVALENT, 55 ms] (46) QTRS (47) QTRSRRRProof [EQUIVALENT, 0 ms] (48) QTRS (49) QTRSRRRProof [EQUIVALENT, 0 ms] (50) QTRS (51) QTRSRRRProof [EQUIVALENT, 4 ms] (52) QTRS (53) Overlay + Local Confluence [EQUIVALENT, 0 ms] (54) QTRS (55) DependencyPairsProof [EQUIVALENT, 0 ms] (56) QDP (57) UsableRulesProof [EQUIVALENT, 0 ms] (58) QDP (59) QReductionProof [EQUIVALENT, 0 ms] (60) QDP (61) NonTerminationLoopProof [COMPLETE, 0 ms] (62) NO (63) PrologToDTProblemTransformerProof [SOUND, 0 ms] (64) TRIPLES (65) TriplesToPiDPProof [SOUND, 0 ms] (66) PiDP (67) DependencyGraphProof [EQUIVALENT, 0 ms] (68) AND (69) PiDP (70) PiDPToQDPProof [SOUND, 0 ms] (71) QDP (72) NonTerminationLoopProof [COMPLETE, 0 ms] (73) NO (74) PiDP (75) PiDPToQDPProof [SOUND, 0 ms] (76) QDP (77) QDPSizeChangeProof [EQUIVALENT, 0 ms] (78) YES (79) PrologToIRSwTTransformerProof [SOUND, 0 ms] (80) IRSwT (81) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms] (82) IRSwT (83) IntTRSCompressionProof [EQUIVALENT, 39 ms] (84) IRSwT (85) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (86) IRSwT (87) IRSwTTerminationDigraphProof [EQUIVALENT, 6 ms] (88) AND (89) IRSwT (90) IntTRSUnneededArgumentFilterProof [EQUIVALENT, 0 ms] (91) IRSwT (92) TempFilterProof [SOUND, 4 ms] (93) IRSwT (94) IRSwTToQDPProof [SOUND, 0 ms] (95) QDP (96) QDPSizeChangeProof [EQUIVALENT, 0 ms] (97) YES (98) IRSwT ---------------------------------------- (0) Obligation: Clauses: len([], 0) :- !. len(Xs, s(N)) :- ','(tail(Xs, Ys), len(Ys, N)). tail([], []). tail(.(X, Xs), Xs). Query: len(g,a) ---------------------------------------- (1) CutEliminatorProof (SOUND) Eliminated all cuts by simply ignoring them[PROLOG]. ---------------------------------------- (2) Obligation: Clauses: len([], 0). len(Xs, s(N)) :- ','(tail(Xs, Ys), len(Ys, N)). tail([], []). tail(.(X, Xs), Xs). Query: len(g,a) ---------------------------------------- (3) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: len_in_2: (b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x2) U1_ga(x1, x2, x3) = U1_ga(x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x4) s(x1) = s(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: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x2) U1_ga(x1, x2, x3) = U1_ga(x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x4) s(x1) = s(x1) ---------------------------------------- (5) 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: LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) LEN_IN_GA(Xs, s(N)) -> TAIL_IN_GA(Xs, Ys) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> U2_GA(Xs, N, Ys, len_in_ga(Ys, N)) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x2) U1_ga(x1, x2, x3) = U1_ga(x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x4) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x3) TAIL_IN_GA(x1, x2) = TAIL_IN_GA(x1) U2_GA(x1, x2, x3, x4) = U2_GA(x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) LEN_IN_GA(Xs, s(N)) -> TAIL_IN_GA(Xs, Ys) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> U2_GA(Xs, N, Ys, len_in_ga(Ys, N)) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x2) U1_ga(x1, x2, x3) = U1_ga(x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x4) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x3) TAIL_IN_GA(x1, x2) = TAIL_IN_GA(x1) U2_GA(x1, x2, x3, x4) = U2_GA(x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 2 less nodes. ---------------------------------------- (8) Obligation: Pi DP problem: The TRS P consists of the following rules: U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x2) U1_ga(x1, x2, x3) = U1_ga(x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x4) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (9) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (10) Obligation: Pi DP problem: The TRS P consists of the following rules: U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) The TRS R consists of the following rules: tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) The argument filtering Pi contains the following mapping: [] = [] tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x2) .(x1, x2) = .(x1, x2) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x3) 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: U1_GA(tail_out_ga(Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA(Xs) -> U1_GA(tail_in_ga(Xs)) The TRS R consists of the following rules: tail_in_ga([]) -> tail_out_ga([]) tail_in_ga(.(X, Xs)) -> tail_out_ga(Xs) The set Q consists of the following terms: tail_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (13) UsableRulesReductionPairsProof (EQUIVALENT) By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well. No dependency pairs are removed. The following rules are removed from R: tail_in_ga(.(X, Xs)) -> tail_out_ga(Xs) Used ordering: POLO with Polynomial interpretation [POLO]: POL(.(x_1, x_2)) = x_1 + 2*x_2 POL(LEN_IN_GA(x_1)) = x_1 POL(U1_GA(x_1)) = x_1 POL([]) = 0 POL(tail_in_ga(x_1)) = x_1 POL(tail_out_ga(x_1)) = x_1 ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(tail_out_ga(Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA(Xs) -> U1_GA(tail_in_ga(Xs)) The TRS R consists of the following rules: tail_in_ga([]) -> tail_out_ga([]) The set Q consists of the following terms: tail_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (15) TransformationProof (SOUND) By narrowing [LPAR04] the rule LEN_IN_GA(Xs) -> U1_GA(tail_in_ga(Xs)) at position [0] we obtained the following new rules [LPAR04]: (LEN_IN_GA([]) -> U1_GA(tail_out_ga([])),LEN_IN_GA([]) -> U1_GA(tail_out_ga([]))) ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(tail_out_ga(Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA([]) -> U1_GA(tail_out_ga([])) The TRS R consists of the following rules: tail_in_ga([]) -> tail_out_ga([]) The set Q consists of the following terms: tail_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (17) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(tail_out_ga(Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA([]) -> U1_GA(tail_out_ga([])) R is empty. The set Q consists of the following terms: tail_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (19) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. tail_in_ga(x0) ---------------------------------------- (20) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(tail_out_ga(Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA([]) -> U1_GA(tail_out_ga([])) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (21) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: len_in_2: (b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x1, x2) U1_ga(x1, x2, x3) = U1_ga(x1, x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x1, x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x1, x4) s(x1) = s(x1) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (22) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x1, x2) U1_ga(x1, x2, x3) = U1_ga(x1, x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x1, x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x1, x4) s(x1) = s(x1) ---------------------------------------- (23) 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: LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) LEN_IN_GA(Xs, s(N)) -> TAIL_IN_GA(Xs, Ys) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> U2_GA(Xs, N, Ys, len_in_ga(Ys, N)) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x1, x2) U1_ga(x1, x2, x3) = U1_ga(x1, x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x1, x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x1, x4) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x1, x3) TAIL_IN_GA(x1, x2) = TAIL_IN_GA(x1) U2_GA(x1, x2, x3, x4) = U2_GA(x1, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (24) Obligation: Pi DP problem: The TRS P consists of the following rules: LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) LEN_IN_GA(Xs, s(N)) -> TAIL_IN_GA(Xs, Ys) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> U2_GA(Xs, N, Ys, len_in_ga(Ys, N)) U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x1, x2) U1_ga(x1, x2, x3) = U1_ga(x1, x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x1, x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x1, x4) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x1, x3) TAIL_IN_GA(x1, x2) = TAIL_IN_GA(x1) U2_GA(x1, x2, x3, x4) = U2_GA(x1, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (25) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 2 less nodes. ---------------------------------------- (26) Obligation: Pi DP problem: The TRS P consists of the following rules: U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) The TRS R consists of the following rules: len_in_ga([], 0) -> len_out_ga([], 0) len_in_ga(Xs, s(N)) -> U1_ga(Xs, N, tail_in_ga(Xs, Ys)) tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) U1_ga(Xs, N, tail_out_ga(Xs, Ys)) -> U2_ga(Xs, N, Ys, len_in_ga(Ys, N)) U2_ga(Xs, N, Ys, len_out_ga(Ys, N)) -> len_out_ga(Xs, s(N)) The argument filtering Pi contains the following mapping: len_in_ga(x1, x2) = len_in_ga(x1) [] = [] len_out_ga(x1, x2) = len_out_ga(x1, x2) U1_ga(x1, x2, x3) = U1_ga(x1, x3) tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x1, x2) .(x1, x2) = .(x1, x2) U2_ga(x1, x2, x3, x4) = U2_ga(x1, x4) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x1, x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (27) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (28) Obligation: Pi DP problem: The TRS P consists of the following rules: U1_GA(Xs, N, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys, N) LEN_IN_GA(Xs, s(N)) -> U1_GA(Xs, N, tail_in_ga(Xs, Ys)) The TRS R consists of the following rules: tail_in_ga([], []) -> tail_out_ga([], []) tail_in_ga(.(X, Xs), Xs) -> tail_out_ga(.(X, Xs), Xs) The argument filtering Pi contains the following mapping: [] = [] tail_in_ga(x1, x2) = tail_in_ga(x1) tail_out_ga(x1, x2) = tail_out_ga(x1, x2) .(x1, x2) = .(x1, x2) s(x1) = s(x1) LEN_IN_GA(x1, x2) = LEN_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x1, x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (29) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(Xs, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA(Xs) -> U1_GA(Xs, tail_in_ga(Xs)) The TRS R consists of the following rules: tail_in_ga([]) -> tail_out_ga([], []) tail_in_ga(.(X, Xs)) -> tail_out_ga(.(X, Xs), Xs) The set Q consists of the following terms: tail_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (31) TransformationProof (SOUND) By narrowing [LPAR04] the rule LEN_IN_GA(Xs) -> U1_GA(Xs, tail_in_ga(Xs)) at position [1] we obtained the following new rules [LPAR04]: (LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])),LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], []))) (LEN_IN_GA(.(x0, x1)) -> U1_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1)),LEN_IN_GA(.(x0, x1)) -> U1_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1))) ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(Xs, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])) LEN_IN_GA(.(x0, x1)) -> U1_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1)) The TRS R consists of the following rules: tail_in_ga([]) -> tail_out_ga([], []) tail_in_ga(.(X, Xs)) -> tail_out_ga(.(X, Xs), Xs) The set Q consists of the following terms: tail_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (33) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (34) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(Xs, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])) LEN_IN_GA(.(x0, x1)) -> U1_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1)) R is empty. The set Q consists of the following terms: tail_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (35) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. tail_in_ga(x0) ---------------------------------------- (36) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(Xs, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])) LEN_IN_GA(.(x0, x1)) -> U1_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (37) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. LEN_IN_GA(.(x0, x1)) -> U1_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1)) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation: POL( U1_GA_2(x_1, x_2) ) = max{0, x_1 + 2x_2 - 2} POL( tail_out_ga_2(x_1, x_2) ) = x_2 + 1 POL( LEN_IN_GA_1(x_1) ) = 2x_1 POL( [] ) = 0 POL( ._2(x_1, x_2) ) = 2x_2 + 1 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: none ---------------------------------------- (38) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GA(Xs, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys) LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (39) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U1_GA(Xs, tail_out_ga(Xs, Ys)) -> LEN_IN_GA(Ys) we obtained the following new rules [LPAR04]: (U1_GA([], tail_out_ga([], [])) -> LEN_IN_GA([]),U1_GA([], tail_out_ga([], [])) -> LEN_IN_GA([])) ---------------------------------------- (40) Obligation: Q DP problem: The TRS P consists of the following rules: LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])) U1_GA([], tail_out_ga([], [])) -> LEN_IN_GA([]) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (41) NonTerminationLoopProof (COMPLETE) We used the non-termination processor [FROCOS05] to show that the DP problem is infinite. Found a loop by narrowing to the left: s = U1_GA([], tail_out_ga([], [])) evaluates to t =U1_GA([], tail_out_ga([], [])) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [ ] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence U1_GA([], tail_out_ga([], [])) -> LEN_IN_GA([]) with rule U1_GA([], tail_out_ga([], [])) -> LEN_IN_GA([]) at position [] and matcher [ ] LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])) with rule LEN_IN_GA([]) -> U1_GA([], tail_out_ga([], [])) Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence All these steps are and every following step will be a correct step w.r.t to Q. ---------------------------------------- (42) NO ---------------------------------------- (43) PrologToTRSTransformerProof (SOUND) Transformed Prolog program to TRS. { "root": 11, "program": { "directives": [], "clauses": [ [ "(len ([]) (0))", "(!)" ], [ "(len Xs (s N))", "(',' (tail Xs Ys) (len Ys N))" ], [ "(tail ([]) ([]))", null ], [ "(tail (. X Xs) Xs)", null ] ] }, "graph": { "nodes": { "11": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "22": { "goal": [{ "clause": 1, "scope": 1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [[ "(len T1 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "33": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "12": { "goal": [ { "clause": 0, "scope": 1, "term": "(len T1 T2)" }, { "clause": 1, "scope": 1, "term": "(len T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "48": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "124": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" }], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "125": { "goal": [{ "clause": 3, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" }], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "126": { "goal": [{ "clause": -1, "scope": -1, "term": "(len ([]) T9)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "127": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "128": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T15 T9)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T15"], "free": [], "exprvars": [] } }, "129": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "62": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (tail T7 X8) (len X8 T9))" }], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "63": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "64": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" }, { "clause": 3, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" } ], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "21": { "goal": [ { "clause": -1, "scope": -1, "term": "(!_1)" }, { "clause": 1, "scope": 1, "term": "(len ([]) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 11, "to": 12, "label": "CASE" }, { "from": 12, "to": 21, "label": "EVAL with clause\nlen([], 0) :- !_1.\nand substitutionT1 -> [],\nT2 -> 0" }, { "from": 12, "to": 22, "label": "EVAL-BACKTRACK" }, { "from": 21, "to": 33, "label": "CUT" }, { "from": 22, "to": 62, "label": "EVAL with clause\nlen(X6, s(X7)) :- ','(tail(X6, X8), len(X8, X7)).\nand substitutionT1 -> T7,\nX6 -> T7,\nX7 -> T9,\nT2 -> s(T9),\nT8 -> T9" }, { "from": 22, "to": 63, "label": "EVAL-BACKTRACK" }, { "from": 33, "to": 48, "label": "SUCCESS" }, { "from": 62, "to": 64, "label": "CASE" }, { "from": 64, "to": 124, "label": "PARALLEL" }, { "from": 64, "to": 125, "label": "PARALLEL" }, { "from": 124, "to": 126, "label": "EVAL with clause\ntail([], []).\nand substitutionT7 -> [],\nX8 -> []" }, { "from": 124, "to": 127, "label": "EVAL-BACKTRACK" }, { "from": 125, "to": 128, "label": "EVAL with clause\ntail(.(X13, X14), X14).\nand substitutionX13 -> T14,\nX14 -> T15,\nT7 -> .(T14, T15),\nX8 -> T15" }, { "from": 125, "to": 129, "label": "EVAL-BACKTRACK" }, { "from": 126, "to": 11, "label": "INSTANCE with matching:\nT1 -> []\nT2 -> T9" }, { "from": 128, "to": 11, "label": "INSTANCE with matching:\nT1 -> T15\nT2 -> T9" } ], "type": "Graph" } } ---------------------------------------- (44) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f11_in([]) -> f11_out1(0) f11_in([]) -> U1(f11_in([]), []) U1(f11_out1(T9), []) -> f11_out1(s(T9)) f11_in(.(T14, T15)) -> U2(f11_in(T15), .(T14, T15)) U2(f11_out1(T9), .(T14, T15)) -> f11_out1(s(T9)) Q is empty. ---------------------------------------- (45) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(.(x_1, x_2)) = 2*x_1 + 2*x_2 POL(0) = 0 POL(U1(x_1, x_2)) = x_1 + 2*x_2 POL(U2(x_1, x_2)) = x_1 + x_2 POL([]) = 0 POL(f11_in(x_1)) = 1 + 2*x_1 POL(f11_out1(x_1)) = 2*x_1 POL(s(x_1)) = x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: f11_in([]) -> f11_out1(0) ---------------------------------------- (46) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f11_in([]) -> U1(f11_in([]), []) U1(f11_out1(T9), []) -> f11_out1(s(T9)) f11_in(.(T14, T15)) -> U2(f11_in(T15), .(T14, T15)) U2(f11_out1(T9), .(T14, T15)) -> f11_out1(s(T9)) Q is empty. ---------------------------------------- (47) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(.(x_1, x_2)) = 2*x_1 + 2*x_2 POL(U1(x_1, x_2)) = 2*x_1 + 2*x_2 POL(U2(x_1, x_2)) = x_1 + x_2 POL([]) = 0 POL(f11_in(x_1)) = 2*x_1 POL(f11_out1(x_1)) = 2 + x_1 POL(s(x_1)) = x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: U1(f11_out1(T9), []) -> f11_out1(s(T9)) ---------------------------------------- (48) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f11_in([]) -> U1(f11_in([]), []) f11_in(.(T14, T15)) -> U2(f11_in(T15), .(T14, T15)) U2(f11_out1(T9), .(T14, T15)) -> f11_out1(s(T9)) Q is empty. ---------------------------------------- (49) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(.(x_1, x_2)) = 1 + 2*x_1 + 2*x_2 POL(U1(x_1, x_2)) = x_1 + x_2 POL(U2(x_1, x_2)) = 1 + x_1 + x_2 POL([]) = 0 POL(f11_in(x_1)) = 2*x_1 POL(f11_out1(x_1)) = 2*x_1 POL(s(x_1)) = x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: U2(f11_out1(T9), .(T14, T15)) -> f11_out1(s(T9)) ---------------------------------------- (50) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f11_in([]) -> U1(f11_in([]), []) f11_in(.(T14, T15)) -> U2(f11_in(T15), .(T14, T15)) Q is empty. ---------------------------------------- (51) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(.(x_1, x_2)) = 2 + 2*x_1 + 2*x_2 POL(U1(x_1, x_2)) = x_1 + x_2 POL(U2(x_1, x_2)) = 1 + x_1 + x_2 POL([]) = 0 POL(f11_in(x_1)) = 2*x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: f11_in(.(T14, T15)) -> U2(f11_in(T15), .(T14, T15)) ---------------------------------------- (52) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f11_in([]) -> U1(f11_in([]), []) Q is empty. ---------------------------------------- (53) Overlay + Local Confluence (EQUIVALENT) The TRS is overlay and locally confluent. By [NOC] we can switch to innermost. ---------------------------------------- (54) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f11_in([]) -> U1(f11_in([]), []) The set Q consists of the following terms: f11_in([]) ---------------------------------------- (55) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. ---------------------------------------- (56) Obligation: Q DP problem: The TRS P consists of the following rules: F11_IN([]) -> F11_IN([]) The TRS R consists of the following rules: f11_in([]) -> U1(f11_in([]), []) The set Q consists of the following terms: f11_in([]) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (57) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (58) Obligation: Q DP problem: The TRS P consists of the following rules: F11_IN([]) -> F11_IN([]) R is empty. The set Q consists of the following terms: f11_in([]) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (59) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. f11_in([]) ---------------------------------------- (60) Obligation: Q DP problem: The TRS P consists of the following rules: F11_IN([]) -> F11_IN([]) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (61) NonTerminationLoopProof (COMPLETE) We used the non-termination processor [FROCOS05] to show that the DP problem is infinite. Found a loop by semiunifying a rule from P directly. s = F11_IN([]) evaluates to t =F11_IN([]) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [ ] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence The DP semiunifies directly so there is only one rewrite step from F11_IN([]) to F11_IN([]). ---------------------------------------- (62) NO ---------------------------------------- (63) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 2, "program": { "directives": [], "clauses": [ [ "(len ([]) (0))", "(!)" ], [ "(len Xs (s N))", "(',' (tail Xs Ys) (len Ys N))" ], [ "(tail ([]) ([]))", null ], [ "(tail (. X Xs) Xs)", null ] ] }, "graph": { "nodes": { "68": { "goal": [ { "clause": -1, "scope": -1, "term": "(!_1)" }, { "clause": 1, "scope": 1, "term": "(len ([]) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "69": { "goal": [{ "clause": 1, "scope": 1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [[ "(len T1 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "type": "Nodes", "130": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "141": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T13 T7)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T13"], "free": [], "exprvars": [] } }, "131": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (tail T5 X5) (len X5 T7))" }], "kb": { "nonunifying": [[ "(len T5 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": ["X5"], "exprvars": [] } }, "142": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "132": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "133": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (tail T5 X5) (len X5 T7))" }, { "clause": 3, "scope": 2, "term": "(',' (tail T5 X5) (len X5 T7))" } ], "kb": { "nonunifying": [[ "(len T5 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": ["X5"], "exprvars": [] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "134": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (tail T5 X5) (len X5 T7))" }], "kb": { "nonunifying": [[ "(len T5 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": ["X5"], "exprvars": [] } }, "135": { "goal": [{ "clause": 3, "scope": 2, "term": "(',' (tail T5 X5) (len X5 T7))" }], "kb": { "nonunifying": [[ "(len T5 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": ["X5"], "exprvars": [] } }, "136": { "goal": [{ "clause": -1, "scope": -1, "term": "(len ([]) T7)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "5": { "goal": [ { "clause": 0, "scope": 1, "term": "(len T1 T2)" }, { "clause": 1, "scope": 1, "term": "(len T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "139": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "70": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 2, "to": 5, "label": "CASE" }, { "from": 5, "to": 68, "label": "EVAL with clause\nlen([], 0) :- !_1.\nand substitutionT1 -> [],\nT2 -> 0" }, { "from": 5, "to": 69, "label": "EVAL-BACKTRACK" }, { "from": 68, "to": 70, "label": "CUT" }, { "from": 69, "to": 131, "label": "EVAL with clause\nlen(X3, s(X4)) :- ','(tail(X3, X5), len(X5, X4)).\nand substitutionT1 -> T5,\nX3 -> T5,\nX4 -> T7,\nT2 -> s(T7),\nT6 -> T7" }, { "from": 69, "to": 132, "label": "EVAL-BACKTRACK" }, { "from": 70, "to": 130, "label": "SUCCESS" }, { "from": 131, "to": 133, "label": "CASE" }, { "from": 133, "to": 134, "label": "PARALLEL" }, { "from": 133, "to": 135, "label": "PARALLEL" }, { "from": 134, "to": 136, "label": "EVAL with clause\ntail([], []).\nand substitutionT5 -> [],\nX5 -> []" }, { "from": 134, "to": 139, "label": "EVAL-BACKTRACK" }, { "from": 135, "to": 141, "label": "EVAL with clause\ntail(.(X10, X11), X11).\nand substitutionX10 -> T12,\nX11 -> T13,\nT5 -> .(T12, T13),\nX5 -> T13" }, { "from": 135, "to": 142, "label": "EVAL-BACKTRACK" }, { "from": 136, "to": 2, "label": "INSTANCE with matching:\nT1 -> []\nT2 -> T7" }, { "from": 141, "to": 2, "label": "INSTANCE with matching:\nT1 -> T13\nT2 -> T7" } ], "type": "Graph" } } ---------------------------------------- (64) Obligation: Triples: lenA([], s(X1)) :- lenA([], X1). lenA(.(X1, X2), s(X3)) :- lenA(X2, X3). Clauses: lencA([], 0). lencA([], s(X1)) :- lencA([], X1). lencA(.(X1, X2), s(X3)) :- lencA(X2, X3). Afs: lenA(x1, x2) = lenA(x1) ---------------------------------------- (65) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: lenA_in_2: (b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: LENA_IN_GA([], s(X1)) -> U1_GA(X1, lenA_in_ga([], X1)) LENA_IN_GA([], s(X1)) -> LENA_IN_GA([], X1) LENA_IN_GA(.(X1, X2), s(X3)) -> U2_GA(X1, X2, X3, lenA_in_ga(X2, X3)) LENA_IN_GA(.(X1, X2), s(X3)) -> LENA_IN_GA(X2, X3) R is empty. The argument filtering Pi contains the following mapping: lenA_in_ga(x1, x2) = lenA_in_ga(x1) [] = [] .(x1, x2) = .(x1, x2) s(x1) = s(x1) LENA_IN_GA(x1, x2) = LENA_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x2) U2_GA(x1, x2, x3, x4) = U2_GA(x1, x2, x4) We have to consider all (P,R,Pi)-chains Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES ---------------------------------------- (66) Obligation: Pi DP problem: The TRS P consists of the following rules: LENA_IN_GA([], s(X1)) -> U1_GA(X1, lenA_in_ga([], X1)) LENA_IN_GA([], s(X1)) -> LENA_IN_GA([], X1) LENA_IN_GA(.(X1, X2), s(X3)) -> U2_GA(X1, X2, X3, lenA_in_ga(X2, X3)) LENA_IN_GA(.(X1, X2), s(X3)) -> LENA_IN_GA(X2, X3) R is empty. The argument filtering Pi contains the following mapping: lenA_in_ga(x1, x2) = lenA_in_ga(x1) [] = [] .(x1, x2) = .(x1, x2) s(x1) = s(x1) LENA_IN_GA(x1, x2) = LENA_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x2) U2_GA(x1, x2, x3, x4) = U2_GA(x1, x2, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (67) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 2 less nodes. ---------------------------------------- (68) Complex Obligation (AND) ---------------------------------------- (69) Obligation: Pi DP problem: The TRS P consists of the following rules: LENA_IN_GA([], s(X1)) -> LENA_IN_GA([], X1) R is empty. The argument filtering Pi contains the following mapping: [] = [] s(x1) = s(x1) LENA_IN_GA(x1, x2) = LENA_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (70) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (71) Obligation: Q DP problem: The TRS P consists of the following rules: LENA_IN_GA([]) -> LENA_IN_GA([]) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (72) NonTerminationLoopProof (COMPLETE) We used the non-termination processor [FROCOS05] to show that the DP problem is infinite. Found a loop by semiunifying a rule from P directly. s = LENA_IN_GA([]) evaluates to t =LENA_IN_GA([]) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [ ] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence The DP semiunifies directly so there is only one rewrite step from LENA_IN_GA([]) to LENA_IN_GA([]). ---------------------------------------- (73) NO ---------------------------------------- (74) Obligation: Pi DP problem: The TRS P consists of the following rules: LENA_IN_GA(.(X1, X2), s(X3)) -> LENA_IN_GA(X2, X3) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) s(x1) = s(x1) LENA_IN_GA(x1, x2) = LENA_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (75) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (76) Obligation: Q DP problem: The TRS P consists of the following rules: LENA_IN_GA(.(X1, X2)) -> LENA_IN_GA(X2) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (77) 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: *LENA_IN_GA(.(X1, X2)) -> LENA_IN_GA(X2) The graph contains the following edges 1 > 1 ---------------------------------------- (78) YES ---------------------------------------- (79) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 1, "program": { "directives": [], "clauses": [ [ "(len ([]) (0))", "(!)" ], [ "(len Xs (s N))", "(',' (tail Xs Ys) (len Ys N))" ], [ "(tail ([]) ([]))", null ], [ "(tail (. X Xs) Xs)", null ] ] }, "graph": { "nodes": { "67": { "goal": [ { "clause": -1, "scope": -1, "term": "(!_1)" }, { "clause": 1, "scope": 1, "term": "(len ([]) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "13": { "goal": [ { "clause": 0, "scope": 1, "term": "(len T1 T2)" }, { "clause": 1, "scope": 1, "term": "(len T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "type": "Nodes", "150": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T15 T9)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T15"], "free": [], "exprvars": [] } }, "140": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "151": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "143": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (tail T7 X8) (len X8 T9))" }], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "144": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "145": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" }, { "clause": 3, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" } ], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "146": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" }], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "147": { "goal": [{ "clause": 3, "scope": 2, "term": "(',' (tail T7 X8) (len X8 T9))" }], "kb": { "nonunifying": [[ "(len T7 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X8"], "exprvars": [] } }, "137": { "goal": [{ "clause": 1, "scope": 1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [[ "(len T1 T2)", "(len ([]) (0))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "148": { "goal": [{ "clause": -1, "scope": -1, "term": "(len ([]) T9)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "138": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "149": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 13, "label": "CASE" }, { "from": 13, "to": 67, "label": "EVAL with clause\nlen([], 0) :- !_1.\nand substitutionT1 -> [],\nT2 -> 0" }, { "from": 13, "to": 137, "label": "EVAL-BACKTRACK" }, { "from": 67, "to": 138, "label": "CUT" }, { "from": 137, "to": 143, "label": "EVAL with clause\nlen(X6, s(X7)) :- ','(tail(X6, X8), len(X8, X7)).\nand substitutionT1 -> T7,\nX6 -> T7,\nX7 -> T9,\nT2 -> s(T9),\nT8 -> T9" }, { "from": 137, "to": 144, "label": "EVAL-BACKTRACK" }, { "from": 138, "to": 140, "label": "SUCCESS" }, { "from": 143, "to": 145, "label": "CASE" }, { "from": 145, "to": 146, "label": "PARALLEL" }, { "from": 145, "to": 147, "label": "PARALLEL" }, { "from": 146, "to": 148, "label": "EVAL with clause\ntail([], []).\nand substitutionT7 -> [],\nX8 -> []" }, { "from": 146, "to": 149, "label": "EVAL-BACKTRACK" }, { "from": 147, "to": 150, "label": "EVAL with clause\ntail(.(X13, X14), X14).\nand substitutionX13 -> T14,\nX14 -> T15,\nT7 -> .(T14, T15),\nX8 -> T15" }, { "from": 147, "to": 151, "label": "EVAL-BACKTRACK" }, { "from": 148, "to": 1, "label": "INSTANCE with matching:\nT1 -> []\nT2 -> T9" }, { "from": 150, "to": 1, "label": "INSTANCE with matching:\nT1 -> T15\nT2 -> T9" } ], "type": "Graph" } } ---------------------------------------- (80) Obligation: Rules: f67_out -> f13_out([]) :|: TRUE f13_in([]) -> f67_in :|: TRUE f13_in(T1) -> f137_in(T1) :|: TRUE f137_out(x) -> f13_out(x) :|: TRUE f1_out(T15) -> f150_out(T15) :|: TRUE f150_in(x1) -> f1_in(x1) :|: TRUE f145_in(T7) -> f147_in(T7) :|: TRUE f145_in(x2) -> f146_in(x2) :|: TRUE f146_out(x3) -> f145_out(x3) :|: TRUE f147_out(x4) -> f145_out(x4) :|: TRUE f1_out([]) -> f148_out :|: TRUE f148_in -> f1_in([]) :|: TRUE f150_out(x5) -> f147_out(.(x6, x5)) :|: TRUE f147_in(.(x7, x8)) -> f150_in(x8) :|: TRUE f147_in(x9) -> f151_in :|: TRUE f151_out -> f147_out(x10) :|: TRUE f146_in([]) -> f148_in :|: TRUE f148_out -> f146_out([]) :|: TRUE f149_out -> f146_out(x11) :|: TRUE f146_in(x12) -> f149_in :|: TRUE f137_in(x13) -> f144_in :|: TRUE f137_in(x14) -> f143_in(x14) :|: TRUE f143_out(x15) -> f137_out(x15) :|: TRUE f144_out -> f137_out(x16) :|: TRUE f145_out(x17) -> f143_out(x17) :|: TRUE f143_in(x18) -> f145_in(x18) :|: TRUE f13_out(x19) -> f1_out(x19) :|: TRUE f1_in(x20) -> f13_in(x20) :|: TRUE Start term: f1_in(T1) ---------------------------------------- (81) IRSwTSimpleDependencyGraphProof (EQUIVALENT) Constructed simple dependency graph. Simplified to the following IRSwTs: intTRSProblem: f13_in(T1) -> f137_in(T1) :|: TRUE f150_in(x1) -> f1_in(x1) :|: TRUE f145_in(T7) -> f147_in(T7) :|: TRUE f145_in(x2) -> f146_in(x2) :|: TRUE f148_in -> f1_in([]) :|: TRUE f147_in(.(x7, x8)) -> f150_in(x8) :|: TRUE f146_in([]) -> f148_in :|: TRUE f137_in(x14) -> f143_in(x14) :|: TRUE f143_in(x18) -> f145_in(x18) :|: TRUE f1_in(x20) -> f13_in(x20) :|: TRUE ---------------------------------------- (82) Obligation: Rules: f13_in(T1) -> f137_in(T1) :|: TRUE f150_in(x1) -> f1_in(x1) :|: TRUE f145_in(T7) -> f147_in(T7) :|: TRUE f145_in(x2) -> f146_in(x2) :|: TRUE f148_in -> f1_in([]) :|: TRUE f147_in(.(x7, x8)) -> f150_in(x8) :|: TRUE f146_in([]) -> f148_in :|: TRUE f137_in(x14) -> f143_in(x14) :|: TRUE f143_in(x18) -> f145_in(x18) :|: TRUE f1_in(x20) -> f13_in(x20) :|: TRUE ---------------------------------------- (83) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (84) Obligation: Rules: f13_in(.(x7:0, x8:0)) -> f13_in(x8:0) :|: TRUE f13_in([]) -> f13_in([]) :|: TRUE ---------------------------------------- (85) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (86) Obligation: Rules: f13_in(.(x7:0, x8:0)) -> f13_in(x8:0) :|: TRUE f13_in([]) -> f13_in([]) :|: TRUE ---------------------------------------- (87) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f13_in(.(x7:0, x8:0)) -> f13_in(x8:0) :|: TRUE (2) f13_in([]) -> f13_in([]) :|: TRUE Arcs: (1) -> (1), (2) (2) -> (2) This digraph is fully evaluated! ---------------------------------------- (88) Complex Obligation (AND) ---------------------------------------- (89) Obligation: Termination digraph: Nodes: (1) f13_in(.(x7:0, x8:0)) -> f13_in(x8:0) :|: TRUE Arcs: (1) -> (1) This digraph is fully evaluated! ---------------------------------------- (90) IntTRSUnneededArgumentFilterProof (EQUIVALENT) Some arguments are removed because they cannot influence termination. We removed arguments according to the following replacements: .(x1, x2) -> .(x2) ---------------------------------------- (91) Obligation: Rules: f13_in(.(x8:0)) -> f13_in(x8:0) :|: TRUE ---------------------------------------- (92) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f13_in(VARIABLE) .(VARIABLE) Removed predefined arithmetic. ---------------------------------------- (93) Obligation: Rules: f13_in(.(x8:0)) -> f13_in(x8:0) ---------------------------------------- (94) IRSwTToQDPProof (SOUND) Removed the integers and created a QDP-Problem. ---------------------------------------- (95) Obligation: Q DP problem: The TRS P consists of the following rules: f13_in(.(x8:0)) -> f13_in(x8:0) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (96) 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: *f13_in(.(x8:0)) -> f13_in(x8:0) The graph contains the following edges 1 > 1 ---------------------------------------- (97) YES ---------------------------------------- (98) Obligation: Termination digraph: Nodes: (1) f13_in([]) -> f13_in([]) :|: TRUE Arcs: (1) -> (1) This digraph is fully evaluated!