/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.pl /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern log2(g,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToPiTRSProof [SOUND, 0 ms] (2) PiTRS (3) DependencyPairsProof [EQUIVALENT, 21 ms] (4) PiDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) PiDP (7) UsableRulesProof [EQUIVALENT, 0 ms] (8) PiDP (9) PiDPToQDPProof [SOUND, 0 ms] (10) QDP (11) MRRProof [EQUIVALENT, 56 ms] (12) QDP (13) DependencyGraphProof [EQUIVALENT, 1 ms] (14) TRUE ---------------------------------------- (0) Obligation: Clauses: log2(X, Y) :- log2(X, 0, s(0), Y). log2(s(s(X)), Half, Acc, Y) :- log2(X, s(Half), Acc, Y). log2(X, s(s(Half)), Acc, Y) :- ','(small(X), log2(Half, s(0), s(Acc), Y)). log2(X, Half, Y, Y) :- ','(small(X), small(Half)). small(0). small(s(0)). Query: log2(g,a) ---------------------------------------- (1) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: log2_in_2: (b,f) log2_in_4: (b,b,b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: log2_in_ga(X, Y) -> U1_ga(X, Y, log2_in_ggga(X, 0, s(0), Y)) log2_in_ggga(s(s(X)), Half, Acc, Y) -> U2_ggga(X, Half, Acc, Y, log2_in_ggga(X, s(Half), Acc, Y)) log2_in_ggga(X, s(s(Half)), Acc, Y) -> U3_ggga(X, Half, Acc, Y, small_in_g(X)) small_in_g(0) -> small_out_g(0) small_in_g(s(0)) -> small_out_g(s(0)) U3_ggga(X, Half, Acc, Y, small_out_g(X)) -> U4_ggga(X, Half, Acc, Y, log2_in_ggga(Half, s(0), s(Acc), Y)) log2_in_ggga(X, Half, Y, Y) -> U5_ggga(X, Half, Y, small_in_g(X)) U5_ggga(X, Half, Y, small_out_g(X)) -> U6_ggga(X, Half, Y, small_in_g(Half)) U6_ggga(X, Half, Y, small_out_g(Half)) -> log2_out_ggga(X, Half, Y, Y) U4_ggga(X, Half, Acc, Y, log2_out_ggga(Half, s(0), s(Acc), Y)) -> log2_out_ggga(X, s(s(Half)), Acc, Y) U2_ggga(X, Half, Acc, Y, log2_out_ggga(X, s(Half), Acc, Y)) -> log2_out_ggga(s(s(X)), Half, Acc, Y) U1_ga(X, Y, log2_out_ggga(X, 0, s(0), Y)) -> log2_out_ga(X, Y) The argument filtering Pi contains the following mapping: log2_in_ga(x1, x2) = log2_in_ga(x1) U1_ga(x1, x2, x3) = U1_ga(x3) log2_in_ggga(x1, x2, x3, x4) = log2_in_ggga(x1, x2, x3) s(x1) = s(x1) U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x5) U3_ggga(x1, x2, x3, x4, x5) = U3_ggga(x2, x3, x5) small_in_g(x1) = small_in_g(x1) 0 = 0 small_out_g(x1) = small_out_g U4_ggga(x1, x2, x3, x4, x5) = U4_ggga(x5) U5_ggga(x1, x2, x3, x4) = U5_ggga(x2, x3, x4) U6_ggga(x1, x2, x3, x4) = U6_ggga(x3, x4) log2_out_ggga(x1, x2, x3, x4) = log2_out_ggga(x4) log2_out_ga(x1, x2) = log2_out_ga(x2) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (2) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: log2_in_ga(X, Y) -> U1_ga(X, Y, log2_in_ggga(X, 0, s(0), Y)) log2_in_ggga(s(s(X)), Half, Acc, Y) -> U2_ggga(X, Half, Acc, Y, log2_in_ggga(X, s(Half), Acc, Y)) log2_in_ggga(X, s(s(Half)), Acc, Y) -> U3_ggga(X, Half, Acc, Y, small_in_g(X)) small_in_g(0) -> small_out_g(0) small_in_g(s(0)) -> small_out_g(s(0)) U3_ggga(X, Half, Acc, Y, small_out_g(X)) -> U4_ggga(X, Half, Acc, Y, log2_in_ggga(Half, s(0), s(Acc), Y)) log2_in_ggga(X, Half, Y, Y) -> U5_ggga(X, Half, Y, small_in_g(X)) U5_ggga(X, Half, Y, small_out_g(X)) -> U6_ggga(X, Half, Y, small_in_g(Half)) U6_ggga(X, Half, Y, small_out_g(Half)) -> log2_out_ggga(X, Half, Y, Y) U4_ggga(X, Half, Acc, Y, log2_out_ggga(Half, s(0), s(Acc), Y)) -> log2_out_ggga(X, s(s(Half)), Acc, Y) U2_ggga(X, Half, Acc, Y, log2_out_ggga(X, s(Half), Acc, Y)) -> log2_out_ggga(s(s(X)), Half, Acc, Y) U1_ga(X, Y, log2_out_ggga(X, 0, s(0), Y)) -> log2_out_ga(X, Y) The argument filtering Pi contains the following mapping: log2_in_ga(x1, x2) = log2_in_ga(x1) U1_ga(x1, x2, x3) = U1_ga(x3) log2_in_ggga(x1, x2, x3, x4) = log2_in_ggga(x1, x2, x3) s(x1) = s(x1) U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x5) U3_ggga(x1, x2, x3, x4, x5) = U3_ggga(x2, x3, x5) small_in_g(x1) = small_in_g(x1) 0 = 0 small_out_g(x1) = small_out_g U4_ggga(x1, x2, x3, x4, x5) = U4_ggga(x5) U5_ggga(x1, x2, x3, x4) = U5_ggga(x2, x3, x4) U6_ggga(x1, x2, x3, x4) = U6_ggga(x3, x4) log2_out_ggga(x1, x2, x3, x4) = log2_out_ggga(x4) log2_out_ga(x1, x2) = log2_out_ga(x2) ---------------------------------------- (3) 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: LOG2_IN_GA(X, Y) -> U1_GA(X, Y, log2_in_ggga(X, 0, s(0), Y)) LOG2_IN_GA(X, Y) -> LOG2_IN_GGGA(X, 0, s(0), Y) LOG2_IN_GGGA(s(s(X)), Half, Acc, Y) -> U2_GGGA(X, Half, Acc, Y, log2_in_ggga(X, s(Half), Acc, Y)) LOG2_IN_GGGA(s(s(X)), Half, Acc, Y) -> LOG2_IN_GGGA(X, s(Half), Acc, Y) LOG2_IN_GGGA(X, s(s(Half)), Acc, Y) -> U3_GGGA(X, Half, Acc, Y, small_in_g(X)) LOG2_IN_GGGA(X, s(s(Half)), Acc, Y) -> SMALL_IN_G(X) U3_GGGA(X, Half, Acc, Y, small_out_g(X)) -> U4_GGGA(X, Half, Acc, Y, log2_in_ggga(Half, s(0), s(Acc), Y)) U3_GGGA(X, Half, Acc, Y, small_out_g(X)) -> LOG2_IN_GGGA(Half, s(0), s(Acc), Y) LOG2_IN_GGGA(X, Half, Y, Y) -> U5_GGGA(X, Half, Y, small_in_g(X)) LOG2_IN_GGGA(X, Half, Y, Y) -> SMALL_IN_G(X) U5_GGGA(X, Half, Y, small_out_g(X)) -> U6_GGGA(X, Half, Y, small_in_g(Half)) U5_GGGA(X, Half, Y, small_out_g(X)) -> SMALL_IN_G(Half) The TRS R consists of the following rules: log2_in_ga(X, Y) -> U1_ga(X, Y, log2_in_ggga(X, 0, s(0), Y)) log2_in_ggga(s(s(X)), Half, Acc, Y) -> U2_ggga(X, Half, Acc, Y, log2_in_ggga(X, s(Half), Acc, Y)) log2_in_ggga(X, s(s(Half)), Acc, Y) -> U3_ggga(X, Half, Acc, Y, small_in_g(X)) small_in_g(0) -> small_out_g(0) small_in_g(s(0)) -> small_out_g(s(0)) U3_ggga(X, Half, Acc, Y, small_out_g(X)) -> U4_ggga(X, Half, Acc, Y, log2_in_ggga(Half, s(0), s(Acc), Y)) log2_in_ggga(X, Half, Y, Y) -> U5_ggga(X, Half, Y, small_in_g(X)) U5_ggga(X, Half, Y, small_out_g(X)) -> U6_ggga(X, Half, Y, small_in_g(Half)) U6_ggga(X, Half, Y, small_out_g(Half)) -> log2_out_ggga(X, Half, Y, Y) U4_ggga(X, Half, Acc, Y, log2_out_ggga(Half, s(0), s(Acc), Y)) -> log2_out_ggga(X, s(s(Half)), Acc, Y) U2_ggga(X, Half, Acc, Y, log2_out_ggga(X, s(Half), Acc, Y)) -> log2_out_ggga(s(s(X)), Half, Acc, Y) U1_ga(X, Y, log2_out_ggga(X, 0, s(0), Y)) -> log2_out_ga(X, Y) The argument filtering Pi contains the following mapping: log2_in_ga(x1, x2) = log2_in_ga(x1) U1_ga(x1, x2, x3) = U1_ga(x3) log2_in_ggga(x1, x2, x3, x4) = log2_in_ggga(x1, x2, x3) s(x1) = s(x1) U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x5) U3_ggga(x1, x2, x3, x4, x5) = U3_ggga(x2, x3, x5) small_in_g(x1) = small_in_g(x1) 0 = 0 small_out_g(x1) = small_out_g U4_ggga(x1, x2, x3, x4, x5) = U4_ggga(x5) U5_ggga(x1, x2, x3, x4) = U5_ggga(x2, x3, x4) U6_ggga(x1, x2, x3, x4) = U6_ggga(x3, x4) log2_out_ggga(x1, x2, x3, x4) = log2_out_ggga(x4) log2_out_ga(x1, x2) = log2_out_ga(x2) LOG2_IN_GA(x1, x2) = LOG2_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x3) LOG2_IN_GGGA(x1, x2, x3, x4) = LOG2_IN_GGGA(x1, x2, x3) U2_GGGA(x1, x2, x3, x4, x5) = U2_GGGA(x5) U3_GGGA(x1, x2, x3, x4, x5) = U3_GGGA(x2, x3, x5) SMALL_IN_G(x1) = SMALL_IN_G(x1) U4_GGGA(x1, x2, x3, x4, x5) = U4_GGGA(x5) U5_GGGA(x1, x2, x3, x4) = U5_GGGA(x2, x3, x4) U6_GGGA(x1, x2, x3, x4) = U6_GGGA(x3, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (4) Obligation: Pi DP problem: The TRS P consists of the following rules: LOG2_IN_GA(X, Y) -> U1_GA(X, Y, log2_in_ggga(X, 0, s(0), Y)) LOG2_IN_GA(X, Y) -> LOG2_IN_GGGA(X, 0, s(0), Y) LOG2_IN_GGGA(s(s(X)), Half, Acc, Y) -> U2_GGGA(X, Half, Acc, Y, log2_in_ggga(X, s(Half), Acc, Y)) LOG2_IN_GGGA(s(s(X)), Half, Acc, Y) -> LOG2_IN_GGGA(X, s(Half), Acc, Y) LOG2_IN_GGGA(X, s(s(Half)), Acc, Y) -> U3_GGGA(X, Half, Acc, Y, small_in_g(X)) LOG2_IN_GGGA(X, s(s(Half)), Acc, Y) -> SMALL_IN_G(X) U3_GGGA(X, Half, Acc, Y, small_out_g(X)) -> U4_GGGA(X, Half, Acc, Y, log2_in_ggga(Half, s(0), s(Acc), Y)) U3_GGGA(X, Half, Acc, Y, small_out_g(X)) -> LOG2_IN_GGGA(Half, s(0), s(Acc), Y) LOG2_IN_GGGA(X, Half, Y, Y) -> U5_GGGA(X, Half, Y, small_in_g(X)) LOG2_IN_GGGA(X, Half, Y, Y) -> SMALL_IN_G(X) U5_GGGA(X, Half, Y, small_out_g(X)) -> U6_GGGA(X, Half, Y, small_in_g(Half)) U5_GGGA(X, Half, Y, small_out_g(X)) -> SMALL_IN_G(Half) The TRS R consists of the following rules: log2_in_ga(X, Y) -> U1_ga(X, Y, log2_in_ggga(X, 0, s(0), Y)) log2_in_ggga(s(s(X)), Half, Acc, Y) -> U2_ggga(X, Half, Acc, Y, log2_in_ggga(X, s(Half), Acc, Y)) log2_in_ggga(X, s(s(Half)), Acc, Y) -> U3_ggga(X, Half, Acc, Y, small_in_g(X)) small_in_g(0) -> small_out_g(0) small_in_g(s(0)) -> small_out_g(s(0)) U3_ggga(X, Half, Acc, Y, small_out_g(X)) -> U4_ggga(X, Half, Acc, Y, log2_in_ggga(Half, s(0), s(Acc), Y)) log2_in_ggga(X, Half, Y, Y) -> U5_ggga(X, Half, Y, small_in_g(X)) U5_ggga(X, Half, Y, small_out_g(X)) -> U6_ggga(X, Half, Y, small_in_g(Half)) U6_ggga(X, Half, Y, small_out_g(Half)) -> log2_out_ggga(X, Half, Y, Y) U4_ggga(X, Half, Acc, Y, log2_out_ggga(Half, s(0), s(Acc), Y)) -> log2_out_ggga(X, s(s(Half)), Acc, Y) U2_ggga(X, Half, Acc, Y, log2_out_ggga(X, s(Half), Acc, Y)) -> log2_out_ggga(s(s(X)), Half, Acc, Y) U1_ga(X, Y, log2_out_ggga(X, 0, s(0), Y)) -> log2_out_ga(X, Y) The argument filtering Pi contains the following mapping: log2_in_ga(x1, x2) = log2_in_ga(x1) U1_ga(x1, x2, x3) = U1_ga(x3) log2_in_ggga(x1, x2, x3, x4) = log2_in_ggga(x1, x2, x3) s(x1) = s(x1) U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x5) U3_ggga(x1, x2, x3, x4, x5) = U3_ggga(x2, x3, x5) small_in_g(x1) = small_in_g(x1) 0 = 0 small_out_g(x1) = small_out_g U4_ggga(x1, x2, x3, x4, x5) = U4_ggga(x5) U5_ggga(x1, x2, x3, x4) = U5_ggga(x2, x3, x4) U6_ggga(x1, x2, x3, x4) = U6_ggga(x3, x4) log2_out_ggga(x1, x2, x3, x4) = log2_out_ggga(x4) log2_out_ga(x1, x2) = log2_out_ga(x2) LOG2_IN_GA(x1, x2) = LOG2_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x3) LOG2_IN_GGGA(x1, x2, x3, x4) = LOG2_IN_GGGA(x1, x2, x3) U2_GGGA(x1, x2, x3, x4, x5) = U2_GGGA(x5) U3_GGGA(x1, x2, x3, x4, x5) = U3_GGGA(x2, x3, x5) SMALL_IN_G(x1) = SMALL_IN_G(x1) U4_GGGA(x1, x2, x3, x4, x5) = U4_GGGA(x5) U5_GGGA(x1, x2, x3, x4) = U5_GGGA(x2, x3, x4) U6_GGGA(x1, x2, x3, x4) = U6_GGGA(x3, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 9 less nodes. ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: LOG2_IN_GGGA(X, s(s(Half)), Acc, Y) -> U3_GGGA(X, Half, Acc, Y, small_in_g(X)) U3_GGGA(X, Half, Acc, Y, small_out_g(X)) -> LOG2_IN_GGGA(Half, s(0), s(Acc), Y) LOG2_IN_GGGA(s(s(X)), Half, Acc, Y) -> LOG2_IN_GGGA(X, s(Half), Acc, Y) The TRS R consists of the following rules: log2_in_ga(X, Y) -> U1_ga(X, Y, log2_in_ggga(X, 0, s(0), Y)) log2_in_ggga(s(s(X)), Half, Acc, Y) -> U2_ggga(X, Half, Acc, Y, log2_in_ggga(X, s(Half), Acc, Y)) log2_in_ggga(X, s(s(Half)), Acc, Y) -> U3_ggga(X, Half, Acc, Y, small_in_g(X)) small_in_g(0) -> small_out_g(0) small_in_g(s(0)) -> small_out_g(s(0)) U3_ggga(X, Half, Acc, Y, small_out_g(X)) -> U4_ggga(X, Half, Acc, Y, log2_in_ggga(Half, s(0), s(Acc), Y)) log2_in_ggga(X, Half, Y, Y) -> U5_ggga(X, Half, Y, small_in_g(X)) U5_ggga(X, Half, Y, small_out_g(X)) -> U6_ggga(X, Half, Y, small_in_g(Half)) U6_ggga(X, Half, Y, small_out_g(Half)) -> log2_out_ggga(X, Half, Y, Y) U4_ggga(X, Half, Acc, Y, log2_out_ggga(Half, s(0), s(Acc), Y)) -> log2_out_ggga(X, s(s(Half)), Acc, Y) U2_ggga(X, Half, Acc, Y, log2_out_ggga(X, s(Half), Acc, Y)) -> log2_out_ggga(s(s(X)), Half, Acc, Y) U1_ga(X, Y, log2_out_ggga(X, 0, s(0), Y)) -> log2_out_ga(X, Y) The argument filtering Pi contains the following mapping: log2_in_ga(x1, x2) = log2_in_ga(x1) U1_ga(x1, x2, x3) = U1_ga(x3) log2_in_ggga(x1, x2, x3, x4) = log2_in_ggga(x1, x2, x3) s(x1) = s(x1) U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x5) U3_ggga(x1, x2, x3, x4, x5) = U3_ggga(x2, x3, x5) small_in_g(x1) = small_in_g(x1) 0 = 0 small_out_g(x1) = small_out_g U4_ggga(x1, x2, x3, x4, x5) = U4_ggga(x5) U5_ggga(x1, x2, x3, x4) = U5_ggga(x2, x3, x4) U6_ggga(x1, x2, x3, x4) = U6_ggga(x3, x4) log2_out_ggga(x1, x2, x3, x4) = log2_out_ggga(x4) log2_out_ga(x1, x2) = log2_out_ga(x2) LOG2_IN_GGGA(x1, x2, x3, x4) = LOG2_IN_GGGA(x1, x2, x3) U3_GGGA(x1, x2, x3, x4, x5) = U3_GGGA(x2, x3, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (8) Obligation: Pi DP problem: The TRS P consists of the following rules: LOG2_IN_GGGA(X, s(s(Half)), Acc, Y) -> U3_GGGA(X, Half, Acc, Y, small_in_g(X)) U3_GGGA(X, Half, Acc, Y, small_out_g(X)) -> LOG2_IN_GGGA(Half, s(0), s(Acc), Y) LOG2_IN_GGGA(s(s(X)), Half, Acc, Y) -> LOG2_IN_GGGA(X, s(Half), Acc, Y) The TRS R consists of the following rules: small_in_g(0) -> small_out_g(0) small_in_g(s(0)) -> small_out_g(s(0)) The argument filtering Pi contains the following mapping: s(x1) = s(x1) small_in_g(x1) = small_in_g(x1) 0 = 0 small_out_g(x1) = small_out_g LOG2_IN_GGGA(x1, x2, x3, x4) = LOG2_IN_GGGA(x1, x2, x3) U3_GGGA(x1, x2, x3, x4, x5) = U3_GGGA(x2, x3, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (9) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: LOG2_IN_GGGA(X, s(s(Half)), Acc) -> U3_GGGA(Half, Acc, small_in_g(X)) U3_GGGA(Half, Acc, small_out_g) -> LOG2_IN_GGGA(Half, s(0), s(Acc)) LOG2_IN_GGGA(s(s(X)), Half, Acc) -> LOG2_IN_GGGA(X, s(Half), Acc) The TRS R consists of the following rules: small_in_g(0) -> small_out_g small_in_g(s(0)) -> small_out_g The set Q consists of the following terms: small_in_g(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (11) MRRProof (EQUIVALENT) By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented. Strictly oriented dependency pairs: U3_GGGA(Half, Acc, small_out_g) -> LOG2_IN_GGGA(Half, s(0), s(Acc)) LOG2_IN_GGGA(s(s(X)), Half, Acc) -> LOG2_IN_GGGA(X, s(Half), Acc) Strictly oriented rules of the TRS R: small_in_g(s(0)) -> small_out_g Used ordering: Polynomial interpretation [POLO]: POL(0) = 0 POL(LOG2_IN_GGGA(x_1, x_2, x_3)) = 2*x_1 + 2*x_2 + x_3 POL(U3_GGGA(x_1, x_2, x_3)) = 2*x_1 + x_2 + 2*x_3 POL(s(x_1)) = 1 + x_1 POL(small_in_g(x_1)) = 2 + x_1 POL(small_out_g) = 2 ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: LOG2_IN_GGGA(X, s(s(Half)), Acc) -> U3_GGGA(Half, Acc, small_in_g(X)) The TRS R consists of the following rules: small_in_g(0) -> small_out_g The set Q consists of the following terms: small_in_g(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (13) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node. ---------------------------------------- (14) TRUE