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

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  r 
)

Definition at line 7501 of file z3py.py.

7501 def __init__(self, r):
7502 self.r = r
7503

Member Function Documentation

◆ __deepcopy__()

__deepcopy__ (   self,
  memo = {} 
)

Definition at line 7504 of file z3py.py.

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

◆ __eq__()

__eq__ (   self,
  other 
)

Definition at line 7507 of file z3py.py.

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

Referenced by CheckSatResult.__ne__().

◆ __ne__()

__ne__ (   self,
  other 
)

Definition at line 7510 of file z3py.py.

7510 def __ne__(self, other):
7511 return not self.__eq__(other)
7512

◆ __repr__()

__repr__ (   self)

Definition at line 7513 of file z3py.py.

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

◆ _repr_html_()

_repr_html_ (   self)
protected

Definition at line 7529 of file z3py.py.

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

Field Documentation

◆ r

r