blob: 2d307b2d44392a4ff4d1e33e2ec1e02e2e9566a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#include "cvc4_public.h"
#pragma once
namespace CVC4 {
// messy; Expr needs EmptySet (because it's the payload of a
// CONSTANT-kinded expression), and EmptySet needs Expr.
class CVC4_PUBLIC EmptySet;
}/* CVC4 namespace */
#include "expr/expr.h"
#include "expr/type.h"
#include <iostream>
namespace CVC4 {
class CVC4_PUBLIC EmptySet {
const SetType d_type;
public:
EmptySet() { } /* Null typed */
EmptySet(SetType t):d_type(t) { }
~EmptySet() throw() {
}
SetType getType() const { return d_type; }
bool operator==(const EmptySet& asa) const throw() {
return d_type == asa.d_type;
}
bool operator!=(const EmptySet& asa) const throw() {
return !(*this == asa);
}
bool operator<(const EmptySet& asa) const throw() {
return d_type < asa.d_type;
}
bool operator<=(const EmptySet& asa) const throw() {
return d_type <= asa.d_type;
}
bool operator>(const EmptySet& asa) const throw() {
return !(*this <= asa);
}
bool operator>=(const EmptySet& asa) const throw() {
return !(*this < asa);
}
};/* class EmptySet */
std::ostream& operator<<(std::ostream& out, const EmptySet& asa) CVC4_PUBLIC;
struct CVC4_PUBLIC EmptySetHashFunction {
inline size_t operator()(const EmptySet& asa) const {
return TypeHashFunction()(asa.getType());
}
};/* struct EmptysetHashFunction */
}
|