minus

fun minus(a1: Automaton, a2: Automaton, determinizeWorkLimit: Int): Automaton

Returns a (deterministic) automaton that accepts the intersection of the language of a1 * and the complement of the language of a2. As a side-effect, the automata may be determinized, if not already deterministic.

Complexity: quadratic in number of states if a2 already deterministic and exponential in number of a2's states otherwise.

Parameters

a1

the initial automaton

a2

the automaton to subtract

determinizeWorkLimit

maximum effort to spend determinizing the automaton. Set higher to allow more complex queries and lower to prevent memory exhaustion. .DEFAULT_DETERMINIZE_WORK_LIMIT is a good starting default.