Class SynthResult

java.lang.Object
io.github.cvc5.SynthResult

public class SynthResult extends Object
Encapsulation of a solver synth result. This is the return value of the API methods: - Solver.checkSynth() - Solver.checkSynthNext() which we call synthesis queries. This class indicates whether the synthesis query has a solution, has no solution, or is unknown.
  • Field Summary

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

    Constructors
    Constructor
    Description
    Null synthResult
  • 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.
    boolean
    Operator overloading for equality of two synthesis results.
    long
    Return the raw native pointer.
    int
    Get the hash value of a synthesis result.
    boolean
    Determine if the synthesis query has no solution.
    boolean
    Determine if the synthesis query has a solution.
    boolean
    Determine if SynthResult is empty, i.e., a nullary SynthResult, and not an actual result returned from a synthesis query.
    boolean
    Determine if the result of the synthesis query could not be determined.
    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.
  • Constructor Details

    • SynthResult

      public SynthResult()
      Null synthResult
  • 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 r)
      Operator overloading for equality of two synthesis results.
      Overrides:
      equals in class Object
      Parameters:
      r - The synthesis result to compare to for equality.
      Returns:
      True if the synthesis results are equal.
    • isNull

      public boolean isNull()
      Determine if SynthResult is empty, i.e., a nullary SynthResult, and not an actual result returned from a synthesis query.
      Returns:
      True if SynthResult is empty, i.e., a nullary SynthResult, and not an actual result returned from a synthesis query.
    • hasSolution

      public boolean hasSolution()
      Determine if the synthesis query has a solution.
      Returns:
      True if the synthesis query has a solution.
    • hasNoSolution

      public boolean hasNoSolution()
      Determine if the synthesis query has no solution.
      Returns:
      True if the synthesis query has no solution. In this case, it was determined there was no solution.
    • isUnknown

      public boolean isUnknown()
      Determine if the result of the synthesis query could not be determined.
      Returns:
      True if the result of the synthesis query could not be determined.
    • 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.
    • hashCode

      public int hashCode()
      Get the hash value of a synthesis result.
      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