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

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
r )

Definition at line 7002 of file z3py.py.

7002 def __init__(self, r):
7003 self.r = r
7004

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ ( self,
memo = {} )

Definition at line 7005 of file z3py.py.

7005 def __deepcopy__(self, memo={}):
7006 return CheckSatResult(self.r)
7007

◆ __eq__()

__eq__ ( self,
other )

Definition at line 7008 of file z3py.py.

7008 def __eq__(self, other):
7009 return isinstance(other, CheckSatResult) and self.r == other.r
7010

Referenced by __ne__().

◆ __ne__()

__ne__ ( self,
other )

Definition at line 7011 of file z3py.py.

7011 def __ne__(self, other):
7012 return not self.__eq__(other)
7013

◆ __repr__()

__repr__ ( self)

Definition at line 7014 of file z3py.py.

7014 def __repr__(self):
7015 if in_html_mode():
7016 if self.r == Z3_L_TRUE:
7017 return "<b>sat</b>"
7018 elif self.r == Z3_L_FALSE:
7019 return "<b>unsat</b>"
7020 else:
7021 return "<b>unknown</b>"
7022 else:
7023 if self.r == Z3_L_TRUE:
7024 return "sat"
7025 elif self.r == Z3_L_FALSE:
7026 return "unsat"
7027 else:
7028 return "unknown"
7029

◆ _repr_html_()

_repr_html_ ( self)
protected

Definition at line 7030 of file z3py.py.

7030 def _repr_html_(self):
7031 in_html = in_html_mode()
7032 set_html_mode(True)
7033 res = repr(self)
7034 set_html_mode(in_html)
7035 return res
7036
7037

Field Documentation

◆ r

r = r

Definition at line 7003 of file z3py.py.

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