Skip to content

SMV: use module items for VAR and DEFINE for creating symbols #1213

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 1 commit into from
Jul 27, 2025

Conversation

kroening
Copy link
Member

The SMV typechecker now uses the module items for creating the symbols for VAR and DEFINE.

@kroening kroening marked this pull request as ready for review July 26, 2025 19:09
check_type(type);

symbol.base_name = var_it.first;
symbol.base_name = to_symbol_expr(item.expr).get_identifier();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This re-use of the same symbolt storage makes me a bit uncomfortable. How about creating a fresh symbolt (then using the most suitable constructor) in here and then using symbol_table.insert(std::move(symbol)); instead of symbol_table.add?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, done

The SMV typechecker now uses the module items for creating the symbols for
VAR and DEFINE.
@kroening kroening merged commit 5f2c37e into main Jul 27, 2025
10 checks passed
@kroening kroening deleted the smvlang-vars2 branch July 27, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants