cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
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
10
class
smt_responset
:
protected
irept
11
{
12
public
:
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_
class
t>
23
const
sub_classt *
cast
() const &;
24
25
protected:
26
using
irept
::
irept
;
27
};
28
29
class
smt_success_responset
: public
smt_responset
30
{
31
public
:
32
smt_success_responset
();
33
};
34
35
class
smt_check_sat_response_kindt
:
protected
irept
36
{
37
public
:
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.
40
smt_check_sat_response_kindt
() =
delete
;
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_
class
t>
48
const
sub_classt *
cast
() const &;
49
56
template <typename derivedt>
57
class
storert
58
{
59
protected
:
60
storert
();
61
static
irept
upcast
(
smt_check_sat_response_kindt
check_sat_response_kind);
62
static
const
smt_check_sat_response_kindt
&
downcast
(
const
irept
&);
63
};
64
65
protected
:
66
using
irept::irept
;
67
};
68
69
class
smt_sat_responset
:
public
smt_check_sat_response_kindt
70
{
71
public
:
72
smt_sat_responset
();
73
};
74
75
class
smt_unsat_responset
:
public
smt_check_sat_response_kindt
76
{
77
public
:
78
smt_unsat_responset
();
79
};
80
81
class
smt_unknown_responset
:
public
smt_check_sat_response_kindt
82
{
83
public
:
84
smt_unknown_responset
();
85
};
86
87
class
smt_check_sat_responset
88
:
public
smt_responset
,
89
private
smt_check_sat_response_kindt::storert
<smt_check_sat_responset>
90
{
91
public
:
92
explicit
smt_check_sat_responset
(
smt_check_sat_response_kindt
kind
);
93
const
smt_check_sat_response_kindt
&
kind
()
const
;
94
};
95
96
class
smt_get_value_responset
97
:
public
smt_responset
,
98
private
smt_termt::storert
<smt_get_value_responset>
99
{
100
public
:
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
117
friend
smt_get_value_responset
;
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
124
class
smt_unsupported_responset
:
public
smt_responset
125
{
126
public
:
127
smt_unsupported_responset
();
128
};
129
130
class
smt_error_responset
:
public
smt_responset
131
{
132
public
:
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
irept::pretty
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
Definition
irep.cpp:482
irept::irept
irept(const irep_idt &_id)
Definition
irep.h:377
smt_check_sat_response_kindt::storert
Class for adding the ability to up and down cast smt_check_sat_response_kindt to and from irept.
Definition
smt_responses.h:58
smt_check_sat_response_kindt::storert::upcast
static irept upcast(smt_check_sat_response_kindt check_sat_response_kind)
Definition
smt_responses.cpp:84
smt_check_sat_response_kindt::storert::storert
storert()
Definition
smt_responses.cpp:75
smt_check_sat_response_kindt::storert::downcast
static const smt_check_sat_response_kindt & downcast(const irept &)
Definition
smt_responses.cpp:92
smt_check_sat_response_kindt
Definition
smt_responses.h:36
smt_check_sat_response_kindt::irept
irept(const irep_idt &_id)
Definition
irep.h:377
smt_check_sat_response_kindt::smt_check_sat_response_kindt
smt_check_sat_response_kindt()=delete
smt_check_sat_response_kindt::cast
const sub_classt * cast() const &
smt_check_sat_responset::smt_check_sat_responset
smt_check_sat_responset(smt_check_sat_response_kindt kind)
Definition
smt_responses.cpp:97
smt_check_sat_responset::kind
const smt_check_sat_response_kindt & kind() const
Definition
smt_responses.cpp:104
smt_error_responset::message
const irep_idt & message() const
Definition
smt_responses.cpp:183
smt_error_responset::smt_error_responset
smt_error_responset(irep_idt message)
Definition
smt_responses.cpp:177
smt_get_value_responset::valuation_pairt::valuation_pairt
valuation_pairt()=delete
smt_get_value_responset::valuation_pairt::descriptor
const smt_termt & descriptor() const
Definition
smt_responses.cpp:127
smt_get_value_responset::valuation_pairt::value
const smt_termt & value() const
Definition
smt_responses.cpp:132
smt_get_value_responset::valuation_pairt::smt_get_value_responset
friend smt_get_value_responset
Definition
smt_responses.h:117
smt_get_value_responset::smt_get_value_responset
smt_get_value_responset(std::vector< valuation_pairt > pairs)
Definition
smt_responses.cpp:149
smt_get_value_responset::pairs
std::vector< std::reference_wrapper< const valuation_pairt > > pairs() const
Definition
smt_responses.cpp:165
smt_responset::smt_responset
smt_responset()=delete
smt_responset::irept
irept(const irep_idt &_id)
Definition
irep.h:377
smt_responset::operator!=
bool operator!=(const smt_responset &) const
Definition
smt_responses.cpp:19
smt_responset::operator==
bool operator==(const smt_responset &) const
Definition
smt_responses.cpp:14
smt_responset::cast
const sub_classt * cast() const &
Definition
smt_responses.cpp:37
smt_sat_responset::smt_sat_responset
smt_sat_responset()
Definition
smt_responses.cpp:59
smt_success_responset::smt_success_responset
smt_success_responset()
Definition
smt_responses.cpp:54
smt_termt::storert
Class for adding the ability to up and down cast smt_termt to and from irept.
Definition
smt_terms.h:44
smt_termt
Definition
smt_terms.h:21
smt_unknown_responset::smt_unknown_responset
smt_unknown_responset()
Definition
smt_responses.cpp:69
smt_unsat_responset::smt_unsat_responset
smt_unsat_responset()
Definition
smt_responses.cpp:64
smt_unsupported_responset::smt_unsupported_responset
smt_unsupported_responset()
Definition
smt_responses.cpp:172
operator!=
bool operator!=(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
Definition
interval.cpp:1532
irep.h
smt_terms.h
operator==
bool operator==(const string_not_contains_constraintt &left, const string_not_contains_constraintt &right)
Definition
string_constraint.cpp:83
irep_idt
dstringt irep_idt
Definition
verification_result.h:16
solvers
smt2_incremental
ast
smt_responses.h
Generated by
1.17.0