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

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  r 
)

Definition at line 7503 of file z3py.py.

7503 def __init__(self, r):
7504 self.r = r
7505

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ (   self,
  memo = {} 
)

Definition at line 7506 of file z3py.py.

7506 def __deepcopy__(self, memo={}):
7507 return CheckSatResult(self.r)
7508

◆ __eq__()

__eq__ (   self,
  other 
)

Definition at line 7509 of file z3py.py.

7509 def __eq__(self, other):
7510 return isinstance(other, CheckSatResult) and self.r == other.r
7511

Referenced by CheckSatResult.__ne__().

◆ __ne__()

__ne__ (   self,
  other 
)

Definition at line 7512 of file z3py.py.

7512 def __ne__(self, other):
7513 return not self.__eq__(other)
7514

◆ __repr__()

__repr__ (   self)

Definition at line 7515 of file z3py.py.

7515 def __repr__(self):
7516 if in_html_mode():
7517 if self.r == Z3_L_TRUE:
7518 return "<b>sat</b>"
7519 elif self.r == Z3_L_FALSE:
7520 return "<b>unsat</b>"
7521 else:
7522 return "<b>unknown</b>"
7523 else:
7524 if self.r == Z3_L_TRUE:
7525 return "sat"
7526 elif self.r == Z3_L_FALSE:
7527 return "unsat"
7528 else:
7529 return "unknown"
7530

◆ _repr_html_()

_repr_html_ (   self)
protected

Definition at line 7531 of file z3py.py.

7531 def _repr_html_(self):
7532 in_html = in_html_mode()
7533 set_html_mode(True)
7534 res = repr(self)
7535 set_html_mode(in_html)
7536 return res
7537
7538

Field Documentation

◆ r

r