4.31/2.03 YES 4.31/2.05 proof of /export/starexec/sandbox/benchmark/theBenchmark.pl 4.31/2.05 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 4.31/2.05 4.31/2.05 4.31/2.05 Left Termination of the query pattern 4.31/2.05 4.31/2.05 ackerman(g,g,a) 4.31/2.05 4.31/2.05 w.r.t. the given Prolog program could successfully be proven: 4.31/2.05 4.31/2.05 (0) Prolog 4.31/2.05 (1) PrologToPiTRSProof [SOUND, 0 ms] 4.31/2.05 (2) PiTRS 4.31/2.05 (3) DependencyPairsProof [EQUIVALENT, 0 ms] 4.31/2.05 (4) PiDP 4.31/2.05 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 4.31/2.05 (6) PiDP 4.31/2.05 (7) PiDPToQDPProof [SOUND, 19 ms] 4.31/2.05 (8) QDP 4.31/2.05 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 4.31/2.05 (10) YES 4.31/2.05 4.31/2.05 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (0) 4.31/2.05 Obligation: 4.31/2.05 Clauses: 4.31/2.05 4.31/2.05 ackerman(0, N, s(N)). 4.31/2.05 ackerman(s(M), 0, Res) :- ackerman(M, s(0), Res). 4.31/2.05 ackerman(s(M), s(N), Res) :- ','(ackerman(s(M), N, Res1), ackerman(M, Res1, Res)). 4.31/2.05 4.31/2.05 4.31/2.05 Query: ackerman(g,g,a) 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (1) PrologToPiTRSProof (SOUND) 4.31/2.05 We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: 4.31/2.05 4.31/2.05 ackerman_in_3: (b,b,f) 4.31/2.05 4.31/2.05 Transforming Prolog into the following Term Rewriting System: 4.31/2.05 4.31/2.05 Pi-finite rewrite system: 4.31/2.05 The TRS R consists of the following rules: 4.31/2.05 4.31/2.05 ackerman_in_gga(0, N, s(N)) -> ackerman_out_gga(0, N, s(N)) 4.31/2.05 ackerman_in_gga(s(M), 0, Res) -> U1_gga(M, Res, ackerman_in_gga(M, s(0), Res)) 4.31/2.05 ackerman_in_gga(s(M), s(N), Res) -> U2_gga(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 U2_gga(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> U3_gga(M, N, Res, ackerman_in_gga(M, Res1, Res)) 4.31/2.05 U3_gga(M, N, Res, ackerman_out_gga(M, Res1, Res)) -> ackerman_out_gga(s(M), s(N), Res) 4.31/2.05 U1_gga(M, Res, ackerman_out_gga(M, s(0), Res)) -> ackerman_out_gga(s(M), 0, Res) 4.31/2.05 4.31/2.05 The argument filtering Pi contains the following mapping: 4.31/2.05 ackerman_in_gga(x1, x2, x3) = ackerman_in_gga(x1, x2) 4.31/2.05 4.31/2.05 0 = 0 4.31/2.05 4.31/2.05 ackerman_out_gga(x1, x2, x3) = ackerman_out_gga(x3) 4.31/2.05 4.31/2.05 s(x1) = s(x1) 4.31/2.05 4.31/2.05 U1_gga(x1, x2, x3) = U1_gga(x3) 4.31/2.05 4.31/2.05 U2_gga(x1, x2, x3, x4) = U2_gga(x1, x4) 4.31/2.05 4.31/2.05 U3_gga(x1, x2, x3, x4) = U3_gga(x4) 4.31/2.05 4.31/2.05 4.31/2.05 4.31/2.05 4.31/2.05 4.31/2.05 Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog 4.31/2.05 4.31/2.05 4.31/2.05 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (2) 4.31/2.05 Obligation: 4.31/2.05 Pi-finite rewrite system: 4.31/2.05 The TRS R consists of the following rules: 4.31/2.05 4.31/2.05 ackerman_in_gga(0, N, s(N)) -> ackerman_out_gga(0, N, s(N)) 4.31/2.05 ackerman_in_gga(s(M), 0, Res) -> U1_gga(M, Res, ackerman_in_gga(M, s(0), Res)) 4.31/2.05 ackerman_in_gga(s(M), s(N), Res) -> U2_gga(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 U2_gga(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> U3_gga(M, N, Res, ackerman_in_gga(M, Res1, Res)) 4.31/2.05 U3_gga(M, N, Res, ackerman_out_gga(M, Res1, Res)) -> ackerman_out_gga(s(M), s(N), Res) 4.31/2.05 U1_gga(M, Res, ackerman_out_gga(M, s(0), Res)) -> ackerman_out_gga(s(M), 0, Res) 4.31/2.05 4.31/2.05 The argument filtering Pi contains the following mapping: 4.31/2.05 ackerman_in_gga(x1, x2, x3) = ackerman_in_gga(x1, x2) 4.31/2.05 4.31/2.05 0 = 0 4.31/2.05 4.31/2.05 ackerman_out_gga(x1, x2, x3) = ackerman_out_gga(x3) 4.31/2.05 4.31/2.05 s(x1) = s(x1) 4.31/2.05 4.31/2.05 U1_gga(x1, x2, x3) = U1_gga(x3) 4.31/2.05 4.31/2.05 U2_gga(x1, x2, x3, x4) = U2_gga(x1, x4) 4.31/2.05 4.31/2.05 U3_gga(x1, x2, x3, x4) = U3_gga(x4) 4.31/2.05 4.31/2.05 4.31/2.05 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (3) DependencyPairsProof (EQUIVALENT) 4.31/2.05 Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem: 4.31/2.05 Pi DP problem: 4.31/2.05 The TRS P consists of the following rules: 4.31/2.05 4.31/2.05 ACKERMAN_IN_GGA(s(M), 0, Res) -> U1_GGA(M, Res, ackerman_in_gga(M, s(0), Res)) 4.31/2.05 ACKERMAN_IN_GGA(s(M), 0, Res) -> ACKERMAN_IN_GGA(M, s(0), Res) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N), Res) -> U2_GGA(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N), Res) -> ACKERMAN_IN_GGA(s(M), N, Res1) 4.31/2.05 U2_GGA(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> U3_GGA(M, N, Res, ackerman_in_gga(M, Res1, Res)) 4.31/2.05 U2_GGA(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> ACKERMAN_IN_GGA(M, Res1, Res) 4.31/2.05 4.31/2.05 The TRS R consists of the following rules: 4.31/2.05 4.31/2.05 ackerman_in_gga(0, N, s(N)) -> ackerman_out_gga(0, N, s(N)) 4.31/2.05 ackerman_in_gga(s(M), 0, Res) -> U1_gga(M, Res, ackerman_in_gga(M, s(0), Res)) 4.31/2.05 ackerman_in_gga(s(M), s(N), Res) -> U2_gga(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 U2_gga(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> U3_gga(M, N, Res, ackerman_in_gga(M, Res1, Res)) 4.31/2.05 U3_gga(M, N, Res, ackerman_out_gga(M, Res1, Res)) -> ackerman_out_gga(s(M), s(N), Res) 4.31/2.05 U1_gga(M, Res, ackerman_out_gga(M, s(0), Res)) -> ackerman_out_gga(s(M), 0, Res) 4.31/2.05 4.31/2.05 The argument filtering Pi contains the following mapping: 4.31/2.05 ackerman_in_gga(x1, x2, x3) = ackerman_in_gga(x1, x2) 4.31/2.05 4.31/2.05 0 = 0 4.31/2.05 4.31/2.05 ackerman_out_gga(x1, x2, x3) = ackerman_out_gga(x3) 4.31/2.05 4.31/2.05 s(x1) = s(x1) 4.31/2.05 4.31/2.05 U1_gga(x1, x2, x3) = U1_gga(x3) 4.31/2.05 4.31/2.05 U2_gga(x1, x2, x3, x4) = U2_gga(x1, x4) 4.31/2.05 4.31/2.05 U3_gga(x1, x2, x3, x4) = U3_gga(x4) 4.31/2.05 4.31/2.05 ACKERMAN_IN_GGA(x1, x2, x3) = ACKERMAN_IN_GGA(x1, x2) 4.31/2.05 4.31/2.05 U1_GGA(x1, x2, x3) = U1_GGA(x3) 4.31/2.05 4.31/2.05 U2_GGA(x1, x2, x3, x4) = U2_GGA(x1, x4) 4.31/2.05 4.31/2.05 U3_GGA(x1, x2, x3, x4) = U3_GGA(x4) 4.31/2.05 4.31/2.05 4.31/2.05 We have to consider all (P,R,Pi)-chains 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (4) 4.31/2.05 Obligation: 4.31/2.05 Pi DP problem: 4.31/2.05 The TRS P consists of the following rules: 4.31/2.05 4.31/2.05 ACKERMAN_IN_GGA(s(M), 0, Res) -> U1_GGA(M, Res, ackerman_in_gga(M, s(0), Res)) 4.31/2.05 ACKERMAN_IN_GGA(s(M), 0, Res) -> ACKERMAN_IN_GGA(M, s(0), Res) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N), Res) -> U2_GGA(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N), Res) -> ACKERMAN_IN_GGA(s(M), N, Res1) 4.31/2.05 U2_GGA(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> U3_GGA(M, N, Res, ackerman_in_gga(M, Res1, Res)) 4.31/2.05 U2_GGA(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> ACKERMAN_IN_GGA(M, Res1, Res) 4.31/2.05 4.31/2.05 The TRS R consists of the following rules: 4.31/2.05 4.31/2.05 ackerman_in_gga(0, N, s(N)) -> ackerman_out_gga(0, N, s(N)) 4.31/2.05 ackerman_in_gga(s(M), 0, Res) -> U1_gga(M, Res, ackerman_in_gga(M, s(0), Res)) 4.31/2.05 ackerman_in_gga(s(M), s(N), Res) -> U2_gga(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 U2_gga(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> U3_gga(M, N, Res, ackerman_in_gga(M, Res1, Res)) 4.31/2.05 U3_gga(M, N, Res, ackerman_out_gga(M, Res1, Res)) -> ackerman_out_gga(s(M), s(N), Res) 4.31/2.05 U1_gga(M, Res, ackerman_out_gga(M, s(0), Res)) -> ackerman_out_gga(s(M), 0, Res) 4.31/2.05 4.31/2.05 The argument filtering Pi contains the following mapping: 4.31/2.05 ackerman_in_gga(x1, x2, x3) = ackerman_in_gga(x1, x2) 4.31/2.05 4.31/2.05 0 = 0 4.31/2.05 4.31/2.05 ackerman_out_gga(x1, x2, x3) = ackerman_out_gga(x3) 4.31/2.05 4.31/2.05 s(x1) = s(x1) 4.31/2.05 4.31/2.05 U1_gga(x1, x2, x3) = U1_gga(x3) 4.31/2.05 4.31/2.05 U2_gga(x1, x2, x3, x4) = U2_gga(x1, x4) 4.31/2.05 4.31/2.05 U3_gga(x1, x2, x3, x4) = U3_gga(x4) 4.31/2.05 4.31/2.05 ACKERMAN_IN_GGA(x1, x2, x3) = ACKERMAN_IN_GGA(x1, x2) 4.31/2.05 4.31/2.05 U1_GGA(x1, x2, x3) = U1_GGA(x3) 4.31/2.05 4.31/2.05 U2_GGA(x1, x2, x3, x4) = U2_GGA(x1, x4) 4.31/2.05 4.31/2.05 U3_GGA(x1, x2, x3, x4) = U3_GGA(x4) 4.31/2.05 4.31/2.05 4.31/2.05 We have to consider all (P,R,Pi)-chains 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (5) DependencyGraphProof (EQUIVALENT) 4.31/2.05 The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 2 less nodes. 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (6) 4.31/2.05 Obligation: 4.31/2.05 Pi DP problem: 4.31/2.05 The TRS P consists of the following rules: 4.31/2.05 4.31/2.05 ACKERMAN_IN_GGA(s(M), 0, Res) -> ACKERMAN_IN_GGA(M, s(0), Res) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N), Res) -> U2_GGA(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 U2_GGA(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> ACKERMAN_IN_GGA(M, Res1, Res) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N), Res) -> ACKERMAN_IN_GGA(s(M), N, Res1) 4.31/2.05 4.31/2.05 The TRS R consists of the following rules: 4.31/2.05 4.31/2.05 ackerman_in_gga(0, N, s(N)) -> ackerman_out_gga(0, N, s(N)) 4.31/2.05 ackerman_in_gga(s(M), 0, Res) -> U1_gga(M, Res, ackerman_in_gga(M, s(0), Res)) 4.31/2.05 ackerman_in_gga(s(M), s(N), Res) -> U2_gga(M, N, Res, ackerman_in_gga(s(M), N, Res1)) 4.31/2.05 U2_gga(M, N, Res, ackerman_out_gga(s(M), N, Res1)) -> U3_gga(M, N, Res, ackerman_in_gga(M, Res1, Res)) 4.31/2.05 U3_gga(M, N, Res, ackerman_out_gga(M, Res1, Res)) -> ackerman_out_gga(s(M), s(N), Res) 4.31/2.05 U1_gga(M, Res, ackerman_out_gga(M, s(0), Res)) -> ackerman_out_gga(s(M), 0, Res) 4.31/2.05 4.31/2.05 The argument filtering Pi contains the following mapping: 4.31/2.05 ackerman_in_gga(x1, x2, x3) = ackerman_in_gga(x1, x2) 4.31/2.05 4.31/2.05 0 = 0 4.31/2.05 4.31/2.05 ackerman_out_gga(x1, x2, x3) = ackerman_out_gga(x3) 4.31/2.05 4.31/2.05 s(x1) = s(x1) 4.31/2.05 4.31/2.05 U1_gga(x1, x2, x3) = U1_gga(x3) 4.31/2.05 4.31/2.05 U2_gga(x1, x2, x3, x4) = U2_gga(x1, x4) 4.31/2.05 4.31/2.05 U3_gga(x1, x2, x3, x4) = U3_gga(x4) 4.31/2.05 4.31/2.05 ACKERMAN_IN_GGA(x1, x2, x3) = ACKERMAN_IN_GGA(x1, x2) 4.31/2.05 4.31/2.05 U2_GGA(x1, x2, x3, x4) = U2_GGA(x1, x4) 4.31/2.05 4.31/2.05 4.31/2.05 We have to consider all (P,R,Pi)-chains 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (7) PiDPToQDPProof (SOUND) 4.31/2.05 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (8) 4.31/2.05 Obligation: 4.31/2.05 Q DP problem: 4.31/2.05 The TRS P consists of the following rules: 4.31/2.05 4.31/2.05 ACKERMAN_IN_GGA(s(M), 0) -> ACKERMAN_IN_GGA(M, s(0)) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N)) -> U2_GGA(M, ackerman_in_gga(s(M), N)) 4.31/2.05 U2_GGA(M, ackerman_out_gga(Res1)) -> ACKERMAN_IN_GGA(M, Res1) 4.31/2.05 ACKERMAN_IN_GGA(s(M), s(N)) -> ACKERMAN_IN_GGA(s(M), N) 4.31/2.05 4.31/2.05 The TRS R consists of the following rules: 4.31/2.05 4.31/2.05 ackerman_in_gga(0, N) -> ackerman_out_gga(s(N)) 4.31/2.05 ackerman_in_gga(s(M), 0) -> U1_gga(ackerman_in_gga(M, s(0))) 4.31/2.05 ackerman_in_gga(s(M), s(N)) -> U2_gga(M, ackerman_in_gga(s(M), N)) 4.31/2.05 U2_gga(M, ackerman_out_gga(Res1)) -> U3_gga(ackerman_in_gga(M, Res1)) 4.31/2.05 U3_gga(ackerman_out_gga(Res)) -> ackerman_out_gga(Res) 4.31/2.05 U1_gga(ackerman_out_gga(Res)) -> ackerman_out_gga(Res) 4.31/2.05 4.31/2.05 The set Q consists of the following terms: 4.31/2.05 4.31/2.05 ackerman_in_gga(x0, x1) 4.31/2.05 U2_gga(x0, x1) 4.31/2.05 U3_gga(x0) 4.31/2.05 U1_gga(x0) 4.31/2.05 4.31/2.05 We have to consider all (P,Q,R)-chains. 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (9) QDPSizeChangeProof (EQUIVALENT) 4.31/2.05 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. 4.31/2.05 4.31/2.05 From the DPs we obtained the following set of size-change graphs: 4.31/2.05 *ACKERMAN_IN_GGA(s(M), s(N)) -> ACKERMAN_IN_GGA(s(M), N) 4.31/2.05 The graph contains the following edges 1 >= 1, 2 > 2 4.31/2.05 4.31/2.05 4.31/2.05 *ACKERMAN_IN_GGA(s(M), s(N)) -> U2_GGA(M, ackerman_in_gga(s(M), N)) 4.31/2.05 The graph contains the following edges 1 > 1 4.31/2.05 4.31/2.05 4.31/2.05 *U2_GGA(M, ackerman_out_gga(Res1)) -> ACKERMAN_IN_GGA(M, Res1) 4.31/2.05 The graph contains the following edges 1 >= 1, 2 > 2 4.31/2.05 4.31/2.05 4.31/2.05 *ACKERMAN_IN_GGA(s(M), 0) -> ACKERMAN_IN_GGA(M, s(0)) 4.31/2.05 The graph contains the following edges 1 > 1 4.31/2.05 4.31/2.05 4.31/2.05 ---------------------------------------- 4.31/2.05 4.31/2.05 (10) 4.31/2.05 YES 4.31/2.08 EOF