cprover
ansi_c_convert_type.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: ANSI-C Language Conversion
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_ANSI_C_ANSI_C_CONVERT_TYPE_H
13 #define CPROVER_ANSI_C_ANSI_C_CONVERT_TYPE_H
14 
15 #include <list>
16 
17 #include <util/expr.h>
18 #include <util/message.h>
19 
20 #include "c_qualifiers.h"
21 #include "c_storage_spec.h"
22 
24 {
25 public:
30 
31  // extensions
41 
43 
44  bool packed, aligned;
46  exprt msc_based; // this is Visual Studio
48 
49  // contracts
52 
53  // storage spec
55 
56  // qualifiers
58 
59  virtual void read(const typet &type);
60  virtual void write(typet &type);
61 
63 
64  std::list<typet> other;
65 
66  explicit ansi_c_convert_typet(message_handlert &_message_handler):
67  messaget(_message_handler)
68  // class members are initialized by calling read()
69  {
70  }
71 
72  virtual void clear()
73  {
89 
90  assigns.make_nil();
91  requires.clear();
92  ensures.clear();
93 
95 
96  other.clear();
99  }
100 
101 protected:
102  virtual void read_rec(const typet &type);
103  virtual void build_type_with_subtype(typet &type) const;
104  virtual void set_attributes(typet &type) const;
105 };
106 
107 #endif // CPROVER_ANSI_C_ANSI_C_CONVERT_TYPE_H
exprt::operandst ensures
virtual void read_rec(const typet &type)
ansi_c_convert_typet(message_handlert &_message_handler)
c_storage_spect c_storage_spec
virtual void read(const typet &type)
virtual void write(typet &type)
exprt::operandst requires
virtual void set_attributes(typet &type) const
Add qualifiers and GCC attributes onto type.
source_locationt source_location
virtual void build_type_with_subtype(typet &type) const
Build a vector or complex type with type as subtype.
std::list< typet > other
virtual void clear() override
Definition: c_qualifiers.h:80
Base class for all expressions.
Definition: expr.h:54
std::vector< exprt > operandst
Definition: expr.h:56
void make_nil()
Definition: irep.h:465
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:155
The type of an expression, extends irept.
Definition: type.h:28