Skip to content

Comments

[spec] Update br_on_cast validation#92

Merged
tlively merged 6 commits intomainfrom
spectec-relax-br-on-cast-validation
Feb 3, 2026
Merged

[spec] Update br_on_cast validation#92
tlively merged 6 commits intomainfrom
spectec-relax-br-on-cast-validation

Conversation

@tlively
Copy link
Member

@tlively tlively commented Jan 30, 2026

As described in the overview, relax validation so that the input and
output types need only be in the same hierarchy rather than requiring
that the output type be a subtype of the input type.

In addition to updating the SpecTec source of truth, add notes about
what the extra supertypes in the formal rules are achieving. These notes
are modeled on the similar note that already exists for ref.cast_desc.

Update backend-interpreter/construct.ml to avoid compile errors in the
due to the changes to the type system in the reference interpreter. Stub
out most of the handling of new functionality and leave TODOs so we can
easily find the places to update later.
As described in the overview, relax validation so that the input and
output types need only be in the same hierarchy rather than requiring
that the output type be a subtype of the input type.

In addition to updating the SpecTec source of truth, add notes about
what the extra supertypes in the formal rules are achieving. These notes
are modeled on the similar note that already exists for ref.cast_desc.
@tlively tlively requested a review from rossberg January 30, 2026 00:52
@tlively
Copy link
Member Author

tlively commented Jan 30, 2026

@rossberg, the validation rules rendered in the PDF overflow into the margin on the right. Is there an easy way to fix that?

@tlively tlively mentioned this pull request Jan 30, 2026
50 tasks
Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

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

You can insert a pseudo premise ---- in the appropriate place, which should produce a line break between the premises. See e.g. Instr_ok/return_call_indirect.

Base automatically changed from fix-spectec-interpreter to main February 3, 2026 06:00
@tlively tlively merged commit 93aa0db into main Feb 3, 2026
3 checks passed
@tlively tlively deleted the spectec-relax-br-on-cast-validation branch February 3, 2026 06:02
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

Successfully merging this pull request may close these issues.

2 participants