cprover
goto_function.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: A GOTO Function
4 
5 Author: Daniel Kroening
6 
7 Date: May 2018
8 
9 \*******************************************************************/
10 
13 
14 #include "goto_function.h"
15 
19  const goto_functiont &goto_function,
20  std::set<irep_idt> &dest)
21 {
22  goto_function.body.get_decl_identifiers(dest);
23 
24  const code_typet::parameterst &parameters = goto_function.type.parameters();
25 
26  // add parameters
27  for(const auto &param : parameters)
28  {
29  const irep_idt &identifier = param.get_identifier();
30  if(identifier != "")
31  dest.insert(identifier);
32  }
33 }
void get_local_identifiers(const goto_functiont &goto_function, std::set< irep_idt > &dest)
Return in dest the identifiers of the local variables declared in the goto_function and the identifie...
goto_programt body
Definition: goto_function.h:29
std::vector< parametert > parameterst
Definition: std_types.h:754
code_typet type
The type of the function, indicating the return type and parameter types.
Definition: goto_function.h:32
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Definition: dstring.h:35
void get_decl_identifiers(decl_identifierst &decl_identifiers) const
get the variables in decl statements
A goto function, consisting of function type (see type), function body (see body), and parameter identifiers (see parameter_identifiers).
Definition: goto_function.h:26
Goto Function.
const parameterst & parameters() const
Definition: std_types.h:893