Exemplo n.º 1
0
    def __init__(self, env=None, invalidate_memoization=None):
        DagWalker.__init__(self,
                           env=env,
                           invalidate_memoization=invalidate_memoization)
        self.mgr = self.env.formula_manager
        self.check_symbol = self.mgr.FreshSymbol(types.BOOL)

        # The walker returns a pair (L, m) where m is a
        # quantifier-free formula (the matrix) and L is a list of
        # pairs (Q, vars) where Q is either mgr.Exists or mgr.ForAll
        # and vars is a frozenset of variables.  The semantics is that
        # the input formula is equivalent to res computed as follows:
        # res = m
        # for Q, vars in L:
        #    res = Q(vars, res)
        self.set_function(self.walk_error, *op.ALL_TYPES)
        self.set_function(self.walk_quantifier, *op.QUANTIFIERS)
        self.set_function(self.walk_theory_op, *op.BV_OPERATORS)
        self.set_function(self.walk_constant, *op.CONSTANTS)
        self.set_function(self.walk_theory_relation, *op.RELATIONS)
        self.set_function(self.walk_theory_op, *op.LIRA_OPERATORS)
        self.set_function(self.walk_symbol, op.SYMBOL)
        self.set_function(self.walk_function, op.FUNCTION)
        self.set_function(self.walk_ite, op.ITE)
        self.set_function(self.walk_conj_disj, op.AND, op.OR)
        self.set_function(self.walk_not, op.NOT)
        self.set_function(self.walk_iff, op.IFF)
        self.set_function(self.walk_implies, op.IMPLIES)
Exemplo n.º 2
0
    def __init__(self, env=None, invalidate_memoization=None):
        DagWalker.__init__(self,
                           env=env,
                           invalidate_memoization=invalidate_memoization)
        self.mgr = self.env.formula_manager
        self.check_symbol = self.mgr.FreshSymbol(types.BOOL)

        # The walker returns a pair (L, m) where m is a
        # quantifier-free formula (the matrix) and L is a list of
        # pairs (Q, vars) where Q is either mgr.Exists or mgr.ForAll
        # and vars is a frozenset of variables.  The semantics is that
        # the input formula is equivalent to res computed as follows:
        # res = m
        # for Q, vars in L:
        #    res = Q(vars, res)
        self.set_function(self.walk_error, *op.ALL_TYPES)
        self.set_function(self.walk_quantifier, *op.QUANTIFIERS)
        self.set_function(self.walk_theory_op, *op.BV_OPERATORS)
        self.set_function(self.walk_constant, *op.CONSTANTS)
        self.set_function(self.walk_theory_relation, *op.RELATIONS)
        self.set_function(self.walk_theory_op, *op.LIRA_OPERATORS)
        self.set_function(self.walk_symbol, op.SYMBOL)
        self.set_function(self.walk_function, op.FUNCTION)
        self.set_function(self.walk_ite, op.ITE)
        self.set_function(self.walk_conj_disj, op.AND, op.OR)
        self.set_function(self.walk_not, op.NOT)
        self.set_function(self.walk_iff, op.IFF)
        self.set_function(self.walk_implies, op.IMPLIES)
Exemplo n.º 3
0
 def __init__(self, environment=None):
     DagWalker.__init__(self, env=environment)
     self.mgr = self.env.formula_manager
     self.set_function(self.walk_nop, *op.RELATIONS)
     self.set_function(self.walk_nop, *op.THEORY_OPERATORS)
     self.set_function(self.walk_nop, *op.CONSTANTS)
     self.set_function(self.walk_nop, op.SYMBOL, op.FUNCTION)
     self.set_function(self.walk_quantifier, *op.QUANTIFIERS)
Exemplo n.º 4
0
 def __init__(self, environment=None):
     DagWalker.__init__(self, env=environment)
     self.mgr = self.env.formula_manager
     self.set_function(self.walk_nop, *op.RELATIONS)
     self.set_function(self.walk_nop, *op.THEORY_OPERATORS)
     self.set_function(self.walk_nop, *op.CONSTANTS)
     self.set_function(self.walk_nop, op.SYMBOL, op.FUNCTION)
     self.set_function(self.walk_quantifier, *op.QUANTIFIERS)
Exemplo n.º 5
0
    def __init__(self, environment=None):
        DagWalker.__init__(self, environment)

        self.set_function(self.walk_error, *op.ALL_TYPES)
        self.set_function(self.walk_quantifier, *op.QUANTIFIERS)
        self.set_function(self.walk_constant, *op.CONSTANTS)
        self.set_function(self.walk_theory_op, *op.THEORY_OPERATORS)
        self.set_function(self.walk_theory_relation, *op.RELATIONS)

        self.set_function(self.walk_and, op.AND)
        self.set_function(self.walk_or, op.OR)
        self.set_function(self.walk_not, op.NOT)
        self.set_function(self.walk_implies, op.IMPLIES)
        self.set_function(self.walk_iff, op.IFF)

        self.set_function(self.walk_symbol, op.SYMBOL)
        self.set_function(self.walk_function, op.FUNCTION)
        self.set_function(self.walk_ite, op.ITE)

        self.mgr = self.env.formula_manager
        self._introduced_variables = {}
        self._cnf_pieces = {}
Exemplo n.º 6
0
 def __init__(self, env=None, invalidate_memoization=None):
     DagWalker.__init__(self,
                        env=env,
                        invalidate_memoization=invalidate_memoization)
     self.mgr = self.env.formula_manager
Exemplo n.º 7
0
 def __init__(self, environment=None):
     DagWalker.__init__(self, environment)
     self.mgr = self.env.formula_manager
     self._introduced_variables = {}
     self._cnf_pieces = {}
Exemplo n.º 8
0
 def __init__(self, environment=None):
     DagWalker.__init__(self, env=environment)
     self.mgr = self.env.formula_manager
     self.set_function(self.walk_theory_relation, *op.RELATIONS)
Exemplo n.º 9
0
 def __init__(self, env=None, invalidate_memoization=None):
     DagWalker.__init__(self,
                        env=env,
                        invalidate_memoization=invalidate_memoization)
     self.mgr = self.env.formula_manager
Exemplo n.º 10
0
 def __init__(self, env=None, invalidate_memoization=None):
     DagWalker.__init__(self,
                        env=env,
                        invalidate_memoization=invalidate_memoization)
Exemplo n.º 11
0
 def __init__(self, environment=None):
     DagWalker.__init__(self, environment)
     self.mgr = self.env.formula_manager
     self._introduced_variables = {}
     self._cnf_pieces = {}
Exemplo n.º 12
0
 def __init__(self, environment=None):
     DagWalker.__init__(self, env=environment)
     self.mgr = self.env.formula_manager
     self.set_function(self.walk_theory_relation, *op.RELATIONS)
Exemplo n.º 13
0
 def __init__(self, environment=None):
     DagWalker.__init__(self, env=environment)
     self.mgr = self.env.formula_manager
     self.set_function(self.walk_constant, *op.CONSTANTS)
     self.set_function(self.walk_theory_op, *op.THEORY_OPERATORS)
     self.set_function(self.walk_theory_relation, *op.RELATIONS)