removing PRED
authorChengsong
Fri, 15 Mar 2019 10:46:46 +0000
changeset 3 f15dccc42c7b
parent 2 cf169411b771
child 4 7a349fe58bf4
removing PRED why should it still be there after so many rounds of experiments? It should have been removed long ago since its existence will always make the compiler report errors. mysterious.:
Spiral.scala
lex_blex_Frankensteined.scala
--- 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)
--- a/lex_blex_Frankensteined.scala	Wed Mar 13 15:27:09 2019 +0000
+++ b/lex_blex_Frankensteined.scala	Fri Mar 15 10:46:46 2019 +0000
@@ -88,7 +88,7 @@
   }
 
   internalise(("a" | "ab") ~ ("b" | ""))
-
+/*
   def decode_aux(r: Rexp, bs: Bits) : (Val, Bits) = (r, bs) match {
     case (ONE, bs) => (Empty, bs)
     case (PRED(f), C(c)::bs) => (Chr(c), bs)
@@ -125,7 +125,7 @@
     case (v, Nil) => v
     case _ => throw new Exception("Not decodable")
   }
-
+*/
 
   //erase function: extracts the regx from Aregex
   def erase(r:ARexp): Rexp = r match{