Spiral.scala
changeset 3 f15dccc42c7b
parent 2 cf169411b771
child 4 7a349fe58bf4
--- a/Spiral.scala	Wed Mar 13 15:27:09 2019 +0000
+++ b/Spiral.scala	Fri Mar 15 10:46:46 2019 +0000
@@ -289,9 +289,10 @@
       val simp_res = br_simp(der_res)
       val anatomy = bspill(simp_res)
       //track if the number of regular expressions exceeds those in the PD set(remember PD means the pders over A*)
-      if(f(anatomy, pd)  == false){
+      if(f(anatomy, pd)  == false || i == 1){
         println(size(berase(syncsimp_res)))
         println(size(berase(simp_res)))
+        println(bregx_tree(simp_res))
         println(anatomy.map(size).sum)
         println(pd.map(size).sum)
       }  
@@ -315,7 +316,7 @@
   def check_all(){
     for(i <- 1 to 1)
     {
-        val s = "bbb"//rd_string_gen(alphabet_size, 5)//"ac"//rd_string_gen(alphabet_size, 5)
+        val s = "bb"//rd_string_gen(alphabet_size, 5)//"ac"//rd_string_gen(alphabet_size, 5)
         val r = STAR(STAR(ALTS(List(SEQ(CHAR('b'),CHAR('b')), ALTS(List(CHAR('a'), CHAR('b')))))))//balanced_struct_gen(4)//SEQ(ALTS(List(STAR("a"),ALTS(List("a","c")))),SEQ(ALTS(List("c","a")),ALTS(List("c","b")))) //random_struct_gen(7)
         //subset_check(r, s)
         weak_sub_check(r, s, 5, size_expansion_rate)