-
Notifications
You must be signed in to change notification settings - Fork 0
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 main
to functions
array
#42
Comments
jberthold
added a commit
to runtimeverification/mir-semantics
that referenced
this issue
Feb 4, 2025
* Various adaptations to `kmir.md` so that we can look up functions by their type `Ty` - `functions` table is now keyed on `Ty` instead of `DefId` - `caller` and `currentFunc` fields likewise contain a `Ty` - the `main` function is added to the functions table with `ty(-1)` key to work around a shortfall of stable-mir-json: runtimeverification/stable-mir-json#42 - various other adaptations and stub code to write function call arguments to resp. local values * A basic program where `main()` calls `a()`, which calls `b()`, which calls `c()` is added as a first integration test * The `#init` function is adapted to support executing functions other than `main` (not tested yet) --------- Co-authored-by: Guy Repta <[email protected]>
After an initial inspection of how we collect the functions in the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
functions
array lists all functions that are being called (i.e., occur within aTerminatorKind::Call
in a block anywhere within one of the items). Typicallymain
is not one of these functions. However, we needmain
to be available so we can restore its blocks when returning from a call - and we should anyway strive to have complete data in thefunctions
array, i.e., allitems
we have should also occur there.functions
data collection to include themain
functionThe text was updated successfully, but these errors were encountered: