Package io.github.cvc5
Class DatatypeConstructorDecl
java.lang.Object
io.github.cvc5.DatatypeConstructorDecl
A cvc5 datatype constructor declaration. A datatype constructor declaration
is a specification used for creating a datatype constructor.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSelector(String name, Sort sort) Add datatype selector declaration.voidaddSelectorSelf(String name) Add datatype selector declaration whose codomain type is the datatype itself.voidaddSelectorUnresolved(String name, String unresDataypeName) Add datatype selector declaration whose codomain sort is an unresolved datatype with the given name.voidFree the native resource associated with this pointer.protected voiddeletePointer(long pointer) Delete the native resource associated with the specified pointer.booleanSyntactic equality operator.longReturn the raw native pointer.inthashCode()Get the hash value of a datatype constructor declaration.booleanisNull()Determine if this DatatypeConstructorDecl is a null declaration.toString()Return a string representation of the pointer.protected StringtoString(long pointer) Return a string representation of the specified native pointer.
-
Field Details
-
pointer
protected long pointerThe raw native pointer value.
-
-
Method Details
-
deletePointer
protected void deletePointer(long pointer) Delete the native resource associated with the specified pointer.Subclasses must implement this method to provide resource-specific cleanup logic.
- Parameters:
pointer- the native pointer to delete
-
equals
Syntactic equality operator. -
addSelector
Add datatype selector declaration.- Parameters:
name- The name of the datatype selector declaration to add.sort- The codomain sort of the datatype selector declaration to add.
-
addSelectorSelf
Add datatype selector declaration whose codomain type is the datatype itself.- Parameters:
name- The name of the datatype selector declaration to add.
-
addSelectorUnresolved
Add datatype selector declaration whose codomain sort is an unresolved datatype with the given name.- Parameters:
name- The name of the datatype selector declaration to add.unresDataypeName- The name of the unresolved datatype. The codomain of the selector will be the resolved datatype with the given name.
-
isNull
public boolean isNull()Determine if this DatatypeConstructorDecl is a null declaration.- Returns:
- True If this DatatypeConstructorDecl is a null declaration.
-
toString
Return a string representation of the specified native pointer.Subclasses must implement this method to convert the native pointer into a meaningful string.
- Parameters:
pointer- the native pointer- Returns:
- A String representation of this datatype constructor declaration
-
hashCode
public int hashCode()Get the hash value of a datatype constructor declaration. -
getPointer
public long getPointer()Return the raw native pointer.- Returns:
- the pointer value
-
deletePointer
public void deletePointer()Free the native resource associated with this pointer.This method should be called to explicitly clean up the underlying native resource. It removes this instance from the
Context, then invokes the subclass-defineddeletePointer(long)method to perform the actual cleanup. -
toString
Return a string representation of the pointer.
-