mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 20:38:43 +00:00
avoid print statements from assertions when the assertion does not trigger. Stackoverflow question http://stackoverflow.com/questions/44094927/creating-formula-taking-too-much-time-in-z3py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
691788f449
commit
b782ec35cc
|
@ -1300,7 +1300,9 @@ class BoolSortRef(SortRef):
|
||||||
if isinstance(val, bool):
|
if isinstance(val, bool):
|
||||||
return BoolVal(val, self.ctx)
|
return BoolVal(val, self.ctx)
|
||||||
if __debug__:
|
if __debug__:
|
||||||
|
if not is_expr(val):
|
||||||
_z3_assert(is_expr(val), "True, False or Z3 Boolean expression expected. Received %s" % val)
|
_z3_assert(is_expr(val), "True, False or Z3 Boolean expression expected. Received %s" % val)
|
||||||
|
if not self.eq(val.sort()):
|
||||||
_z3_assert(self.eq(val.sort()), "Value cannot be converted into a Z3 Boolean value")
|
_z3_assert(self.eq(val.sort()), "Value cannot be converted into a Z3 Boolean value")
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue