Results¶
Solver.checkSat and its variants return a Result. Synthesis queries
return a SynthResult.
Result¶
Encapsulation of a three-valued solver result, with explanations.
Wrapper class for Result.
9 of the 9 mirrored methods of Result are generated.
| Method | Summary | Binding | Mojo |
|---|---|---|---|
isNull |
Returns true if Result is empty, i.e., a nullary Result, and not an actual result returned from a Solver.checkSat() (and friends) query. |
auto | ✓ |
isSat |
Returns true if query was a satisfiable Solver.checkSat() or Solver.checkSatAssuming() query. |
auto | ✓ |
isUnsat |
Returns true if query was an usatisfiable Solver.checkSat() or Solver.checkSatAssuming() query. |
auto | ✓ |
isUnknown |
Returns true if query was a Solver.checkSat() or Solver.checkSatAssuming() query and cvc5 was not able to determine (un)satisfiability. |
auto | ✓ |
getUnknownExplanation |
Returns an explanation for an unknown query result. | auto | ✓ |
__eq__ |
rule | ✓ | |
__ne__ |
rule | ✓ | |
__str__ |
auto | ✓ | |
__repr__ |
auto | ✓ |
Result.isNull¶
Mojo declaration:
def isNull(self) raises -> Bool
Upstream Python signature:
Result.isNull()
Returns
True if Result is empty, i.e., a nullary Result, and not
an actual result returned from a
Solver.checkSat() (and friends) query.
Binding: Generated from cvc5_result_is_null.
Result.isSat¶
Mojo declaration:
def isSat(self) raises -> Bool
Upstream Python signature:
Result.isSat()
Returns
True if query was a satisfiable
Solver.checkSat() or
Solver.checkSatAssuming() query.
Binding: Generated from cvc5_result_is_sat.
Result.isUnsat¶
Mojo declaration:
def isUnsat(self) raises -> Bool
Upstream Python signature:
Result.isUnsat()
Returns
True if query was an usatisfiable
Solver.checkSat() or
Solver.checkSatAssuming() query.
Binding: Generated from cvc5_result_is_unsat.
Result.isUnknown¶
Mojo declaration:
def isUnknown(self) raises -> Bool
Upstream Python signature:
Result.isUnknown()
Returns
True if query was a Solver.checkSat() or
Solver.checkSatAssuming() query and cvc5 was
not able to determine (un)satisfiability.
Binding: Generated from cvc5_result_is_unknown.
Result.getUnknownExplanation¶
Mojo declaration:
def getUnknownExplanation(self) raises -> UnknownExplanation
Upstream Python signature:
Result.getUnknownExplanation()
Returns
An explanation for an unknown query result.
Binding: Generated from cvc5_result_get_unknown_explanation.
Result.__eq__¶
Mojo declaration:
def __eq__(self, other: Self) -> Bool
Upstream Python signature:
Result.__eq__(other: Result)
Binding: Generated by a rule from cvc5_result_is_equal.
Result.__ne__¶
Mojo declaration:
def __ne__(self, other: Self) -> Bool
Upstream Python signature:
Result.__ne__(other: Result)
Binding: Generated by a rule from cvc5_result_is_disequal.
Result.__str__¶
Mojo declaration:
def toString(self) -> String
def write_to(self, mut writer: Some[Writer])
Upstream Python signature:
Result.__str__()
Mojo uses the Writable protocol here: call String(value), repr(value), or print(value).
Binding: Generated from cvc5_result_to_string.
Result.__repr__¶
Mojo declaration:
Upstream Python signature:
Result.__repr__()
Mojo uses the Writable protocol here: call String(value), repr(value), or print(value).
Binding: Generated from cvc5_result_to_string.
SynthResult¶
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.
8 of the 8 mirrored methods of SynthResult are generated.
| Method | Summary | Binding | Mojo |
|---|---|---|---|
__eq__ |
rule | ✓ | |
__ne__ |
rule | ✓ | |
isNull |
Returns true if SynthResult is null, i.e., not a SynthResult returned from a synthesis query. | auto | ✓ |
hasSolution |
Returns true if the synthesis query has a solution. | auto | ✓ |
hasNoSolution |
Returns true if the synthesis query has no solution. | auto | ✓ |
isUnknown |
Returns true if the result of the synthesis query could not be determined. | auto | ✓ |
__str__ |
auto | ✓ | |
__repr__ |
auto | ✓ |
SynthResult.__eq__¶
Mojo declaration:
def __eq__(self, other: Self) -> Bool
Upstream Python signature:
SynthResult.__eq__(other: SynthResult)
Binding: Generated by a rule from cvc5_synth_result_is_equal.
SynthResult.__ne__¶
Mojo declaration:
def __ne__(self, other: Self) -> Bool
Upstream Python signature:
SynthResult.__ne__(other: SynthResult)
Binding: Generated by a rule from cvc5_synth_result_is_disequal.
SynthResult.isNull¶
Mojo declaration:
def isNull(self) raises -> Bool
Upstream Python signature:
SynthResult.isNull()
Returns
True if SynthResult is null, i.e., not a SynthResult returned from a synthesis query.
Binding: Generated from cvc5_synth_result_is_null.
SynthResult.hasSolution¶
Mojo declaration:
def hasSolution(self) raises -> Bool
Upstream Python signature:
SynthResult.hasSolution()
Returns
True if the synthesis query has a solution.
Binding: Generated from cvc5_synth_result_has_solution.
SynthResult.hasNoSolution¶
Mojo declaration:
def hasNoSolution(self) raises -> Bool
Upstream Python signature:
SynthResult.hasNoSolution()
Returns
True if the synthesis query has no solution. In this case, it was determined that there was no solution.
Binding: Generated from cvc5_synth_result_has_no_solution.
SynthResult.isUnknown¶
Mojo declaration:
def isUnknown(self) raises -> Bool
Upstream Python signature:
SynthResult.isUnknown()
Returns
True if the result of the synthesis query could not be determined.
Binding: Generated from cvc5_synth_result_is_unknown.
SynthResult.__str__¶
Mojo declaration:
def toString(self) -> String
def write_to(self, mut writer: Some[Writer])
Upstream Python signature:
SynthResult.__str__()
Mojo uses the Writable protocol here: call String(value), repr(value), or print(value).
Binding: Generated from cvc5_synth_result_to_string.
SynthResult.__repr__¶
Mojo declaration:
Upstream Python signature:
SynthResult.__repr__()
Mojo uses the Writable protocol here: call String(value), repr(value), or print(value).
Binding: Generated from cvc5_synth_result_to_string.