CVC4::SortType Class Reference

Class encapsulating a user-defined sort. More...

`#include <type.h>`

Inheritance diagram for CVC4::SortType:
[legend]
Collaboration diagram for CVC4::SortType:
[legend]

## Public Member Functions

| SortType (const Type &type=Type()) throw (IllegalArgumentException)
| Construct from the base type.
std::string | getName () const
| Get the name of the sort.
bool | isParameterized () const
| Is this type parameterized?
std::vector< Type > | getParamTypes () const
| Get the parameter types.
bool | isNull () const
| Check whether this is a null type.
Cardinality | getCardinality () const
| Return the cardinality of this type.
bool | isWellFounded () const
| Is this a well-founded type?
Expr | mkGroundTerm () const
| Construct and return a ground term for this Type.
bool | isSubtypeOf (Type t) const
| Is this type a subtype of the given type?
bool | isComparableTo (Type t) const
| Is this type comparable to the given type (i.e., do they share a common ancestor in the subtype tree)?
Type | getBaseType () const
| Get the most general base type of this type.
Type | substitute (const Type &type, const Type &replacement) const
| Substitution of Types.
Type | substitute (const std::vector< Type > &types, const std::vector< Type > &replacements) const
| Simultaneous substitution of Types.
ExprManager * | getExprManager () const
| Get this type's ExprManager.
Type | exportTo (ExprManager *exprManager, ExprManagerMapCollection &vmap) const
| Exports this type into a different ExprManager.
bool | operator== (const Type &t) const
| Comparison for structural equality.
bool | operator!= (const Type &t) const
| Comparison for structural disequality.
bool | operator< (const Type &t) const
| An ordering on Types so they can be stored in maps, etc.
bool | operator<= (const Type &t) const
| An ordering on Types so they can be stored in maps, etc.
bool | operator> (const Type &t) const
| An ordering on Types so they can be stored in maps, etc.
bool | operator>= (const Type &t) const
| An ordering on Types so they can be stored in maps, etc.
bool | isBoolean () const
| Is this the Boolean type?
bool | isInteger () const
| Is this the integer type?
bool | isReal () const
| Is this the real type?
bool | isString () const
| Is this the string type?
bool | isBitVector () const
| Is this the bit-vector type?
bool | isFunction () const
| Is this a function type?
bool | isPredicate () const
| Is this a predicate type, i.e.
bool | isTuple () const
| Is this a tuple type?
bool | isRecord () const
| Is this a record type?
bool | isSExpr () const
| Is this a symbolic expression type?
bool | isArray () const
| Is this an array type?
bool | isSet () const
| Is this a Set type?
bool | isDatatype () const
| Is this a datatype type?
bool | isConstructor () const
| Is this a constructor type?
bool | isSelector () const
| Is this a selector type?
bool | isTester () const
| Is this a tester type?
bool | isSort () const
| Is this a sort kind?
bool | isSortConstructor () const
| Is this a sort constructor kind?
bool | isSubrange () const
| Is this a predicate subtype?
void | toStream (std::ostream &out) const
| Outputs a string representation of this type to the stream.
std::string | toString () const
| Constructs a string representation of this type.

## Protected Member Functions

Type | makeType (const TypeNode &typeNode) const
| Construct a new type given the typeNode, for internal use only.

## Static Protected Member Functions

static TypeNode * | getTypeNode (const Type &t) throw ()
| Accessor for derived classes.

## Protected Attributes

TypeNode * | d_typeNode
| The internal expression representation.
NodeManager * | d_nodeManager
| The responsible expression manager.

## Detailed Description

Class encapsulating a user-defined sort.

Definition at line 515 of file type.h.

## Constructor & Destructor Documentation

## SortType()

CVC4::SortType::SortType | ( | const Type & | type = Type() | ) |
throw | ( | IllegalArgumentException ) |  |  |

Construct from the base type.

## Member Function Documentation

## exportTo()

Type CVC4::Type::exportTo | ( | ExprManager * | exprManager,
|  | ExprManagerMapCollection & | vmap ) const

inherited

Exports this type into a different ExprManager.

Referenced by CVC4::Command::ExportTransformer::operator()().

## getBaseType()

Type CVC4::Type::getBaseType | ( |  | ) | const

inherited

Get the most general base type of this type.

## getCardinality()

Cardinality CVC4::Type::getCardinality | ( |  | ) | const

inherited

Return the cardinality of this type.

## getExprManager()

ExprManager * CVC4::Type::getExprManager | ( |  | ) | const

inherited

Get this type's ExprManager.

## getName()

std::string CVC4::SortType::getName | ( |  | ) | const

Get the name of the sort.

## getParamTypes()

std::vector< Type > CVC4::SortType::getParamTypes | ( |  | ) | const

Get the parameter types.

## getTypeNode()

static TypeNode * CVC4::Type::getTypeNode | ( | const Type & | t | ) |
throw | ( | ) |  |  |

inlinestaticprotectedinherited

Accessor for derived classes.

Definition at line 121 of file type.h.

## isArray()

bool CVC4::Type::isArray | ( |  | ) | const

inherited

Is this an array type?

Returns
  true if the type is a array type

## isBitVector()

bool CVC4::Type::isBitVector | ( |  | ) | const

inherited

Is this the bit-vector type?

Returns
  true if the type is a bit-vector type

## isBoolean()

bool CVC4::Type::isBoolean | ( |  | ) | const

inherited

Is this the Boolean type?

Returns
  true if the type is a Boolean type

## isComparableTo()

bool CVC4::Type::isComparableTo | ( | Type | t | ) | const

inherited

Is this type comparable to the given type (i.e., do they share a common ancestor in the subtype tree)?

## isConstructor()

bool CVC4::Type::isConstructor | ( |  | ) | const

inherited

Is this a constructor type?

Returns
  true if the type is a constructor type

## isDatatype()

bool CVC4::Type::isDatatype | ( |  | ) | const

inherited

Is this a datatype type?

Returns
  true if the type is a datatype type

## isFunction()

bool CVC4::Type::isFunction | ( |  | ) | const

inherited

Is this a function type?

Returns
  true if the type is a function type

## isInteger()

bool CVC4::Type::isInteger | ( |  | ) | const

inherited

Is this the integer type?

Returns
  true if the type is a integer type

## isNull()

bool CVC4::Type::isNull | ( |  | ) | const

inherited

Check whether this is a null type.

Returns
  true if type is null

## isParameterized()

bool CVC4::SortType::isParameterized | ( |  | ) | const

Is this type parameterized?

## isPredicate()

bool CVC4::Type::isPredicate | ( |  | ) | const

inherited

Is this a predicate type, i.e.

if it's a function type mapping to Boolean. All predicate types are also function types.

Returns
  true if the type is a predicate type

## isReal()

bool CVC4::Type::isReal | ( |  | ) | const

inherited

Is this the real type?

Returns
  true if the type is a real type

## isRecord()

bool CVC4::Type::isRecord | ( |  | ) | const

inherited

Is this a record type?

Returns
  true if the type is a record type

## isSelector()

bool CVC4::Type::isSelector | ( |  | ) | const

inherited

Is this a selector type?

Returns
  true if the type is a selector type

## isSet()

bool CVC4::Type::isSet | ( |  | ) | const

inherited

Is this a Set type?

Returns
  true if the type is a Set type

## isSExpr()

bool CVC4::Type::isSExpr | ( |  | ) | const

inherited

Is this a symbolic expression type?

Returns
  true if the type is a symbolic expression type

## isSort()

bool CVC4::Type::isSort | ( |  | ) | const

inherited

Is this a sort kind?

Returns
  true if this is a sort kind

## isSortConstructor()

bool CVC4::Type::isSortConstructor | ( |  | ) | const

inherited

Is this a sort constructor kind?

Returns
  true if this is a sort constructor kind

## isString()

bool CVC4::Type::isString | ( |  | ) | const

inherited

Is this the string type?

Returns
  true if the type is the string type

## isSubrange()

bool CVC4::Type::isSubrange | ( |  | ) | const

inherited

Is this a predicate subtype?

Returns
  true if this is a predicate subtype Is this an integer subrange type?
  true if this is an integer subrange type

## isSubtypeOf()

bool CVC4::Type::isSubtypeOf | ( | Type | t | ) | const

inherited

Is this type a subtype of the given type?

## isTester()

bool CVC4::Type::isTester | ( |  | ) | const

inherited

Is this a tester type?

Returns
  true if the type is a tester type

## isTuple()

bool CVC4::Type::isTuple | ( |  | ) | const

inherited

Is this a tuple type?

Returns
  true if the type is a tuple type

## isWellFounded()

bool CVC4::Type::isWellFounded | ( |  | ) | const

inherited

Is this a well-founded type?

## makeType()

Type CVC4::Type::makeType | ( | const TypeNode & | typeNode | ) | const

protectedinherited

Construct a new type given the typeNode, for internal use only.

Parameters

  typeNode | the TypeNode to use

Returns
  the Type corresponding to the TypeNode

## mkGroundTerm()

Expr CVC4::Type::mkGroundTerm | ( |  | ) | const

inherited

Construct and return a ground term for this Type.

Throws an exception if this type is not well-founded.

## operator!=()

bool CVC4::Type::operator!= | ( | const Type & | t | ) | const

inherited

Comparison for structural disequality.

Parameters

  t | the type to compare to

Returns
  true if the types are not equal

## operator<()

bool CVC4::Type::operator< | ( | const Type & | t | ) | const

inherited

An ordering on Types so they can be stored in maps, etc.

## operator<=()

bool CVC4::Type::operator<= | ( | const Type & | t | ) | const

inherited

An ordering on Types so they can be stored in maps, etc.

## operator==()

bool CVC4::Type::operator== | ( | const Type & | t | ) | const

inherited

Comparison for structural equality.

Parameters

  t | the type to compare to

Returns
  true if the types are equal

## operator>()

bool CVC4::Type::operator> | ( | const Type & | t | ) | const

inherited

An ordering on Types so they can be stored in maps, etc.

## operator>=()

bool CVC4::Type::operator>= | ( | const Type & | t | ) | const

inherited

An ordering on Types so they can be stored in maps, etc.

## substitute() [1/2]

Type CVC4::Type::substitute | ( | const std::vector< Type > & | types,
|  | const std::vector< Type > & | replacements ) const

inherited

Simultaneous substitution of Types.

## substitute() [2/2]

Type CVC4::Type::substitute | ( | const Type & | type,
|  | const Type & | replacement ) const

inherited

Substitution of Types.

## toStream()

void CVC4::Type::toStream | ( | std::ostream & | out | ) | const

inherited

Outputs a string representation of this type to the stream.

Parameters

  out | the stream to output to

## toString()

std::string CVC4::Type::toString | ( |  | ) | const

inherited

Constructs a string representation of this type.

## Field Documentation

## d_nodeManager

NodeManager* CVC4::Type::d_nodeManager

protectedinherited

The responsible expression manager.

Definition at line 104 of file type.h.

## d_typeNode

TypeNode* CVC4::Type::d_typeNode

protectedinherited

The internal expression representation.

Definition at line 101 of file type.h.

The documentation for this class was generated from the following file:

- src/expr/type.h