Z3
Public Member Functions | Data Fields
CheckSatResult Class Reference

Public Member Functions

def __init__ (self, r)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __repr__ (self)
 

Data Fields

 r
 

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

Constructor & Destructor Documentation

def __init__ (   self,
  r 
)

Definition at line 5686 of file z3py.py.

5686  def __init__(self, r):
5687  self.r = r
5688 
def __init__(self, r)
Definition: z3py.py:5686

Member Function Documentation

def __eq__ (   self,
  other 
)

Definition at line 5689 of file z3py.py.

Referenced by Probe.__ne__().

5689  def __eq__(self, other):
5690  return isinstance(other, CheckSatResult) and self.r == other.r
5691 
def __eq__(self, other)
Definition: z3py.py:5689
def __ne__ (   self,
  other 
)

Definition at line 5692 of file z3py.py.

5692  def __ne__(self, other):
5693  return not self.__eq__(other)
5694 
def __eq__(self, other)
Definition: z3py.py:5689
def __ne__(self, other)
Definition: z3py.py:5692
def __repr__ (   self)

Definition at line 5695 of file z3py.py.

5695  def __repr__(self):
5696  if in_html_mode():
5697  if self.r == Z3_L_TRUE:
5698  return "<b>sat</b>"
5699  elif self.r == Z3_L_FALSE:
5700  return "<b>unsat</b>"
5701  else:
5702  return "<b>unknown</b>"
5703  else:
5704  if self.r == Z3_L_TRUE:
5705  return "sat"
5706  elif self.r == Z3_L_FALSE:
5707  return "unsat"
5708  else:
5709  return "unknown"
5710 
def __repr__(self)
Definition: z3py.py:5695

Field Documentation

r

Definition at line 5687 of file z3py.py.

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