Class Command

java.lang.Object
io.github.cvc5.Command

public class Command extends Object
Encapsulation of a command. Commands are constructed by the input parser and can be invoked on the solver and symbol manager.
  • Field Summary

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

    Modifier and Type
    Method
    Description
    void
    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
    Determine if this command is null.
    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, equals, finalize, getClass, hashCode, 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
    • invoke

      public String invoke(Solver solver, SymbolManager symbolManager)
      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

      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 result.
    • getCommandName

      public String 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-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