progs/thompson.scala
changeset 521 95af9beb4b7f
parent 491 d5776c6018f0
child 586 451a95e1bc25
equal deleted inserted replaced
520:2849c305b12d 521:95af9beb4b7f
   162 
   162 
   163 
   163 
   164 
   164 
   165 // while my thompson-enfa-subset-partial-function-chain
   165 // while my thompson-enfa-subset-partial-function-chain
   166 // is probably not the most effcient way to obtain a fast DFA 
   166 // is probably not the most effcient way to obtain a fast DFA 
   167 // (the below should be much faster with a more direct construction),
   167 // (the test below should be much faster with a more direct 
   168 // in general the DFAs can be slow because of the state explosion
   168 // construction), in general the DFAs can be slow because of 
   169 // in the subset construction
   169 // the state explosion in the subset construction
   170 
   170 
   171 for (i <- 1 to 13) {
   171 for (i <- 1 to 13) {
   172   println(i + ": " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL1(i), "a" * i))))
   172   println(i + ": " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL1(i), "a" * i))))
   173 }
   173 }
   174 
   174