Skip to content

Conversation

@kroening
Copy link
Collaborator

@kroening kroening commented Nov 1, 2025

This moves the conversion of the . (dot) and [...] index operators from the SMV parser to the type checker, to enable array index and bit extract operators.

@kroening kroening added the SMV label Nov 1, 2025
@kroening kroening force-pushed the smv-typecheck-index-member branch 2 times, most recently from b53d468 to dca6318 Compare November 5, 2025 02:01
@kroening kroening marked this pull request as ready for review November 5, 2025 02:08
@kroening kroening force-pushed the smv-typecheck-index-member branch from dca6318 to b7be5d6 Compare November 5, 2025 19:57
Comment on lines 1730 to 1732
if(member_expr.compound().id() != ID_symbol)
DATA_INVARIANT_WITH_DIAGNOSTICS(
false, "unexpected complex_identifier", expr.pretty());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if(member_expr.compound().id() != ID_symbol)
DATA_INVARIANT_WITH_DIAGNOSTICS(
false, "unexpected complex_identifier", expr.pretty());
DATA_INVARIANT_WITH_DIAGNOSTICS(
member_expr.compound().id() == ID_symbol, "unexpected complex_identifier", expr.pretty());

Comment on lines 1743 to 1745
if(index_expr.array().id() != ID_symbol)
DATA_INVARIANT_WITH_DIAGNOSTICS(
false, "unexpected complex_identifier", expr.pretty());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if(index_expr.array().id() != ID_symbol)
DATA_INVARIANT_WITH_DIAGNOSTICS(
false, "unexpected complex_identifier", expr.pretty());
DATA_INVARIANT_WITH_DIAGNOSTICS(
index_expr.array().id() == ID_symbol, "unexpected complex_identifier", expr.pretty());

@kroening kroening force-pushed the smv-typecheck-index-member branch from b7be5d6 to 6564d5c Compare November 5, 2025 20:56
This moves the conversion of the .  (dot) and [...] index operators from the
SMV parser to the type checker, to enable array index and bit extract
operators.
@kroening kroening force-pushed the smv-typecheck-index-member branch from 6564d5c to d848ecb Compare November 5, 2025 20:58
@kroening kroening merged commit a5a43bc into main Nov 5, 2025
11 checks passed
@kroening kroening deleted the smv-typecheck-index-member branch November 5, 2025 21:05
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.

3 participants