Skip to content

SMV typechecker cleanup #902

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

Merged
merged 5 commits into from
Dec 26, 2024
Merged

SMV typechecker cleanup #902

merged 5 commits into from
Dec 26, 2024

Conversation

kroening
Copy link
Member

@kroening kroening commented Dec 24, 2024

  1. smv_ranget is moved into a header file

  2. Use override instead of virtual for the methods in smv_typecheckt.

  3. Remove unnecessary declarators on method parameters.

  4. Use ranged for instead of Forall_operands and forall_operands.

@kroening kroening added the SMV label Dec 24, 2024
@kroening kroening marked this pull request as ready for review December 24, 2024 12:58
@kroening kroening force-pushed the smt-typecheck-cleanup branch 4 times, most recently from dee8b11 to f7bd2e3 Compare December 26, 2024 13:31

bool is_bool() const
{
return from == 0 && to == 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I understand that this is the same behaviour as before: why would from == 1 or to == 0 not be permitted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #903, and will add a precondition to the class.

1. smv_ranget is moved into a header file

2. Use override instead of virtual for the methods in smv_typecheckt.

3. Remove unnecessary declarators on method parameters.

4. Use ranged for instead of Forall_operands and forall_operands.
This replaces instances of "throw 0;" by "throw errort()".
This replaces the string literal by an ID.
This renames typecheck(exprt, ...) to typecheck_expr_rec to signal the recursion.
@kroening kroening force-pushed the smt-typecheck-cleanup branch from f7bd2e3 to 836a55e Compare December 26, 2024 17:28
@kroening kroening merged commit f8aa6bd into main Dec 26, 2024
9 checks passed
@kroening kroening deleted the smt-typecheck-cleanup branch December 26, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants