string generation loops for patterns like "(.){0,2}"
miniHive opened this issue · 2 comments
miniHive commented
Hi,
we love working with Brics, but we came across this issue:
Given the pattern (.){0,2}, Brics correctly produces the automaton a:
initial state: 2
state 0 [accept]:
\u0000-\uffff -> 1
state 1 [accept]:
state 2 [accept]:
\u0000-\uffff -> 0
However, calling SpecialOperations.getFiniteStrings(a)
enters an infitite loop.
Thanks,
Stefanie
amoeller commented
Are you sure? The language of the automaton in your example contains 4295032833 strings, so if you let the program run, it will probably result in an OutOfMemoryError at some point.
miniHive commented
Thank you for clarifying. I had not realized that the solution space is so large.