11namespace expressions {
78 return BooleanType::mask;
86 return IntegerType::mask;
98 return BitVectorType::mask;
102 return "bv[" + std::to_string(width) +
"]";
114 return RationalType::mask;
134 return ArrayType::mask;
142 return TranscendentalNumberType::mask;
146 return "transcendental";
157 return static_cast<ArrayType const&
>(first).getElementType() <
static_cast<ArrayType const&
>(second).getElementType();
166Type::Type(std::shared_ptr<ExpressionManager const>
const& manager, std::shared_ptr<BaseType>
const& innerType) : manager(manager), innerType(innerType) {
171 return *this->innerType == *other.innerType;
175 return this->innerType->getMask();
179 return this->innerType->isBooleanType();
183 return this->innerType->isIntegerType();
187 return this->innerType->isBitVectorType();
195 return this->innerType->isArrayType();
199 return this->innerType->isTranscendentalNumberType();
203 return this->innerType->getStringRepresentation();
215 return this->innerType->isRationalType();
224 return std::max(*
this, other);
234 "Operator division requires numerical operands, got " << this->isNumericalType() <<
" and " << other.
isNumericalType() <<
".");
236 return std::max(*
this, other);
241 return std::max(*
this, other);
252 if (allowIntegerType) {
253 return std::max(*
this, other);
281 if (thenType == elseType) {
285 "Operator 'ite' requires proper types.");
286 return std::max(thenType, elseType);
298 return std::max(*
this, other);
302 return *type1.innerType < *type2.innerType;
virtual std::string getStringRepresentation() const override
Returns a string representation of the type.
Type getElementType() const
ArrayType(Type elementType)
virtual bool operator==(BaseType const &other) const override
Checks whether two types are actually the same.
virtual uint64_t getMask() const override
Retrieves the mask that is associated with this type.
virtual bool isArrayType() const override
virtual bool isBooleanType() const
virtual bool isIntegerType() const
virtual bool isArrayType() const
virtual bool operator==(BaseType const &other) const
Checks whether two types are actually the same.
virtual bool isTranscendentalNumberType() const
virtual bool isRationalType() const
virtual bool isBitVectorType() const
virtual bool isErrorType() const
virtual uint64_t getMask() const =0
Retrieves the mask that is associated with this type.
virtual bool operator==(BaseType const &other) const override
Checks whether two types are actually the same.
virtual std::string getStringRepresentation() const override
Returns a string representation of the type.
std::size_t getWidth() const
Retrieves the bit width of the bounded type.
BitVectorType(std::size_t width)
Creates a new bounded bitvector type with the given bit width.
virtual bool isIntegerType() const override
virtual uint64_t getMask() const override
Retrieves the mask that is associated with this type.
virtual bool isBitVectorType() const override
virtual uint64_t getMask() const override
Retrieves the mask that is associated with this type.
virtual bool isBooleanType() const override
virtual std::string getStringRepresentation() const override
Returns a string representation of the type.
This class is responsible for managing a set of typed variables and all expressions using these varia...
Type const & getBooleanType() const
Retrieves the boolean type.
Type const & getIntegerType() const
Retrieves the unbounded integer type.
Type const & getRationalType() const
Retrieves the rational type.
virtual bool isIntegerType() const override
virtual std::string getStringRepresentation() const override
Returns a string representation of the type.
virtual uint64_t getMask() const override
Retrieves the mask that is associated with this type.
virtual std::string getStringRepresentation() const override
Returns a string representation of the type.
virtual bool isRationalType() const override
virtual uint64_t getMask() const override
Retrieves the mask that is associated with this type.
virtual bool isTranscendentalNumberType() const override
virtual uint64_t getMask() const override
Retrieves the mask that is associated with this type.
virtual std::string getStringRepresentation() const override
Returns a string representation of the type.
Type getElementType() const
Retrieves the element type of the type, provided that it is an Array type.
bool isBooleanType() const
Checks whether this type is a boolean type.
Type modulo(Type const &other) const
bool operator==(Type const &other) const
Checks whether two types are the same.
Type logarithm(Type const &other) const
Type divide(Type const &other) const
Type power(Type const &other, bool allowIntegerType=false) const
storm::expressions::ExpressionManager const & getManager() const
Retrieves the manager of the type.
std::size_t getWidth() const
Retrieves the bit width of the type, provided that it is a bitvector type.
Type numericalComparison(Type const &other) const
Type plusMinusTimes(Type const &other) const
Type logicalConnective() const
bool isIntegerType() const
Checks whether this type is an integral type.
bool isNumericalType() const
Checks whether this type is a numerical type.
bool isArrayType() const
Checks whether this type is an array type.
std::string getStringRepresentation() const
Retrieves a string representation of the type.
Type ite(Type const &thenType, Type const &elseType) const
uint64_t getMask() const
Retrieves the bit mask of the type.
bool isRationalType() const
Checks whether this type is a rational type.
bool isTranscendentalNumberType() const
Checks whether this type is a transcendental number type.
Type trigonometric() const
bool isBitVectorType() const
Checks whether this type is a bitvector type.
Type minimumMaximum(Type const &other) const
#define STORM_LOG_THROW(cond, exception, message)
Expression operator<(Expression const &first, Expression const &second)
std::ostream & operator<<(std::ostream &stream, BaseExpression const &expression)