Exemple #1
0
    def __init__(self, environment, logic, user_options=None, debugFile=None):
        IncrementalTrackingSolver.__init__(self,
                                           environment=environment,
                                           logic=logic,
                                           user_options=user_options)

        self.msat_config = mathsat.msat_create_default_config(str(logic))
        self._prepare_config(self.options, debugFile)
        self.msat_env = MSatEnv(self.msat_config)
        mathsat.msat_destroy_config(self.msat_config)

        self.realType = mathsat.msat_get_rational_type(self.msat_env())
        self.intType = mathsat.msat_get_integer_type(self.msat_env())
        self.boolType = mathsat.msat_get_bool_type(self.msat_env())

        self.mgr = environment.formula_manager
        self.converter = MSatConverter(environment, self.msat_env)
Exemple #2
0
    def __init__(self, environment, logic, user_options=None, debugFile=None):
        IncrementalTrackingSolver.__init__(self,
                                           environment=environment,
                                           logic=logic,
                                           user_options=user_options)

        self.msat_config = mathsat.msat_create_default_config(str(logic))
        self._prepare_config(self.options, debugFile)
        self.msat_env = mathsat.msat_create_env(self.msat_config)

        self.realType = mathsat.msat_get_rational_type(self.msat_env)
        self.intType = mathsat.msat_get_integer_type(self.msat_env)
        self.boolType = mathsat.msat_get_bool_type(self.msat_env)

        self.mgr = environment.formula_manager
        self.converter = MSatConverter(environment, self.msat_env)
        return
Exemple #3
0
        def __init__(self, environment, logic=None, algorithm='fm'):
            """Algorithm can be either 'fm' (for Fourier-Motzkin) or 'lw' (for
               Loos-Weisspfenning)"""

            IdentityDagWalker.__init__(self, env=environment)

            self.set_function(self.walk_identity, op.SYMBOL, op.REAL_CONSTANT,
                              op.BOOL_CONSTANT, op.INT_CONSTANT)

            self.logic = logic

            assert algorithm in ['fm', 'lw']
            self.algorithm = algorithm

            self.msat_config = mathsat.msat_create_default_config("QF_LRA")
            self.msat_env = mathsat.msat_create_env(self.msat_config)
            self.converter = MSatConverter(environment, self.msat_env)
            self._destroyed = False
Exemple #4
0
        def __init__(self, environment, logic=None, algorithm='fm'):
            """Algorithm can be either 'fm' (for Fourier-Motzkin) or 'lw' (for
               Loos-Weisspfenning)"""

            IdentityDagWalker.__init__(self, env=environment)

            self.set_function(self.walk_identity, op.SYMBOL, op.REAL_CONSTANT,
                              op.BOOL_CONSTANT, op.INT_CONSTANT)

            self.logic = logic

            assert algorithm in ['fm', 'lw']
            self.algorithm = algorithm

            self.msat_config = mathsat.msat_create_default_config("QF_LRA")
            self.msat_env = mathsat.msat_create_env(self.msat_config)
            self.converter = MSatConverter(environment, self.msat_env)
            self._destroyed = False
Exemple #5
0
        def __init__(self, environment, logic=None, algorithm='fm'):
            """Initialize the Quantifier Eliminator using 'fm' or 'lw'.

            fm: Fourier-Motzkin (default)
            lw: Loos-Weisspfenning
            """
            if algorithm not in ['fm', 'lw']:
                raise ValueError("Algorithm can be either 'fm' or 'lw'")
            QuantifierEliminator.__init__(self)
            IdentityDagWalker.__init__(self, env=environment)
            self.msat_config = mathsat.msat_create_default_config("QF_LRA")
            self.msat_env = MSatEnv(self.msat_config)
            mathsat.msat_destroy_config(self.msat_config)

            self.set_function(self.walk_identity, op.SYMBOL, op.REAL_CONSTANT,
                              op.BOOL_CONSTANT, op.INT_CONSTANT)
            self.logic = logic
            self.algorithm = algorithm
            self.converter = MSatConverter(environment, self.msat_env)
Exemple #6
0
    def __init__(self, environment, logic, options=None, debugFile=None):
        Solver.__init__(self,
                        environment=environment,
                        logic=logic,
                        options=options)

        self.config = mathsat.msat_create_default_config(str(logic))
        check = mathsat.msat_set_option(self.config, "model_generation", "true")
        assert check == 0

        if debugFile is not None:
            mathsat.msat_set_option(self.config, "debug.api_call_trace", "1")
            mathsat.msat_set_option(self.config, "debug.api_call_trace_filename",
                                    debugFile)

        self.msat_env = mathsat.msat_create_env(self.config)

        self.realType = mathsat.msat_get_rational_type(self.msat_env)
        self.intType = mathsat.msat_get_integer_type(self.msat_env)
        self.boolType = mathsat.msat_get_bool_type(self.msat_env)

        self.mgr = environment.formula_manager
        self.converter = MSatConverter(environment, self.msat_env)
        return