(self)
Overloading of iterator from Model.  We iterate only on the
        variables defined in the assignment.
Overloading of iterator from Model.  We iterate only on the
        variables defined in the assignment.
Overloading of iterator from Model . We iterate only on the variables defined in the assignment .
def __iter__(self):
        """Overloading of iterator from Model.  We iterate only on the
        variables defined in the assignment.
        """
        it = mathsat.msat_model_create_iterator(self.msat_model)
        if mathsat.MSAT_ERROR_MODEL_ITERATOR(it):
            raise InternalSolverError("model iteration")

        while mathsat.msat_model_iterator_has_next(it):
            t, v = mathsat.msat_model_iterator_next(it)
            if mathsat.msat_term_is_constant(self.msat_env(), t):
                pt = self.converter.back(t)
                pv = self.converter.back(v)
                if self.environment.stc.get_type(pt).is_real_type() and \
                       pv.is_int_constant():
                    pv = self.environment.formula_manager.Real(
                        pv.constant_value())
                yield (pt, pv)

        mathsat.msat_destroy_model_iterator(it)
def __iter__ ( self ) : it = mathsat . msat_model_create_iterator ( self . msat_model ) if mathsat . MSAT_ERROR_MODEL_ITERATOR ( it ) : raise InternalSolverError ( "model iteration" ) while mathsat . msat_model_iterator_has_next ( it ) : t , v = mathsat . msat_model_iterator_next ( it ) if mathsat . msat_term_is_constant ( self . msat_env ( ) , t ) : pt = self . converter . back ( t ) pv = self . converter . back ( v ) if self . environment . stc . get_type ( pt ) . is_real_type ( ) and pv . is_int_constant ( ) : pv = self . environment . formula_manager . Real ( pv . constant_value ( ) ) yield ( pt , pv ) mathsat . msat_destroy_model_iterator ( it )