Skip to content

JBMC: add property checks on a per-function basis #1739

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
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/analyses/goto_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1753,10 +1753,11 @@ void goto_checkt::goto_check(
void goto_check(
const namespacet &ns,
const optionst &options,
const irep_idt &mode,
goto_functionst::goto_functiont &goto_function)
{
goto_checkt goto_check(ns, options);
goto_check.goto_check(goto_function, irep_idt());
goto_check.goto_check(goto_function, mode);
}

void goto_check(
Expand Down
1 change: 1 addition & 0 deletions src/analyses/goto_check.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ void goto_check(
void goto_check(
const namespacet &ns,
const optionst &options,
const irep_idt &mode,
goto_functionst::goto_functiont &goto_function);

void goto_check(
Expand Down
14 changes: 14 additions & 0 deletions src/goto-programs/convert_nondet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ void convert_nondet(
}
}

void convert_nondet(
goto_model_functiont &function,
message_handlert &message_handler,
const object_factory_parameterst &object_factory_parameters)
{
convert_nondet(
function.get_goto_function().body,
function.get_symbol_table(),
message_handler,
object_factory_parameters);

function.compute_location_numbers();
}

void convert_nondet(
goto_functionst &goto_functions,
symbol_tablet &symbol_table,
Expand Down
12 changes: 12 additions & 0 deletions src/goto-programs/convert_nondet.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Author: Reuben Thomas, [email protected]
class goto_functionst;
class symbol_tablet;
class goto_modelt;
class goto_model_functiont;
class message_handlert;
struct object_factory_parameterst;

Expand All @@ -38,4 +39,15 @@ void convert_nondet(
message_handlert &,
const object_factory_parameterst &object_factory_parameters);

/// Replace calls to nondet library functions with an internal nondet
/// representation.
/// \param function: goto program to modify
/// \param message_handler: For error logging.
/// \param object_factory_parameters: Parameters for the generation of nondet
/// objects.
void convert_nondet(
goto_model_functiont &function,
message_handlert &message_handler,
const object_factory_parameterst &object_factory_parameters);

#endif
4 changes: 2 additions & 2 deletions src/goto-programs/lazy_goto_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class lazy_goto_modelt
message_handlert &message_handler)
{
return lazy_goto_modelt(
[&handler] (goto_model_functiont &function)
[&handler, &options] (goto_model_functiont &function)
{
handler.process_goto_function(function);
handler.process_goto_function(function, options);
},
[&handler, &options] (goto_modelt &goto_model) -> bool
{
Expand Down
Loading