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

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
r )

Definition at line 7105 of file z3py.py.

7105 def __init__(self, r):
7106 self.r = r
7107

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ ( self,
memo = {} )

Definition at line 7108 of file z3py.py.

7108 def __deepcopy__(self, memo={}):
7109 return CheckSatResult(self.r)
7110

◆ __eq__()

__eq__ ( self,
other )

Definition at line 7111 of file z3py.py.

7111 def __eq__(self, other):
7112 return isinstance(other, CheckSatResult) and self.r == other.r
7113

Referenced by __ne__().

◆ __ne__()

__ne__ ( self,
other )

Definition at line 7114 of file z3py.py.

7114 def __ne__(self, other):
7115 return not self.__eq__(other)
7116

◆ __repr__()

__repr__ ( self)

Definition at line 7117 of file z3py.py.

7117 def __repr__(self):
7118 if in_html_mode():
7119 if self.r == Z3_L_TRUE:
7120 return "<b>sat</b>"
7121 elif self.r == Z3_L_FALSE:
7122 return "<b>unsat</b>"
7123 else:
7124 return "<b>unknown</b>"
7125 else:
7126 if self.r == Z3_L_TRUE:
7127 return "sat"
7128 elif self.r == Z3_L_FALSE:
7129 return "unsat"
7130 else:
7131 return "unknown"
7132

◆ _repr_html_()

_repr_html_ ( self)
protected

Definition at line 7133 of file z3py.py.

7133 def _repr_html_(self):
7134 in_html = in_html_mode()
7135 set_html_mode(True)
7136 res = repr(self)
7137 set_html_mode(in_html)
7138 return res
7139
7140

Field Documentation

◆ r

r = r

Definition at line 7106 of file z3py.py.

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