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
The type of an expression, extends irept.
Definition: type.h:27
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.
Symbol table entry.
Definition: symbol.h:27
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,...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:35
void init_system_library_map()
To generate a map of header file names -> list of symbols The symbol names are reserved as the header...
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.
std::map< irep_idt, irep_idt > system_library_map
Defines typet, type_with_subtypet and type_with_subtypest.