Package io.github.cvc5
Class Command
java.lang.Object
io.github.cvc5.Command
Encapsulation of a command.
Commands are constructed by the input parser and can be invoked on
the solver and symbol manager.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Free the native resource associated with this pointer.protected void
deletePointer
(long pointer) Delete the native resource associated with the specified pointer.Get the name for this command, e.g.long
Return the raw native pointer.invoke
(Solver solver, SymbolManager symbolManager) Invoke the command on the solver and symbol manager sm and return any resulting output as a string.boolean
isNull()
Determine if this command is null.toString()
Return a string representation of the pointer.protected String
toString
(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
-
invoke
Invoke the command on the solver and symbol manager sm and return any resulting output as a string.- Parameters:
solver
- The solver to invoke the command on.symbolManager
- The symbol manager to invoke the command on.- Returns:
- The output of invoking the command.
-
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 result.
-
getCommandName
Get the name for this command, e.g. "assert".- Returns:
- The name of this command.
-
isNull
public boolean isNull()Determine if this command is null.- Returns:
- True if this command is null.
-
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.
-