Skip to content

add Java monitorenter/exit symbols #2286

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions jbmc/src/java_bytecode/java_bytecode_internal_additions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,36 @@ Author: Daniel Kroening, [email protected]
#include <util/cprover_prefix.h>
#include <util/c_types.h>

#include "java_types.h"

void java_internal_additions(symbol_table_baset &dest)
{
// add monitorenter

{
code_typet type(
{code_typet::parametert(java_lang_object_type())}, void_typet());
symbolt symbol;
symbol.base_name = "monitorenter";
symbol.name = "java::monitorenter";
symbol.type = type;
symbol.mode = ID_java;
dest.add(symbol);
}

// add monitorexit

{
code_typet type(
{code_typet::parametert(java_lang_object_type())}, void_typet());
symbolt symbol;
symbol.base_name = "monitorexit";
symbol.name = "java::monitorexit";
symbol.type = type;
symbol.mode = ID_java;
dest.add(symbol);
}

// add __CPROVER_rounding_mode

{
Expand Down