Class DatatypeConstructorDecl

java.lang.Object
io.github.cvc5.DatatypeConstructorDecl

public class DatatypeConstructorDecl extends Object
A cvc5 datatype constructor declaration. A datatype constructor declaration is a specification used for creating a datatype constructor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected long
    The raw native pointer value.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSelector(String name, Sort sort)
    Add datatype selector declaration.
    void
    Add datatype selector declaration whose codomain type is the datatype itself.
    void
    addSelectorUnresolved(String name, String unresDataypeName)
    Add datatype selector declaration whose codomain sort is an unresolved datatype with the given name.
    void
    Free the native resource associated with this pointer.
    protected void
    deletePointer(long pointer)
    Delete the native resource associated with the specified pointer.
    boolean
    Syntactic equality operator.
    long
    Return the raw native pointer.
    int
    Get the hash value of a datatype constructor declaration.
    boolean
    Determine if this DatatypeConstructorDecl is a null declaration.
    Return a string representation of the pointer.
    protected String
    toString(long pointer)
    Return a string representation of the specified native pointer.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • pointer

      protected long pointer
      The 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

      public boolean equals(Object d)
      Syntactic equality operator.
      Overrides:
      equals in class Object
      Parameters:
      d - The datatype constructor declaration to compare to for equality.
      Returns:
      True if the datatype constructor declarations are equal.
    • addSelector

      public void addSelector(String name, Sort sort)
      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

      public void addSelectorSelf(String name)
      Add datatype selector declaration whose codomain type is the datatype itself.
      Parameters:
      name - The name of the datatype selector declaration to add.
    • addSelectorUnresolved

      public void addSelectorUnresolved(String name, String unresDataypeName)
      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

      protected String toString(long pointer)
      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.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value.
    • 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-defined deletePointer(long) method to perform the actual cleanup.

    • toString

      public String toString()
      Return a string representation of the pointer.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the pointer