Develop an interface of the following types
-
Add(nonterm, rightSide), which computes the union of automata if there was such a nonterm, otherwise adds an automaton.
-
Remove(nonterm, rightSide), which calculates the difference.
It is important that the states are preserved, because they are used to reuse the already calculated results. It is wrong to create a new automaton every time.
Develop an interface of the following types
Add(nonterm, rightSide), which computes the union of automata if there was such a nonterm, otherwise adds an automaton.
Remove(nonterm, rightSide), which calculates the difference.
It is important that the states are preserved, because they are used to reuse the already calculated results. It is wrong to create a new automaton every time.