CBMC
goto_inline.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Function Inlining
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
13 
14 #ifndef CPROVER_GOTO_PROGRAMS_GOTO_INLINE_H
15 #define CPROVER_GOTO_PROGRAMS_GOTO_INLINE_H
16 
17 #include <util/json.h>
18 
19 class goto_functionst;
20 class goto_modelt;
21 class goto_programt;
22 class message_handlert;
23 class namespacet;
24 
25 // do a full inlining
26 
27 void goto_inline(
28  goto_modelt &goto_model,
29  message_handlert &message_handler,
30  bool adjust_function=false);
31 
32 void goto_inline(
33  goto_functionst &goto_functions,
34  const namespacet &ns,
35  message_handlert &message_handler,
36  bool adjust_function=false);
37 
38 // inline those functions marked as "inlined" and functions with less
39 // than _smallfunc_limit instructions
40 
42  goto_modelt &goto_model,
43  message_handlert &message_handler,
44  unsigned smallfunc_limit=0,
45  bool adjust_function=false);
46 
48  goto_functionst &goto_functions,
49  const namespacet &ns,
50  message_handlert &message_handler,
51  unsigned smallfunc_limit=0,
52  bool adjust_function=false);
53 
54 // transitively inline all calls the given function makes
55 
57  goto_modelt &goto_model,
58  const irep_idt function,
59  message_handlert &message_handler,
60  bool adjust_function=false,
61  bool caching=true);
62 
64  goto_functionst &goto_functions,
65  const irep_idt function,
66  const namespacet &ns,
67  message_handlert &message_handler,
68  bool adjust_function=false,
69  bool caching=true);
70 
72  goto_modelt &,
73  const irep_idt function,
74  message_handlert &message_handler,
75  bool adjust_function=false,
76  bool caching=true);
77 
79  goto_functionst &goto_functions,
80  goto_programt &goto_program,
81  const namespacet &ns,
82  message_handlert &message_handler,
83  bool adjust_function = false,
84  bool caching = true);
85 
86 #endif // CPROVER_GOTO_PROGRAMS_GOTO_INLINE_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
A collection of goto functions.
A generic container class for the GOTO intermediate representation of one function.
Definition: goto_program.h:73
Definition: json.h:27
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:94
void goto_inline(goto_modelt &goto_model, message_handlert &message_handler, bool adjust_function=false)
Inline every function call into the entry_point() function.
Definition: goto_inline.cpp:26
void goto_program_inline(goto_functionst &goto_functions, goto_programt &goto_program, const namespacet &ns, message_handlert &message_handler, bool adjust_function=false, bool caching=true)
Transitively inline all function calls found in a particular program.
void goto_function_inline(goto_modelt &goto_model, const irep_idt function, message_handlert &message_handler, bool adjust_function=false, bool caching=true)
Transitively inline all function calls made from a particular function.
void goto_partial_inline(goto_modelt &goto_model, message_handlert &message_handler, unsigned smallfunc_limit=0, bool adjust_function=false)
Inline all function calls to functions either marked as "inlined" or smaller than smallfunc_limit (by...
jsont goto_function_inline_and_log(goto_modelt &, const irep_idt function, message_handlert &message_handler, bool adjust_function=false, bool caching=true)