Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Data Fields
CheckSatResult Class Reference

Public Member Functions

def __init__
 
def __eq__
 
def __ne__
 
def __repr__
 

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

Constructor & Destructor Documentation

def __init__ (   self,
  r 
)

Definition at line 5595 of file z3py.py.

5596  def __init__(self, r):
5597  self.r = r

Member Function Documentation

def __eq__ (   self,
  other 
)

Definition at line 5598 of file z3py.py.

Referenced by Probe.__ne__().

5599  def __eq__(self, other):
5600  return isinstance(other, CheckSatResult) and self.r == other.r
def __ne__ (   self,
  other 
)

Definition at line 5601 of file z3py.py.

5602  def __ne__(self, other):
5603  return not self.__eq__(other)
def __repr__ (   self)

Definition at line 5604 of file z3py.py.

5605  def __repr__(self):
5606  if in_html_mode():
5607  if self.r == Z3_L_TRUE:
5608  return "<b>sat</b>"
5609  elif self.r == Z3_L_FALSE:
5610  return "<b>unsat</b>"
5611  else:
5612  return "<b>unknown</b>"
5613  else:
5614  if self.r == Z3_L_TRUE:
5615  return "sat"
5616  elif self.r == Z3_L_FALSE:
5617  return "unsat"
5618  else:
5619  return "unknown"

Field Documentation

r

Definition at line 5596 of file z3py.py.

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