diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Lib.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -209,6 +209,8 @@ chars n = in map (1 :) r ++ map (0 :) r minimize :: (Ord a) => Integer -> NFA [Int] a -> NFA [Int] a -minimize n nfa@(NFA _ starts accepts f) = NFA states' starts accepts f +minimize n nfa@(NFA _ starts accepts f) = NFA states' starts' accepts' f where states' = closure nfa (chars n) starts + starts' = starts `L.intersect` states' + accepts' = accepts `L.intersect` states' |