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

A number of improvements to boolean values & a unit test fwk #841

Merged
merged 7 commits into from
Nov 20, 2021

Conversation

dmlloyd
Copy link
Collaborator

@dmlloyd dmlloyd commented Nov 19, 2021

  • Introduce a general unit test utility
  • Introduce Comp ones-complement node, use it as canonical form for boolean inversion
  • Introduce several transformations to optimize and/or canonicalize boolean forms
  • Allow any value to have a value-if-true/false
  • Front-load InstanceOf value-if-true (allows optimizations to simplify it)
  • Add the start of unit tests for individual optimization transformations using the unit test utility

@dmlloyd
Copy link
Collaborator Author

dmlloyd commented Nov 19, 2021

Looks like it broke in rebase. Will fix after lunch

Some nodes are always boolean-typed, but some are only sometimes boolean-typed but can still contribute reasonable information.
As a follow-up, we will want to devise a merging algorithm which combines constraints and then picks a final input, perhaps adding a `ConstrainEq` for the other input
Also introduce a comprehensive suite of simple boolean reductions and canonicalizations
@dmlloyd
Copy link
Collaborator Author

dmlloyd commented Nov 19, 2021

Fixed

@dmlloyd dmlloyd mentioned this pull request Nov 19, 2021
12 tasks
@dmlloyd dmlloyd changed the title A number of improvements to boolean values A number of improvements to boolean values & a unit test fwk Nov 19, 2021
@dmlloyd dmlloyd merged commit cdfefe0 into qbicc:main Nov 20, 2021
@dmlloyd dmlloyd deleted the bool2 branch November 20, 2021 18:49
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.

None yet

2 participants