AutomataDotNet / Automata

Automata and transducer library for .NET
Other
79 stars 28 forks source link

Missing timeout propagation in Automaton::Determinize #3

Open davisjam opened 5 years ago

davisjam commented 5 years ago

The API Automaton::Determinize accepts a timeout parameter.

  1. FWIW this parameter is in milliseconds. It would be nice to document that.
  2. The timeout is not propagated recursively when the call to TryDecompose succeeds and d.Determinize() is called. So a regex consisting of a large disjunction exhibits exponential (?) behavior and the requested timeout is ignored.

I can open a PR if interested. The patch seems simple -- add the timeout to the recursive call.