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
 

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

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
r )

Definition at line 7037 of file z3py.py.

7037 def __init__(self, r):
7038 self.r = r
7039

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ ( self,
memo = {} )

Definition at line 7040 of file z3py.py.

7040 def __deepcopy__(self, memo={}):
7041 return CheckSatResult(self.r)
7042

◆ __eq__()

__eq__ ( self,
other )

Definition at line 7043 of file z3py.py.

7043 def __eq__(self, other):
7044 return isinstance(other, CheckSatResult) and self.r == other.r
7045

Referenced by CheckSatResult.__ne__().

◆ __ne__()

__ne__ ( self,
other )

Definition at line 7046 of file z3py.py.

7046 def __ne__(self, other):
7047 return not self.__eq__(other)
7048

◆ __repr__()

__repr__ ( self)

Definition at line 7049 of file z3py.py.

7049 def __repr__(self):
7050 if in_html_mode():
7051 if self.r == Z3_L_TRUE:
7052 return "<b>sat</b>"
7053 elif self.r == Z3_L_FALSE:
7054 return "<b>unsat</b>"
7055 else:
7056 return "<b>unknown</b>"
7057 else:
7058 if self.r == Z3_L_TRUE:
7059 return "sat"
7060 elif self.r == Z3_L_FALSE:
7061 return "unsat"
7062 else:
7063 return "unknown"
7064

◆ _repr_html_()

_repr_html_ ( self)
protected

Definition at line 7065 of file z3py.py.

7065 def _repr_html_(self):
7066 in_html = in_html_mode()
7067 set_html_mode(True)
7068 res = repr(self)
7069 set_html_mode(in_html)
7070 return res
7071
7072

Field Documentation

◆ r