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 7629 of file z3py.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
r )

Definition at line 7640 of file z3py.py.

7640 def __init__(self, r):
7641 self.r = r
7642

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ ( self,
memo = {} )

Definition at line 7643 of file z3py.py.

7643 def __deepcopy__(self, memo={}):
7644 return CheckSatResult(self.r)
7645

◆ __eq__()

__eq__ ( self,
other )

Definition at line 7646 of file z3py.py.

7646 def __eq__(self, other):
7647 return isinstance(other, CheckSatResult) and self.r == other.r
7648

Referenced by __ne__().

◆ __ne__()

__ne__ ( self,
other )

Definition at line 7649 of file z3py.py.

7649 def __ne__(self, other):
7650 return not self.__eq__(other)
7651

◆ __repr__()

__repr__ ( self)

Definition at line 7652 of file z3py.py.

7652 def __repr__(self):
7653 if in_html_mode():
7654 if self.r == Z3_L_TRUE:
7655 return "<b>sat</b>"
7656 elif self.r == Z3_L_FALSE:
7657 return "<b>unsat</b>"
7658 else:
7659 return "<b>unknown</b>"
7660 else:
7661 if self.r == Z3_L_TRUE:
7662 return "sat"
7663 elif self.r == Z3_L_FALSE:
7664 return "unsat"
7665 else:
7666 return "unknown"
7667

◆ _repr_html_()

_repr_html_ ( self)
protected

Definition at line 7668 of file z3py.py.

7668 def _repr_html_(self):
7669 in_html = in_html_mode()
7670 set_html_mode(True)
7671 res = repr(self)
7672 set_html_mode(in_html)
7673 return res
7674
7675

Field Documentation

◆ r

r = r

Definition at line 7641 of file z3py.py.

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