Package io.github.cvc5
Class Result
java.lang.Object
io.github.cvc5.Result
Encapsulation of a three-valued solver result, with explanations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFree the native resource associated with this pointer.booleanOperator overloading for equality of two results.longReturn the raw native pointer.Get an explanation for an unknown query result.inthashCode()Get the hash value of a result.booleanisNull()Determine if Result is empty, i.e., a nullary Result, and not an actual result returned from a checkSat() (and friends) query.booleanisSat()Determine if query was a satisfiable checkSat() or checkSatAssuming() query.booleanDetermine if query was a checkSat() or checkSatAssuming() query and cvc5 was not able to determine (un)satisfiability.booleanisUnsat()Determine if if query was an unsatisfiable checkSat() or checkSatAssuming() query.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
-
Result
public Result()Null result
-
-
Method Details
-
isNull
public boolean isNull()Determine if Result is empty, i.e., a nullary Result, and not an actual result returned from a checkSat() (and friends) query.- Returns:
- True if Result is empty, i.e., a nullary Result, and not an actual result returned from a checkSat() (and friends) query.
-
isSat
public boolean isSat()Determine if query was a satisfiable checkSat() or checkSatAssuming() query.- Returns:
- True if query was a satisfiable checkSat() or checkSatAssuming() query.
-
isUnsat
public boolean isUnsat()Determine if if query was an unsatisfiable checkSat() or checkSatAssuming() query.- Returns:
- True if query was an unsatisfiable checkSat() or checkSatAssuming() query.
-
isUnknown
public boolean isUnknown()Determine if query was a checkSat() or checkSatAssuming() query and cvc5 was not able to determine (un)satisfiability.- Returns:
- True if query was a checkSat() or checkSatAssuming() query and cvc5 was not able to determine (un)satisfiability.
-
equals
Operator overloading for equality of two results. -
getUnknownExplanation
Get an explanation for an unknown query result.- Returns:
- The explanation.
-
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.
-
hashCode
public int hashCode()Get the hash value of a result. -
getPointer
public long getPointer()Return the raw native pointer.Every native call obtains the pointers of the objects it uses through this method, so that using an object after its native resource has been released raises an exception instead of crashing the JVM.
- Returns:
- the pointer value
- Throws:
IllegalStateException- if the native resource of this object has been released, e.g., viadeletePointer()
-
deletePointer
public void deletePointer()Free the native resource associated with this pointer.Native resources are freed automatically once the Java object is no longer reachable. This method frees the native resource immediately instead; afterwards, using the object raises an
IllegalStateException. It must be called from the thread that is using the associated term manager. Calling it more than once has no further effect. -
toString
Return a string representation of the pointer.
-