CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
smt_responses.h
Go to the documentation of this file.
1// Author: Diffblue Ltd.
2
3#ifndef CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_RESPONSES_H
4#define CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_RESPONSES_H
5
6#include <util/irep.h>
7
8#include "smt_terms.h"
9
10class smt_responset : protected irept
11{
12public:
13 // smt_responset does not support the notion of an empty / null state. Use
14 // std::optional<smt_responset> instead if an empty response is required.
15 smt_responset() = delete;
16
17 using irept::pretty;
18
19 bool operator==(const smt_responset &) const;
20 bool operator!=(const smt_responset &) const;
21
22 template <typename sub_classt>
23 const sub_classt *cast() const &;
24
27};
28
34
36{
37public:
38 // smt_responset does not support the notion of an empty / null state. Use
39 // std::optional<smt_responset> instead if an empty response is required.
41
42 using irept::pretty;
43
44 bool operator==(const smt_check_sat_response_kindt &) const;
45 bool operator!=(const smt_check_sat_response_kindt &) const;
46
47 template <typename sub_classt>
48 const sub_classt *cast() const &;
49
58 {
59 protected:
60 storert();
62 static const smt_check_sat_response_kindt &downcast(const irept &);
63 };
64
65protected:
66 using irept::irept;
67};
68
74
80
86
88 : public smt_responset,
89 private smt_check_sat_response_kindt::storert<smt_check_sat_responset>
90{
91public:
93 const smt_check_sat_response_kindt &kind() const;
94};
95
97 : public smt_responset,
98 private smt_termt::storert<smt_get_value_responset>
99{
100public:
101 class valuation_pairt : private irept,
102 private smt_termt::storert<valuation_pairt>
103 {
104 public:
105 valuation_pairt() = delete;
106 valuation_pairt(smt_termt descriptor, smt_termt value);
107 valuation_pairt(irep_idt descriptor, const smt_termt &value);
108
109 using irept::pretty;
110
111 bool operator==(const valuation_pairt &) const;
112 bool operator!=(const valuation_pairt &) const;
113
114 const smt_termt &descriptor() const;
115 const smt_termt &value() const;
116
118 };
119
120 explicit smt_get_value_responset(std::vector<valuation_pairt> pairs);
121 std::vector<std::reference_wrapper<const valuation_pairt>> pairs() const;
122};
123
125{
126public:
128};
129
131{
132public:
133 explicit smt_error_responset(irep_idt message);
134 const irep_idt &message() const;
135};
136
137#endif // CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_RESPONSES_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition irep.h:364
irept()=default
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
Definition irep.cpp:482
Class for adding the ability to up and down cast smt_check_sat_response_kindt to and from irept.
const sub_classt * cast() const &
smt_responset()=delete
bool operator!=(const smt_responset &) const
bool operator==(const smt_responset &) const
const sub_classt * cast() const &
Class for adding the ability to up and down cast smt_termt to and from irept.
Definition smt_terms.h:44
bool operator!=(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
bool operator==(const string_not_contains_constraintt &left, const string_not_contains_constraintt &right)