abstract_value.h
Go to the documentation of this file.
/********************* */
#include "cvc4_public.h"
#pragma once
#include "expr/type.h"
#include <iostream>
namespace CVC4 {
class CVC4_PUBLIC AbstractValue {
const Integer d_index;
public:
AbstractValue(Integer index) throw(IllegalArgumentException) :
d_index(index) {
CheckArgument(index >= 1, index, "index >= 1 required for abstract value, not `%s'", index.toString().c_str());
}
~AbstractValue() throw() {
}
const Integer& getIndex() const throw() {
return d_index;
}
bool operator==(const AbstractValue& val) const throw() {
return d_index == val.d_index;
}
bool operator!=(const AbstractValue& val) const throw() {
return !(*this == val);
}
bool operator<(const AbstractValue& val) const throw() {
return d_index < val.d_index;
}
bool operator<=(const AbstractValue& val) const throw() {
return d_index <= val.d_index;
}
bool operator>(const AbstractValue& val) const throw() {
return !(*this <= val);
}
bool operator>=(const AbstractValue& val) const throw() {
return !(*this < val);
}
};/* class AbstractValue */
std::ostream& operator<<(std::ostream& out, const AbstractValue& val) CVC4_PUBLIC;
struct CVC4_PUBLIC AbstractValueHashFunction {
inline size_t operator()(const AbstractValue& val) const {
return IntegerHashFunction()(val.getIndex());
}
};/* struct AbstractValueHashFunction */
}/* CVC4 namespace */
CVC4::AbstractValue
Definition abstract_value.h:26
CVC4::AbstractValue::operator>
bool operator>(const AbstractValue &val) const
Definition abstract_value.h:56
CVC4::AbstractValue::operator==
bool operator==(const AbstractValue &val) const
Definition abstract_value.h:43
CVC4::AbstractValue::getIndex
const Integer & getIndex() const
Definition abstract_value.h:39
CVC4::AbstractValue::operator!=
bool operator!=(const AbstractValue &val) const
Definition abstract_value.h:46
CVC4::AbstractValue::~AbstractValue
~AbstractValue()
Definition abstract_value.h:36
CVC4::AbstractValue::operator<
bool operator<(const AbstractValue &val) const
Definition abstract_value.h:50
CVC4::AbstractValue::AbstractValue
AbstractValue(Integer index)
Definition abstract_value.h:31
CVC4::AbstractValue::operator>=
bool operator>=(const AbstractValue &val) const
Definition abstract_value.h:59
CVC4::AbstractValue::operator<=
bool operator<=(const AbstractValue &val) const
Definition abstract_value.h:53
CVC4::IllegalArgumentException
Definition exception.h:79
CVC4::Integer
Definition integer_gmp_imp.h:34
cvc4_public.h
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4_PUBLIC
#define CVC4_PUBLIC
Definition cvc4_public.h:30
CVC4
Definition expr.h:106
CVC4::operator<<
std::ostream & operator<<(std::ostream &out, const TypeCheckingException &e)
CVC4::CheckArgument
void CheckArgument(bool cond, const T &arg, const char *fmt,...)
Definition exception.h:140
CVC4::AbstractValueHashFunction
Hash function for the BitVector constants.
Definition abstract_value.h:70
CVC4::AbstractValueHashFunction::operator()
size_t operator()(const AbstractValue &val) const
Definition abstract_value.h:71
CVC4::IntegerHashFunction
Definition integer_gmp_imp.h:508
type.h
Interface for expression types.