Skip to content

Cprover should have an __enum_in_range primitive #5473

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

Closed
danielsn opened this issue Aug 25, 2020 · 3 comments
Closed

Cprover should have an __enum_in_range primitive #5473

danielsn opened this issue Aug 25, 2020 · 3 comments
Labels
aws Bugs or features of importance to AWS CBMC users new feature

Comments

@danielsn
Copy link
Contributor

It is currently difficult to use the --enum-range-check option, because it is hard to ensure in a harness that an enum is within range. IF there was a
__CPROVER_enum_is_in_range(e) primitive, we could use it like
__CPROVER_assume(__CPROVER_enum_is_in_range(e))
and
assert(__CPROVER_enum_is_in_range(e))

@danielsn danielsn added the aws Bugs or features of importance to AWS CBMC users label Aug 25, 2020
@feliperodri
Copy link
Collaborator

@hannes-steffenhagen-diffblue is there anyone currently working on this issue? Any updates?

@TGWDB
Copy link
Contributor

TGWDB commented Feb 9, 2021

See pull request here.

TGWDB added a commit that referenced this issue Feb 17, 2021
This adds a new builtin function __CPROVER_enum_is_in_range to determine if an enum is one of the valid enum values. This fixes issue 5473: #5473
@TGWDB TGWDB closed this as completed Feb 17, 2021
@TGWDB
Copy link
Contributor

TGWDB commented Feb 17, 2021

Fixed in #5808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users new feature
Projects
None yet
Development

No branches or pull requests

4 participants