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

IL: A conservative apartness checker #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

IL: A conservative apartness checker #16

wants to merge 2 commits into from

Conversation

nomeata
Copy link

@nomeata nomeata commented May 3, 2023

This module adds a check

val apart : exp -> exp -> bool

with the idea that apart lhs1 lhs2 = true means that two reduction rules with these lhs definitely can’t match both.

I extracted it from my (rejected) proposal for how to desugar the otherwise construct, but I believe this check will be useful still, as (as far as I understand) Andreas wants to uphold and check the invariant that

Rules before a rule using otherwise must either obviously not match, or have syntactically equal LHSs, and only boolean premises.

The apart predicate is the “obviously not match”.

As of today, all rules in the reduction semantics have either eq or apart LHS, I believe.

rossberg pushed a commit that referenced this pull request Mar 7, 2024
Alan-Liang pushed a commit to Alan-Liang/spectec that referenced this pull request Sep 1, 2024
Merge with WebAssembly/spec, WebAssembly/function-references, and WebAssembly/gc
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.

1 participant