CBMC
java_bmc_util.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Bounded Model Checking Utils for Java
4 
5 Author: Daniel Kroening, Peter Schrammel
6 
7 \*******************************************************************/
8 
11 
12 #include "java_bmc_util.h"
13 
14 #include <goto-checker/symex_bmc.h>
17 
19  const optionst &options,
20  abstract_goto_modelt &goto_model,
21  symex_bmct &symex)
22 {
23  // unwinds <clinit> loops to number of enum elements
24  if(options.get_bool_option("java-unwind-enum-static"))
25  {
26  // clang-format off
27  // (it asks for the body to be at the same indent level as the parameters
28  // for some reason)
30  [&goto_model](
31  const call_stackt &context,
32  unsigned loop_num,
33  unsigned unwind,
34  unsigned &max_unwind)
35  { // NOLINT (*)
37  context, loop_num, unwind, max_unwind, goto_model.get_symbol_table());
38  });
39  // clang-format on
40  }
41 }
Abstract interface to eager or lazy GOTO models.
Abstract interface to eager or lazy GOTO models.
virtual const symbol_tablet & get_symbol_table() const =0
Accessor to get the symbol table.
bool get_bool_option(const std::string &option) const
Definition: options.cpp:44
void add_loop_unwind_handler(loop_unwind_handlert handler)
Add a callback function that will be called to determine whether to unwind loops.
Definition: symex_bmc.h:61
void java_setup_symex(const optionst &options, abstract_goto_modelt &goto_model, symex_bmct &symex)
Registers Java-specific preprocessing handlers with goto-symex.
Bounded Model Checking Utils for Java.
tvt java_enum_static_init_unwind_handler(const call_stackt &context, unsigned loop_number, unsigned unwind_count, unsigned &unwind_max, const symbol_tablet &symbol_table)
Unwind handler that special-cases the clinit (static initializer) functions of enumeration classes,...
Unwind loops in static initializers.
Bounded Model Checking for ANSI-C.