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

SE: add symbolic engine support for Boolean constraints #5380

Closed
costin-zaharia-sonarsource opened this issue Feb 10, 2022 · 1 comment · Fixed by #5390
Closed

SE: add symbolic engine support for Boolean constraints #5380

costin-zaharia-sonarsource opened this issue Feb 10, 2022 · 1 comment · Fixed by #5390
Assignees
Labels
Area: CFG/SE CFG and SE related issues.
Milestone

Comments

@costin-zaharia-sonarsource
Copy link
Member

costin-zaharia-sonarsource commented Feb 10, 2022

The engine should automatically add True or False constraints for symbols and operations which can be evaluated as True or False. E.g.:

  • literals: true and false like in new Mutex(true)
  • simple equality checks: 1 == 1
@pavel-mikula-sonarsource
Copy link
Contributor

The 1 == 1 should work by checking every operation to see if .ConstantValue is true/false. It should also work for cases like

const int zero = 0;
var b = zero == 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CFG/SE CFG and SE related issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants