--- a/progs/re3.scala Wed Oct 11 14:33:13 2017 +0100
+++ b/progs/re3.scala Sun Oct 15 20:47:14 2017 +0100
@@ -74,7 +74,7 @@
// Test Cases
//evil regular expressions
-def EVIL1(n: Int) = SEQ(NTIMES(OPT(CHAR('a')), n), NTIMES(CHAR('a'), n))
+def EVIL1(n: Int) = SEQ(NTIMEemacs re3S(OPT(CHAR('a')), n), NTIMES(CHAR('a'), n))
val EVIL2 = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
@@ -87,11 +87,11 @@
//test: (a?{n}) (a{n})
-for (i <- 1 to 11001 by 1000) {
+for (i <- 1 to 8001 by 1000) {
println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i))))
}
-for (i <- 1 to 11001 by 1000) {
+for (i <- 1 to 8001 by 1000) {
println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL1(i), "a" * i))))
}
--- a/progs/re3a.scala Wed Oct 11 14:33:13 2017 +0100
+++ b/progs/re3a.scala Sun Oct 15 20:47:14 2017 +0100
@@ -94,11 +94,11 @@
}
//test: (a*)* b
-for (i <- 1 to 5000001 by 500000) {
+for (i <- 1 to 6000001 by 500000) {
println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL2, "a" * i))))
}
-for (i <- 1 to 5000001 by 500000) {
+for (i <- 1 to 6000001 by 500000) {
println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL2, "a" * i))))
}
@@ -112,7 +112,9 @@
val r6 = simp(der('a', r5))
//test: (a|aa)* b
+/*
for (i <- 1 to 7001 by 500) {
println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL3, "a" * i ++ "c"))))
}
+ */