cprover
replace_calls.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Replace calls
4 
5 Author: Daniel Poetzl
6 
7 \*******************************************************************/
8 
12 
13 #ifndef CPROVER_GOTO_PROGRAMS_REPLACE_CALLS_H
14 #define CPROVER_GOTO_PROGRAMS_REPLACE_CALLS_H
15 
17 
19 {
20 public:
21  typedef std::list<std::string> replacement_listt;
22  typedef std::map<irep_idt, irep_idt> replacement_mapt;
23 
24  void operator()(
25  goto_modelt &goto_model,
26  const replacement_listt &replacement_list) const;
27 
28  void operator()(
29  goto_modelt &goto_model,
30  const replacement_mapt &replacement_map) const;
31 
32 protected:
33  void operator()(
34  goto_programt &goto_program,
35  const goto_functionst &goto_functions,
36  const namespacet &ns,
37  const replacement_mapt &replacement_map) const;
38 
40  parse_replacement_list(const replacement_listt &replacement_list) const;
41 
43  const replacement_mapt &replacement_map,
44  const goto_functionst &goto_functions,
45  const namespacet &ns) const;
46 };
47 
48 #define OPT_REPLACE_CALLS "(replace-calls):"
49 
50 #define HELP_REPLACE_CALLS \
51  " --replace-calls f:g replace calls to f with calls to g\n"
52 
53 #endif // CPROVER_GOTO_PROGRAMS_REPLACE_CALLS_H
replace_callst::replacement_listt
std::list< std::string > replacement_listt
Definition: replace_calls.h:21
goto_model.h
Symbol Table + CFG.
goto_modelt
Definition: goto_model.h:26
replace_callst::check_replacement_map
void check_replacement_map(const replacement_mapt &replacement_map, const goto_functionst &goto_functions, const namespacet &ns) const
Definition: replace_calls.cpp:147
replace_callst::parse_replacement_list
replacement_mapt parse_replacement_list(const replacement_listt &replacement_list) const
Definition: replace_calls.cpp:122
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:92
replace_callst::replacement_mapt
std::map< irep_idt, irep_idt > replacement_mapt
Definition: replace_calls.h:22
goto_functionst
A collection of goto functions.
Definition: goto_functions.h:23
replace_callst::operator()
void operator()(goto_modelt &goto_model, const replacement_listt &replacement_list) const
Replace function calls with calls to other functions.
Definition: replace_calls.cpp:30
replace_callst
Definition: replace_calls.h:19
goto_programt
A generic container class for the GOTO intermediate representation of one function.
Definition: goto_program.h:73