Package io.github.cvc5
Class Op
java.lang.Object
io.github.cvc5.Op
A cvc5 operator.
An operator is a term that represents certain operators, instantiated
with its required parameters, e.g., a Term of kind
Kind.BITVECTOR_EXTRACT.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFree the native resource associated with this pointer.protected voiddeletePointer(long pointer) Delete the native resource associated with the specified pointer.booleanSyntactic equality operator.get(int i) Get the index at positioni.getKind()Get the kind of this operator.intGet the number of indices of this op.longReturn the raw native pointer.inthashCode()Get the hash value of an operator.booleanDetermine if this operator is indexed.booleanisNull()Determine if this operator is a null term.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.
-
-
Constructor Details
-
Op
public Op()Null op
-
-
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. -
getKind
Get the kind of this operator.- Returns:
- The kind of this operator.
-
isNull
public boolean isNull()Determine if this operator is a null term.- Returns:
- True if this operator is a null term.
-
isIndexed
public boolean isIndexed()Determine if this operator is indexed.- Returns:
- True iff this operator is indexed.
-
getNumIndices
public int getNumIndices()Get the number of indices of this op.- Returns:
- The number of indices of this op.
-
get
Get the index at positioni.- Parameters:
i- The position of the index to return.- Returns:
- The index at position
i. - Throws:
CVC5ApiException- on error
-
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 operator.
-
hashCode
public int hashCode()Get the hash value of an operator. -
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.
-