# HG changeset patch # User Chengsong # Date 1552748443 0 # Node ID 26b40a9856221deb3477118668eb30332f4360ef # Parent 622ddbb1223a52417a548d11e81a0249955806c5 random test failed on the new simplification function. ("super_blexing_simp") diff -r 622ddbb1223a -r 26b40a985622 Spiral.scala --- a/Spiral.scala Sat Mar 16 14:14:42 2019 +0000 +++ b/Spiral.scala Sat Mar 16 15:00:43 2019 +0000 @@ -214,6 +214,16 @@ case (2, i) => ALTS( List(random_struct_gen(depth - 1), random_struct_gen(depth - 1) ) ) } } + def random_pool(n: Int, d: Int) : Stream[Rexp] = n match { + case 0 => (for (i <- 1 to 10) yield balanced_struct_gen(d)).toStream + case n => { + val rs = random_pool(n - 1, d) + rs #::: + (for (i <- (1 to 10).toStream) yield balanced_struct_gen(d)) #::: + (for (i <- (1 to 10).toStream) yield random_struct_gen(d)) + } + } + def rd_string_gen(alp_size: Int, len: Int): String = { if( len > 0) ((ran.nextInt(alp_size) + 97).toChar).toString + rd_string_gen(alp_size, len - 1) @@ -388,7 +398,9 @@ } def main(args: Array[String]) { //check_all() - enum(3, "abc").map(tests_blexer_simp(strs(3, "abc"))).toSet + //enum(3, "abc").map(tests_blexer_simp(strs(3, "abc"))).toSet + // + random_pool(1, 5).map(tests_blexer_simp(strs(5, "abc"))).toSet //correctness_proof_convenient_path() } }