Skip to content

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

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Jan 15, 2018

A trivial switch from a whole-program to a per-function pass. Depends on #1737; only review the latest commit.

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.
/// 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.
Copy link
Member

Choose a reason for hiding this comment

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

not any more


// 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.
Copy link
Member

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.

@smowton smowton force-pushed the smowton/feature/convert_nondet_per_function branch from 61a9faf to 4059e3d Compare January 16, 2018 11:08
@smowton
Copy link
Contributor Author

smowton commented Jan 24, 2018

Subsumed by #1740

@smowton smowton closed this Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants