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

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
r )

Definition at line 7097 of file z3py.py.

7097 def __init__(self, r):
7098 self.r = r
7099

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ ( self,
memo = {} )

Definition at line 7100 of file z3py.py.

7100 def __deepcopy__(self, memo={}):
7101 return CheckSatResult(self.r)
7102

◆ __eq__()

__eq__ ( self,
other )

Definition at line 7103 of file z3py.py.

7103 def __eq__(self, other):
7104 return isinstance(other, CheckSatResult) and self.r == other.r
7105

Referenced by __ne__().

◆ __ne__()

__ne__ ( self,
other )

Definition at line 7106 of file z3py.py.

7106 def __ne__(self, other):
7107 return not self.__eq__(other)
7108

◆ __repr__()

__repr__ ( self)

Definition at line 7109 of file z3py.py.

7109 def __repr__(self):
7110 if in_html_mode():
7111 if self.r == Z3_L_TRUE:
7112 return "<b>sat</b>"
7113 elif self.r == Z3_L_FALSE:
7114 return "<b>unsat</b>"
7115 else:
7116 return "<b>unknown</b>"
7117 else:
7118 if self.r == Z3_L_TRUE:
7119 return "sat"
7120 elif self.r == Z3_L_FALSE:
7121 return "unsat"
7122 else:
7123 return "unknown"
7124

◆ _repr_html_()

_repr_html_ ( self)
protected

Definition at line 7125 of file z3py.py.

7125 def _repr_html_(self):
7126 in_html = in_html_mode()
7127 set_html_mode(True)
7128 res = repr(self)
7129 set_html_mode(in_html)
7130 return res
7131
7132

Field Documentation

◆ r

r = r

Definition at line 7098 of file z3py.py.

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