(self, formula)
return res
Checks satisfiability of the formula w.r.t. the current state of
        the solver.

        Previous assertions are taken into account.

        :type formula: FNode
        :returns: Whether formula is satisfiable
        :rtype: bool
Checks satisfiability of the formula w.r.t. the current state of
        the solver.
Checks satisfiability of the formula w . r . t . the current state of the solver .
def is_sat(self, formula):
        """Checks satisfiability of the formula w.r.t. the current state of
        the solver.

        Previous assertions are taken into account.

        :type formula: FNode
        :returns: Whether formula is satisfiable
        :rtype: bool
        """
        assert formula in self.environment.formula_manager, \
               "Formula does not belong to the current Formula Manager"

        if not self.options.incremental:
            # If not incremental, we only need to assert and solve.
            self.add_assertion(formula)
            # We do not allow two calls to solve()
            def solve_error(*args, **kwargs):
                raise SolverStatusError("Cannot call is_sat twice when incrementality is disable")
            res = self.solve()
            self.solve = solve_error
            self.is_sat = solve_error
            return res

        # Try to be incremental using push/pop but fallback to
        # solving under assumption if push/pop is not implemented
        use_solving_under_assumption = False
        try:
            self.push()
        except NotImplementedError:
            use_solving_under_assumption = True

        if use_solving_under_assumption:
            res = self.solve([formula])
        else:
            self.add_assertion(formula)
            res = self.solve()
            self.pending_pop = True

        return res
def is_sat ( self , formula ) : assert formula in self . environment . formula_manager , "Formula does not belong to the current Formula Manager" if not self . options . incremental : # If not incremental, we only need to assert and solve. self . add_assertion ( formula ) # We do not allow two calls to solve() def solve_error ( * args , * * kwargs ) : raise SolverStatusError ( "Cannot call is_sat twice when incrementality is disable" ) res = self . solve ( ) self . solve = solve_error self . is_sat = solve_error return res # Try to be incremental using push/pop but fallback to # solving under assumption if push/pop is not implemented use_solving_under_assumption = False try : self . push ( ) except NotImplementedError : use_solving_under_assumption = True if use_solving_under_assumption : res = self . solve ( [ formula ] ) else : self . add_assertion ( formula ) res = self . solve ( ) self . pending_pop = True return res