cprover
ci_lazy_methods.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Context-insensitive lazy methods container
4 
5 Author: Chris Smowton, chris.smowton@diffblue.com
6 
7 \*******************************************************************/
8 
11 
12 #include "ci_lazy_methods.h"
13 
14 #include <string>
15 
20 void ci_lazy_methodst::add_needed_method(const irep_idt &method_symbol_name)
21 {
22  needed_methods.push_back(method_symbol_name);
23 }
24 
31 bool ci_lazy_methodst::add_needed_class(const irep_idt &class_symbol_name)
32 {
33  if(!needed_classes.insert(class_symbol_name).second)
34  return false;
35  const irep_idt clinit_name(id2string(class_symbol_name)+".<clinit>:()V");
36  if(symbol_table.symbols.count(clinit_name))
37  add_needed_method(clinit_name);
38  return true;
39 }
bool add_needed_class(const irep_idt &)
Notes class class_symbol_name will be instantiated, or a static field belonging to it will be accesse...
void add_needed_method(const irep_idt &)
Notes method_symbol_name is referenced from some reachable function, and should therefore be elaborat...
const std::string & id2string(const irep_idt &d)
Definition: irep.h:44
symbol_tablet & symbol_table
std::vector< irep_idt > & needed_methods
symbolst symbols
Definition: symbol_table.h:57
Context-insensitive lazy methods container.
std::set< irep_idt > & needed_classes