Partial.scala
changeset 92 aaa2f2b52baf
parent 0 902326e1615a
--- a/Partial.scala	Mon Nov 11 17:37:24 2019 +0000
+++ b/Partial.scala	Wed Nov 27 14:15:00 2019 +0000
@@ -91,10 +91,10 @@
     }
   }
   def comp(s: List[Char], t: Rexp) = {
-    //var r = internalise(t)
-    //var setr = Set(t)
+    var r = internalise(t)
+    var setr = Set(t)
     
-    /*for(i <- 0 to s.length - 1){
+    for(i <- 0 to s.length - 1){
       val mamaipi = bsimp(bder(s(i), r))
       val mamaimapi = pdps(List(s(i)), setr)
       //compare dersimp and pder w.r.t each character in string s
@@ -105,12 +105,12 @@
       mamaimapi.foreach(m => println(regx_tree(m)))
       r = mamaipi
       setr = mamaimapi 
-    }*/
+    }
     for(i <- 1 to 10)
       println(pderas(Set(t), i).size, i)
-    //val alphabet_star_t = pderas(Set(t), 10)
-    //println("all possible elements in pder (probably...): ")
-    //alphabet_star_t.foreach(r => println(regx_tree(r)))
+    val alphabet_star_t = pderas(Set(t), 10)
+    println("all possible elements in pder (probably...): ")
+    alphabet_star_t.foreach(r => println(regx_tree(r)))
   }
 }
 /*    val delta = lfs(t).map(mon => mon._2)