DatatypeDecl

class DatatypeDecl

A cvc5 datatype declaration. A datatype declaration is not itself a datatype (see Datatype ), but a specification for creating a datatype sort.

The interface for a datatype declaration coincides with the syntax for the SMT-LIB 2.6 command declare-datatype , or a single datatype within the declare-datatypes command.

Datatype sorts can be constructed from a DatatypeDecl using:

Public Functions

DatatypeDecl ( )

Constructor.

~DatatypeDecl ( )

Destructor.

void addConstructor ( const DatatypeConstructorDecl & ctor )

Add datatype constructor declaration.

Parameters :

ctor – The datatype constructor declaration to add.

size_t getNumConstructors ( ) const

Get the number of constructors (so far) for this Datatype declaration.

Returns :

The number of constructors.

bool isParametric ( ) const

Determine if this Datatype declaration is parametric.

Warning

This function is experimental and may change in future versions.

Returns :

True if this datatype declaration is parametric.

bool isResolved ( ) const

Determine if this datatype declaration is resolved (has already been used to declare a datatype).

Returns :

True if this datatype declaration is resolved.

bool isNull ( ) const

Determine if this datatype declaration is nullary.

Returns :

True if this DatatypeDecl is a null object.

std :: string toString ( ) const

Get a string representation of this datatype declaration.

Returns :

A string representation.

std :: string getName ( ) const

Get the name of this datatype declaration.

Returns :

The name.