/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern hidden_flatten(g,a,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) CutEliminatorProof [SOUND, 0 ms] (2) Prolog (3) PrologToPiTRSProof [SOUND, 0 ms] (4) PiTRS (5) DependencyPairsProof [EQUIVALENT, 2 ms] (6) PiDP (7) DependencyGraphProof [EQUIVALENT, 0 ms] (8) PiDP (9) PiDPToQDPProof [SOUND, 12 ms] (10) QDP (11) UsableRulesReductionPairsProof [EQUIVALENT, 17 ms] (12) QDP (13) DependencyGraphProof [EQUIVALENT, 0 ms] (14) TRUE ---------------------------------------- (0) Obligation: Clauses: hidden_flatten([], L, L). hidden_flatten(.(.(H, T), L), S, F) :- ','(!, ','(hidden_flatten(L, S, Lf), hidden_flatten(.(H, T), Lf, F))). hidden_flatten(.(H, T), S, .(H, L)) :- hidden_flatten(T, S, L). Query: hidden_flatten(g,a,a) ---------------------------------------- (1) CutEliminatorProof (SOUND) Eliminated all cuts by simply ignoring them[PROLOG]. ---------------------------------------- (2) Obligation: Clauses: hidden_flatten([], L, L). hidden_flatten(.(.(H, T), L), S, F) :- ','(hidden_flatten(L, S, Lf), hidden_flatten(.(H, T), Lf, F)). hidden_flatten(.(H, T), S, .(H, L)) :- hidden_flatten(T, S, L). Query: hidden_flatten(g,a,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: hidden_flatten_in_3: (b,f,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: hidden_flatten_in_gaa([], L, L) -> hidden_flatten_out_gaa([], L, L) hidden_flatten_in_gaa(.(.(H, T), L), S, F) -> U1_gaa(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) hidden_flatten_in_gaa(.(H, T), S, .(H, L)) -> U3_gaa(H, T, S, L, hidden_flatten_in_gaa(T, S, L)) U3_gaa(H, T, S, L, hidden_flatten_out_gaa(T, S, L)) -> hidden_flatten_out_gaa(.(H, T), S, .(H, L)) U1_gaa(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> U2_gaa(H, T, L, S, F, hidden_flatten_in_gaa(.(H, T), Lf, F)) U2_gaa(H, T, L, S, F, hidden_flatten_out_gaa(.(H, T), Lf, F)) -> hidden_flatten_out_gaa(.(.(H, T), L), S, F) The argument filtering Pi contains the following mapping: hidden_flatten_in_gaa(x1, x2, x3) = hidden_flatten_in_gaa(x1) [] = [] hidden_flatten_out_gaa(x1, x2, x3) = hidden_flatten_out_gaa .(x1, x2) = .(x1, x2) U1_gaa(x1, x2, x3, x4, x5, x6) = U1_gaa(x1, x2, x6) U3_gaa(x1, x2, x3, x4, x5) = U3_gaa(x5) U2_gaa(x1, x2, x3, x4, x5, x6) = U2_gaa(x6) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (4) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: hidden_flatten_in_gaa([], L, L) -> hidden_flatten_out_gaa([], L, L) hidden_flatten_in_gaa(.(.(H, T), L), S, F) -> U1_gaa(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) hidden_flatten_in_gaa(.(H, T), S, .(H, L)) -> U3_gaa(H, T, S, L, hidden_flatten_in_gaa(T, S, L)) U3_gaa(H, T, S, L, hidden_flatten_out_gaa(T, S, L)) -> hidden_flatten_out_gaa(.(H, T), S, .(H, L)) U1_gaa(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> U2_gaa(H, T, L, S, F, hidden_flatten_in_gaa(.(H, T), Lf, F)) U2_gaa(H, T, L, S, F, hidden_flatten_out_gaa(.(H, T), Lf, F)) -> hidden_flatten_out_gaa(.(.(H, T), L), S, F) The argument filtering Pi contains the following mapping: hidden_flatten_in_gaa(x1, x2, x3) = hidden_flatten_in_gaa(x1) [] = [] hidden_flatten_out_gaa(x1, x2, x3) = hidden_flatten_out_gaa .(x1, x2) = .(x1, x2) U1_gaa(x1, x2, x3, x4, x5, x6) = U1_gaa(x1, x2, x6) U3_gaa(x1, x2, x3, x4, x5) = U3_gaa(x5) U2_gaa(x1, x2, x3, x4, x5, x6) = U2_gaa(x6) ---------------------------------------- (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: HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L), S, F) -> U1_GAA(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L), S, F) -> HIDDEN_FLATTEN_IN_GAA(L, S, Lf) HIDDEN_FLATTEN_IN_GAA(.(H, T), S, .(H, L)) -> U3_GAA(H, T, S, L, hidden_flatten_in_gaa(T, S, L)) HIDDEN_FLATTEN_IN_GAA(.(H, T), S, .(H, L)) -> HIDDEN_FLATTEN_IN_GAA(T, S, L) U1_GAA(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> U2_GAA(H, T, L, S, F, hidden_flatten_in_gaa(.(H, T), Lf, F)) U1_GAA(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> HIDDEN_FLATTEN_IN_GAA(.(H, T), Lf, F) The TRS R consists of the following rules: hidden_flatten_in_gaa([], L, L) -> hidden_flatten_out_gaa([], L, L) hidden_flatten_in_gaa(.(.(H, T), L), S, F) -> U1_gaa(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) hidden_flatten_in_gaa(.(H, T), S, .(H, L)) -> U3_gaa(H, T, S, L, hidden_flatten_in_gaa(T, S, L)) U3_gaa(H, T, S, L, hidden_flatten_out_gaa(T, S, L)) -> hidden_flatten_out_gaa(.(H, T), S, .(H, L)) U1_gaa(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> U2_gaa(H, T, L, S, F, hidden_flatten_in_gaa(.(H, T), Lf, F)) U2_gaa(H, T, L, S, F, hidden_flatten_out_gaa(.(H, T), Lf, F)) -> hidden_flatten_out_gaa(.(.(H, T), L), S, F) The argument filtering Pi contains the following mapping: hidden_flatten_in_gaa(x1, x2, x3) = hidden_flatten_in_gaa(x1) [] = [] hidden_flatten_out_gaa(x1, x2, x3) = hidden_flatten_out_gaa .(x1, x2) = .(x1, x2) U1_gaa(x1, x2, x3, x4, x5, x6) = U1_gaa(x1, x2, x6) U3_gaa(x1, x2, x3, x4, x5) = U3_gaa(x5) U2_gaa(x1, x2, x3, x4, x5, x6) = U2_gaa(x6) HIDDEN_FLATTEN_IN_GAA(x1, x2, x3) = HIDDEN_FLATTEN_IN_GAA(x1) U1_GAA(x1, x2, x3, x4, x5, x6) = U1_GAA(x1, x2, x6) U3_GAA(x1, x2, x3, x4, x5) = U3_GAA(x5) U2_GAA(x1, x2, x3, x4, x5, x6) = U2_GAA(x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L), S, F) -> U1_GAA(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L), S, F) -> HIDDEN_FLATTEN_IN_GAA(L, S, Lf) HIDDEN_FLATTEN_IN_GAA(.(H, T), S, .(H, L)) -> U3_GAA(H, T, S, L, hidden_flatten_in_gaa(T, S, L)) HIDDEN_FLATTEN_IN_GAA(.(H, T), S, .(H, L)) -> HIDDEN_FLATTEN_IN_GAA(T, S, L) U1_GAA(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> U2_GAA(H, T, L, S, F, hidden_flatten_in_gaa(.(H, T), Lf, F)) U1_GAA(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> HIDDEN_FLATTEN_IN_GAA(.(H, T), Lf, F) The TRS R consists of the following rules: hidden_flatten_in_gaa([], L, L) -> hidden_flatten_out_gaa([], L, L) hidden_flatten_in_gaa(.(.(H, T), L), S, F) -> U1_gaa(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) hidden_flatten_in_gaa(.(H, T), S, .(H, L)) -> U3_gaa(H, T, S, L, hidden_flatten_in_gaa(T, S, L)) U3_gaa(H, T, S, L, hidden_flatten_out_gaa(T, S, L)) -> hidden_flatten_out_gaa(.(H, T), S, .(H, L)) U1_gaa(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> U2_gaa(H, T, L, S, F, hidden_flatten_in_gaa(.(H, T), Lf, F)) U2_gaa(H, T, L, S, F, hidden_flatten_out_gaa(.(H, T), Lf, F)) -> hidden_flatten_out_gaa(.(.(H, T), L), S, F) The argument filtering Pi contains the following mapping: hidden_flatten_in_gaa(x1, x2, x3) = hidden_flatten_in_gaa(x1) [] = [] hidden_flatten_out_gaa(x1, x2, x3) = hidden_flatten_out_gaa .(x1, x2) = .(x1, x2) U1_gaa(x1, x2, x3, x4, x5, x6) = U1_gaa(x1, x2, x6) U3_gaa(x1, x2, x3, x4, x5) = U3_gaa(x5) U2_gaa(x1, x2, x3, x4, x5, x6) = U2_gaa(x6) HIDDEN_FLATTEN_IN_GAA(x1, x2, x3) = HIDDEN_FLATTEN_IN_GAA(x1) U1_GAA(x1, x2, x3, x4, x5, x6) = U1_GAA(x1, x2, x6) U3_GAA(x1, x2, x3, x4, x5) = U3_GAA(x5) U2_GAA(x1, x2, x3, x4, x5, x6) = U2_GAA(x6) 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_GAA(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> HIDDEN_FLATTEN_IN_GAA(.(H, T), Lf, F) HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L), S, F) -> U1_GAA(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L), S, F) -> HIDDEN_FLATTEN_IN_GAA(L, S, Lf) HIDDEN_FLATTEN_IN_GAA(.(H, T), S, .(H, L)) -> HIDDEN_FLATTEN_IN_GAA(T, S, L) The TRS R consists of the following rules: hidden_flatten_in_gaa([], L, L) -> hidden_flatten_out_gaa([], L, L) hidden_flatten_in_gaa(.(.(H, T), L), S, F) -> U1_gaa(H, T, L, S, F, hidden_flatten_in_gaa(L, S, Lf)) hidden_flatten_in_gaa(.(H, T), S, .(H, L)) -> U3_gaa(H, T, S, L, hidden_flatten_in_gaa(T, S, L)) U3_gaa(H, T, S, L, hidden_flatten_out_gaa(T, S, L)) -> hidden_flatten_out_gaa(.(H, T), S, .(H, L)) U1_gaa(H, T, L, S, F, hidden_flatten_out_gaa(L, S, Lf)) -> U2_gaa(H, T, L, S, F, hidden_flatten_in_gaa(.(H, T), Lf, F)) U2_gaa(H, T, L, S, F, hidden_flatten_out_gaa(.(H, T), Lf, F)) -> hidden_flatten_out_gaa(.(.(H, T), L), S, F) The argument filtering Pi contains the following mapping: hidden_flatten_in_gaa(x1, x2, x3) = hidden_flatten_in_gaa(x1) [] = [] hidden_flatten_out_gaa(x1, x2, x3) = hidden_flatten_out_gaa .(x1, x2) = .(x1, x2) U1_gaa(x1, x2, x3, x4, x5, x6) = U1_gaa(x1, x2, x6) U3_gaa(x1, x2, x3, x4, x5) = U3_gaa(x5) U2_gaa(x1, x2, x3, x4, x5, x6) = U2_gaa(x6) HIDDEN_FLATTEN_IN_GAA(x1, x2, x3) = HIDDEN_FLATTEN_IN_GAA(x1) U1_GAA(x1, x2, x3, x4, x5, x6) = U1_GAA(x1, x2, x6) 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: U1_GAA(H, T, hidden_flatten_out_gaa) -> HIDDEN_FLATTEN_IN_GAA(.(H, T)) HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L)) -> U1_GAA(H, T, hidden_flatten_in_gaa(L)) HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L)) -> HIDDEN_FLATTEN_IN_GAA(L) HIDDEN_FLATTEN_IN_GAA(.(H, T)) -> HIDDEN_FLATTEN_IN_GAA(T) The TRS R consists of the following rules: hidden_flatten_in_gaa([]) -> hidden_flatten_out_gaa hidden_flatten_in_gaa(.(.(H, T), L)) -> U1_gaa(H, T, hidden_flatten_in_gaa(L)) hidden_flatten_in_gaa(.(H, T)) -> U3_gaa(hidden_flatten_in_gaa(T)) U3_gaa(hidden_flatten_out_gaa) -> hidden_flatten_out_gaa U1_gaa(H, T, hidden_flatten_out_gaa) -> U2_gaa(hidden_flatten_in_gaa(.(H, T))) U2_gaa(hidden_flatten_out_gaa) -> hidden_flatten_out_gaa The set Q consists of the following terms: hidden_flatten_in_gaa(x0) U3_gaa(x0) U1_gaa(x0, x1, x2) U2_gaa(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (11) 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. The following dependency pairs can be deleted: HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L)) -> U1_GAA(H, T, hidden_flatten_in_gaa(L)) HIDDEN_FLATTEN_IN_GAA(.(.(H, T), L)) -> HIDDEN_FLATTEN_IN_GAA(L) HIDDEN_FLATTEN_IN_GAA(.(H, T)) -> HIDDEN_FLATTEN_IN_GAA(T) The following rules are removed from R: hidden_flatten_in_gaa([]) -> hidden_flatten_out_gaa hidden_flatten_in_gaa(.(.(H, T), L)) -> U1_gaa(H, T, hidden_flatten_in_gaa(L)) hidden_flatten_in_gaa(.(H, T)) -> U3_gaa(hidden_flatten_in_gaa(T)) U3_gaa(hidden_flatten_out_gaa) -> hidden_flatten_out_gaa U2_gaa(hidden_flatten_out_gaa) -> hidden_flatten_out_gaa Used ordering: POLO with Polynomial interpretation [POLO]: POL(.(x_1, x_2)) = 2 + 2*x_1 + 2*x_2 POL(HIDDEN_FLATTEN_IN_GAA(x_1)) = x_1 POL(U1_GAA(x_1, x_2, x_3)) = 2*x_1 + 2*x_2 + x_3 POL(U1_gaa(x_1, x_2, x_3)) = 2*x_1 + 2*x_2 + 2*x_3 POL(U2_gaa(x_1)) = 2 + x_1 POL(U3_gaa(x_1)) = 2*x_1 POL([]) = 2 POL(hidden_flatten_in_gaa(x_1)) = x_1 POL(hidden_flatten_out_gaa) = 2 ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: U1_GAA(H, T, hidden_flatten_out_gaa) -> HIDDEN_FLATTEN_IN_GAA(.(H, T)) The TRS R consists of the following rules: U1_gaa(H, T, hidden_flatten_out_gaa) -> U2_gaa(hidden_flatten_in_gaa(.(H, T))) The set Q consists of the following terms: hidden_flatten_in_gaa(x0) U3_gaa(x0) U1_gaa(x0, x1, x2) U2_gaa(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