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

Make IL control-flow representation match boogie more closely #134

Closed
ailrst opened this issue Nov 2, 2023 · 1 comment · Fixed by #140
Closed

Make IL control-flow representation match boogie more closely #134

ailrst opened this issue Nov 2, 2023 · 1 comment · Fixed by #140
Assignees

Comments

@ailrst
Copy link
Contributor

ailrst commented Nov 2, 2023

The IL should represent conditional calls, and branching, closer to boogie. This means removing conditions from DirectCalls and replacing them with an assume preceding the call.

E.g.

                        ┌─────────────┐
                        │ statement1  │
                        │ statement2  │
                        │ ----------  │
                        │ goto a      │
                        │ goto b      │
              ┌─────────┴─────────────┴───────────┐
              │                                   │
 ┌────────────▼───────────┐        ┌──────────────▼─────────┐
 │a:assume R0 == 699900   │        │b:assume R0 == 699908   │
 │ --------------------   │        │ ---------------------- │
 │ DirectCall(ProcedureA) │        │ DirectCall(ProcedureB) │
 └────────────────────────┴────┬───┴────────────────────────┘
                               │
                        ┌──────▼──────┐
                        │ statement3  │
                        │ statement4  │
                        │ ----------  │
                        │ goto c      │
                        └─────────────┘
@l-kent l-kent self-assigned this Nov 2, 2023
@l-kent
Copy link
Contributor

l-kent commented Nov 2, 2023

It's GoTos that we would want to remove the conditions from, not DirectCalls (I have already removed conditions from DirectCalls in changes for #132 that are not yet pushed).

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 a pull request may close this issue.

2 participants