Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Closure operations #15

Open
ksf opened this issue Jul 16, 2012 · 1 comment
Open

Feature request: Closure operations #15

ksf opened this issue Jul 16, 2012 · 1 comment

Comments

@ksf
Copy link

ksf commented Jul 16, 2012

Regular languages are closed under complement, intersection, union and difference (because they're sets) as well as under reversal, it would be great to have those available as they provide much expressive and combinatorial power, intersection probably being the one with most practical use.

Complement is trivial on a DFA, just switch all final states to non-final and vice versa.

Union already exists in the guise of alternation, intersection follows by De Morgan's Law, difference is (intersect a (not b), reversal is reversing all edges of an DFA and switching start and end states (you end up with an NFA, then)

...that's not to say that I think it's trivial to do, though. Doing them on graph-based automata would be two hours worth of work, implementing them for online automata is a different kind of beast.

@ulidtko
Copy link

ulidtko commented Jan 5, 2021

Perhaps the reference and ideas here could be useful for this:
https://hackage.haskell.org/package/regexpr-symbolic-0.5/src/RegExpr/RegExprOperations.lhs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants