/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 add(a,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, 1 ms] (12) QDP (13) UsableRulesReductionPairsProof [EQUIVALENT, 10 ms] (14) QDP (15) PrologToPiTRSProof [SOUND, 0 ms] (16) PiTRS (17) DependencyPairsProof [EQUIVALENT, 0 ms] (18) PiDP (19) DependencyGraphProof [EQUIVALENT, 0 ms] (20) PiDP (21) UsableRulesProof [EQUIVALENT, 0 ms] (22) PiDP (23) PiDPToQDPProof [SOUND, 9 ms] (24) QDP (25) TransformationProof [SOUND, 0 ms] (26) QDP (27) UsableRulesProof [EQUIVALENT, 0 ms] (28) QDP (29) QReductionProof [EQUIVALENT, 0 ms] (30) QDP (31) TransformationProof [EQUIVALENT, 0 ms] (32) QDP (33) DependencyGraphProof [EQUIVALENT, 0 ms] (34) AND (35) QDP (36) NonTerminationLoopProof [COMPLETE, 0 ms] (37) NO (38) QDP (39) QDPSizeChangeProof [EQUIVALENT, 0 ms] (40) YES (41) PrologToDTProblemTransformerProof [SOUND, 0 ms] (42) TRIPLES (43) TriplesToPiDPProof [SOUND, 0 ms] (44) PiDP (45) DependencyGraphProof [EQUIVALENT, 0 ms] (46) AND (47) PiDP (48) PiDPToQDPProof [SOUND, 0 ms] (49) QDP (50) NonTerminationLoopProof [COMPLETE, 0 ms] (51) NO (52) PiDP (53) PiDPToQDPProof [SOUND, 0 ms] (54) QDP (55) QDPSizeChangeProof [EQUIVALENT, 0 ms] (56) YES (57) PrologToIRSwTTransformerProof [SOUND, 0 ms] (58) IRSwT (59) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms] (60) IRSwT (61) IntTRSCompressionProof [EQUIVALENT, 55 ms] (62) IRSwT (63) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (64) IRSwT (65) IRSwTTerminationDigraphProof [EQUIVALENT, 16 ms] (66) AND (67) IRSwT (68) TempFilterProof [SOUND, 4 ms] (69) IRSwT (70) IRSwTToQDPProof [SOUND, 0 ms] (71) QDP (72) QDPSizeChangeProof [EQUIVALENT, 0 ms] (73) YES (74) IRSwT (75) IntTRSCompressionProof [EQUIVALENT, 0 ms] (76) IRSwT (77) PrologToTRSTransformerProof [SOUND, 0 ms] (78) QTRS (79) QTRSRRRProof [EQUIVALENT, 36 ms] (80) QTRS (81) QTRSRRRProof [EQUIVALENT, 0 ms] (82) QTRS (83) QTRSRRRProof [EQUIVALENT, 0 ms] (84) QTRS (85) Overlay + Local Confluence [EQUIVALENT, 0 ms] (86) QTRS (87) DependencyPairsProof [EQUIVALENT, 0 ms] (88) QDP (89) UsableRulesProof [EQUIVALENT, 0 ms] (90) QDP (91) QReductionProof [EQUIVALENT, 0 ms] (92) QDP (93) NonTerminationLoopProof [COMPLETE, 0 ms] (94) NO ---------------------------------------- (0) Obligation: Clauses: add(X, 0, X) :- !. add(X, Y, s(Z)) :- ','(p(Y, P), add(X, P, Z)). p(0, 0). p(s(X), X). Query: add(a,g,a) ---------------------------------------- (1) CutEliminatorProof (SOUND) Eliminated all cuts by simply ignoring them[PROLOG]. ---------------------------------------- (2) Obligation: Clauses: add(X, 0, X). add(X, Y, s(Z)) :- ','(p(Y, P), add(X, P, Z)). p(0, 0). p(s(X), X). Query: add(a,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: add_in_3: (f,b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga U1_aga(x1, x2, x3, x4) = U1_aga(x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x5) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (4) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga U1_aga(x1, x2, x3, x4) = U1_aga(x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x5) ---------------------------------------- (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: ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) ADD_IN_AGA(X, Y, s(Z)) -> P_IN_GA(Y, P) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> U2_AGA(X, Y, Z, P, add_in_aga(X, P, Z)) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga U1_aga(x1, x2, x3, x4) = U1_aga(x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x5) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x4) P_IN_GA(x1, x2) = P_IN_GA(x1) U2_AGA(x1, x2, x3, x4, x5) = U2_AGA(x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) ADD_IN_AGA(X, Y, s(Z)) -> P_IN_GA(Y, P) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> U2_AGA(X, Y, Z, P, add_in_aga(X, P, Z)) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga U1_aga(x1, x2, x3, x4) = U1_aga(x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x5) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x4) P_IN_GA(x1, x2) = P_IN_GA(x1) U2_AGA(x1, x2, x3, x4, x5) = U2_AGA(x5) 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_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga U1_aga(x1, x2, x3, x4) = U1_aga(x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x5) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x4) 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_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) The TRS R consists of the following rules: p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) The argument filtering Pi contains the following mapping: 0 = 0 p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x2) s(x1) = s(x1) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x4) 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_AGA(p_out_ga(P)) -> ADD_IN_AGA(P) ADD_IN_AGA(Y) -> U1_AGA(p_in_ga(Y)) The TRS R consists of the following rules: p_in_ga(0) -> p_out_ga(0) p_in_ga(s(X)) -> p_out_ga(X) The set Q consists of the following terms: p_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: p_in_ga(s(X)) -> p_out_ga(X) Used ordering: POLO with Polynomial interpretation [POLO]: POL(0) = 0 POL(ADD_IN_AGA(x_1)) = x_1 POL(U1_AGA(x_1)) = x_1 POL(p_in_ga(x_1)) = x_1 POL(p_out_ga(x_1)) = x_1 POL(s(x_1)) = 2*x_1 ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: U1_AGA(p_out_ga(P)) -> ADD_IN_AGA(P) ADD_IN_AGA(Y) -> U1_AGA(p_in_ga(Y)) The TRS R consists of the following rules: p_in_ga(0) -> p_out_ga(0) The set Q consists of the following terms: p_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (15) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: add_in_3: (f,b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga(x2) U1_aga(x1, x2, x3, x4) = U1_aga(x2, x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x1, x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x2, x5) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (16) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga(x2) U1_aga(x1, x2, x3, x4) = U1_aga(x2, x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x1, x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x2, x5) ---------------------------------------- (17) 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: ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) ADD_IN_AGA(X, Y, s(Z)) -> P_IN_GA(Y, P) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> U2_AGA(X, Y, Z, P, add_in_aga(X, P, Z)) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga(x2) U1_aga(x1, x2, x3, x4) = U1_aga(x2, x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x1, x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x2, x5) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x2, x4) P_IN_GA(x1, x2) = P_IN_GA(x1) U2_AGA(x1, x2, x3, x4, x5) = U2_AGA(x2, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (18) Obligation: Pi DP problem: The TRS P consists of the following rules: ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) ADD_IN_AGA(X, Y, s(Z)) -> P_IN_GA(Y, P) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> U2_AGA(X, Y, Z, P, add_in_aga(X, P, Z)) U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga(x2) U1_aga(x1, x2, x3, x4) = U1_aga(x2, x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x1, x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x2, x5) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x2, x4) P_IN_GA(x1, x2) = P_IN_GA(x1) U2_AGA(x1, x2, x3, x4, x5) = U2_AGA(x2, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (19) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 2 less nodes. ---------------------------------------- (20) Obligation: Pi DP problem: The TRS P consists of the following rules: U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) The TRS R consists of the following rules: add_in_aga(X, 0, X) -> add_out_aga(X, 0, X) add_in_aga(X, Y, s(Z)) -> U1_aga(X, Y, Z, p_in_ga(Y, P)) p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) U1_aga(X, Y, Z, p_out_ga(Y, P)) -> U2_aga(X, Y, Z, P, add_in_aga(X, P, Z)) U2_aga(X, Y, Z, P, add_out_aga(X, P, Z)) -> add_out_aga(X, Y, s(Z)) The argument filtering Pi contains the following mapping: add_in_aga(x1, x2, x3) = add_in_aga(x2) 0 = 0 add_out_aga(x1, x2, x3) = add_out_aga(x2) U1_aga(x1, x2, x3, x4) = U1_aga(x2, x4) p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x1, x2) s(x1) = s(x1) U2_aga(x1, x2, x3, x4, x5) = U2_aga(x2, x5) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x2, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (21) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (22) Obligation: Pi DP problem: The TRS P consists of the following rules: U1_AGA(X, Y, Z, p_out_ga(Y, P)) -> ADD_IN_AGA(X, P, Z) ADD_IN_AGA(X, Y, s(Z)) -> U1_AGA(X, Y, Z, p_in_ga(Y, P)) The TRS R consists of the following rules: p_in_ga(0, 0) -> p_out_ga(0, 0) p_in_ga(s(X), X) -> p_out_ga(s(X), X) The argument filtering Pi contains the following mapping: 0 = 0 p_in_ga(x1, x2) = p_in_ga(x1) p_out_ga(x1, x2) = p_out_ga(x1, x2) s(x1) = s(x1) ADD_IN_AGA(x1, x2, x3) = ADD_IN_AGA(x2) U1_AGA(x1, x2, x3, x4) = U1_AGA(x2, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (23) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (24) Obligation: Q DP problem: The TRS P consists of the following rules: U1_AGA(Y, p_out_ga(Y, P)) -> ADD_IN_AGA(P) ADD_IN_AGA(Y) -> U1_AGA(Y, p_in_ga(Y)) The TRS R consists of the following rules: p_in_ga(0) -> p_out_ga(0, 0) p_in_ga(s(X)) -> p_out_ga(s(X), X) The set Q consists of the following terms: p_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (25) TransformationProof (SOUND) By narrowing [LPAR04] the rule ADD_IN_AGA(Y) -> U1_AGA(Y, p_in_ga(Y)) at position [1] we obtained the following new rules [LPAR04]: (ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)),ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0))) (ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0)),ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0))) ---------------------------------------- (26) Obligation: Q DP problem: The TRS P consists of the following rules: U1_AGA(Y, p_out_ga(Y, P)) -> ADD_IN_AGA(P) ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)) ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0)) The TRS R consists of the following rules: p_in_ga(0) -> p_out_ga(0, 0) p_in_ga(s(X)) -> p_out_ga(s(X), X) The set Q consists of the following terms: p_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (27) 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. ---------------------------------------- (28) Obligation: Q DP problem: The TRS P consists of the following rules: U1_AGA(Y, p_out_ga(Y, P)) -> ADD_IN_AGA(P) ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)) ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0)) R is empty. The set Q consists of the following terms: p_in_ga(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (29) 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]. p_in_ga(x0) ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: U1_AGA(Y, p_out_ga(Y, P)) -> ADD_IN_AGA(P) ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)) ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (31) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule U1_AGA(Y, p_out_ga(Y, P)) -> ADD_IN_AGA(P) we obtained the following new rules [LPAR04]: (U1_AGA(0, p_out_ga(0, 0)) -> ADD_IN_AGA(0),U1_AGA(0, p_out_ga(0, 0)) -> ADD_IN_AGA(0)) (U1_AGA(s(z0), p_out_ga(s(z0), z0)) -> ADD_IN_AGA(z0),U1_AGA(s(z0), p_out_ga(s(z0), z0)) -> ADD_IN_AGA(z0)) ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)) ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0)) U1_AGA(0, p_out_ga(0, 0)) -> ADD_IN_AGA(0) U1_AGA(s(z0), p_out_ga(s(z0), z0)) -> ADD_IN_AGA(z0) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (33) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs. ---------------------------------------- (34) Complex Obligation (AND) ---------------------------------------- (35) Obligation: Q DP problem: The TRS P consists of the following rules: U1_AGA(0, p_out_ga(0, 0)) -> ADD_IN_AGA(0) ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (36) 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 = ADD_IN_AGA(0) evaluates to t =ADD_IN_AGA(0) Thus s starts an infinite chain as s semiunifies with t with the following substitutions: * Matcher: [ ] * Semiunifier: [ ] -------------------------------------------------------------------------------- Rewriting sequence ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)) with rule ADD_IN_AGA(0) -> U1_AGA(0, p_out_ga(0, 0)) at position [] and matcher [ ] U1_AGA(0, p_out_ga(0, 0)) -> ADD_IN_AGA(0) with rule U1_AGA(0, p_out_ga(0, 0)) -> ADD_IN_AGA(0) 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. ---------------------------------------- (37) NO ---------------------------------------- (38) Obligation: Q DP problem: The TRS P consists of the following rules: ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0)) U1_AGA(s(z0), p_out_ga(s(z0), z0)) -> ADD_IN_AGA(z0) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (39) 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: *U1_AGA(s(z0), p_out_ga(s(z0), z0)) -> ADD_IN_AGA(z0) The graph contains the following edges 1 > 1, 2 > 1 *ADD_IN_AGA(s(x0)) -> U1_AGA(s(x0), p_out_ga(s(x0), x0)) The graph contains the following edges 1 >= 1 ---------------------------------------- (40) YES ---------------------------------------- (41) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(add X (0) X)", "(!)" ], [ "(add X Y (s Z))", "(',' (p Y P) (add X P Z))" ], [ "(p (0) (0))", null ], [ "(p (s X) X)", null ] ] }, "graph": { "nodes": { "22": { "goal": [ { "clause": 0, "scope": 1, "term": "(add T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(add T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "77": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (p T10 X9) (add T12 X9 T13))" }], "kb": { "nonunifying": [[ "(add T1 T10 T3)", "(add X2 (0) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T10"], "free": [ "X2", "X9" ], "exprvars": [] } }, "23": { "goal": [ { "clause": -1, "scope": -1, "term": "(!_1)" }, { "clause": 1, "scope": 1, "term": "(add T1 (0) T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "78": { "goal": [{ "clause": 3, "scope": 2, "term": "(',' (p T10 X9) (add T12 X9 T13))" }], "kb": { "nonunifying": [[ "(add T1 T10 T3)", "(add X2 (0) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T10"], "free": [ "X2", "X9" ], "exprvars": [] } }, "24": { "goal": [{ "clause": 1, "scope": 1, "term": "(add T1 T2 T3)" }], "kb": { "nonunifying": [[ "(add T1 T2 T3)", "(add X2 (0) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": ["X2"], "exprvars": [] } }, "79": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T12 (0) T13)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "25": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "26": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "141": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "139": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T12 T17 T13)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T17"], "free": [], "exprvars": [] } }, "80": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "70": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "52": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T10 X9) (add T12 X9 T13))" }], "kb": { "nonunifying": [[ "(add T1 T10 T3)", "(add X2 (0) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T10"], "free": [ "X2", "X9" ], "exprvars": [] } }, "76": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (p T10 X9) (add T12 X9 T13))" }, { "clause": 3, "scope": 2, "term": "(',' (p T10 X9) (add T12 X9 T13))" } ], "kb": { "nonunifying": [[ "(add T1 T10 T3)", "(add X2 (0) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T10"], "free": [ "X2", "X9" ], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 22, "label": "CASE" }, { "from": 22, "to": 23, "label": "EVAL with clause\nadd(X2, 0, X2) :- !_1.\nand substitutionT1 -> T5,\nX2 -> T5,\nT2 -> 0,\nT3 -> T5" }, { "from": 22, "to": 24, "label": "EVAL-BACKTRACK" }, { "from": 23, "to": 25, "label": "CUT" }, { "from": 24, "to": 52, "label": "EVAL with clause\nadd(X6, X7, s(X8)) :- ','(p(X7, X9), add(X6, X9, X8)).\nand substitutionT1 -> T12,\nX6 -> T12,\nT2 -> T10,\nX7 -> T10,\nX8 -> T13,\nT3 -> s(T13),\nT9 -> T12,\nT11 -> T13" }, { "from": 24, "to": 70, "label": "EVAL-BACKTRACK" }, { "from": 25, "to": 26, "label": "SUCCESS" }, { "from": 52, "to": 76, "label": "CASE" }, { "from": 76, "to": 77, "label": "PARALLEL" }, { "from": 76, "to": 78, "label": "PARALLEL" }, { "from": 77, "to": 79, "label": "EVAL with clause\np(0, 0).\nand substitutionT10 -> 0,\nX9 -> 0" }, { "from": 77, "to": 80, "label": "EVAL-BACKTRACK" }, { "from": 78, "to": 139, "label": "EVAL with clause\np(s(X13), X13).\nand substitutionX13 -> T17,\nT10 -> s(T17),\nX9 -> T17" }, { "from": 78, "to": 141, "label": "EVAL-BACKTRACK" }, { "from": 79, "to": 1, "label": "INSTANCE with matching:\nT1 -> T12\nT2 -> 0\nT3 -> T13" }, { "from": 139, "to": 1, "label": "INSTANCE with matching:\nT1 -> T12\nT2 -> T17\nT3 -> T13" } ], "type": "Graph" } } ---------------------------------------- (42) Obligation: Triples: addA(X1, 0, s(X2)) :- addA(X1, 0, X2). addA(X1, s(X2), s(X3)) :- addA(X1, X2, X3). Clauses: addcA(X1, 0, X1). addcA(X1, 0, s(X2)) :- addcA(X1, 0, X2). addcA(X1, s(X2), s(X3)) :- addcA(X1, X2, X3). Afs: addA(x1, x2, x3) = addA(x2) ---------------------------------------- (43) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: addA_in_3: (f,b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: ADDA_IN_AGA(X1, 0, s(X2)) -> U1_AGA(X1, X2, addA_in_aga(X1, 0, X2)) ADDA_IN_AGA(X1, 0, s(X2)) -> ADDA_IN_AGA(X1, 0, X2) ADDA_IN_AGA(X1, s(X2), s(X3)) -> U2_AGA(X1, X2, X3, addA_in_aga(X1, X2, X3)) ADDA_IN_AGA(X1, s(X2), s(X3)) -> ADDA_IN_AGA(X1, X2, X3) R is empty. The argument filtering Pi contains the following mapping: addA_in_aga(x1, x2, x3) = addA_in_aga(x2) 0 = 0 s(x1) = s(x1) ADDA_IN_AGA(x1, x2, x3) = ADDA_IN_AGA(x2) U1_AGA(x1, x2, x3) = U1_AGA(x3) U2_AGA(x1, x2, x3, x4) = U2_AGA(x2, x4) We have to consider all (P,R,Pi)-chains Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES ---------------------------------------- (44) Obligation: Pi DP problem: The TRS P consists of the following rules: ADDA_IN_AGA(X1, 0, s(X2)) -> U1_AGA(X1, X2, addA_in_aga(X1, 0, X2)) ADDA_IN_AGA(X1, 0, s(X2)) -> ADDA_IN_AGA(X1, 0, X2) ADDA_IN_AGA(X1, s(X2), s(X3)) -> U2_AGA(X1, X2, X3, addA_in_aga(X1, X2, X3)) ADDA_IN_AGA(X1, s(X2), s(X3)) -> ADDA_IN_AGA(X1, X2, X3) R is empty. The argument filtering Pi contains the following mapping: addA_in_aga(x1, x2, x3) = addA_in_aga(x2) 0 = 0 s(x1) = s(x1) ADDA_IN_AGA(x1, x2, x3) = ADDA_IN_AGA(x2) U1_AGA(x1, x2, x3) = U1_AGA(x3) U2_AGA(x1, x2, x3, x4) = U2_AGA(x2, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (45) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 2 less nodes. ---------------------------------------- (46) Complex Obligation (AND) ---------------------------------------- (47) Obligation: Pi DP problem: The TRS P consists of the following rules: ADDA_IN_AGA(X1, 0, s(X2)) -> ADDA_IN_AGA(X1, 0, X2) R is empty. The argument filtering Pi contains the following mapping: 0 = 0 s(x1) = s(x1) ADDA_IN_AGA(x1, x2, x3) = ADDA_IN_AGA(x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (48) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (49) Obligation: Q DP problem: The TRS P consists of the following rules: ADDA_IN_AGA(0) -> ADDA_IN_AGA(0) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (50) 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 = ADDA_IN_AGA(0) evaluates to t =ADDA_IN_AGA(0) 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 ADDA_IN_AGA(0) to ADDA_IN_AGA(0). ---------------------------------------- (51) NO ---------------------------------------- (52) Obligation: Pi DP problem: The TRS P consists of the following rules: ADDA_IN_AGA(X1, s(X2), s(X3)) -> ADDA_IN_AGA(X1, X2, X3) R is empty. The argument filtering Pi contains the following mapping: s(x1) = s(x1) ADDA_IN_AGA(x1, x2, x3) = ADDA_IN_AGA(x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (53) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (54) Obligation: Q DP problem: The TRS P consists of the following rules: ADDA_IN_AGA(s(X2)) -> ADDA_IN_AGA(X2) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (55) 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: *ADDA_IN_AGA(s(X2)) -> ADDA_IN_AGA(X2) The graph contains the following edges 1 > 1 ---------------------------------------- (56) YES ---------------------------------------- (57) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 2, "program": { "directives": [], "clauses": [ [ "(add X (0) X)", "(!)" ], [ "(add X Y (s Z))", "(',' (p Y P) (add X P Z))" ], [ "(p (0) (0))", null ], [ "(p (s X) X)", null ] ] }, "graph": { "nodes": { "type": "Nodes", "150": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "151": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" }, { "clause": 3, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" } ], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } }, "152": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" }], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } }, "153": { "goal": [{ "clause": 3, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" }], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } }, "154": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T16 (0) T17)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "155": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "156": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T16 T22 T17)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T22"], "free": [], "exprvars": [] } }, "146": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "157": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "4": { "goal": [ { "clause": 0, "scope": 1, "term": "(add T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(add T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "148": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "149": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T14 X14) (add T16 X14 T17))" }], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } }, "84": { "goal": [ { "clause": -1, "scope": -1, "term": "(!_1)" }, { "clause": 1, "scope": 1, "term": "(add T1 (0) T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "87": { "goal": [{ "clause": 1, "scope": 1, "term": "(add T1 T2 T3)" }], "kb": { "nonunifying": [[ "(add T1 T2 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": ["X3"], "exprvars": [] } } }, "edges": [ { "from": 2, "to": 4, "label": "CASE" }, { "from": 4, "to": 84, "label": "EVAL with clause\nadd(X3, 0, X3) :- !_1.\nand substitutionT1 -> T6,\nX3 -> T6,\nT2 -> 0,\nT3 -> T6" }, { "from": 4, "to": 87, "label": "EVAL-BACKTRACK" }, { "from": 84, "to": 146, "label": "CUT" }, { "from": 87, "to": 149, "label": "EVAL with clause\nadd(X11, X12, s(X13)) :- ','(p(X12, X14), add(X11, X14, X13)).\nand substitutionT1 -> T16,\nX11 -> T16,\nT2 -> T14,\nX12 -> T14,\nX13 -> T17,\nT3 -> s(T17),\nT13 -> T16,\nT15 -> T17" }, { "from": 87, "to": 150, "label": "EVAL-BACKTRACK" }, { "from": 146, "to": 148, "label": "SUCCESS" }, { "from": 149, "to": 151, "label": "CASE" }, { "from": 151, "to": 152, "label": "PARALLEL" }, { "from": 151, "to": 153, "label": "PARALLEL" }, { "from": 152, "to": 154, "label": "EVAL with clause\np(0, 0).\nand substitutionT14 -> 0,\nX14 -> 0" }, { "from": 152, "to": 155, "label": "EVAL-BACKTRACK" }, { "from": 153, "to": 156, "label": "EVAL with clause\np(s(X19), X19).\nand substitutionX19 -> T22,\nT14 -> s(T22),\nX14 -> T22" }, { "from": 153, "to": 157, "label": "EVAL-BACKTRACK" }, { "from": 154, "to": 2, "label": "INSTANCE with matching:\nT1 -> T16\nT2 -> 0\nT3 -> T17" }, { "from": 156, "to": 2, "label": "INSTANCE with matching:\nT1 -> T16\nT2 -> T22\nT3 -> T17" } ], "type": "Graph" } } ---------------------------------------- (58) Obligation: Rules: f87_in(T2) -> f150_in :|: TRUE f150_out -> f87_out(x) :|: TRUE f87_in(T14) -> f149_in(T14) :|: TRUE f149_out(x1) -> f87_out(x1) :|: TRUE f151_out(x2) -> f149_out(x2) :|: TRUE f149_in(x3) -> f151_in(x3) :|: TRUE f156_in(T22) -> f2_in(T22) :|: TRUE f2_out(x4) -> f156_out(x4) :|: TRUE f2_in(x5) -> f4_in(x5) :|: TRUE f4_out(x6) -> f2_out(x6) :|: TRUE f156_out(x7) -> f153_out(s(x7)) :|: TRUE f153_in(x8) -> f157_in :|: TRUE f157_out -> f153_out(x9) :|: TRUE f153_in(s(x10)) -> f156_in(x10) :|: TRUE f84_out -> f4_out(0) :|: TRUE f4_in(x11) -> f87_in(x11) :|: TRUE f87_out(x12) -> f4_out(x12) :|: TRUE f4_in(0) -> f84_in :|: TRUE f154_in -> f2_in(0) :|: TRUE f2_out(0) -> f154_out :|: TRUE f154_out -> f152_out(0) :|: TRUE f152_in(0) -> f154_in :|: TRUE f152_in(x13) -> f155_in :|: TRUE f155_out -> f152_out(x14) :|: TRUE f153_out(x15) -> f151_out(x15) :|: TRUE f152_out(x16) -> f151_out(x16) :|: TRUE f151_in(x17) -> f153_in(x17) :|: TRUE f151_in(x18) -> f152_in(x18) :|: TRUE Start term: f2_in(T2) ---------------------------------------- (59) IRSwTSimpleDependencyGraphProof (EQUIVALENT) Constructed simple dependency graph. Simplified to the following IRSwTs: intTRSProblem: f87_in(T14) -> f149_in(T14) :|: TRUE f149_in(x3) -> f151_in(x3) :|: TRUE f156_in(T22) -> f2_in(T22) :|: TRUE f2_in(x5) -> f4_in(x5) :|: TRUE f153_in(s(x10)) -> f156_in(x10) :|: TRUE f4_in(x11) -> f87_in(x11) :|: TRUE f154_in -> f2_in(0) :|: TRUE f152_in(0) -> f154_in :|: TRUE f151_in(x17) -> f153_in(x17) :|: TRUE f151_in(x18) -> f152_in(x18) :|: TRUE ---------------------------------------- (60) Obligation: Rules: f87_in(T14) -> f149_in(T14) :|: TRUE f149_in(x3) -> f151_in(x3) :|: TRUE f156_in(T22) -> f2_in(T22) :|: TRUE f2_in(x5) -> f4_in(x5) :|: TRUE f153_in(s(x10)) -> f156_in(x10) :|: TRUE f4_in(x11) -> f87_in(x11) :|: TRUE f154_in -> f2_in(0) :|: TRUE f152_in(0) -> f154_in :|: TRUE f151_in(x17) -> f153_in(x17) :|: TRUE f151_in(x18) -> f152_in(x18) :|: TRUE ---------------------------------------- (61) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (62) Obligation: Rules: f87_in(cons_0) -> f87_in(0) :|: TRUE && cons_0 = 0 f87_in(s(x10:0)) -> f87_in(x10:0) :|: TRUE ---------------------------------------- (63) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (64) Obligation: Rules: f87_in(cons_0) -> f87_in(0) :|: TRUE && cons_0 = 0 f87_in(s(x10:0)) -> f87_in(x10:0) :|: TRUE ---------------------------------------- (65) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f87_in(cons_0) -> f87_in(0) :|: TRUE && cons_0 = 0 (2) f87_in(s(x10:0)) -> f87_in(x10:0) :|: TRUE Arcs: (1) -> (1) (2) -> (1), (2) This digraph is fully evaluated! ---------------------------------------- (66) Complex Obligation (AND) ---------------------------------------- (67) Obligation: Termination digraph: Nodes: (1) f87_in(s(x10:0)) -> f87_in(x10:0) :|: TRUE Arcs: (1) -> (1) This digraph is fully evaluated! ---------------------------------------- (68) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f87_in(VARIABLE) s(VARIABLE) Removed predefined arithmetic. ---------------------------------------- (69) Obligation: Rules: f87_in(s(x10:0)) -> f87_in(x10:0) ---------------------------------------- (70) IRSwTToQDPProof (SOUND) Removed the integers and created a QDP-Problem. ---------------------------------------- (71) Obligation: Q DP problem: The TRS P consists of the following rules: f87_in(s(x10:0)) -> f87_in(x10:0) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (72) 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: *f87_in(s(x10:0)) -> f87_in(x10:0) The graph contains the following edges 1 > 1 ---------------------------------------- (73) YES ---------------------------------------- (74) Obligation: Termination digraph: Nodes: (1) f87_in(cons_0) -> f87_in(0) :|: TRUE && cons_0 = 0 Arcs: (1) -> (1) This digraph is fully evaluated! ---------------------------------------- (75) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (76) Obligation: Rules: f87_in(cons_0) -> f87_in(0) :|: TRUE && cons_0 = 0 ---------------------------------------- (77) PrologToTRSTransformerProof (SOUND) Transformed Prolog program to TRS. { "root": 3, "program": { "directives": [], "clauses": [ [ "(add X (0) X)", "(!)" ], [ "(add X Y (s Z))", "(',' (p Y P) (add X P Z))" ], [ "(p (0) (0))", null ], [ "(p (s X) X)", null ] ] }, "graph": { "nodes": { "13": { "goal": [ { "clause": -1, "scope": -1, "term": "(!_1)" }, { "clause": 1, "scope": 1, "term": "(add T1 (0) T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "14": { "goal": [{ "clause": 1, "scope": 1, "term": "(add T1 T2 T3)" }], "kb": { "nonunifying": [[ "(add T1 T2 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": ["X3"], "exprvars": [] } }, "15": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "16": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "140": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" }], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } }, "142": { "goal": [{ "clause": 3, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" }], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } }, "143": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T16 (0) T17)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "144": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "145": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T16 T22 T17)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T22"], "free": [], "exprvars": [] } }, "3": { "goal": [{ "clause": -1, "scope": -1, "term": "(add T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "136": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T14 X14) (add T16 X14 T17))" }], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } }, "147": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "5": { "goal": [ { "clause": 0, "scope": 1, "term": "(add T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(add T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "137": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "138": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" }, { "clause": 3, "scope": 2, "term": "(',' (p T14 X14) (add T16 X14 T17))" } ], "kb": { "nonunifying": [[ "(add T1 T14 T3)", "(add X3 (0) X3)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X3", "X14" ], "exprvars": [] } } }, "edges": [ { "from": 3, "to": 5, "label": "CASE" }, { "from": 5, "to": 13, "label": "EVAL with clause\nadd(X3, 0, X3) :- !_1.\nand substitutionT1 -> T6,\nX3 -> T6,\nT2 -> 0,\nT3 -> T6" }, { "from": 5, "to": 14, "label": "EVAL-BACKTRACK" }, { "from": 13, "to": 15, "label": "CUT" }, { "from": 14, "to": 136, "label": "EVAL with clause\nadd(X11, X12, s(X13)) :- ','(p(X12, X14), add(X11, X14, X13)).\nand substitutionT1 -> T16,\nX11 -> T16,\nT2 -> T14,\nX12 -> T14,\nX13 -> T17,\nT3 -> s(T17),\nT13 -> T16,\nT15 -> T17" }, { "from": 14, "to": 137, "label": "EVAL-BACKTRACK" }, { "from": 15, "to": 16, "label": "SUCCESS" }, { "from": 136, "to": 138, "label": "CASE" }, { "from": 138, "to": 140, "label": "PARALLEL" }, { "from": 138, "to": 142, "label": "PARALLEL" }, { "from": 140, "to": 143, "label": "EVAL with clause\np(0, 0).\nand substitutionT14 -> 0,\nX14 -> 0" }, { "from": 140, "to": 144, "label": "EVAL-BACKTRACK" }, { "from": 142, "to": 145, "label": "EVAL with clause\np(s(X19), X19).\nand substitutionX19 -> T22,\nT14 -> s(T22),\nX14 -> T22" }, { "from": 142, "to": 147, "label": "EVAL-BACKTRACK" }, { "from": 143, "to": 3, "label": "INSTANCE with matching:\nT1 -> T16\nT2 -> 0\nT3 -> T17" }, { "from": 145, "to": 3, "label": "INSTANCE with matching:\nT1 -> T16\nT2 -> T22\nT3 -> T17" } ], "type": "Graph" } } ---------------------------------------- (78) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f3_in(0) -> f3_out1 f3_in(0) -> U1(f3_in(0), 0) U1(f3_out1, 0) -> f3_out1 f3_in(s(T22)) -> U2(f3_in(T22), s(T22)) U2(f3_out1, s(T22)) -> f3_out1 Q is empty. ---------------------------------------- (79) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(U1(x_1, x_2)) = 2*x_1 + 2*x_2 POL(U2(x_1, x_2)) = x_1 + x_2 POL(f3_in(x_1)) = 2*x_1 POL(f3_out1) = 0 POL(s(x_1)) = 2 + 2*x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: f3_in(s(T22)) -> U2(f3_in(T22), s(T22)) U2(f3_out1, s(T22)) -> f3_out1 ---------------------------------------- (80) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f3_in(0) -> f3_out1 f3_in(0) -> U1(f3_in(0), 0) U1(f3_out1, 0) -> f3_out1 Q is empty. ---------------------------------------- (81) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(U1(x_1, x_2)) = x_1 + x_2 POL(f3_in(x_1)) = 1 + 2*x_1 POL(f3_out1) = 0 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: f3_in(0) -> f3_out1 ---------------------------------------- (82) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f3_in(0) -> U1(f3_in(0), 0) U1(f3_out1, 0) -> f3_out1 Q is empty. ---------------------------------------- (83) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(U1(x_1, x_2)) = 2*x_1 + x_2 POL(f3_in(x_1)) = 2*x_1 POL(f3_out1) = 2 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: U1(f3_out1, 0) -> f3_out1 ---------------------------------------- (84) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f3_in(0) -> U1(f3_in(0), 0) Q is empty. ---------------------------------------- (85) Overlay + Local Confluence (EQUIVALENT) The TRS is overlay and locally confluent. By [NOC] we can switch to innermost. ---------------------------------------- (86) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: f3_in(0) -> U1(f3_in(0), 0) The set Q consists of the following terms: f3_in(0) ---------------------------------------- (87) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. ---------------------------------------- (88) Obligation: Q DP problem: The TRS P consists of the following rules: F3_IN(0) -> F3_IN(0) The TRS R consists of the following rules: f3_in(0) -> U1(f3_in(0), 0) The set Q consists of the following terms: f3_in(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (89) 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. ---------------------------------------- (90) Obligation: Q DP problem: The TRS P consists of the following rules: F3_IN(0) -> F3_IN(0) R is empty. The set Q consists of the following terms: f3_in(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (91) 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]. f3_in(0) ---------------------------------------- (92) Obligation: Q DP problem: The TRS P consists of the following rules: F3_IN(0) -> F3_IN(0) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (93) 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 = F3_IN(0) evaluates to t =F3_IN(0) 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 F3_IN(0) to F3_IN(0). ---------------------------------------- (94) NO