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

Mechanized semantics and proofs #628

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Mechanized semantics and proofs #628

merged 1 commit into from
Aug 9, 2024

Conversation

rtjoa
Copy link
Collaborator

@rtjoa rtjoa commented Aug 9, 2024

Add a mechanized formal semantics for eggcc IR*, as well as proofs of:

  • If context introduction
    • (If pred in then else) is equivalent to (If pred in (Ctx (InThen pred in) then) (Ctx (InElse pred in) else)
  • Context pushdown
    • (Ctx a (PureOp e)) is equivalent to (PureOp (Ctx a e))
    • (Ctx a (If pred in then else)) is equivalent to (If (Ctx a pred) (Ctx a in) then else)
    • (Ctx a (DoWhile in pred out)) is equivalent to (DoWhile (Ctx a in) pred out)
  • Constant input substitution
    • (Ctx (InThen pred (Const c)) Arg) is equivalent to (Ctx (InThen pred (Const c)) (Const c))

*See here for more explanation of the modeled IR/semantics, which are more general (context nodes, arbitrary pure ops) than those actually used in eggcc now:
https://uw-cse.slack.com/archives/C06CH261JM9/p1718175743886959

@rtjoa rtjoa changed the title Add proofs Add mechanized semantics and proofs Aug 9, 2024
@rtjoa rtjoa changed the title Add mechanized semantics and proofs Mechanized semantics and proofs Aug 9, 2024
Copy link
Member

@oflatt oflatt left a comment

Choose a reason for hiding this comment

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

Yay!

@oflatt oflatt merged commit c07234f into main Aug 9, 2024
4 checks passed
@oflatt oflatt deleted the proofs branch August 9, 2024 22:20
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