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

Constructor & Destructor Documentation

def __init__ (   self,
  r 
)

Definition at line 5746 of file z3py.py.

5746  def __init__(self, r):
5747  self.r = r
5748 
def __init__(self, r)
Definition: z3py.py:5746

Member Function Documentation

def __eq__ (   self,
  other 
)

Definition at line 5749 of file z3py.py.

Referenced by Probe.__ne__().

5749  def __eq__(self, other):
5750  return isinstance(other, CheckSatResult) and self.r == other.r
5751 
def __eq__(self, other)
Definition: z3py.py:5749
def __ne__ (   self,
  other 
)

Definition at line 5752 of file z3py.py.

5752  def __ne__(self, other):
5753  return not self.__eq__(other)
5754 
def __eq__(self, other)
Definition: z3py.py:5749
def __ne__(self, other)
Definition: z3py.py:5752
def __repr__ (   self)

Definition at line 5755 of file z3py.py.

5755  def __repr__(self):
5756  if in_html_mode():
5757  if self.r == Z3_L_TRUE:
5758  return "<b>sat</b>"
5759  elif self.r == Z3_L_FALSE:
5760  return "<b>unsat</b>"
5761  else:
5762  return "<b>unknown</b>"
5763  else:
5764  if self.r == Z3_L_TRUE:
5765  return "sat"
5766  elif self.r == Z3_L_FALSE:
5767  return "unsat"
5768  else:
5769  return "unknown"
5770 
def __repr__(self)
Definition: z3py.py:5755

Field Documentation

r

Definition at line 5747 of file z3py.py.

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