mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
add rc2 sample
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7016d94d59
commit
37ef3cbeb2
2 changed files with 91 additions and 1 deletions
|
@ -1645,6 +1645,12 @@ def Not(a, ctx=None):
|
|||
a = s.cast(a)
|
||||
return BoolRef(Z3_mk_not(ctx.ref(), a.as_ast()), ctx)
|
||||
|
||||
def mk_not(a):
|
||||
if is_not(a):
|
||||
return a.arg(0)
|
||||
else:
|
||||
return Not(a)
|
||||
|
||||
def _has_probe(args):
|
||||
"""Return `True` if one of the elements of the given collection is a Z3 probe."""
|
||||
for arg in args:
|
||||
|
@ -2800,7 +2806,7 @@ class RatNumRef(ArithRef):
|
|||
return self.denominator().is_int() and self.denominator_as_long() == 1
|
||||
|
||||
def as_long(self):
|
||||
_z3_assert(self.is_int(), "Expected integer fraction")
|
||||
_z3_assert(self.is_int_value(), "Expected integer fraction")
|
||||
return self.numerator_as_long()
|
||||
|
||||
def as_decimal(self, prec):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue