Package io.github.cvc5
Class Proof
java.lang.Object
io.github.cvc5.Proof
A cvc5 Proof.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFree the native resource associated with this pointer.booleanReferential equality operator.Get the annotation identifier used by the root step of the proof.Term[]Get the arguments of the root step of the proof as a vector of terms.getArgumentToString(int i) Get a string representation of an argument of the root step of the proof.Proof[]Get the premises of the root step of the proof.longReturn the raw native pointer.Get the conclusion of the root step of the proof.Get the proof rewrite rule used by the root step of the proof.getRule()Get the proof rule used by the root step of the proof.inthashCode()Get the hash value of a proof.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
-
Proof
public Proof()Null proof
-
-
Method Details
-
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 the pointer
-
getRule
Get the proof rule used by the root step of the proof.- Returns:
- The proof rule used by the root step of the proof.
- Throws:
CVC5ApiException- on error
-
getRewriteRule
Get the proof rewrite rule used by the root step of the proof.- Returns:
- The proof rewrite rule used by the root step of the proof.
- Throws:
CVC5ApiException- if `getRule()` does not return `DSL_REWRITE` or `THEORY_REWRITE`.
-
getAnnotationId
Get the annotation identifier used by the root step of the proof.- Returns:
- The annotation identifier used by the root step of the proof.
- Throws:
CVC5ApiException- if `getRule()` does not return `ANNOTATE`.- Note:
- This method is experimental and may change in future versions.
-
getResult
Get the conclusion of the root step of the proof.- Returns:
- The conclusion of the root step of the proof.
-
getChildren
Get the premises of the root step of the proof.- Returns:
- The premises of the root step of the proof.
-
getArguments
Get the arguments of the root step of the proof as a vector of terms.- Returns:
- The arguments of the root step of the proof as a vector of terms. Some of those terms might be strings.
-
getArgumentToString
Get a string representation of an argument of the root step of the proof. The string is computed by the internal proof printer, which takes into account how the argument is used by the proof rule. For example, an argument that encodes an identifier (e.g., of a theory or a rewrite rule) is converted to the name of that identifier. All other arguments are converted to the string representation of the corresponding term returned bygetArguments().- Parameters:
i- The index of the argument.- Returns:
- The string representation of the argument.
- Throws:
CVC5ApiException- on error- Note:
- This method is experimental and may change in future versions.
-
equals
Referential equality operator. -
hashCode
public int hashCode()Get the hash value of a proof. -
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.
-