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

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  r 
)

Definition at line 7118 of file z3py.py.

7118 def __init__(self, r):
7119 self.r = r
7120

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ (   self,
  memo = {} 
)

Definition at line 7121 of file z3py.py.

7121 def __deepcopy__(self, memo={}):
7122 return CheckSatResult(self.r)
7123

◆ __eq__()

__eq__ (   self,
  other 
)

Definition at line 7124 of file z3py.py.

7124 def __eq__(self, other):
7125 return isinstance(other, CheckSatResult) and self.r == other.r
7126

Referenced by CheckSatResult.__ne__().

◆ __ne__()

__ne__ (   self,
  other 
)

Definition at line 7127 of file z3py.py.

7127 def __ne__(self, other):
7128 return not self.__eq__(other)
7129

◆ __repr__()

__repr__ (   self)

Definition at line 7130 of file z3py.py.

7130 def __repr__(self):
7131 if in_html_mode():
7132 if self.r == Z3_L_TRUE:
7133 return "<b>sat</b>"
7134 elif self.r == Z3_L_FALSE:
7135 return "<b>unsat</b>"
7136 else:
7137 return "<b>unknown</b>"
7138 else:
7139 if self.r == Z3_L_TRUE:
7140 return "sat"
7141 elif self.r == Z3_L_FALSE:
7142 return "unsat"
7143 else:
7144 return "unknown"
7145

◆ _repr_html_()

_repr_html_ (   self)
protected

Definition at line 7146 of file z3py.py.

7146 def _repr_html_(self):
7147 in_html = in_html_mode()
7148 set_html_mode(True)
7149 res = repr(self)
7150 set_html_mode(in_html)
7151 return res
7152
7153

Field Documentation

◆ r

r