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

Various minor improvements #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

wilcoxjay
Copy link
Contributor

I have recently developed two small SpaceSearch tools (a Sudoku solver and a automated Hoare logic tool for Imp). This PR collects some library-level improvements to SpaceSearch that I factored out along the way.

Here are the main changes.

  • I moved countUp from the Queens example into the SpaceSearch library, since I needed it in another tool as well. I also refactored it and zCountUp to use a generic list function.
  • I added infix notation for various operations on Int.
  • I added infix notation for Ensemble.In, which I was surprised @konne88 hadn't done yet 😉
  • I improved some of the new tactic automation.
  • I added a new library function called guard, which lifts a predicate (A -> bool) to a monadic arrow A -> Space A by requiring the predicate to hold (returning empty otherwise). I refactored Queens to use this in one place, and I also use it in both my new examples.

This PR is a bit of a smorgasbord. I'm happy to split it up if people don't like certain parts. Feedback welcome!

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

Successfully merging this pull request may close these issues.

1 participant