cprover
system_library_symbols.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Goto Programs
4 
5 Author: Thomas Kiley
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_PROGRAMS_SYSTEM_LIBRARY_SYMBOLS_H
13 #define CPROVER_GOTO_PROGRAMS_SYSTEM_LIBRARY_SYMBOLS_H
14 
15 #include <list>
16 #include <map>
17 #include <set>
18 #include <string>
19 #include <util/irep.h>
20 #include <util/type.h>
21 
22 class symbolt;
23 class typet;
24 
26 {
27 public:
28  explicit system_library_symbolst(bool init);
29 
31  system_library_symbolst(true) // NOLINT(runtime/explicit)
32  {
33  }
34 
36  const symbolt &symbol,
37  std::set<std::string> &out_system_headers) const;
38 
39  bool is_type_internal(
40  const typet &type,
41  std::set<std::string> &out_system_headers) const;
42 
43  void set_use_all_headers(bool use)
44  {
45  use_all_headers=use;
46  }
47 
48 private:
50 
52  irep_idt header_file,
53  std::list<irep_idt> symbols);
54 
55  std::map<irep_idt, irep_idt> system_library_map;
57 };
58 
59 #endif // CPROVER_GOTO_PROGRAMS_SYSTEM_LIBRARY_SYMBOLS_H
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:37
system_library_symbolst
Definition: system_library_symbols.h:26
typet
The type of an expression, extends irept.
Definition: type.h:29
system_library_symbolst::init_system_library_map
void init_system_library_map()
To generate a map of header file names -> list of symbols The symbol names are reserved as the header...
Definition: system_library_symbols.cpp:30
system_library_symbolst::use_all_headers
bool use_all_headers
Definition: system_library_symbols.h:56
type.h
Defines typet, type_with_subtypet and type_with_subtypest.
system_library_symbolst::is_type_internal
bool is_type_internal(const typet &type, std::set< std::string > &out_system_headers) const
Helper function to call is_symbol_internal_symbol on a nameless fake symbol with the given type,...
Definition: system_library_symbols.cpp:263
system_library_symbolst::system_library_symbolst
system_library_symbolst()
Definition: system_library_symbols.h:30
system_library_symbolst::system_library_map
std::map< irep_idt, irep_idt > system_library_map
Definition: system_library_symbols.h:55
system_library_symbolst::set_use_all_headers
void set_use_all_headers(bool use)
Definition: system_library_symbols.h:43
symbolt
Symbol table entry.
Definition: symbol.h:28
system_library_symbolst::is_symbol_internal_symbol
bool is_symbol_internal_symbol(const symbolt &symbol, std::set< std::string > &out_system_headers) const
To find out if a symbol is an internal symbol.
Definition: system_library_symbols.cpp:277
system_library_symbolst::add_to_system_library
void add_to_system_library(irep_idt header_file, std::list< irep_idt > symbols)
To add the symbols from a specific header file to the system library map.
Definition: system_library_symbols.cpp:246
irep.h