-
Notifications
You must be signed in to change notification settings - Fork 273
JBMC: run convert-nondet on a per-function basis #1738
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
JBMC: run convert-nondet on a per-function basis #1738
Conversation
This converts functions from conventional to via-global-variable return style on a function-by-function basis. It results in some complication, as the globals are now seen by the language's final pass, meaning it must ignore them for initialisation purposes, and we must cope with functions not having their "true" type while other functions are still being loaded. One test in cbmc-java failed because it was written in C, which we don't adapt to support incremental loading yet, so it is moved to the cbmc test directory, where it can still achieve its goal of checking whether uncaught_exceptions_analysist can tolerate CPROVER_assert and similar builtins, since cbmc also runs the remove_exceptions pass.
src/goto-programs/convert_nondet.h
Outdated
/// Replace calls to nondet library functions with an internal nondet | ||
/// representation. | ||
/// \param function: goto program to modify | ||
/// \param symbol_table: The symbol table to query/update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not any more
src/jbmc/jbmc_parse_options.cpp
Outdated
|
||
// Similar removal of java nondet statements: | ||
// TODO Should really get this from java_bytecode_language somehow, but we | ||
// don't have an instance of that here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pffff... (I know this code was already there)... we really have to upgrade optionst
so that parsing can happen on setting values.
61a9faf
to
4059e3d
Compare
Subsumed by #1740 |
A trivial switch from a whole-program to a per-function pass. Depends on #1737; only review the latest commit.