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

Add more documentation for Enums #140

Open
qzcx opened this issue Dec 30, 2021 · 1 comment
Open

Add more documentation for Enums #140

qzcx opened this issue Dec 30, 2021 · 1 comment

Comments

@qzcx
Copy link

qzcx commented Dec 30, 2021

It would be nice to have more documentation around the enum type. The minimal example given doesn't have any constraints.

Questions I have:

  • What is the proper way to constraint enums using range or weighted constraints?
  • How to use enum to constrain other variables (implies, if_else, ect)
  • What is the purpose of enum_t?

A coworker played with enums for a while, but had trouble getting constraints to work properly so he switched to using rand_bit_t and constraining by enum value instead. I need to get a bug example from him to file, but would love some clarification in the documentation on the intended usage.

@qzcx
Copy link
Author

qzcx commented Dec 30, 2021

It looks like my coworker was using enum_t instead of rand_enum_t.

The solve failure from doing this isn't clear at all even with solve_fail_debug set.

image

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