Z3
Loading...
Searching...
No Matches
CheckSatResult Class Reference

Public Member Functions

 __init__ (self, r)
 __deepcopy__ (self, memo={})
 __eq__ (self, other)
 __ne__ (self, other)
 __repr__ (self)

Data Fields

 r = r

Protected Member Functions

 _repr_html_ (self)

Detailed Description

Represents the result of a satisfiability check: sat, unsat, unknown.

>>> s = Solver()
>>> s.check()
sat
>>> r = s.check()
>>> isinstance(r, CheckSatResult)
True

Definition at line 7496 of file z3py.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
r )

Definition at line 7507 of file z3py.py.

7507 def __init__(self, r):
7508 self.r = r
7509

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ ( self,
memo = {} )

Definition at line 7510 of file z3py.py.

7510 def __deepcopy__(self, memo={}):
7511 return CheckSatResult(self.r)
7512

◆ __eq__()

__eq__ ( self,
other )

Definition at line 7513 of file z3py.py.

7513 def __eq__(self, other):
7514 return isinstance(other, CheckSatResult) and self.r == other.r
7515

Referenced by __ne__().

◆ __ne__()

__ne__ ( self,
other )

Definition at line 7516 of file z3py.py.

7516 def __ne__(self, other):
7517 return not self.__eq__(other)
7518

◆ __repr__()

__repr__ ( self)

Definition at line 7519 of file z3py.py.

7519 def __repr__(self):
7520 if in_html_mode():
7521 if self.r == Z3_L_TRUE:
7522 return "<b>sat</b>"
7523 elif self.r == Z3_L_FALSE:
7524 return "<b>unsat</b>"
7525 else:
7526 return "<b>unknown</b>"
7527 else:
7528 if self.r == Z3_L_TRUE:
7529 return "sat"
7530 elif self.r == Z3_L_FALSE:
7531 return "unsat"
7532 else:
7533 return "unknown"
7534

◆ _repr_html_()

_repr_html_ ( self)
protected

Definition at line 7535 of file z3py.py.

7535 def _repr_html_(self):
7536 in_html = in_html_mode()
7537 set_html_mode(True)
7538 res = repr(self)
7539 set_html_mode(in_html)
7540 return res
7541
7542

Field Documentation

◆ r

r = r

Definition at line 7508 of file z3py.py.

Referenced by __deepcopy__(), __eq__(), and __repr__().