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: search for laws with a specific shape #55

Open
isovector opened this issue Jun 25, 2020 · 0 comments
Open

Feature request: search for laws with a specific shape #55

isovector opened this issue Jun 25, 2020 · 0 comments

Comments

@isovector
Copy link
Contributor

When using quickspec to find laws useful for optimization, it's helpful to look for laws only of a particular shape.

For example, my both function grows quickly in the size of its argument. I'd like to be able to find ways of distributing other combinators through it. Quickspec will happily find lots of laws for both:

...
 22. choose x (both y (star y)) = both (star y) (choose x y)
 23. both (char x) (lookahead (char y)) = both (char x) (char y)
 24. star (both x (star (char y))) = star (both x (optional (char y)))
 25. both (cat x y) (cat x z) = cat x (both y z)
 26. both (cat x x) (cat y x) = cat (both x y) x
 27. both (cat x y) (choose z y) = both (optional z) (cat x y)
 28. choose (both x y) (both x z) = both x (choose y z)
 29. both x (cat (both x y) z) = cat (both x y) z
...

of particular interest here are 23 and 25 because they simplify arguments to both. Unfortunately, they are awash in a million other laws for both, which makes it hard to skim for these ones.

I'd be amazing to have a way to have QuickSpec help me find laws like these more easily.

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

No branches or pull requests

1 participant