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

Add simple bisimulation prover #1933

Merged
merged 9 commits into from
Sep 8, 2023
Merged

Add simple bisimulation prover #1933

merged 9 commits into from
Sep 8, 2023

Conversation

bboston7
Copy link
Contributor

@bboston7 bboston7 commented Sep 6, 2023

This change adds command prove_bisim that proves that two terms simulate eachother. Given a relation rel, term lhs, and term rhs, the prover considers lhs and rhs bisimilar when:

forall s1 s2 in out1 out2.
  rel (s1, out1) (s2, out2) -> rel (lhs (s1, in)) (rhs (s2, in))

This change adds command `prove_bisim` that proves that two terms
simulate eachother. Given a relation `rel`, term `lhs`, and term `rhs`,
the prover considers `lhs` and `rhs` bisimilar when:
```
forall s1 s2 in out.
  rel (s1, out) (s2, out) -> rel (lhs (s1, in)) (rhs (s2, in))
```
Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

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

This does what it advertises, so I'm happy with this. I've left a number of suggestions inline, but some of these suggestions may not be applicable, as I'm not completely sure how the bisimulation prover is intended to be used in future work.

As a high-level suggestion: my understanding is that it took a fair bit of discussion and thought to arrive at the current design for the bisimulation prover. I think it would be helpful to capture some of that discussion in a Note somewhere in the comments, including some examples of other design possibilities that were rejected (and with reasons why they were rejected).

src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Interpreter.hs Outdated Show resolved Hide resolved
@bboston7 bboston7 requested a review from RyanGlScott September 8, 2023 04:09
@bboston7 bboston7 merged commit 6a6a1f5 into master Sep 8, 2023
@bboston7 bboston7 deleted the bb/bisim branch September 8, 2023 17:24
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