Z3
 
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions
CheckSatResult Class Reference

Public Member Functions

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

Data Fields

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

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  r 
)

Definition at line 7030 of file z3py.py.

7030 def __init__(self, r):
7031 self.r = r
7032

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ (   self,
  memo = {} 
)

Definition at line 7033 of file z3py.py.

7033 def __deepcopy__(self, memo={}):
7034 return CheckSatResult(self.r)
7035

◆ __eq__()

__eq__ (   self,
  other 
)

Definition at line 7036 of file z3py.py.

7036 def __eq__(self, other):
7037 return isinstance(other, CheckSatResult) and self.r == other.r
7038

Referenced by CheckSatResult.__ne__().

◆ __ne__()

__ne__ (   self,
  other 
)

Definition at line 7039 of file z3py.py.

7039 def __ne__(self, other):
7040 return not self.__eq__(other)
7041

◆ __repr__()

__repr__ (   self)

Definition at line 7042 of file z3py.py.

7042 def __repr__(self):
7043 if in_html_mode():
7044 if self.r == Z3_L_TRUE:
7045 return "<b>sat</b>"
7046 elif self.r == Z3_L_FALSE:
7047 return "<b>unsat</b>"
7048 else:
7049 return "<b>unknown</b>"
7050 else:
7051 if self.r == Z3_L_TRUE:
7052 return "sat"
7053 elif self.r == Z3_L_FALSE:
7054 return "unsat"
7055 else:
7056 return "unknown"
7057

◆ _repr_html_()

_repr_html_ (   self)
protected

Definition at line 7058 of file z3py.py.

7058 def _repr_html_(self):
7059 in_html = in_html_mode()
7060 set_html_mode(True)
7061 res = repr(self)
7062 set_html_mode(in_html)
7063 return res
7064
7065

Field Documentation

◆ r

r