/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 test_fun(g,g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) UndefinedPredicateHandlerProof [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) TRUE ---------------------------------------- (0) Obligation: Clauses: test_fun(X, Y) :- loop(X, Y, 0). loop(X, Y, C) :- ','(>(X, 1), ','(<(X, Y), ','(is(X1, *(X, X)), ','(is(C1, +(C, 1)), loop(X1, C1))))). loop(X, Y, C) :- =<(X, 1). loop(X, Y, C) :- >=(X, 100). Query: test_fun(g,g) ---------------------------------------- (1) UndefinedPredicateHandlerProof (SOUND) Added facts for all undefined predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: test_fun(X, Y) :- loop(X, Y, 0). loop(X, Y, C) :- ','(>(X, 1), ','(<(X, Y), ','(is(X1, *(X, X)), ','(is(C1, +(C, 1)), loop(X1, C1))))). loop(X, Y, C) :- =<(X, 1). loop(X, Y, C) :- >=(X, 100). >(X0, X1). <(X0, X1). is(X0, X1). loop(X0, X1). =<(X0, X1). >=(X0, X1). Query: test_fun(g,g) ---------------------------------------- (3) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: test_fun_in_2: (b,b) loop_in_3: (b,b,b) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: test_fun_in_gg(X, Y) -> U1_gg(X, Y, loop_in_ggg(X, Y, 0)) loop_in_ggg(X, Y, C) -> U2_ggg(X, Y, C, >_in_gg(X, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_ggg(X, Y, C, >_out_gg(X, 1)) -> U3_ggg(X, Y, C, <_in_gg(X, Y)) <_in_gg(X0, X1) -> <_out_gg(X0, X1) U3_ggg(X, Y, C, <_out_gg(X, Y)) -> U4_ggg(X, Y, C, is_in_ag(X1, *(X, X))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U4_ggg(X, Y, C, is_out_ag(X1, *(X, X))) -> U5_ggg(X, Y, C, X1, is_in_ag(C1, +(C, 1))) U5_ggg(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> U6_ggg(X, Y, C, loop_in_aa(X1, C1)) loop_in_aa(X0, X1) -> loop_out_aa(X0, X1) U6_ggg(X, Y, C, loop_out_aa(X1, C1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U7_ggg(X, Y, C, =<_in_gg(X, 1)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U7_ggg(X, Y, C, =<_out_gg(X, 1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U8_ggg(X, Y, C, >=_in_gg(X, 100)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U8_ggg(X, Y, C, >=_out_gg(X, 100)) -> loop_out_ggg(X, Y, C) U1_gg(X, Y, loop_out_ggg(X, Y, 0)) -> test_fun_out_gg(X, Y) The argument filtering Pi contains the following mapping: test_fun_in_gg(x1, x2) = test_fun_in_gg(x1, x2) U1_gg(x1, x2, x3) = U1_gg(x3) loop_in_ggg(x1, x2, x3) = loop_in_ggg(x1, x2, x3) U2_ggg(x1, x2, x3, x4) = U2_ggg(x1, x2, x3, x4) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg 1 = 1 U3_ggg(x1, x2, x3, x4) = U3_ggg(x1, x3, x4) <_in_gg(x1, x2) = <_in_gg(x1, x2) <_out_gg(x1, x2) = <_out_gg U4_ggg(x1, x2, x3, x4) = U4_ggg(x3, x4) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag *(x1, x2) = *(x1, x2) U5_ggg(x1, x2, x3, x4, x5) = U5_ggg(x5) +(x1, x2) = +(x1, x2) U6_ggg(x1, x2, x3, x4) = U6_ggg(x4) loop_in_aa(x1, x2) = loop_in_aa loop_out_aa(x1, x2) = loop_out_aa loop_out_ggg(x1, x2, x3) = loop_out_ggg U7_ggg(x1, x2, x3, x4) = U7_ggg(x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U8_ggg(x1, x2, x3, x4) = U8_ggg(x4) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 100 = 100 0 = 0 test_fun_out_gg(x1, x2) = test_fun_out_gg Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (4) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: test_fun_in_gg(X, Y) -> U1_gg(X, Y, loop_in_ggg(X, Y, 0)) loop_in_ggg(X, Y, C) -> U2_ggg(X, Y, C, >_in_gg(X, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_ggg(X, Y, C, >_out_gg(X, 1)) -> U3_ggg(X, Y, C, <_in_gg(X, Y)) <_in_gg(X0, X1) -> <_out_gg(X0, X1) U3_ggg(X, Y, C, <_out_gg(X, Y)) -> U4_ggg(X, Y, C, is_in_ag(X1, *(X, X))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U4_ggg(X, Y, C, is_out_ag(X1, *(X, X))) -> U5_ggg(X, Y, C, X1, is_in_ag(C1, +(C, 1))) U5_ggg(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> U6_ggg(X, Y, C, loop_in_aa(X1, C1)) loop_in_aa(X0, X1) -> loop_out_aa(X0, X1) U6_ggg(X, Y, C, loop_out_aa(X1, C1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U7_ggg(X, Y, C, =<_in_gg(X, 1)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U7_ggg(X, Y, C, =<_out_gg(X, 1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U8_ggg(X, Y, C, >=_in_gg(X, 100)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U8_ggg(X, Y, C, >=_out_gg(X, 100)) -> loop_out_ggg(X, Y, C) U1_gg(X, Y, loop_out_ggg(X, Y, 0)) -> test_fun_out_gg(X, Y) The argument filtering Pi contains the following mapping: test_fun_in_gg(x1, x2) = test_fun_in_gg(x1, x2) U1_gg(x1, x2, x3) = U1_gg(x3) loop_in_ggg(x1, x2, x3) = loop_in_ggg(x1, x2, x3) U2_ggg(x1, x2, x3, x4) = U2_ggg(x1, x2, x3, x4) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg 1 = 1 U3_ggg(x1, x2, x3, x4) = U3_ggg(x1, x3, x4) <_in_gg(x1, x2) = <_in_gg(x1, x2) <_out_gg(x1, x2) = <_out_gg U4_ggg(x1, x2, x3, x4) = U4_ggg(x3, x4) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag *(x1, x2) = *(x1, x2) U5_ggg(x1, x2, x3, x4, x5) = U5_ggg(x5) +(x1, x2) = +(x1, x2) U6_ggg(x1, x2, x3, x4) = U6_ggg(x4) loop_in_aa(x1, x2) = loop_in_aa loop_out_aa(x1, x2) = loop_out_aa loop_out_ggg(x1, x2, x3) = loop_out_ggg U7_ggg(x1, x2, x3, x4) = U7_ggg(x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U8_ggg(x1, x2, x3, x4) = U8_ggg(x4) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 100 = 100 0 = 0 test_fun_out_gg(x1, x2) = test_fun_out_gg ---------------------------------------- (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: TEST_FUN_IN_GG(X, Y) -> U1_GG(X, Y, loop_in_ggg(X, Y, 0)) TEST_FUN_IN_GG(X, Y) -> LOOP_IN_GGG(X, Y, 0) LOOP_IN_GGG(X, Y, C) -> U2_GGG(X, Y, C, >_in_gg(X, 1)) LOOP_IN_GGG(X, Y, C) -> >_IN_GG(X, 1) U2_GGG(X, Y, C, >_out_gg(X, 1)) -> U3_GGG(X, Y, C, <_in_gg(X, Y)) U2_GGG(X, Y, C, >_out_gg(X, 1)) -> <_IN_GG(X, Y) U3_GGG(X, Y, C, <_out_gg(X, Y)) -> U4_GGG(X, Y, C, is_in_ag(X1, *(X, X))) U3_GGG(X, Y, C, <_out_gg(X, Y)) -> IS_IN_AG(X1, *(X, X)) U4_GGG(X, Y, C, is_out_ag(X1, *(X, X))) -> U5_GGG(X, Y, C, X1, is_in_ag(C1, +(C, 1))) U4_GGG(X, Y, C, is_out_ag(X1, *(X, X))) -> IS_IN_AG(C1, +(C, 1)) U5_GGG(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> U6_GGG(X, Y, C, loop_in_aa(X1, C1)) U5_GGG(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> LOOP_IN_AA(X1, C1) LOOP_IN_GGG(X, Y, C) -> U7_GGG(X, Y, C, =<_in_gg(X, 1)) LOOP_IN_GGG(X, Y, C) -> =<_IN_GG(X, 1) LOOP_IN_GGG(X, Y, C) -> U8_GGG(X, Y, C, >=_in_gg(X, 100)) LOOP_IN_GGG(X, Y, C) -> >=_IN_GG(X, 100) The TRS R consists of the following rules: test_fun_in_gg(X, Y) -> U1_gg(X, Y, loop_in_ggg(X, Y, 0)) loop_in_ggg(X, Y, C) -> U2_ggg(X, Y, C, >_in_gg(X, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_ggg(X, Y, C, >_out_gg(X, 1)) -> U3_ggg(X, Y, C, <_in_gg(X, Y)) <_in_gg(X0, X1) -> <_out_gg(X0, X1) U3_ggg(X, Y, C, <_out_gg(X, Y)) -> U4_ggg(X, Y, C, is_in_ag(X1, *(X, X))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U4_ggg(X, Y, C, is_out_ag(X1, *(X, X))) -> U5_ggg(X, Y, C, X1, is_in_ag(C1, +(C, 1))) U5_ggg(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> U6_ggg(X, Y, C, loop_in_aa(X1, C1)) loop_in_aa(X0, X1) -> loop_out_aa(X0, X1) U6_ggg(X, Y, C, loop_out_aa(X1, C1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U7_ggg(X, Y, C, =<_in_gg(X, 1)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U7_ggg(X, Y, C, =<_out_gg(X, 1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U8_ggg(X, Y, C, >=_in_gg(X, 100)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U8_ggg(X, Y, C, >=_out_gg(X, 100)) -> loop_out_ggg(X, Y, C) U1_gg(X, Y, loop_out_ggg(X, Y, 0)) -> test_fun_out_gg(X, Y) The argument filtering Pi contains the following mapping: test_fun_in_gg(x1, x2) = test_fun_in_gg(x1, x2) U1_gg(x1, x2, x3) = U1_gg(x3) loop_in_ggg(x1, x2, x3) = loop_in_ggg(x1, x2, x3) U2_ggg(x1, x2, x3, x4) = U2_ggg(x1, x2, x3, x4) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg 1 = 1 U3_ggg(x1, x2, x3, x4) = U3_ggg(x1, x3, x4) <_in_gg(x1, x2) = <_in_gg(x1, x2) <_out_gg(x1, x2) = <_out_gg U4_ggg(x1, x2, x3, x4) = U4_ggg(x3, x4) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag *(x1, x2) = *(x1, x2) U5_ggg(x1, x2, x3, x4, x5) = U5_ggg(x5) +(x1, x2) = +(x1, x2) U6_ggg(x1, x2, x3, x4) = U6_ggg(x4) loop_in_aa(x1, x2) = loop_in_aa loop_out_aa(x1, x2) = loop_out_aa loop_out_ggg(x1, x2, x3) = loop_out_ggg U7_ggg(x1, x2, x3, x4) = U7_ggg(x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U8_ggg(x1, x2, x3, x4) = U8_ggg(x4) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 100 = 100 0 = 0 test_fun_out_gg(x1, x2) = test_fun_out_gg TEST_FUN_IN_GG(x1, x2) = TEST_FUN_IN_GG(x1, x2) U1_GG(x1, x2, x3) = U1_GG(x3) LOOP_IN_GGG(x1, x2, x3) = LOOP_IN_GGG(x1, x2, x3) U2_GGG(x1, x2, x3, x4) = U2_GGG(x1, x2, x3, x4) >_IN_GG(x1, x2) = >_IN_GG(x1, x2) U3_GGG(x1, x2, x3, x4) = U3_GGG(x1, x3, x4) <_IN_GG(x1, x2) = <_IN_GG(x1, x2) U4_GGG(x1, x2, x3, x4) = U4_GGG(x3, x4) IS_IN_AG(x1, x2) = IS_IN_AG(x2) U5_GGG(x1, x2, x3, x4, x5) = U5_GGG(x5) U6_GGG(x1, x2, x3, x4) = U6_GGG(x4) LOOP_IN_AA(x1, x2) = LOOP_IN_AA U7_GGG(x1, x2, x3, x4) = U7_GGG(x4) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U8_GGG(x1, x2, x3, x4) = U8_GGG(x4) >=_IN_GG(x1, x2) = >=_IN_GG(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: TEST_FUN_IN_GG(X, Y) -> U1_GG(X, Y, loop_in_ggg(X, Y, 0)) TEST_FUN_IN_GG(X, Y) -> LOOP_IN_GGG(X, Y, 0) LOOP_IN_GGG(X, Y, C) -> U2_GGG(X, Y, C, >_in_gg(X, 1)) LOOP_IN_GGG(X, Y, C) -> >_IN_GG(X, 1) U2_GGG(X, Y, C, >_out_gg(X, 1)) -> U3_GGG(X, Y, C, <_in_gg(X, Y)) U2_GGG(X, Y, C, >_out_gg(X, 1)) -> <_IN_GG(X, Y) U3_GGG(X, Y, C, <_out_gg(X, Y)) -> U4_GGG(X, Y, C, is_in_ag(X1, *(X, X))) U3_GGG(X, Y, C, <_out_gg(X, Y)) -> IS_IN_AG(X1, *(X, X)) U4_GGG(X, Y, C, is_out_ag(X1, *(X, X))) -> U5_GGG(X, Y, C, X1, is_in_ag(C1, +(C, 1))) U4_GGG(X, Y, C, is_out_ag(X1, *(X, X))) -> IS_IN_AG(C1, +(C, 1)) U5_GGG(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> U6_GGG(X, Y, C, loop_in_aa(X1, C1)) U5_GGG(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> LOOP_IN_AA(X1, C1) LOOP_IN_GGG(X, Y, C) -> U7_GGG(X, Y, C, =<_in_gg(X, 1)) LOOP_IN_GGG(X, Y, C) -> =<_IN_GG(X, 1) LOOP_IN_GGG(X, Y, C) -> U8_GGG(X, Y, C, >=_in_gg(X, 100)) LOOP_IN_GGG(X, Y, C) -> >=_IN_GG(X, 100) The TRS R consists of the following rules: test_fun_in_gg(X, Y) -> U1_gg(X, Y, loop_in_ggg(X, Y, 0)) loop_in_ggg(X, Y, C) -> U2_ggg(X, Y, C, >_in_gg(X, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_ggg(X, Y, C, >_out_gg(X, 1)) -> U3_ggg(X, Y, C, <_in_gg(X, Y)) <_in_gg(X0, X1) -> <_out_gg(X0, X1) U3_ggg(X, Y, C, <_out_gg(X, Y)) -> U4_ggg(X, Y, C, is_in_ag(X1, *(X, X))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U4_ggg(X, Y, C, is_out_ag(X1, *(X, X))) -> U5_ggg(X, Y, C, X1, is_in_ag(C1, +(C, 1))) U5_ggg(X, Y, C, X1, is_out_ag(C1, +(C, 1))) -> U6_ggg(X, Y, C, loop_in_aa(X1, C1)) loop_in_aa(X0, X1) -> loop_out_aa(X0, X1) U6_ggg(X, Y, C, loop_out_aa(X1, C1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U7_ggg(X, Y, C, =<_in_gg(X, 1)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U7_ggg(X, Y, C, =<_out_gg(X, 1)) -> loop_out_ggg(X, Y, C) loop_in_ggg(X, Y, C) -> U8_ggg(X, Y, C, >=_in_gg(X, 100)) >=_in_gg(X0, X1) -> >=_out_gg(X0, X1) U8_ggg(X, Y, C, >=_out_gg(X, 100)) -> loop_out_ggg(X, Y, C) U1_gg(X, Y, loop_out_ggg(X, Y, 0)) -> test_fun_out_gg(X, Y) The argument filtering Pi contains the following mapping: test_fun_in_gg(x1, x2) = test_fun_in_gg(x1, x2) U1_gg(x1, x2, x3) = U1_gg(x3) loop_in_ggg(x1, x2, x3) = loop_in_ggg(x1, x2, x3) U2_ggg(x1, x2, x3, x4) = U2_ggg(x1, x2, x3, x4) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg 1 = 1 U3_ggg(x1, x2, x3, x4) = U3_ggg(x1, x3, x4) <_in_gg(x1, x2) = <_in_gg(x1, x2) <_out_gg(x1, x2) = <_out_gg U4_ggg(x1, x2, x3, x4) = U4_ggg(x3, x4) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag *(x1, x2) = *(x1, x2) U5_ggg(x1, x2, x3, x4, x5) = U5_ggg(x5) +(x1, x2) = +(x1, x2) U6_ggg(x1, x2, x3, x4) = U6_ggg(x4) loop_in_aa(x1, x2) = loop_in_aa loop_out_aa(x1, x2) = loop_out_aa loop_out_ggg(x1, x2, x3) = loop_out_ggg U7_ggg(x1, x2, x3, x4) = U7_ggg(x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U8_ggg(x1, x2, x3, x4) = U8_ggg(x4) >=_in_gg(x1, x2) = >=_in_gg(x1, x2) >=_out_gg(x1, x2) = >=_out_gg 100 = 100 0 = 0 test_fun_out_gg(x1, x2) = test_fun_out_gg TEST_FUN_IN_GG(x1, x2) = TEST_FUN_IN_GG(x1, x2) U1_GG(x1, x2, x3) = U1_GG(x3) LOOP_IN_GGG(x1, x2, x3) = LOOP_IN_GGG(x1, x2, x3) U2_GGG(x1, x2, x3, x4) = U2_GGG(x1, x2, x3, x4) >_IN_GG(x1, x2) = >_IN_GG(x1, x2) U3_GGG(x1, x2, x3, x4) = U3_GGG(x1, x3, x4) <_IN_GG(x1, x2) = <_IN_GG(x1, x2) U4_GGG(x1, x2, x3, x4) = U4_GGG(x3, x4) IS_IN_AG(x1, x2) = IS_IN_AG(x2) U5_GGG(x1, x2, x3, x4, x5) = U5_GGG(x5) U6_GGG(x1, x2, x3, x4) = U6_GGG(x4) LOOP_IN_AA(x1, x2) = LOOP_IN_AA U7_GGG(x1, x2, x3, x4) = U7_GGG(x4) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U8_GGG(x1, x2, x3, x4) = U8_GGG(x4) >=_IN_GG(x1, x2) = >=_IN_GG(x1, x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 0 SCCs with 16 less nodes. ---------------------------------------- (8) TRUE