CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cpp_declarator.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: C++ Language Type Checking
4
5Author: Daniel Kroening, kroening@cs.cmu.edu
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_CPP_CPP_DECLARATOR_H
13#define CPROVER_CPP_CPP_DECLARATOR_H
14
15#include <util/expr.h>
16
17#include "cpp_name.h"
18
20{
21public:
28
35
36 cpp_namet &name() { return static_cast<cpp_namet &>(add(ID_name)); }
37 const cpp_namet &name() const
38 {
39 return static_cast<const cpp_namet &>(find(ID_name));
40 }
41
42 exprt &value() { return static_cast<exprt &>(add(ID_value)); }
43 const exprt &value() const
44 {
45 return static_cast<const exprt &>(find(ID_value));
46 }
47
48 bool get_is_parameter() const
49 {
51 }
52
53 void set_is_parameter(bool is_parameter)
54 {
55 set(ID_is_parameter, is_parameter);
56 }
57
58 // initializers for function arguments
60 {
61 return static_cast<exprt &>(add(ID_init_args));
62 }
63 const exprt &init_args() const
64 {
65 return static_cast<const exprt &>(find(ID_init_args));
66 }
67
69 const irept &method_qualifier() const { return find(ID_method_qualifier); }
70
73 {
75 }
76
78 {
79 return add(ID_throw_decl);
80 }
81 const irept &throw_decl() const
82 {
83 return find(ID_throw_decl);
84 }
85
86 void output(std::ostream &out) const;
87
89};
90
91#endif // CPROVER_CPP_CPP_DECLARATOR_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
const cpp_namet & name() const
const irept & throw_decl() const
irept & throw_decl()
void set_is_parameter(bool is_parameter)
void output(std::ostream &out) const
irept & member_initializers()
typet merge_type(const typet &declaration_type) const
const irept & member_initializers() const
cpp_namet & name()
const exprt & init_args() const
const exprt & value() const
const irept & method_qualifier() const
irept & method_qualifier()
exprt & init_args()
bool get_is_parameter() const
cpp_declaratort(const typet &type)
Base class for all expressions.
Definition expr.h:56
typet & type()
Return the type of the expression.
Definition expr.h:84
source_locationt & add_source_location()
Definition expr.h:236
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition irep.h:364
bool get_bool(const irep_idt &name) const
Definition irep.cpp:57
const irept & find(const irep_idt &name) const
Definition irep.cpp:93
void set(const irep_idt &name, const irep_idt &value)
Definition irep.h:412
void make_nil()
Definition irep.h:446
irept & add(const irep_idt &name)
Definition irep.cpp:103
The type of an expression, extends irept.
Definition type.h:29