cprover
ansi_c_entry_point.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 #include "ansi_c_entry_point.h"
10 
11 #include <util/arith_tools.h>
12 #include <util/c_types.h>
13 #include <util/config.h>
14 #include <util/string_constant.h>
15 
17 
19 
21 #include "expr2c.h"
22 
24  const code_typet::parameterst &parameters,
25  code_blockt &init_code,
26  symbol_tablet &symbol_table,
27  const c_object_factory_parameterst &object_factory_parameters)
28 {
29  exprt::operandst main_arguments;
30  main_arguments.resize(parameters.size());
31 
32  for(std::size_t param_number=0;
33  param_number<parameters.size();
34  param_number++)
35  {
36  const code_typet::parametert &p=parameters[param_number];
37  const irep_idt base_name=p.get_base_name().empty()?
38  ("argument#"+std::to_string(param_number)):p.get_base_name();
39 
40  main_arguments[param_number] = c_nondet_symbol_factory(
41  init_code,
42  symbol_table,
43  base_name,
44  p.type(),
45  p.source_location(),
46  object_factory_parameters,
48  }
49 
50  return main_arguments;
51 }
52 
54  const symbolt &function,
55  code_blockt &init_code,
56  symbol_tablet &symbol_table)
57 {
58  bool has_return_value =
59  to_code_type(function.type).return_type() != void_type();
60 
61  if(has_return_value)
62  {
63  const symbolt &return_symbol = symbol_table.lookup_ref("return'");
64 
65  // record return value
66  init_code.add(code_outputt{
67  return_symbol.base_name, return_symbol.symbol_expr(), function.location});
68  }
69 
70  #if 0
71  std::size_t i=0;
72 
73  for(const auto &p : parameters)
74  {
75  if(p.get_identifier().empty())
76  continue;
77 
78  irep_idt identifier=p.get_identifier();
79 
80  const symbolt &symbol=symbol_table.lookup(identifier);
81 
82  if(symbol.type.id()==ID_pointer)
83  {
84  codet output(ID_output);
85  output.operands().resize(2);
86 
87  output.op0()=
91  from_integer(0, index_type())));
92  output.op1()=symbol.symbol_expr();
93  output.add_source_location()=p.source_location();
94 
95  init_code.add(std::move(output));
96  }
97 
98  i++;
99  }
100  #endif
101 }
102 
104  symbol_tablet &symbol_table,
105  message_handlert &message_handler,
106  const c_object_factory_parameterst &object_factory_parameters)
107 {
108  // check if entry point is already there
109  if(symbol_table.symbols.find(goto_functionst::entry_point())!=
110  symbol_table.symbols.end())
111  return false; // silently ignore
112 
113  irep_idt main_symbol;
114 
115  // find main symbol, if any is given
116  if(config.main.has_value())
117  {
118  std::list<irep_idt> matches;
119 
121  it, symbol_table.symbol_base_map, config.main.value())
122  {
123  // look it up
124  symbol_tablet::symbolst::const_iterator s_it=
125  symbol_table.symbols.find(it->second);
126 
127  if(s_it==symbol_table.symbols.end())
128  continue;
129 
130  if(s_it->second.type.id()==ID_code)
131  matches.push_back(it->second);
132  }
133 
134  if(matches.empty())
135  {
136  messaget message(message_handler);
137  message.error() << "main symbol '" << config.main.value() << "' not found"
138  << messaget::eom;
139  return true; // give up
140  }
141 
142  if(matches.size()>=2)
143  {
144  messaget message(message_handler);
145  message.error() << "main symbol '" << config.main.value()
146  << "' is ambiguous" << messaget::eom;
147  return true;
148  }
149 
150  main_symbol=matches.front();
151  }
152  else
153  main_symbol=ID_main;
154 
155  // look it up
156  symbol_tablet::symbolst::const_iterator s_it=
157  symbol_table.symbols.find(main_symbol);
158 
159  if(s_it==symbol_table.symbols.end())
160  return false; // give up silently
161 
162  const symbolt &symbol=s_it->second;
163 
164  // check if it has a body
165  if(symbol.value.is_nil())
166  {
167  messaget message(message_handler);
168  message.error() << "main symbol '" << id2string(main_symbol)
169  << "' has no body" << messaget::eom;
170  return false; // give up
171  }
172 
173  static_lifetime_init(symbol_table, symbol.location);
174 
176  symbol, symbol_table, message_handler, object_factory_parameters);
177 }
178 
189  const symbolt &symbol,
190  symbol_tablet &symbol_table,
191  message_handlert &message_handler,
192  const c_object_factory_parameterst &object_factory_parameters)
193 {
194  PRECONDITION(!symbol.value.is_nil());
195  code_blockt init_code;
196 
197  // add 'HIDE' label
198  init_code.add(code_labelt(CPROVER_PREFIX "HIDE", code_skipt()));
199 
200  // build call to initialization function
201 
202  {
203  symbol_tablet::symbolst::const_iterator init_it=
204  symbol_table.symbols.find(INITIALIZE_FUNCTION);
205 
206  if(init_it==symbol_table.symbols.end())
207  {
208  messaget message(message_handler);
209  message.error() << "failed to find " INITIALIZE_FUNCTION " symbol"
210  << messaget::eom;
211  return true;
212  }
213 
214  code_function_callt call_init(init_it->second.symbol_expr());
215  call_init.add_source_location()=symbol.location;
216 
217  init_code.add(std::move(call_init));
218  }
219 
220  // build call to main function
221 
222  code_function_callt call_main(symbol.symbol_expr());
223  call_main.add_source_location()=symbol.location;
224  call_main.function().add_source_location()=symbol.location;
225 
226  if(to_code_type(symbol.type).return_type() != void_type())
227  {
228  auxiliary_symbolt return_symbol;
229  return_symbol.mode=ID_C;
230  return_symbol.is_static_lifetime=false;
231  return_symbol.name="return'";
232  return_symbol.base_name = "return'";
233  return_symbol.type=to_code_type(symbol.type).return_type();
234 
235  symbol_table.add(return_symbol);
236  call_main.lhs()=return_symbol.symbol_expr();
237  }
238 
239  const code_typet::parameterst &parameters=
240  to_code_type(symbol.type).parameters();
241 
242  if(symbol.name==ID_main)
243  {
244  if(parameters.empty())
245  {
246  // ok
247  }
248  else if(parameters.size()==2 || parameters.size()==3)
249  {
250  namespacet ns(symbol_table);
251 
252  {
253  symbolt argc_symbol;
254 
255  argc_symbol.base_name = "argc'";
256  argc_symbol.name = "argc'";
257  argc_symbol.type = signed_int_type();
258  argc_symbol.is_static_lifetime = true;
259  argc_symbol.is_lvalue = true;
260  argc_symbol.mode = ID_C;
261 
262  auto r = symbol_table.insert(argc_symbol);
263  if(!r.second && r.first != argc_symbol)
264  {
265  messaget message(message_handler);
266  message.error() << "argc already exists but is not usable"
267  << messaget::eom;
268  return true;
269  }
270  }
271 
272  const symbolt &argc_symbol = ns.lookup("argc'");
273 
274  {
275  // we make the type of this thing an array of pointers
276  // need to add one to the size -- the array is terminated
277  // with NULL
278  const exprt one_expr = from_integer(1, argc_symbol.type);
279  const plus_exprt size_expr(argc_symbol.symbol_expr(), one_expr);
280  const array_typet argv_type(pointer_type(char_type()), size_expr);
281 
282  symbolt argv_symbol;
283 
284  argv_symbol.base_name = "argv'";
285  argv_symbol.name = "argv'";
286  argv_symbol.type = argv_type;
287  argv_symbol.is_static_lifetime = true;
288  argv_symbol.is_lvalue = true;
289  argv_symbol.mode = ID_C;
290 
291  auto r = symbol_table.insert(argv_symbol);
292  if(!r.second && r.first != argv_symbol)
293  {
294  messaget message(message_handler);
295  message.error() << "argv already exists but is not usable"
296  << messaget::eom;
297  return true;
298  }
299  }
300 
301  const symbolt &argv_symbol=ns.lookup("argv'");
302 
303  {
304  // assume argc is at least one
305  exprt one=from_integer(1, argc_symbol.type);
306 
308  argc_symbol.symbol_expr(), ID_ge, std::move(one));
309 
310  init_code.add(code_assumet(std::move(ge)));
311  }
312 
313  {
314  // assume argc is at most MAX/8-1
315  mp_integer upper_bound=
317 
318  exprt bound_expr=from_integer(upper_bound, argc_symbol.type);
319 
321  argc_symbol.symbol_expr(), ID_le, std::move(bound_expr));
322 
323  init_code.add(code_assumet(std::move(le)));
324  }
325 
326  // record argc as an input
327  init_code.add(code_inputt{"argc", argc_symbol.symbol_expr()});
328 
329  if(parameters.size()==3)
330  {
331  {
332  symbolt envp_size_symbol;
333  envp_size_symbol.base_name = "envp_size'";
334  envp_size_symbol.name = "envp_size'";
335  envp_size_symbol.type = size_type();
336  envp_size_symbol.is_static_lifetime = true;
337  envp_size_symbol.mode = ID_C;
338 
339  if(!symbol_table.insert(std::move(envp_size_symbol)).second)
340  {
341  messaget message(message_handler);
342  message.error()
343  << "failed to insert envp_size symbol" << messaget::eom;
344  return true;
345  }
346  }
347 
348  const symbolt &envp_size_symbol=ns.lookup("envp_size'");
349 
350  {
351  symbolt envp_symbol;
352  envp_symbol.base_name = "envp'";
353  envp_symbol.name = "envp'";
354  envp_symbol.type = array_typet(
355  pointer_type(char_type()), envp_size_symbol.symbol_expr());
356  envp_symbol.is_static_lifetime = true;
357  envp_symbol.mode = ID_C;
358 
359  if(!symbol_table.insert(std::move(envp_symbol)).second)
360  {
361  messaget message(message_handler);
362  message.error() << "failed to insert envp symbol" << messaget::eom;
363  return true;
364  }
365  }
366 
367  // assume envp_size is INTMAX-1
368  const mp_integer max =
369  to_integer_bitvector_type(envp_size_symbol.type).largest();
370 
371  exprt max_minus_one=from_integer(max-1, envp_size_symbol.type);
372 
374  envp_size_symbol.symbol_expr(), ID_le, std::move(max_minus_one));
375 
376  init_code.add(code_assumet(le));
377  }
378 
379  {
380  /* zero_string doesn't work yet */
381 
382  /*
383  exprt zero_string(ID_zero_string, array_typet());
384  zero_string.type().subtype()=char_type();
385  zero_string.type().set(ID_size, "infinity");
386  const index_exprt index(zero_string, from_integer(0, uint_type()));
387  exprt address_of =
388  typecast_exprt::conditional_cast(
389  address_of_exprt(index, pointer_type(char_type())),
390  argv_symbol.type.subtype());
391 
392  // assign argv[*] to the address of a string-object
393  array_of_exprt array_of(address_of, argv_symbol.type);
394 
395  init_code.copy_to_operands(
396  code_assignt(argv_symbol.symbol_expr(), array_of));
397  */
398  }
399 
400  {
401  // assign argv[argc] to NULL
402  const null_pointer_exprt null(
403  to_pointer_type(argv_symbol.type.subtype()));
404 
405  index_exprt index_expr(
406  argv_symbol.symbol_expr(), argc_symbol.symbol_expr());
407 
408  // disable bounds check on that one
409  index_expr.set("bounds_check", false);
410 
411  init_code.add(code_assignt(index_expr, null));
412  }
413 
414  if(parameters.size()==3)
415  {
416  const symbolt &envp_symbol=ns.lookup("envp'");
417  const symbolt &envp_size_symbol=ns.lookup("envp_size'");
418 
419  // assume envp[envp_size] is NULL
420  null_pointer_exprt null(to_pointer_type(envp_symbol.type.subtype()));
421 
422  index_exprt index_expr(
423  envp_symbol.symbol_expr(), envp_size_symbol.symbol_expr());
424  // disable bounds check on that one
425  index_expr.set("bounds_check", false);
426 
427  equal_exprt is_null(std::move(index_expr), std::move(null));
428 
429  init_code.add(code_assumet(is_null));
430  }
431 
432  {
433  exprt::operandst &operands=call_main.arguments();
434 
435  if(parameters.size()==3)
436  operands.resize(3);
437  else
438  operands.resize(2);
439 
440  exprt &op0=operands[0];
441  exprt &op1=operands[1];
442 
444  argc_symbol.symbol_expr(), parameters[0].type());
445 
446  {
447  index_exprt index_expr(
448  argv_symbol.symbol_expr(), from_integer(0, index_type()));
449 
450  // disable bounds check on that one
451  index_expr.set("bounds_check", false);
452 
453  const pointer_typet &pointer_type =
454  to_pointer_type(parameters[1].type());
455 
457  address_of_exprt(index_expr), pointer_type);
458  }
459 
460  // do we need envp?
461  if(parameters.size()==3)
462  {
463  const symbolt &envp_symbol=ns.lookup("envp'");
464 
465  index_exprt index_expr(
466  envp_symbol.symbol_expr(), from_integer(0, index_type()));
467 
468  const pointer_typet &pointer_type =
469  to_pointer_type(parameters[2].type());
470 
471  operands[2] = typecast_exprt::conditional_cast(
472  address_of_exprt(index_expr), pointer_type);
473  }
474  }
475  }
476  else
477  {
478  const namespacet ns{symbol_table};
479  const std::string main_signature = type2c(symbol.type, ns);
481  "'main' with signature '" + main_signature +
482  "' found,"
483  " but expecting one of:\n"
484  " int main(void)\n"
485  " int main(int argc, char *argv[])\n"
486  " int main(int argc, char *argv[], char *envp[])\n"
487  "If this is a non-standard main entry point please provide a custom\n"
488  "entry function and point to it via cbmc --function instead"};
489  }
490  }
491  else
492  {
493  // produce nondet arguments
495  parameters, init_code, symbol_table, object_factory_parameters);
496  }
497 
498  init_code.add(std::move(call_main));
499 
500  // TODO: add read/modified (recursively in call graph) globals as INPUT/OUTPUT
501 
502  record_function_outputs(symbol, init_code, symbol_table);
503 
504  // add the entry point symbol
505  symbolt new_symbol;
506 
507  new_symbol.name=goto_functionst::entry_point();
508  new_symbol.type = code_typet({}, void_type());
509  new_symbol.value.swap(init_code);
510  new_symbol.mode=symbol.mode;
511 
512  if(!symbol_table.insert(std::move(new_symbol)).second)
513  {
514  messaget message(message_handler);
515  message.error() << "failed to insert main symbol" << messaget::eom;
516  return true;
517  }
518 
519  return false;
520 }
c_nondet_symbol_factory.h
C Nondet Symbol Factory.
messaget
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:155
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:37
code_blockt
A codet representing sequential composition of program statements.
Definition: std_code.h:170
typecast_exprt::conditional_cast
static exprt conditional_cast(const exprt &expr, const typet &type)
Definition: std_expr.h:2021
symbol_tablet
The symbol table.
Definition: symbol_table.h:20
symbol_table_baset::lookup_ref
const symbolt & lookup_ref(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
Definition: symbol_table_base.h:104
typet::subtype
const typet & subtype() const
Definition: type.h:47
arith_tools.h
symbol_table_baset::symbol_base_map
const symbol_base_mapt & symbol_base_map
Read-only field, used to look up symbol names given their base names.
Definition: symbol_table_base.h:33
codet::op0
exprt & op0()
Definition: expr.h:102
lifetimet::AUTOMATIC_LOCAL
@ AUTOMATIC_LOCAL
Allocate local objects with automatic lifetime.
ansi_c_entry_point.h
code_typet::parameterst
std::vector< parametert > parameterst
Definition: std_types.h:738
symbolt::type
typet type
Type of symbol.
Definition: symbol.h:31
mp_integer
BigInt mp_integer
Definition: mp_arith.h:19
configt::main
optionalt< std::string > main
Definition: config.h:181
plus_exprt
The plus expression Associativity is not specified.
Definition: std_expr.h:881
string_constant.h
c_nondet_symbol_factory
symbol_exprt c_nondet_symbol_factory(code_blockt &init_code, symbol_tablet &symbol_table, const irep_idt base_name, const typet &type, const source_locationt &loc, const c_object_factory_parameterst &object_factory_parameters, const lifetimet lifetime)
Creates a symbol and generates code so that it can vary over all possible values for its type.
Definition: c_nondet_symbol_factory.cpp:200
exprt
Base class for all expressions.
Definition: expr.h:53
symbolt::base_name
irep_idt base_name
Base (non-scoped) name.
Definition: symbol.h:46
invalid_source_file_exceptiont
Thrown when we can't handle something in an input source file.
Definition: exception_utils.h:171
build_function_environment
exprt::operandst build_function_environment(const code_typet::parameterst &parameters, code_blockt &init_code, symbol_tablet &symbol_table, const c_object_factory_parameterst &object_factory_parameters)
Definition: ansi_c_entry_point.cpp:23
to_string
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
Definition: string_constraint.cpp:55
messaget::eom
static eomt eom
Definition: message.h:297
auxiliary_symbolt
Internally generated symbol table entryThis is a symbol generated as part of translation to or modifi...
Definition: symbol.h:160
configt::ansi_c
struct configt::ansi_ct ansi_c
string_constantt
Definition: string_constant.h:16
index_type
bitvector_typet index_type()
Definition: c_types.cpp:16
equal_exprt
Equality.
Definition: std_expr.h:1190
void_type
empty_typet void_type()
Definition: c_types.cpp:253
record_function_outputs
void record_function_outputs(const symbolt &function, code_blockt &init_code, symbol_tablet &symbol_table)
Definition: ansi_c_entry_point.cpp:53
code_function_callt::lhs
exprt & lhs()
Definition: std_code.h:1208
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:92
code_outputt
A codet representing the declaration that an output of a particular description has a value which cor...
Definition: std_code.h:692
message
static const char * message(const static_verifier_resultt::statust &status)
Makes a status message string from a status.
Definition: static_verifier.cpp:74
exprt::type
typet & type()
Return the type of the expression.
Definition: expr.h:81
namespacet::lookup
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
Definition: namespace.cpp:140
code_function_callt
codet representation of a function call statement.
Definition: std_code.h:1183
to_code_type
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
Definition: std_types.h:946
symbolt::mode
irep_idt mode
Language mode.
Definition: symbol.h:49
code_typet::parametert::get_base_name
const irep_idt & get_base_name() const
Definition: std_types.h:797
signed_int_type
signedbv_typet signed_int_type()
Definition: c_types.cpp:30
c_object_factory_parameterst
Definition: c_object_factory_parameters.h:15
null_pointer_exprt
The null pointer constant.
Definition: std_expr.h:3989
id2string
const std::string & id2string(const irep_idt &d)
Definition: irep.h:44
expr2c.h
code_labelt
codet representation of a label for branch targets.
Definition: std_code.h:1375
PRECONDITION
#define PRECONDITION(CONDITION)
Definition: invariant.h:464
code_assumet
An assumption, which must hold in subsequent code.
Definition: std_code.h:535
symbolt::symbol_expr
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
Definition: symbol.cpp:122
INITIALIZE_FUNCTION
#define INITIALIZE_FUNCTION
Definition: static_lifetime_init.h:23
symbol_tablet::insert
virtual std::pair< symbolt &, bool > insert(symbolt symbol) override
Author: Diffblue Ltd.
Definition: symbol_table.cpp:19
pointer_type
pointer_typet pointer_type(const typet &subtype)
Definition: c_types.cpp:243
to_integer_bitvector_type
const integer_bitvector_typet & to_integer_bitvector_type(const typet &type)
Cast a typet to an integer_bitvector_typet.
Definition: std_types.h:1199
irept::swap
void swap(irept &irep)
Definition: irep.h:463
code_typet
Base type of functions.
Definition: std_types.h:736
irept::is_nil
bool is_nil() const
Definition: irep.h:398
irept::id
const irep_idt & id() const
Definition: irep.h:418
message_handlert
Definition: message.h:28
exprt::operandst
std::vector< exprt > operandst
Definition: expr.h:55
dstringt::empty
bool empty() const
Definition: dstring.h:88
code_blockt::add
void add(const codet &code)
Definition: std_code.h:208
generate_ansi_c_start_function
bool generate_ansi_c_start_function(const symbolt &symbol, symbol_tablet &symbol_table, message_handlert &message_handler, const c_object_factory_parameterst &object_factory_parameters)
Generate a _start function for a specific function.
Definition: ansi_c_entry_point.cpp:188
code_typet::parameters
const parameterst & parameters() const
Definition: std_types.h:857
to_pointer_type
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
Definition: std_types.h:1526
ansi_c_entry_point
bool ansi_c_entry_point(symbol_tablet &symbol_table, message_handlert &message_handler, const c_object_factory_parameterst &object_factory_parameters)
Definition: ansi_c_entry_point.cpp:103
code_function_callt::arguments
argumentst & arguments()
Definition: std_code.h:1228
config
configt config
Definition: config.cpp:24
char_type
bitvector_typet char_type()
Definition: c_types.cpp:114
symbol_table_baset::add
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
Definition: symbol_table_base.cpp:18
symbolt::value
exprt value
Initial value of symbol.
Definition: symbol.h:34
array_typet
Arrays with given size.
Definition: std_types.h:965
code_skipt
A codet representing a skip statement.
Definition: std_code.h:270
is_null
static exprt is_null(const array_string_exprt &string, array_poolt &array_pool)
Expression which is true when the string is equal to the literal "null".
Definition: string_format_builtin_function.cpp:93
symbolt::location
source_locationt location
Source code location of definition of symbol.
Definition: symbol.h:37
code_inputt
A codet representing the declaration that an input of a particular description has a value which corr...
Definition: std_code.h:645
symbolt
Symbol table entry.
Definition: symbol.h:28
irept::set
void set(const irep_namet &name, const irep_idt &value)
Definition: irep.h:442
from_integer
constant_exprt from_integer(const mp_integer &int_value, const typet &type)
Definition: arith_tools.cpp:99
static_lifetime_init
static optionalt< codet > static_lifetime_init(const irep_idt &identifier, symbol_tablet &symbol_table)
Definition: static_lifetime_init.cpp:26
symbol_table_baset::symbols
const symbolst & symbols
Read-only field, used to look up symbols given their names.
Definition: symbol_table_base.h:30
binary_relation_exprt
A base class for relations, i.e., binary predicates whose two operands have the same type.
Definition: std_expr.h:725
forall_symbol_base_map
#define forall_symbol_base_map(it, expr, base_name)
Definition: symbol_table.h:11
CPROVER_PREFIX
#define CPROVER_PREFIX
Definition: cprover_prefix.h:14
power
mp_integer power(const mp_integer &base, const mp_integer &exponent)
A multi-precision implementation of the power operator.
Definition: arith_tools.cpp:194
code_typet::parametert
Definition: std_types.h:753
symbolt::is_static_lifetime
bool is_static_lifetime
Definition: symbol.h:65
goto_functions.h
Goto Programs with Functions.
config.h
integer_bitvector_typet::largest
mp_integer largest() const
Return the largest value that can be represented using this type.
Definition: std_types.cpp:171
symbol_table_baset::lookup
const symbolt * lookup(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
Definition: symbol_table_base.h:95
code_typet::return_type
const typet & return_type() const
Definition: std_types.h:847
exprt::operands
operandst & operands()
Definition: expr.h:95
r
static int8_t r
Definition: irep_hash.h:59
symbolt::is_lvalue
bool is_lvalue
Definition: symbol.h:66
type2c
std::string type2c(const typet &type, const namespacet &ns, const expr2c_configurationt &configuration)
Definition: expr2c.cpp:3894
goto_functionst::entry_point
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
Definition: goto_functions.h:90
codet::op1
exprt & op1()
Definition: expr.h:105
index_exprt
Array index operator.
Definition: std_expr.h:1293
static_lifetime_init.h
address_of_exprt
Operator to return the address of an object.
Definition: std_expr.h:2786
exprt::add_source_location
source_locationt & add_source_location()
Definition: expr.h:259
pointer_typet
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
Definition: std_types.h:1488
size_type
unsignedbv_typet size_type()
Definition: c_types.cpp:58
code_assignt
A codet representing an assignment in the program.
Definition: std_code.h:295
exprt::source_location
const source_locationt & source_location() const
Definition: expr.h:254
configt::ansi_ct::int_width
std::size_t int_width
Definition: config.h:31
c_types.h
symbolt::name
irep_idt name
The unique identifier.
Definition: symbol.h:40
code_function_callt::function
exprt & function()
Definition: std_code.h:1218
codet
Data structure for representing an arbitrary statement in a program.
Definition: std_code.h:35