mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	Merge branch 'master' into polysat
This commit is contained in:
		
						commit
						220a63e8bd
					
				
					 223 changed files with 508 additions and 505 deletions
				
			
		
							
								
								
									
										2
									
								
								.github/workflows/android-build.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/android-build.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -27,7 +27,7 @@ jobs:
 | 
			
		|||
      run:  |
 | 
			
		||||
        mkdir build
 | 
			
		||||
        cd build
 | 
			
		||||
        cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_ARCH_ABI=${{ matrix.android-abi }} -DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME -DZ3_BUILD_JAVA_BINDINGS=TRUE -G "Unix Makefiles" -DJAVA_AWT_LIBRARY=NotNeeded -DJAVA_JVM_LIBRARY=NotNeeded -DJAVA_INCLUDE_PATH2=NotNeeded -DJAVA_AWT_INCLUDE_PATH=NotNeeded ../
 | 
			
		||||
        cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_ARCH_ABI=${{ matrix.android-abi }} "-DCMAKE_ANDROID_NDK=$ANDROID_NDK_LATEST_HOME" -DZ3_BUILD_JAVA_BINDINGS=TRUE -G "Unix Makefiles" -DJAVA_AWT_LIBRARY=NotNeeded -DJAVA_JVM_LIBRARY=NotNeeded -DJAVA_INCLUDE_PATH2=NotNeeded -DJAVA_AWT_INCLUDE_PATH=NotNeeded ../
 | 
			
		||||
        make -j $(nproc)
 | 
			
		||||
        tar -cvf z3-build-${{ matrix.android-abi }}.tar *.jar *.so
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
cmake_minimum_required(VERSION 3.4)
 | 
			
		||||
 | 
			
		||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_compiler_flags_overrides.cmake")
 | 
			
		||||
project(Z3 VERSION 4.9.2.0 LANGUAGES CXX C)
 | 
			
		||||
project(Z3 VERSION 4.11.0.0 LANGUAGES CXX C)
 | 
			
		||||
 | 
			
		||||
################################################################################
 | 
			
		||||
# Project version
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ Pre-built binaries for stable and nightly releases are available from [here](htt
 | 
			
		|||
Z3 can be built using [Visual Studio][1], a [Makefile][2] or using [CMake][3]. It provides
 | 
			
		||||
[bindings for several programming languages][4]. 
 | 
			
		||||
 | 
			
		||||
See the [release notes](RELEASE_NOTES) for notes on various stable releases of Z3.
 | 
			
		||||
See the [release notes](RELEASE_NOTES.md) for notes on various stable releases of Z3.
 | 
			
		||||
 | 
			
		||||
## Build status
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,19 @@ Version 4.next
 | 
			
		|||
    - native word level bit-vector solving.
 | 
			
		||||
  - introduction of simple induction lemmas to handle a limited repertoire of induction proofs.
 | 
			
		||||
 | 
			
		||||
Version 4.11.0
 | 
			
		||||
==============
 | 
			
		||||
- remove Z3_bool from API
 | 
			
		||||
 | 
			
		||||
Version 4.10.2
 | 
			
		||||
==============
 | 
			
		||||
- fix regression #6194. It broke mod/rem/div reasoning.
 | 
			
		||||
- fix user propagator scope management for equality callbacks.
 | 
			
		||||
 | 
			
		||||
Version 4.10.1
 | 
			
		||||
==============
 | 
			
		||||
- fix implementation of mk_fresh in user propagator for Python API
 | 
			
		||||
 | 
			
		||||
Version 4.10.0
 | 
			
		||||
==============
 | 
			
		||||
- Added API Z3_enable_concurrent_dec_ref to be set by interfaces that
 | 
			
		||||
| 
						 | 
				
			
			@ -39,6 +52,7 @@ Version 4.10.0
 | 
			
		|||
    of the form x = 0
 | 
			
		||||
  - After (partial) completion, perform factorization for factors of the
 | 
			
		||||
    form x*y*p = 0 where x, are variables, p is linear.
 | 
			
		||||
- Added support for declaring algebraic datatypes from the C++ interface.
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
Version 4.9.1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2171,7 +2171,6 @@ INCLUDE_FILE_PATTERNS  =
 | 
			
		|||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 | 
			
		||||
 | 
			
		||||
PREDEFINED             = Z3_ast_opt:=Z3_ast \
 | 
			
		||||
                         Z3_bool_opt:=Z3_bool \
 | 
			
		||||
                         Z3_func_interp_opt:=Z3_func_interp \
 | 
			
		||||
                         Z3_model_opt:=Z3_model \
 | 
			
		||||
                         __out_opt:=__out
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -816,7 +816,7 @@ INCLUDE_FILE_PATTERNS  =
 | 
			
		|||
# undefined via #undef or recursively expanded use the := operator
 | 
			
		||||
# instead of the = operator.
 | 
			
		||||
 | 
			
		||||
PREDEFINED             =Z3_ast_opt:=Z3_ast Z3_bool_opt:=Z3_bool Z3_func_interp_opt:=Z3_func_interp Z3_model_opt:=Z3_model __out_opt:=__out
 | 
			
		||||
PREDEFINED             =Z3_ast_opt:=Z3_ast Z3_func_interp_opt:=Z3_func_interp Z3_model_opt:=Z3_model __out_opt:=__out
 | 
			
		||||
 | 
			
		||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
 | 
			
		||||
# this tag can be used to specify a list of macro names that should be expanded.
 | 
			
		||||
| 
						 | 
				
			
			@ -825,7 +825,7 @@ PREDEFINED             =Z3_ast_opt:=Z3_ast Z3_bool_opt:=Z3_bool Z3_func_interp_o
 | 
			
		|||
 | 
			
		||||
EXPAND_AS_DEFINED      =
 | 
			
		||||
 | 
			
		||||
# Z3_ast_opt Z3_bool_opt Z3_func_interp_opt Z3_model_opt __out_opt
 | 
			
		||||
# Z3_ast_opt Z3_func_interp_opt Z3_model_opt __out_opt
 | 
			
		||||
 | 
			
		||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
 | 
			
		||||
# doxygen's preprocessor will remove all function-like macros that are alone
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,7 @@
 | 
			
		|||
from mk_util import *
 | 
			
		||||
 | 
			
		||||
def init_version():
 | 
			
		||||
    set_version(4, 9, 2, 0)
 | 
			
		||||
    set_version(4, 11, 0, 0)
 | 
			
		||||
    
 | 
			
		||||
# Z3 Project definition
 | 
			
		||||
def init_project_def():
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,8 @@
 | 
			
		|||
variables:
 | 
			
		||||
 | 
			
		||||
  Major: '4'
 | 
			
		||||
  Minor: '9'
 | 
			
		||||
  Patch: '2'
 | 
			
		||||
  Minor: '11'
 | 
			
		||||
  Patch: '0'
 | 
			
		||||
  NightlyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId)-$(Build.DefinitionName)
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
trigger: none
 | 
			
		||||
 | 
			
		||||
variables:
 | 
			
		||||
  ReleaseVersion: '4.9.2'
 | 
			
		||||
  ReleaseVersion: '4.11.0'
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -516,9 +516,10 @@ stages:
 | 
			
		|||
      inputs:
 | 
			
		||||
        command: push
 | 
			
		||||
        nuGetFeedType: External
 | 
			
		||||
        publishFeedCredentials: Z3Nuget
 | 
			
		||||
        publishFeedCredentials: $(NugetZ3)
 | 
			
		||||
        packagesToPush: $(Agent.TempDirectory)/*.nupkg
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
  # Enable on release:
 | 
			
		||||
  - job: PyPIPublish
 | 
			
		||||
    condition: eq(1,1)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1854,6 +1854,7 @@ _lib.Z3_solver_propagate_final.restype = None
 | 
			
		|||
_lib.Z3_solver_propagate_fixed.restype = None
 | 
			
		||||
_lib.Z3_solver_propagate_eq.restype = None
 | 
			
		||||
_lib.Z3_solver_propagate_diseq.restype = None
 | 
			
		||||
_lib.Z3_solver_propagate_decide.restype = None
 | 
			
		||||
 | 
			
		||||
on_model_eh_type = ctypes.CFUNCTYPE(None, ctypes.c_void_p)
 | 
			
		||||
_lib.Z3_optimize_register_model_eh.restype = None
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,8 +29,6 @@ public:
 | 
			
		|||
        updt_params(p);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~ackermannize_bv_tactic() override { }
 | 
			
		||||
 | 
			
		||||
    char const* name() const override { return "ackermannize_bv"; }
 | 
			
		||||
 | 
			
		||||
    void operator()(goal_ref const & g, goal_ref_buffer & result) override {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,8 +40,6 @@ public:
 | 
			
		|||
          fixed_model(false)
 | 
			
		||||
    { }
 | 
			
		||||
 | 
			
		||||
    ~ackr_model_converter() override { }
 | 
			
		||||
 | 
			
		||||
    void get_units(obj_map<expr, bool>& units) override { units.reset(); }
 | 
			
		||||
 | 
			
		||||
    void operator()(model_ref & md) override {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,8 +28,6 @@ public:
 | 
			
		|||
        , model_constructor(lmc)
 | 
			
		||||
    { }
 | 
			
		||||
 | 
			
		||||
    ~lackr_model_converter_lazy() override { }
 | 
			
		||||
 | 
			
		||||
    void operator()(model_ref & md) override {
 | 
			
		||||
        SASSERT(md.get() == 0 || (!md->get_num_constants() && !md->get_num_functions()));
 | 
			
		||||
        SASSERT(model_constructor.get());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -344,7 +344,6 @@ extern "C" {
 | 
			
		|||
        scoped_anum_vector const & m_as;
 | 
			
		||||
    public:
 | 
			
		||||
        vector_var2anum(scoped_anum_vector & as):m_as(as) {}
 | 
			
		||||
        virtual ~vector_var2anum() {}
 | 
			
		||||
        algebraic_numbers::manager & m() const override { return m_as.m(); }
 | 
			
		||||
        bool contains(polynomial::var x) const override { return static_cast<unsigned>(x) < m_as.size(); }
 | 
			
		||||
        algebraic_numbers::anum const & operator()(polynomial::var x) const override { return m_as.get(x); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,6 @@ namespace api {
 | 
			
		|||
struct Z3_ast_vector_ref : public api::object {
 | 
			
		||||
    ast_ref_vector  m_ast_vector;
 | 
			
		||||
    Z3_ast_vector_ref(api::context& c, ast_manager & m): api::object(c), m_ast_vector(m) {}
 | 
			
		||||
    ~Z3_ast_vector_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_ast_vector_ref * to_ast_vector(Z3_ast_vector v) { return reinterpret_cast<Z3_ast_vector_ref *>(v); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ extern "C" {
 | 
			
		|||
        env_params::updt_params();
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    Z3_bool Z3_API Z3_global_param_get(Z3_string param_id, Z3_string_ptr param_value) {
 | 
			
		||||
    bool Z3_API Z3_global_param_get(Z3_string param_id, Z3_string_ptr param_value) {
 | 
			
		||||
        memory::initialize(UINT_MAX);
 | 
			
		||||
        LOG_Z3_global_param_get(param_id, param_value);
 | 
			
		||||
        *param_value = nullptr;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,7 +58,7 @@ namespace api {
 | 
			
		|||
        solver_ref   s;
 | 
			
		||||
    public:
 | 
			
		||||
        seq_expr_solver(ast_manager& m, params_ref const& p): m(m), p(p) {}
 | 
			
		||||
        lbool check_sat(expr* e) {
 | 
			
		||||
        lbool check_sat(expr* e) override {
 | 
			
		||||
            if (!s) {
 | 
			
		||||
                s = mk_smt_solver(m, p, symbol("ALL"));
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,6 @@ namespace api {
 | 
			
		|||
            m_context(m, m_register_engine, p),
 | 
			
		||||
            m_trail(m) {}
 | 
			
		||||
 | 
			
		||||
        ~fixedpoint_context() override {}
 | 
			
		||||
        family_id get_family_id() const override { return const_cast<datalog::context&>(m_context).get_decl_util().get_family_id(); }
 | 
			
		||||
        void set_state(void* state) {
 | 
			
		||||
            SASSERT(!m_state);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,6 @@ Revision History:
 | 
			
		|||
struct Z3_goal_ref : public api::object {
 | 
			
		||||
    goal_ref m_goal;
 | 
			
		||||
    Z3_goal_ref(api::context& c) : api::object(c) {}
 | 
			
		||||
    ~Z3_goal_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_goal_ref * to_goal(Z3_goal g) { return reinterpret_cast<Z3_goal_ref *>(g); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,6 @@ Revision History:
 | 
			
		|||
struct Z3_model_ref : public api::object {
 | 
			
		||||
    model_ref  m_model;
 | 
			
		||||
    Z3_model_ref(api::context& c): api::object(c) {}
 | 
			
		||||
    ~Z3_model_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_model_ref * to_model(Z3_model s) { return reinterpret_cast<Z3_model_ref *>(s); }
 | 
			
		||||
| 
						 | 
				
			
			@ -34,7 +33,6 @@ struct Z3_func_interp_ref : public api::object {
 | 
			
		|||
    model_ref     m_model; // must have it to prevent reference to m_func_interp to be killed.
 | 
			
		||||
    func_interp * m_func_interp;
 | 
			
		||||
    Z3_func_interp_ref(api::context& c, model * m): api::object(c), m_model(m), m_func_interp(nullptr) {}
 | 
			
		||||
    ~Z3_func_interp_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_func_interp_ref * to_func_interp(Z3_func_interp s) { return reinterpret_cast<Z3_func_interp_ref *>(s); }
 | 
			
		||||
| 
						 | 
				
			
			@ -46,7 +44,6 @@ struct Z3_func_entry_ref : public api::object {
 | 
			
		|||
    func_interp *       m_func_interp;
 | 
			
		||||
    func_entry const *  m_func_entry;
 | 
			
		||||
    Z3_func_entry_ref(api::context& c, model * m):api::object(c), m_model(m), m_func_interp(nullptr), m_func_entry(nullptr) {}
 | 
			
		||||
    ~Z3_func_entry_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_func_entry_ref * to_func_entry(Z3_func_entry s) { return reinterpret_cast<Z3_func_entry_ref *>(s); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -459,4 +459,33 @@ extern "C" {
 | 
			
		|||
        Z3_CATCH_RETURN(nullptr);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
    Z3_ast Z3_API Z3_mk_mpz_numeral(Z3_context c, bool sign, unsigned n, unsigned const nums[], Z3_sort* srt) {
 | 
			
		||||
        LOG_TRY;
 | 
			
		||||
        LOG_Z3_mk_mpz_numeral(c, sign, n, nums, srt);
 | 
			
		||||
        RESET_ERROR_CODE();
 | 
			
		||||
        rational z;
 | 
			
		||||
 | 
			
		||||
        // todo fill in z
 | 
			
		||||
        if (!z.size())
 | 
			
		||||
            z.neg();
 | 
			
		||||
        arith_util & a = mk_c(c)->autil();
 | 
			
		||||
        auto* a = mk_c(c)->mk_numeral_core(r, a.mk_int_sort());
 | 
			
		||||
        Z3_CATCH_RETURN(nullptr);
 | 
			
		||||
            
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Z3_ast Z3_API Z3_mk_mpq_numeral1(Z3_context c, bool sign, unsigned n, unsigned const nums[], unsigned d, unsigned const dens[]) {
 | 
			
		||||
        LOG_TRY;
 | 
			
		||||
        LOG_Z3_mk_mpq_numeral(c, sign, n, nums, d, dens);
 | 
			
		||||
        RESET_ERROR_CODE();
 | 
			
		||||
        rational q;
 | 
			
		||||
 | 
			
		||||
        if (!sign)
 | 
			
		||||
            q.neg();
 | 
			
		||||
 | 
			
		||||
        Z3_CATCH_RETURN(nullptr);
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,8 +47,6 @@ extern "C" {
 | 
			
		|||
            ctx->register_plist();
 | 
			
		||||
            ctx->set_ignore_check(true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ~Z3_parser_context_ref() override {}
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    inline Z3_parser_context_ref * to_parser_context(Z3_parser_context pc) { return reinterpret_cast<Z3_parser_context_ref*>(pc); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,7 +51,6 @@ struct Z3_solver_ref : public api::object {
 | 
			
		|||
 | 
			
		||||
    Z3_solver_ref(api::context& c, solver_factory * f): 
 | 
			
		||||
        api::object(c), m_solver_factory(f), m_solver(nullptr), m_logic(symbol::null), m_eh(nullptr) {}
 | 
			
		||||
    ~Z3_solver_ref() override {}
 | 
			
		||||
 | 
			
		||||
    void assert_expr(expr* e);
 | 
			
		||||
    void assert_expr(expr* e, expr* t);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,6 @@ Revision History:
 | 
			
		|||
struct Z3_stats_ref : public api::object {
 | 
			
		||||
    statistics m_stats;
 | 
			
		||||
    Z3_stats_ref(api::context& c): api::object(c) {}
 | 
			
		||||
    ~Z3_stats_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_stats_ref * to_stats(Z3_stats s) { return reinterpret_cast<Z3_stats_ref *>(s); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,13 +28,11 @@ namespace api {
 | 
			
		|||
struct Z3_tactic_ref : public api::object {
 | 
			
		||||
    tactic_ref   m_tactic;
 | 
			
		||||
    Z3_tactic_ref(api::context& c): api::object(c) {}
 | 
			
		||||
    ~Z3_tactic_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct Z3_probe_ref : public api::object {
 | 
			
		||||
    probe_ref    m_probe;
 | 
			
		||||
    Z3_probe_ref(api::context& c):api::object(c) {}
 | 
			
		||||
    ~Z3_probe_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_tactic_ref * to_tactic(Z3_tactic g) { return reinterpret_cast<Z3_tactic_ref *>(g); }
 | 
			
		||||
| 
						 | 
				
			
			@ -50,7 +48,6 @@ struct Z3_apply_result_ref : public api::object {
 | 
			
		|||
    model_converter_ref  m_mc;
 | 
			
		||||
    proof_converter_ref  m_pc;
 | 
			
		||||
    Z3_apply_result_ref(api::context& c, ast_manager & m);
 | 
			
		||||
    ~Z3_apply_result_ref() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline Z3_apply_result_ref * to_apply_result(Z3_apply_result g) { return reinterpret_cast<Z3_apply_result_ref *>(g); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3414,7 +3414,7 @@ namespace z3 {
 | 
			
		|||
        }
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    constructor_list::constructor_list(constructors const& cs): ctx(cs.ctx) {
 | 
			
		||||
    inline constructor_list::constructor_list(constructors const& cs): ctx(cs.ctx) {
 | 
			
		||||
        array<Z3_constructor> cons(cs.size());
 | 
			
		||||
        for (unsigned i = 0; i < cs.size(); ++i)
 | 
			
		||||
            cons[i] = cs[i];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -938,6 +938,15 @@ namespace Microsoft.Z3
 | 
			
		|||
            return new BoolExpr(this, Native.Z3_mk_distinct(nCtx, (uint)args.Length, AST.ArrayToNative(args)));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Creates a <c>distinct</c> term.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public BoolExpr MkDistinct(IEnumerable<Expr> args)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Assert(args != null);
 | 
			
		||||
            return MkDistinct(args.ToArray());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        ///  Mk an expression representing <c>not(a)</c>.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -103,7 +103,7 @@ function rcf_get_numerator_denominator(c: Z3_context, a: Z3_rcf_num): { n: Z3_rc
 | 
			
		|||
When there is only a single out parameter, and the return value is not otherwise of interest, the parameter is not wrapped. For example, the C declaration
 | 
			
		||||
 | 
			
		||||
```c
 | 
			
		||||
Z3_bool Z3_model_eval(Z3_context c, Z3_model m, Z3_ast t, bool model_completion, Z3_ast * v);
 | 
			
		||||
bool Z3_model_eval(Z3_context c, Z3_model m, Z3_ast t, bool model_completion, Z3_ast * v);
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
is represented in the TS bindings as
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,7 +16,6 @@ const files = [
 | 
			
		|||
 | 
			
		||||
const aliases = {
 | 
			
		||||
  __proto__: null,
 | 
			
		||||
  Z3_bool: 'boolean',
 | 
			
		||||
  Z3_string: 'string',
 | 
			
		||||
  bool: 'boolean',
 | 
			
		||||
  signed: 'int',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -498,6 +498,15 @@ export function createApi(Z3: Z3Core): Z3HighLevel {
 | 
			
		|||
      return result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ///////////////////////////////
 | 
			
		||||
    // expression simplification //
 | 
			
		||||
    ///////////////////////////////
 | 
			
		||||
 | 
			
		||||
    async function simplify(e : Expr<Name>) {
 | 
			
		||||
       const result = await Z3.simplify(contextPtr, e.ast)       
 | 
			
		||||
       return _toExpr(check(result));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /////////////
 | 
			
		||||
    // Objects //
 | 
			
		||||
    /////////////
 | 
			
		||||
| 
						 | 
				
			
			@ -1050,6 +1059,10 @@ export function createApi(Z3: Z3Core): Z3HighLevel {
 | 
			
		|||
        return check(Z3.model_to_string(contextPtr, this.ptr));
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      toString() {
 | 
			
		||||
        return this.sexpr();
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      eval(expr: Bool<Name>, modelCompletion?: boolean): Bool<Name>;
 | 
			
		||||
      eval(expr: Arith<Name>, modelCompletion?: boolean): Arith<Name>;
 | 
			
		||||
      eval(expr: Expr<Name>, modelCompletion: boolean = false) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,7 +133,7 @@ def _configure_z3():
 | 
			
		|||
    # Allow command-line arguments to add and override Z3_ options
 | 
			
		||||
    for i in range(len(sys.argv) - 1):
 | 
			
		||||
        key = sys.argv[i]
 | 
			
		||||
        if key.starts_with("Z3_"):
 | 
			
		||||
        if key.startswith("Z3_"):
 | 
			
		||||
            val = sys.argv[i + 1].upper()
 | 
			
		||||
            if val == "TRUE" or val == "FALSE":
 | 
			
		||||
                cmake_options[key] = val
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -204,12 +204,13 @@ class Context:
 | 
			
		|||
                Z3_set_param_value(conf, str(prev), _to_param_value(a))
 | 
			
		||||
                prev = None
 | 
			
		||||
        self.ctx = Z3_mk_context_rc(conf)
 | 
			
		||||
        self.owner = True
 | 
			
		||||
        self.eh = Z3_set_error_handler(self.ctx, z3_error_handler)
 | 
			
		||||
        Z3_set_ast_print_mode(self.ctx, Z3_PRINT_SMTLIB2_COMPLIANT)
 | 
			
		||||
        Z3_del_config(conf)
 | 
			
		||||
 | 
			
		||||
    def __del__(self):
 | 
			
		||||
        if Z3_del_context is not None:
 | 
			
		||||
        if Z3_del_context is not None and self.owner:
 | 
			
		||||
            Z3_del_context(self.ctx)
 | 
			
		||||
        self.ctx = None
 | 
			
		||||
        self.eh = None
 | 
			
		||||
| 
						 | 
				
			
			@ -11363,16 +11364,18 @@ def to_ContextObj(ptr,):
 | 
			
		|||
    return ctx
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def user_prop_fresh(ctx, new_ctx):
 | 
			
		||||
def user_prop_fresh(ctx, _new_ctx):
 | 
			
		||||
    _prop_closures.set_threaded()
 | 
			
		||||
    prop = _prop_closures.get(ctx)
 | 
			
		||||
    nctx = Context()
 | 
			
		||||
    new_ctx = to_ContextObj(new_ctx)
 | 
			
		||||
    Z3_del_context(nctx.ctx)
 | 
			
		||||
    new_ctx = to_ContextObj(_new_ctx)
 | 
			
		||||
    nctx.ctx = new_ctx
 | 
			
		||||
    nctx.eh = Z3_set_error_handler(new_ctx, z3_error_handler)
 | 
			
		||||
    nctx.owner = False
 | 
			
		||||
    new_prop = prop.fresh(nctx)
 | 
			
		||||
    _prop_closures.set(new_prop.id, new_prop)
 | 
			
		||||
    return ctypes.c_void_p(new_prop.id)
 | 
			
		||||
    return new_prop.id
 | 
			
		||||
 | 
			
		||||
def to_Ast(ptr,):
 | 
			
		||||
    ast = Ast(ptr)
 | 
			
		||||
| 
						 | 
				
			
			@ -11387,6 +11390,13 @@ def user_prop_fixed(ctx, cb, id, value):
 | 
			
		|||
    prop.fixed(id, value)
 | 
			
		||||
    prop.cb = None
 | 
			
		||||
 | 
			
		||||
def user_prop_created(ctx, cb, id):
 | 
			
		||||
    prop = _prop_closures.get(ctx)
 | 
			
		||||
    prop.cb = cb
 | 
			
		||||
    id = _to_expr_ref(to_Ast(id), prop.ctx())
 | 
			
		||||
    prop.created(id)
 | 
			
		||||
    prop.cb = None
 | 
			
		||||
    
 | 
			
		||||
def user_prop_final(ctx, cb):
 | 
			
		||||
    prop = _prop_closures.get(ctx)
 | 
			
		||||
    prop.cb = cb
 | 
			
		||||
| 
						 | 
				
			
			@ -11409,14 +11419,49 @@ def user_prop_diseq(ctx, cb, x, y):
 | 
			
		|||
    prop.diseq(x, y)
 | 
			
		||||
    prop.cb = None
 | 
			
		||||
 | 
			
		||||
# TODO The decision callback is not fully implemented.
 | 
			
		||||
# It needs to handle the ast*, unsigned* idx, and Z3_lbool* 
 | 
			
		||||
def user_prop_decide(ctx, cb, t_ref, idx_ref, phase_ref):
 | 
			
		||||
    prop = _prop_closures.get(ctx)
 | 
			
		||||
    prop.cb = cb
 | 
			
		||||
    t = _to_expr_ref(to_Ast(t_ref), prop.ctx())
 | 
			
		||||
    t, idx, phase = prop.decide(t, idx, phase)
 | 
			
		||||
    t_ref = t
 | 
			
		||||
    idx_ref = idx
 | 
			
		||||
    phase_ref = phase
 | 
			
		||||
    prop.cb = None
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
_user_prop_push = Z3_push_eh(user_prop_push)
 | 
			
		||||
_user_prop_pop = Z3_pop_eh(user_prop_pop)
 | 
			
		||||
_user_prop_fresh = Z3_fresh_eh(user_prop_fresh)
 | 
			
		||||
_user_prop_fixed = Z3_fixed_eh(user_prop_fixed)
 | 
			
		||||
_user_prop_created = Z3_created_eh(user_prop_created)
 | 
			
		||||
_user_prop_final = Z3_final_eh(user_prop_final)
 | 
			
		||||
_user_prop_eq = Z3_eq_eh(user_prop_eq)
 | 
			
		||||
_user_prop_diseq = Z3_eq_eh(user_prop_diseq)
 | 
			
		||||
_user_prop_decide = Z3_decide_eh(user_prop_decide)
 | 
			
		||||
 | 
			
		||||
def PropagateFunction(name, *sig):
 | 
			
		||||
    """Create a function that gets tracked by user propagator.
 | 
			
		||||
       Every term headed by this function symbol is tracked.
 | 
			
		||||
       If a term is fixed and the fixed callback is registered a
 | 
			
		||||
       callback is invoked that the term headed by this function is fixed.
 | 
			
		||||
    """
 | 
			
		||||
    sig = _get_args(sig)
 | 
			
		||||
    if z3_debug():
 | 
			
		||||
        _z3_assert(len(sig) > 0, "At least two arguments expected")
 | 
			
		||||
    arity = len(sig) - 1
 | 
			
		||||
    rng = sig[arity]
 | 
			
		||||
    if z3_debug():
 | 
			
		||||
        _z3_assert(is_sort(rng), "Z3 sort expected")
 | 
			
		||||
    dom = (Sort * arity)()
 | 
			
		||||
    for i in range(arity):
 | 
			
		||||
        if z3_debug():
 | 
			
		||||
            _z3_assert(is_sort(sig[i]), "Z3 sort expected")
 | 
			
		||||
        dom[i] = sig[i].ast
 | 
			
		||||
    ctx = rng.ctx
 | 
			
		||||
    return FuncDeclRef(Z3_solver_propagate_declare(ctx.ref(), to_symbol(name, ctx), arity, dom, rng.ast), ctx)
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
class UserPropagateBase:
 | 
			
		||||
| 
						 | 
				
			
			@ -11440,6 +11485,7 @@ class UserPropagateBase:
 | 
			
		|||
        self.final = None
 | 
			
		||||
        self.eq = None
 | 
			
		||||
        self.diseq = None
 | 
			
		||||
        self.created = None
 | 
			
		||||
        if ctx:
 | 
			
		||||
            self.fresh_ctx = ctx
 | 
			
		||||
        if s:
 | 
			
		||||
| 
						 | 
				
			
			@ -11470,6 +11516,13 @@ class UserPropagateBase:
 | 
			
		|||
            Z3_solver_propagate_fixed(self.ctx_ref(), self.solver.solver, _user_prop_fixed)
 | 
			
		||||
        self.fixed = fixed
 | 
			
		||||
 | 
			
		||||
    def add_created(self, created):
 | 
			
		||||
        assert not self.created
 | 
			
		||||
        assert not self._ctx
 | 
			
		||||
        if self.solver:
 | 
			
		||||
            Z3_solver_propagate_created(self.ctx_ref(), self.solver.solver, _user_prop_created)
 | 
			
		||||
        self.created = created
 | 
			
		||||
        
 | 
			
		||||
    def add_final(self, final):
 | 
			
		||||
        assert not self.final
 | 
			
		||||
        assert not self._ctx
 | 
			
		||||
| 
						 | 
				
			
			@ -11491,6 +11544,13 @@ class UserPropagateBase:
 | 
			
		|||
            Z3_solver_propagate_diseq(self.ctx_ref(), self.solver.solver, _user_prop_diseq)
 | 
			
		||||
        self.diseq = diseq
 | 
			
		||||
 | 
			
		||||
    def add_decide(self, decide):
 | 
			
		||||
        assert not self.decide
 | 
			
		||||
        assert not self._ctx
 | 
			
		||||
        if self.solver:
 | 
			
		||||
            Z3_solver_propagate_decide(self.ctx_ref(), self.solver.solver, _user_prop_decide)
 | 
			
		||||
        self.decide = decide        
 | 
			
		||||
 | 
			
		||||
    def push(self):
 | 
			
		||||
        raise Z3Exception("push needs to be overwritten")
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -11501,9 +11561,19 @@ class UserPropagateBase:
 | 
			
		|||
        raise Z3Exception("fresh needs to be overwritten")
 | 
			
		||||
 | 
			
		||||
    def add(self, e):
 | 
			
		||||
        assert self.solver
 | 
			
		||||
        assert not self._ctx
 | 
			
		||||
        Z3_solver_propagate_register(self.ctx_ref(), self.solver.solver, e.ast)
 | 
			
		||||
        if self.solver:
 | 
			
		||||
            Z3_solver_propagate_register(self.ctx_ref(), self.solver.solver, e.ast)
 | 
			
		||||
        else:
 | 
			
		||||
            Z3_solver_propagate_register_cb(self.ctx_ref(), ctypes.c_void_p(self.cb), e.ast)
 | 
			
		||||
        
 | 
			
		||||
    #
 | 
			
		||||
    # Tell the solver to perform the next split on a given term
 | 
			
		||||
    # If the term is a bit-vector the index idx specifies the index of the Boolean variable being
 | 
			
		||||
    # split on. A phase of true = 1/false = -1/undef = 0 = let solver decide is the last argument.
 | 
			
		||||
    #
 | 
			
		||||
    def next_split(self, t, idx, phase):
 | 
			
		||||
        Z3_solver_next_split(self.ctx_ref(), ctypes.c_void_p(self.cb), t.ast, idx, phase)
 | 
			
		||||
        
 | 
			
		||||
    #
 | 
			
		||||
    # Propagation can only be invoked as during a fixed or final callback.
 | 
			
		||||
| 
						 | 
				
			
			@ -11516,5 +11586,5 @@ class UserPropagateBase:
 | 
			
		|||
        Z3_solver_propagate_consequence(e.ctx.ref(), ctypes.c_void_p(
 | 
			
		||||
            self.cb), num_fixed, _ids, num_eqs, _lhs, _rhs, e.ast)
 | 
			
		||||
 | 
			
		||||
    def conflict(self, deps):
 | 
			
		||||
        self.propagate(BoolVal(False, self.ctx()), deps, eqs=[])
 | 
			
		||||
    def conflict(self, deps = [], eqs = []):
 | 
			
		||||
        self.propagate(BoolVal(False, self.ctx()), deps, eqs)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1528,7 +1528,7 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
       def_API('Z3_global_param_get', BOOL, (_in(STRING), _out(STRING)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_bool Z3_API Z3_global_param_get(Z3_string param_id, Z3_string_ptr param_value);
 | 
			
		||||
    bool Z3_API Z3_global_param_get(Z3_string param_id, Z3_string_ptr param_value);
 | 
			
		||||
 | 
			
		||||
    /**@}*/
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -3387,6 +3387,39 @@ extern "C" {
 | 
			
		|||
    */
 | 
			
		||||
    Z3_ast Z3_API Z3_mk_numeral(Z3_context c, Z3_string numeral, Z3_sort ty);
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
    /**
 | 
			
		||||
       \brief Create an integer numeral from a vector of unsigned numerals.
 | 
			
		||||
 | 
			
		||||
       \param c - context
 | 
			
		||||
       \param sign - true if positive, false if negative
 | 
			
		||||
       \param n - length of array of numerals
 | 
			
		||||
       \param nums - array of numerals
 | 
			
		||||
       \param s - sort of numeral (int, real, bit-vector).
 | 
			
		||||
 | 
			
		||||
       future_('Z3_mk_mpz_numeral', AST, (_in(CONTEXT), _in(BOOL), _in(UINT), _in_array(2, UINT), _in(SORT)))
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
    Z3_ast Z3_mk_mpz_numeral(Z3_context c, bool sign, unsigned n, unsigned const nums[], Z3_sort s);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
       \brief Create a rational numeral from a vector of unsigned numerals.
 | 
			
		||||
 | 
			
		||||
       \param c - context
 | 
			
		||||
       \param sign - true if positive, false if negative
 | 
			
		||||
       \param n - length of array of nominator numerals
 | 
			
		||||
       \param nums - array of numerator numerals
 | 
			
		||||
       \param d - length of array of denominator numerals
 | 
			
		||||
       \param dens - array of denominator numerals      
 | 
			
		||||
 | 
			
		||||
       The sort of returned numeral is Real.
 | 
			
		||||
 | 
			
		||||
       future_('Z3_mk_mpq_numeral', AST, (_in(CONTEXT), _in(BOOL), _in(UINT), _in_array(2, UINT), _in(UINT), _in_array(4, UINT)))
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
    Z3_ast Z3_mk_mpq_numeral(Z3_context c, bool sign, unsigned n, unsigned const nums[], unsigned d, unsigned const dens[]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
       \brief Create a real from a fraction.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -4407,7 +4440,7 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
        def_API('Z3_get_finite_domain_sort_size', BOOL, (_in(CONTEXT), _in(SORT), _out(UINT64)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_bool Z3_API Z3_get_finite_domain_sort_size(Z3_context c, Z3_sort s, uint64_t* r);
 | 
			
		||||
    bool Z3_API Z3_get_finite_domain_sort_size(Z3_context c, Z3_sort s, uint64_t* r);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
       \brief Return the domain of the given array sort.
 | 
			
		||||
| 
						 | 
				
			
			@ -4822,6 +4855,8 @@ extern "C" {
 | 
			
		|||
       \brief Return the number of argument of an application. If \c t
 | 
			
		||||
       is an constant, then the number of arguments is 0.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_get_app_arg
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_get_app_num_args', UINT, (_in(CONTEXT), _in(APP)))
 | 
			
		||||
    */
 | 
			
		||||
    unsigned Z3_API Z3_get_app_num_args(Z3_context c, Z3_app a);
 | 
			
		||||
| 
						 | 
				
			
			@ -4831,6 +4866,8 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
       \pre i < Z3_get_app_num_args(c, a)
 | 
			
		||||
 | 
			
		||||
       \sa Z3_get_app_num_args
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_get_app_arg', AST, (_in(CONTEXT), _in(APP), _in(UINT)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_ast Z3_API Z3_get_app_arg(Z3_context c, Z3_app a, unsigned i);
 | 
			
		||||
| 
						 | 
				
			
			@ -5376,7 +5413,7 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
       def_API('Z3_model_eval', BOOL, (_in(CONTEXT), _in(MODEL), _in(AST), _in(BOOL), _out(AST)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_bool Z3_API Z3_model_eval(Z3_context c, Z3_model m, Z3_ast t, bool model_completion, Z3_ast * v);
 | 
			
		||||
    bool Z3_API Z3_model_eval(Z3_context c, Z3_model m, Z3_ast t, bool model_completion, Z3_ast * v);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
       \brief Return the interpretation (i.e., assignment) of constant \c a in the model \c m.
 | 
			
		||||
| 
						 | 
				
			
			@ -5425,6 +5462,7 @@ extern "C" {
 | 
			
		|||
       \pre i < Z3_model_get_num_consts(c, m)
 | 
			
		||||
 | 
			
		||||
       \sa Z3_model_eval
 | 
			
		||||
       \sa Z3_model_get_num_consts
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_model_get_const_decl', FUNC_DECL, (_in(CONTEXT), _in(MODEL), _in(UINT)))
 | 
			
		||||
    */
 | 
			
		||||
| 
						 | 
				
			
			@ -5436,6 +5474,8 @@ extern "C" {
 | 
			
		|||
       A function interpretation is represented as a finite map and an 'else' value.
 | 
			
		||||
       Each entry in the finite map represents the value of a function given a set of arguments.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_model_get_func_decl
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_model_get_num_funcs', UINT, (_in(CONTEXT), _in(MODEL)))
 | 
			
		||||
    */
 | 
			
		||||
    unsigned Z3_API Z3_model_get_num_funcs(Z3_context c, Z3_model m);
 | 
			
		||||
| 
						 | 
				
			
			@ -5561,6 +5601,8 @@ extern "C" {
 | 
			
		|||
       Each entry in the finite map represents the value of a function given a set of arguments.
 | 
			
		||||
       This procedure return the number of element in the finite map of \c f.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_func_interp_get_entry
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_func_interp_get_num_entries', UINT, (_in(CONTEXT), _in(FUNC_INTERP)))
 | 
			
		||||
    */
 | 
			
		||||
    unsigned Z3_API Z3_func_interp_get_num_entries(Z3_context c, Z3_func_interp f);
 | 
			
		||||
| 
						 | 
				
			
			@ -5649,6 +5691,7 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Return the number of arguments in a \c Z3_func_entry object.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_func_entry_get_arg
 | 
			
		||||
       \sa Z3_func_interp_get_entry
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_func_entry_get_num_args', UINT, (_in(CONTEXT), _in(FUNC_ENTRY)))
 | 
			
		||||
| 
						 | 
				
			
			@ -5660,6 +5703,7 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
       \pre i < Z3_func_entry_get_num_args(c, e)
 | 
			
		||||
 | 
			
		||||
       \sa Z3_func_entry_get_num_args
 | 
			
		||||
       \sa Z3_func_interp_get_entry
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_func_entry_get_arg', AST, (_in(CONTEXT), _in(FUNC_ENTRY), _in(UINT)))
 | 
			
		||||
| 
						 | 
				
			
			@ -5672,6 +5716,9 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Log interaction to a file.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_append_log
 | 
			
		||||
       \sa Z3_close_log
 | 
			
		||||
 | 
			
		||||
       extra_API('Z3_open_log', INT, (_in(STRING),))
 | 
			
		||||
    */
 | 
			
		||||
    bool Z3_API Z3_open_log(Z3_string filename);
 | 
			
		||||
| 
						 | 
				
			
			@ -5679,10 +5726,13 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Append user-defined string to interaction log.
 | 
			
		||||
 | 
			
		||||
       The interaction log is opened using Z3_open_log.
 | 
			
		||||
       The interaction log is opened using #Z3_open_log.
 | 
			
		||||
       It contains the formulas that are checked using Z3.
 | 
			
		||||
       You can use this command to append comments, for instance.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_open_log
 | 
			
		||||
       \sa Z3_close_log
 | 
			
		||||
 | 
			
		||||
       extra_API('Z3_append_log', VOID, (_in(STRING),))
 | 
			
		||||
    */
 | 
			
		||||
    void Z3_API Z3_append_log(Z3_string string);
 | 
			
		||||
| 
						 | 
				
			
			@ -5690,6 +5740,9 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Close interaction log.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_open_log
 | 
			
		||||
       \sa Z3_append_log
 | 
			
		||||
 | 
			
		||||
       extra_API('Z3_close_log', VOID, ())
 | 
			
		||||
    */
 | 
			
		||||
    void Z3_API Z3_close_log(void);
 | 
			
		||||
| 
						 | 
				
			
			@ -6388,6 +6441,8 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Return the number of builtin tactics available in Z3.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_get_tactic_name
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_get_num_tactics', UINT, (_in(CONTEXT),))
 | 
			
		||||
    */
 | 
			
		||||
    unsigned Z3_API Z3_get_num_tactics(Z3_context c);
 | 
			
		||||
| 
						 | 
				
			
			@ -6397,6 +6452,8 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
       \pre i < Z3_get_num_tactics(c)
 | 
			
		||||
 | 
			
		||||
       \sa Z3_get_num_tactics
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_get_tactic_name', STRING, (_in(CONTEXT), _in(UINT)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_string Z3_API Z3_get_tactic_name(Z3_context c, unsigned i);
 | 
			
		||||
| 
						 | 
				
			
			@ -6404,6 +6461,8 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Return the number of builtin probes available in Z3.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_get_probe_name
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_get_num_probes', UINT, (_in(CONTEXT),))
 | 
			
		||||
    */
 | 
			
		||||
    unsigned Z3_API Z3_get_num_probes(Z3_context c);
 | 
			
		||||
| 
						 | 
				
			
			@ -6413,6 +6472,8 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
       \pre i < Z3_get_num_probes(c)
 | 
			
		||||
 | 
			
		||||
       \sa Z3_get_num_probes
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_get_probe_name', STRING, (_in(CONTEXT), _in(UINT)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_string Z3_API Z3_get_probe_name(Z3_context c, unsigned i);
 | 
			
		||||
| 
						 | 
				
			
			@ -6456,6 +6517,8 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Apply tactic \c t to the goal \c g.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_tactic_apply_ex
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_tactic_apply', APPLY_RESULT, (_in(CONTEXT), _in(TACTIC), _in(GOAL)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_apply_result Z3_API Z3_tactic_apply(Z3_context c, Z3_tactic t, Z3_goal g);
 | 
			
		||||
| 
						 | 
				
			
			@ -6463,6 +6526,8 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Apply tactic \c t to the goal \c g using the parameter set \c p.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_tactic_apply
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_tactic_apply_ex', APPLY_RESULT, (_in(CONTEXT), _in(TACTIC), _in(GOAL), _in(PARAMS)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_apply_result Z3_API Z3_tactic_apply_ex(Z3_context c, Z3_tactic t, Z3_goal g, Z3_params p);
 | 
			
		||||
| 
						 | 
				
			
			@ -6491,6 +6556,8 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
       \brief Return the number of subgoals in the \c Z3_apply_result object returned by #Z3_tactic_apply.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_apply_result_get_subgoal
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_apply_result_get_num_subgoals', UINT, (_in(CONTEXT), _in(APPLY_RESULT)))
 | 
			
		||||
    */
 | 
			
		||||
    unsigned Z3_API Z3_apply_result_get_num_subgoals(Z3_context c, Z3_apply_result r);
 | 
			
		||||
| 
						 | 
				
			
			@ -6500,6 +6567,8 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
       \pre i < Z3_apply_result_get_num_subgoals(c, r)
 | 
			
		||||
 | 
			
		||||
       \sa Z3_apply_result_get_num_subgoals
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_apply_result_get_subgoal', GOAL, (_in(CONTEXT), _in(APPLY_RESULT), _in(UINT)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_goal Z3_API Z3_apply_result_get_subgoal(Z3_context c, Z3_apply_result r, unsigned i);
 | 
			
		||||
| 
						 | 
				
			
			@ -6542,6 +6611,10 @@ extern "C" {
 | 
			
		|||
       \remark User must use #Z3_solver_inc_ref and #Z3_solver_dec_ref to manage solver objects.
 | 
			
		||||
       Even if the context was created using #Z3_mk_context instead of #Z3_mk_context_rc.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_mk_simple_solver
 | 
			
		||||
       \sa Z3_mk_solver_for_logic
 | 
			
		||||
       \sa Z3_mk_solver_from_tactic
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_mk_solver', SOLVER, (_in(CONTEXT),))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_solver Z3_API Z3_mk_solver(Z3_context c);
 | 
			
		||||
| 
						 | 
				
			
			@ -6569,6 +6642,10 @@ extern "C" {
 | 
			
		|||
       \remark User must use #Z3_solver_inc_ref and #Z3_solver_dec_ref to manage solver objects.
 | 
			
		||||
       Even if the context was created using #Z3_mk_context instead of #Z3_mk_context_rc.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_mk_solver
 | 
			
		||||
       \sa Z3_mk_solver_for_logic
 | 
			
		||||
       \sa Z3_mk_solver_from_tactic
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_mk_simple_solver', SOLVER, (_in(CONTEXT),))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_solver Z3_API Z3_mk_simple_solver(Z3_context c);
 | 
			
		||||
| 
						 | 
				
			
			@ -6580,6 +6657,10 @@ extern "C" {
 | 
			
		|||
       \remark User must use #Z3_solver_inc_ref and #Z3_solver_dec_ref to manage solver objects.
 | 
			
		||||
       Even if the context was created using #Z3_mk_context instead of #Z3_mk_context_rc.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_mk_solver
 | 
			
		||||
       \sa Z3_mk_simple_solver
 | 
			
		||||
       \sa Z3_mk_solver_from_tactic
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_mk_solver_for_logic', SOLVER, (_in(CONTEXT), _in(SYMBOL)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_solver Z3_API Z3_mk_solver_for_logic(Z3_context c, Z3_symbol logic);
 | 
			
		||||
| 
						 | 
				
			
			@ -6592,6 +6673,10 @@ extern "C" {
 | 
			
		|||
       \remark User must use #Z3_solver_inc_ref and #Z3_solver_dec_ref to manage solver objects.
 | 
			
		||||
       Even if the context was created using #Z3_mk_context instead of #Z3_mk_context_rc.
 | 
			
		||||
 | 
			
		||||
       \sa Z3_mk_solver
 | 
			
		||||
       \sa Z3_mk_simple_solver
 | 
			
		||||
       \sa Z3_mk_solver_for_logic
 | 
			
		||||
 | 
			
		||||
       def_API('Z3_mk_solver_from_tactic', SOLVER, (_in(CONTEXT), _in(TACTIC)))
 | 
			
		||||
    */
 | 
			
		||||
    Z3_solver Z3_API Z3_mk_solver_from_tactic(Z3_context c, Z3_tactic t);
 | 
			
		||||
| 
						 | 
				
			
			@ -6899,7 +6984,7 @@ extern "C" {
 | 
			
		|||
    /**
 | 
			
		||||
        Create uninterpreted function declaration for the user propagator.
 | 
			
		||||
        When expressions using the function are created by the solver invoke a callback
 | 
			
		||||
        to \ref \Z3_solver_propagate_created with arguments
 | 
			
		||||
        to \ref Z3_solver_propagate_created with arguments
 | 
			
		||||
        1. context and callback solve
 | 
			
		||||
        2. declared_expr: expression using function that was used as the top-level symbol
 | 
			
		||||
        3. declared_id: a unique identifier (unique within the current scope) to track the expression.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,8 @@ Author:
 | 
			
		|||
Notes:
 | 
			
		||||
    
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/symbol.h"
 | 
			
		||||
 | 
			
		||||
void R();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
Copyright (c) 2015 Microsoft Corporation
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#ifndef Z3_API
 | 
			
		||||
# ifdef __GNUC__
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -107,7 +107,6 @@ class array_decl_plugin : public decl_plugin {
 | 
			
		|||
    bool is_array_sort(sort* s) const;
 | 
			
		||||
 public:
 | 
			
		||||
    array_decl_plugin();
 | 
			
		||||
    ~array_decl_plugin() override {}
 | 
			
		||||
 | 
			
		||||
    decl_plugin * mk_fresh() override {
 | 
			
		||||
        return alloc(array_decl_plugin);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1429,7 +1429,7 @@ ast_manager::~ast_manager() {
 | 
			
		|||
    }
 | 
			
		||||
    m_plugins.reset();
 | 
			
		||||
    while (!m_ast_table.empty()) {
 | 
			
		||||
        DEBUG_CODE(IF_VERBOSE(0, verbose_stream() << "ast_manager LEAKED: " << m_ast_table.size() << std::endl););
 | 
			
		||||
        DEBUG_CODE(IF_VERBOSE(1, verbose_stream() << "ast_manager LEAKED: " << m_ast_table.size() << std::endl););
 | 
			
		||||
        ptr_vector<ast> roots;
 | 
			
		||||
        ast_mark mark;
 | 
			
		||||
        for (ast * n : m_ast_table) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1465,22 +1465,21 @@ ast_manager::~ast_manager() {
 | 
			
		|||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        for (ast * n : m_ast_table) {
 | 
			
		||||
            if (!mark.is_marked(n)) {
 | 
			
		||||
        for (ast * n : m_ast_table) 
 | 
			
		||||
            if (!mark.is_marked(n)) 
 | 
			
		||||
                roots.push_back(n);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        SASSERT(!roots.empty());
 | 
			
		||||
        for (unsigned i = 0; i < roots.size(); ++i) {
 | 
			
		||||
            ast* a = roots[i];
 | 
			
		||||
            DEBUG_CODE(
 | 
			
		||||
                std::cout << "Leaked: ";
 | 
			
		||||
                if (is_sort(a)) {
 | 
			
		||||
                    std::cout << to_sort(a)->get_name() << "\n";
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    std::cout << mk_ll_pp(a, *this, false) << "id: " << a->get_id() << "\n";
 | 
			
		||||
                });
 | 
			
		||||
                IF_VERBOSE(1, 
 | 
			
		||||
                           verbose_stream() << "Leaked: ";
 | 
			
		||||
                           if (is_sort(a)) 
 | 
			
		||||
                               verbose_stream() << to_sort(a)->get_name() << "\n";
 | 
			
		||||
                           else 
 | 
			
		||||
                               verbose_stream() << mk_ll_pp(a, *this, false) << "id: " << a->get_id() << "\n";
 | 
			
		||||
                           ););
 | 
			
		||||
            a->m_ref_count = 0;
 | 
			
		||||
            delete_node(a);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,6 @@ class simple_ast_printer_context : public ast_printer_context {
 | 
			
		|||
    smt2_pp_environment_dbg & env() const { return *(m_env.get()); }
 | 
			
		||||
public:
 | 
			
		||||
    simple_ast_printer_context(ast_manager & m):m_manager(m) { m_env = alloc(smt2_pp_environment_dbg, m); }
 | 
			
		||||
    ~simple_ast_printer_context() override {}
 | 
			
		||||
    ast_manager & m() const { return m_manager; }
 | 
			
		||||
    ast_manager & get_ast_manager() override { return m_manager; }
 | 
			
		||||
    void display(std::ostream & out, sort * s, unsigned indent = 0) const override { out << mk_ismt2_pp(s, m(), indent); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,7 +45,6 @@ public:
 | 
			
		|||
 | 
			
		||||
class ast_printer_context : public ast_printer {
 | 
			
		||||
public:
 | 
			
		||||
    ~ast_printer_context() override {}
 | 
			
		||||
    virtual ast_manager & get_ast_manager() = 0;
 | 
			
		||||
    virtual std::ostream & regular_stream();
 | 
			
		||||
    virtual std::ostream & diagnostic_stream();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -241,7 +241,6 @@ protected:
 | 
			
		|||
public:
 | 
			
		||||
    bv_decl_plugin();
 | 
			
		||||
 | 
			
		||||
    ~bv_decl_plugin() override {}
 | 
			
		||||
    void finalize() override;
 | 
			
		||||
 | 
			
		||||
    decl_plugin * mk_fresh() override { return alloc(bv_decl_plugin); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -101,7 +101,6 @@ namespace datalog {
 | 
			
		|||
    public:
 | 
			
		||||
 | 
			
		||||
        dl_decl_plugin();
 | 
			
		||||
        ~dl_decl_plugin() override {}
 | 
			
		||||
 | 
			
		||||
        decl_plugin * mk_fresh() override { return alloc(dl_decl_plugin); }
 | 
			
		||||
        
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,8 +52,6 @@ namespace format_ns {
 | 
			
		|||
            m_line_break_ext("cr++") {
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        ~format_decl_plugin() override {}
 | 
			
		||||
 | 
			
		||||
        void finalize() override {
 | 
			
		||||
            if (m_format_sort)
 | 
			
		||||
                m_manager->dec_ref(m_format_sort);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -239,7 +239,6 @@ class fpa2bv_converter_wrapped : public fpa2bv_converter {
 | 
			
		|||
    fpa2bv_converter_wrapped(ast_manager & m, th_rewriter& rw) :
 | 
			
		||||
        fpa2bv_converter(m),
 | 
			
		||||
        m_rw(rw) {}
 | 
			
		||||
    virtual ~fpa2bv_converter_wrapped() {}
 | 
			
		||||
    void mk_const(func_decl * f, expr_ref & result) override;
 | 
			
		||||
    void mk_rm_const(func_decl * f, expr_ref & result) override;
 | 
			
		||||
    app_ref wrap(expr * e);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -77,9 +77,6 @@ public:
 | 
			
		|||
        m_rw(m, m.proofs_enabled(), m_cfg) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~name_exprs_core() override {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) override {
 | 
			
		||||
        m_cfg.m_def_exprs  = &new_defs;
 | 
			
		||||
        m_cfg.m_def_proofs = &new_def_proofs;
 | 
			
		||||
| 
						 | 
				
			
			@ -113,9 +110,6 @@ public:
 | 
			
		|||
        name_exprs_core(m, n, m_pred),
 | 
			
		||||
        m_pred(m) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~name_quantifier_labels() override {
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
name_exprs * mk_quantifier_label_namer(ast_manager & m, defined_names & n) {
 | 
			
		||||
| 
						 | 
				
			
			@ -145,9 +139,6 @@ public:
 | 
			
		|||
        m_pred(m) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~name_nested_formulas() override {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) override {
 | 
			
		||||
        m_pred.m_root = n;
 | 
			
		||||
        TRACE("name_exprs", tout << "operator()\n";);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,6 @@ class pb_decl_plugin : public decl_plugin {
 | 
			
		|||
    func_decl * mk_eq(unsigned arity, rational const* coeffs, int k);
 | 
			
		||||
public:
 | 
			
		||||
    pb_decl_plugin();
 | 
			
		||||
    ~pb_decl_plugin() override {}
 | 
			
		||||
 | 
			
		||||
    sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override {
 | 
			
		||||
        UNREACHABLE();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,8 +52,6 @@ class proof_checker {
 | 
			
		|||
    public:
 | 
			
		||||
        hyp_decl_plugin();
 | 
			
		||||
 | 
			
		||||
        ~hyp_decl_plugin() override {}
 | 
			
		||||
 | 
			
		||||
        void finalize() override;
 | 
			
		||||
        
 | 
			
		||||
        decl_plugin * mk_fresh() override { return alloc(hyp_decl_plugin); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,8 @@ Author:
 | 
			
		|||
Revision History:
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/rational.h"
 | 
			
		||||
#include "util/common_msgs.h"
 | 
			
		||||
#include "ast/rewriter/bit_blaster/bit_blaster_tpl.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,8 +68,6 @@ public:
 | 
			
		|||
        rewriter_tpl<elim_bounds_cfg>(m, m.proofs_enabled(), m_cfg),
 | 
			
		||||
        m_cfg(m)
 | 
			
		||||
    {} 
 | 
			
		||||
 | 
			
		||||
    ~elim_bounds_rw() override {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -129,8 +129,6 @@ public:
 | 
			
		|||
        m_r(m, p) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~th_rewriter2expr_replacer() override {}
 | 
			
		||||
 | 
			
		||||
    ast_manager & m() const override { return m_r.m(); }
 | 
			
		||||
 | 
			
		||||
    void set_substitution(expr_substitution * s) override { m_r.set_substitution(s); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,7 @@ Author:
 | 
			
		|||
Notes:
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/container_util.h"
 | 
			
		||||
#include "ast/rewriter/poly_rewriter.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,7 +49,6 @@ protected:
 | 
			
		|||
    bool is_target(func_decl * decl, unsigned num_args, expr * const * args) override;
 | 
			
		||||
public:
 | 
			
		||||
    ng_push_app_ite_cfg(ast_manager& m): push_app_ite_cfg(m) {}
 | 
			
		||||
    virtual ~ng_push_app_ite_cfg() {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct push_app_ite_rw : public rewriter_tpl<push_app_ite_cfg> {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,6 @@ class recfun_replace : public recfun::replace {
 | 
			
		|||
    expr_safe_replace m_replace;
 | 
			
		||||
public:
 | 
			
		||||
    recfun_replace(ast_manager& m): m(m), m_replace(m) {}
 | 
			
		||||
    ~recfun_replace() override {}
 | 
			
		||||
    void reset() override { m_replace.reset(); }
 | 
			
		||||
    void insert(expr* s, expr* t) override { m_replace.insert(s, t); }
 | 
			
		||||
    expr_ref operator()(expr* e) override { expr_ref r(m); m_replace(e, r); return r; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,8 @@ Author:
 | 
			
		|||
Notes:
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "ast/rewriter/rewriter.h"
 | 
			
		||||
#include "ast/ast_smt2_pp.h"
 | 
			
		||||
#include "ast/ast_ll_pp.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1107,6 +1107,31 @@ unsigned seq_util::rex::max_length(expr* r) const {
 | 
			
		|||
    return UINT_MAX;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
   \brief determine if \c n is a range regular expression where the lower and upper bounds
 | 
			
		||||
   are given by single characters.
 | 
			
		||||
   Range expressions where lower and upper bounds are not single characters are either 
 | 
			
		||||
   the empty language (when a bound is a string but not a single character) or symbolic
 | 
			
		||||
   (when both bounds are not ground strings). The general is_range can be used to process
 | 
			
		||||
   range expressions for these cases, but they don't correspond to mainstream regex usage.   
 | 
			
		||||
 */
 | 
			
		||||
bool seq_util::rex::is_range(expr const* n, unsigned& lo, unsigned& hi) const {
 | 
			
		||||
    expr* _lo, *_hi;
 | 
			
		||||
    zstring los, his;
 | 
			
		||||
    if (!is_range(n, _lo, _hi))
 | 
			
		||||
        return false;
 | 
			
		||||
    if (!u.str.is_string(_lo, los))
 | 
			
		||||
        return false;
 | 
			
		||||
    if (!u.str.is_string(_hi, his))
 | 
			
		||||
        return false;
 | 
			
		||||
    if (los.length() != 1 || his.length() != 1)
 | 
			
		||||
        return false;
 | 
			
		||||
    lo = los[0];
 | 
			
		||||
    hi = his[0];
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
sort* seq_util::rex::to_seq(sort* re) {
 | 
			
		||||
    (void)u;
 | 
			
		||||
    SASSERT(u.is_re(re));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -545,6 +545,7 @@ public:
 | 
			
		|||
        bool is_plus(expr const* n)    const { return is_app_of(n, m_fid, OP_RE_PLUS); }
 | 
			
		||||
        bool is_opt(expr const* n)    const { return is_app_of(n, m_fid, OP_RE_OPTION); }
 | 
			
		||||
        bool is_range(expr const* n)    const { return is_app_of(n, m_fid, OP_RE_RANGE); }
 | 
			
		||||
        bool is_range(expr const* n, unsigned& lo, unsigned& hi) const;
 | 
			
		||||
        bool is_loop(expr const* n)    const { return is_app_of(n, m_fid, OP_RE_LOOP); }
 | 
			
		||||
        bool is_empty(expr const* n)  const { return is_app_of(n, m_fid, OP_RE_EMPTY_SET); }
 | 
			
		||||
        bool is_full_char(expr const* n)  const { return is_app_of(n, m_fid, OP_RE_FULL_CHAR_SET); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,8 +40,6 @@ class special_relations_decl_plugin : public decl_plugin {
 | 
			
		|||
public:
 | 
			
		||||
    special_relations_decl_plugin();
 | 
			
		||||
 | 
			
		||||
    ~special_relations_decl_plugin() override {}
 | 
			
		||||
 | 
			
		||||
    decl_plugin * mk_fresh() override {
 | 
			
		||||
        return alloc(special_relations_decl_plugin);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -99,7 +99,7 @@ public:
 | 
			
		|||
    datatype_value_generator(value_generator& g, ast_manager& m):
 | 
			
		||||
        m(m), g(g), dt(m), m_sorts(m) {}
 | 
			
		||||
   
 | 
			
		||||
    ~datatype_value_generator() {
 | 
			
		||||
    ~datatype_value_generator() override {
 | 
			
		||||
        for (auto& kv : m_values) dealloc(kv.m_value);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -379,8 +379,6 @@ public:
 | 
			
		|||
        m_int_real_coercions(":int-real-coercions"),
 | 
			
		||||
        m_reproducible_resource_limit(":reproducible-resource-limit") {
 | 
			
		||||
    }
 | 
			
		||||
    ~set_get_option_cmd() override {}
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class set_option_cmd : public set_get_option_cmd {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -493,7 +493,6 @@ protected:
 | 
			
		|||
 | 
			
		||||
public:
 | 
			
		||||
    pp_env(cmd_context & o):m_owner(o), m_autil(o.m()), m_bvutil(o.m()), m_arutil(o.m()), m_futil(o.m()), m_sutil(o.m()), m_dtutil(o.m()), m_dlutil(o.m()) {}
 | 
			
		||||
    ~pp_env() override {}
 | 
			
		||||
    ast_manager & get_manager() const override { return m_owner.m(); }
 | 
			
		||||
    arith_util & get_autil() override { return m_autil; }
 | 
			
		||||
    bv_util & get_bvutil() override { return m_bvutil; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,6 +15,7 @@ Author:
 | 
			
		|||
Notes:
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
class cmd_context;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -147,7 +147,6 @@ class psort_sort : public psort {
 | 
			
		|||
    sort * get_sort() const { return m_sort; }
 | 
			
		||||
    sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override { return m_sort; }
 | 
			
		||||
public:
 | 
			
		||||
    ~psort_sort() override {}
 | 
			
		||||
    bool is_sort_wrapper() const override { return true; }
 | 
			
		||||
    char const * hcons_kind() const override { return "psort_sort"; }
 | 
			
		||||
    unsigned hcons_hash() const override { return m_sort->get_id(); }
 | 
			
		||||
| 
						 | 
				
			
			@ -171,7 +170,6 @@ class psort_var : public psort {
 | 
			
		|||
    }
 | 
			
		||||
    size_t obj_size() const override { return sizeof(psort_var); }
 | 
			
		||||
public:
 | 
			
		||||
    ~psort_var() override {}
 | 
			
		||||
    char const * hcons_kind() const override { return "psort_var"; }
 | 
			
		||||
    unsigned hcons_hash() const override { return hash_u_u(m_num_params, m_idx); }
 | 
			
		||||
    bool hcons_eq(psort const * other) const override {
 | 
			
		||||
| 
						 | 
				
			
			@ -233,7 +231,6 @@ class psort_app : public psort {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    ~psort_app() override {}
 | 
			
		||||
    char const * hcons_kind() const override { return "psort_app"; }
 | 
			
		||||
    unsigned hcons_hash() const override {
 | 
			
		||||
        return get_composite_hash<psort_app*, khasher, chasher>(const_cast<psort_app*>(this), m_args.size());
 | 
			
		||||
| 
						 | 
				
			
			@ -800,8 +797,6 @@ struct pdecl_manager::app_sort_info : public pdecl_manager::sort_info {
 | 
			
		|||
        m.m().inc_array_ref(n, s);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~app_sort_info() override {}
 | 
			
		||||
 | 
			
		||||
    unsigned obj_size() const override { return sizeof(app_sort_info); }
 | 
			
		||||
 | 
			
		||||
    void finalize(pdecl_manager & m) override {
 | 
			
		||||
| 
						 | 
				
			
			@ -843,8 +838,6 @@ struct pdecl_manager::indexed_sort_info : public pdecl_manager::sort_info {
 | 
			
		|||
        m_indices(n, s) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~indexed_sort_info() override {}
 | 
			
		||||
 | 
			
		||||
    unsigned obj_size() const override { return sizeof(indexed_sort_info); }
 | 
			
		||||
 | 
			
		||||
    void display(std::ostream & out, pdecl_manager const & m) const override {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,7 +66,6 @@ protected:
 | 
			
		|||
    psort(unsigned id, unsigned num_params):pdecl(id, num_params), m_inst_cache(nullptr) {}
 | 
			
		||||
    bool is_psort() const override { return true; }
 | 
			
		||||
    void finalize(pdecl_manager & m) override;
 | 
			
		||||
    ~psort() override {}
 | 
			
		||||
    virtual void cache(pdecl_manager & m, sort * const * s, sort * r);
 | 
			
		||||
    virtual sort * find(sort * const * s) const;
 | 
			
		||||
public:
 | 
			
		||||
| 
						 | 
				
			
			@ -98,7 +97,6 @@ protected:
 | 
			
		|||
    sort * find(sort * const * s);
 | 
			
		||||
    psort_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n);
 | 
			
		||||
    void finalize(pdecl_manager & m) override;
 | 
			
		||||
    ~psort_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    virtual sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) = 0;
 | 
			
		||||
    virtual sort * instantiate(pdecl_manager & m, unsigned n, unsigned const * s) { return nullptr; }
 | 
			
		||||
| 
						 | 
				
			
			@ -120,7 +118,6 @@ protected:
 | 
			
		|||
    psort_user_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n, psort * p);
 | 
			
		||||
    size_t obj_size() const override { return sizeof(psort_user_decl); }
 | 
			
		||||
    void finalize(pdecl_manager & m) override;
 | 
			
		||||
    ~psort_user_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
 | 
			
		||||
    std::ostream& display(std::ostream & out) const override;
 | 
			
		||||
| 
						 | 
				
			
			@ -133,7 +130,6 @@ protected:
 | 
			
		|||
    decl_kind m_kind;
 | 
			
		||||
    psort_builtin_decl(unsigned id, pdecl_manager & m, symbol const & n, family_id fid, decl_kind k);
 | 
			
		||||
    size_t obj_size() const override { return sizeof(psort_builtin_decl); }
 | 
			
		||||
    ~psort_builtin_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
 | 
			
		||||
    sort * instantiate(pdecl_manager & m, unsigned n, unsigned const * s) override;
 | 
			
		||||
| 
						 | 
				
			
			@ -145,7 +141,6 @@ protected:
 | 
			
		|||
    friend class pdecl_manager;
 | 
			
		||||
    psort_dt_decl(unsigned id, unsigned num_params, pdecl_manager & m, symbol const & n);
 | 
			
		||||
    size_t obj_size() const override { return sizeof(psort_dt_decl); }
 | 
			
		||||
    ~psort_dt_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
 | 
			
		||||
    std::ostream& display(std::ostream & out) const override;
 | 
			
		||||
| 
						 | 
				
			
			@ -196,7 +191,6 @@ class paccessor_decl : public pdecl {
 | 
			
		|||
    accessor_decl * instantiate_decl(pdecl_manager & m, unsigned n, sort * const * s);
 | 
			
		||||
    symbol const & get_name() const { return m_name; }
 | 
			
		||||
    ptype const & get_type() const { return m_type; }
 | 
			
		||||
    ~paccessor_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    std::ostream& display(std::ostream & out) const override { pdecl::display(out); return out; }
 | 
			
		||||
    void display(std::ostream & out, pdatatype_decl const * const * dts) const;
 | 
			
		||||
| 
						 | 
				
			
			@ -217,7 +211,6 @@ class pconstructor_decl : public pdecl {
 | 
			
		|||
    symbol const & get_name() const { return m_name; }
 | 
			
		||||
    symbol const & get_recognizer_name() const { return m_recogniser_name; }
 | 
			
		||||
    constructor_decl * instantiate_decl(pdecl_manager & m, unsigned n, sort * const * s);
 | 
			
		||||
    ~pconstructor_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    std::ostream& display(std::ostream & out) const override { pdecl::display(out); return out; }
 | 
			
		||||
    void display(std::ostream & out, pdatatype_decl const * const * dts) const;
 | 
			
		||||
| 
						 | 
				
			
			@ -234,7 +227,6 @@ class pdatatype_decl : public psort_decl {
 | 
			
		|||
    size_t obj_size() const override { return sizeof(pdatatype_decl); }
 | 
			
		||||
    bool fix_missing_refs(dictionary<int> const & symbol2idx, symbol & missing);
 | 
			
		||||
    datatype_decl * instantiate_decl(pdecl_manager & m, unsigned n, sort * const * s);
 | 
			
		||||
    ~pdatatype_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override;
 | 
			
		||||
    std::ostream& display(std::ostream & out) const override;
 | 
			
		||||
| 
						 | 
				
			
			@ -255,7 +247,6 @@ class pdatatypes_decl : public pdecl {
 | 
			
		|||
    size_t obj_size() const override { return sizeof(pdatatypes_decl); }
 | 
			
		||||
    bool fix_missing_refs(symbol & missing);
 | 
			
		||||
    bool instantiate(pdecl_manager & m, sort * const * s);
 | 
			
		||||
    ~pdatatypes_decl() override {}
 | 
			
		||||
public:
 | 
			
		||||
    pdatatype_decl const * const * children() const { return m_datatypes.data(); }
 | 
			
		||||
    pdatatype_decl * const * begin() const { return m_datatypes.begin(); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,9 +47,6 @@ public:
 | 
			
		|||
        p.insert("print_statistics", CPK_BOOL, "(default: false) print statistics.");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~simplify_cmd() override {
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    void prepare(cmd_context & ctx) override {
 | 
			
		||||
        parametric_cmd::prepare(ctx);
 | 
			
		||||
        m_target   = nullptr;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,6 @@ public:
 | 
			
		|||
template<class T>
 | 
			
		||||
class boolean_algebra : public positive_boolean_algebra<T> {
 | 
			
		||||
public:
 | 
			
		||||
    ~boolean_algebra() override {}
 | 
			
		||||
    virtual T mk_not(T x) = 0;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Author:
 | 
			
		|||
Revision History:
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "math/dd/dd_pdd.h"
 | 
			
		||||
 | 
			
		||||
namespace dd {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Author:
 | 
			
		|||
Revision History:
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "math/dd/dd_pdd.h"
 | 
			
		||||
#include "math/interval/dep_intervals.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,7 +80,6 @@ class heap_trie {
 | 
			
		|||
        Value m_value;
 | 
			
		||||
    public:
 | 
			
		||||
        leaf(): node(leaf_t) {}
 | 
			
		||||
        ~leaf() override {}
 | 
			
		||||
        Value const& get_value() const { return m_value; }
 | 
			
		||||
        void set_value(Value const& v) { m_value = v; }
 | 
			
		||||
        void display(std::ostream& out, unsigned indent) const override {
 | 
			
		||||
| 
						 | 
				
			
			@ -98,9 +97,6 @@ class heap_trie {
 | 
			
		|||
    public:
 | 
			
		||||
        trie(): node(trie_t) {}
 | 
			
		||||
 | 
			
		||||
        ~trie() override {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        node* find_or_insert(Key k, node* n) {
 | 
			
		||||
            for (unsigned i = 0; i < m_nodes.size(); ++i) {
 | 
			
		||||
                if (m_nodes[i].first == k) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/binary_heap_priority_queue.h"
 | 
			
		||||
namespace lp {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,7 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <set>
 | 
			
		||||
#include "math/lp/lp_utils.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <limits>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "math/lp/lp_settings.h"
 | 
			
		||||
#ifdef Z3DEBUG
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,8 +28,8 @@ namespace nla {
 | 
			
		|||
        const monic& m_rm;
 | 
			
		||||
        
 | 
			
		||||
        factorization_factory_imp(const monic& rm, const core& s);
 | 
			
		||||
        bool find_canonical_monic_of_vars(const svector<lpvar>& vars, unsigned & i) const;
 | 
			
		||||
        virtual bool canonize_sign(const monic& m) const;
 | 
			
		||||
        virtual bool canonize_sign(const factorization& m) const;
 | 
			
		||||
        bool find_canonical_monic_of_vars(const svector<lpvar>& vars, unsigned & i) const override;
 | 
			
		||||
        bool canonize_sign(const monic& m) const override;
 | 
			
		||||
        bool canonize_sign(const factorization& m) const override;
 | 
			
		||||
 };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/indexed_vector.h"
 | 
			
		||||
#include "math/lp/lp_settings.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,6 +9,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/lar_core_solver.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -543,7 +543,7 @@ public:
 | 
			
		|||
    void get_model(std::unordered_map<var_index, mpq> & variable_values) const;
 | 
			
		||||
    void get_rid_of_inf_eps();
 | 
			
		||||
    void get_model_do_not_care_about_diff_vars(std::unordered_map<var_index, mpq> & variable_values) const;
 | 
			
		||||
    std::string get_variable_name(var_index vi) const;
 | 
			
		||||
    std::string get_variable_name(var_index vi) const override;
 | 
			
		||||
    void set_variable_name(var_index vi, std::string);
 | 
			
		||||
    inline unsigned number_of_vars() const { return m_var_register.size(); }
 | 
			
		||||
    inline bool is_base(unsigned j) const { return m_mpq_lar_core_solver.m_r_heading[j] >= 0; }
 | 
			
		||||
| 
						 | 
				
			
			@ -651,7 +651,7 @@ public:
 | 
			
		|||
    lar_solver();
 | 
			
		||||
    void set_track_pivoted_rows(bool v);
 | 
			
		||||
    bool get_track_pivoted_rows() const;    
 | 
			
		||||
    virtual ~lar_solver();
 | 
			
		||||
    ~lar_solver() override;
 | 
			
		||||
    const vector<impq>& r_x() const { return m_mpq_lar_core_solver.m_r_x; }
 | 
			
		||||
    bool column_is_int(unsigned j) const;
 | 
			
		||||
    inline bool column_value_is_int(unsigned j) const { return m_mpq_lar_core_solver.m_r_x[j].is_int(); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <set>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "math/lp/lp_dual_simplex.h"
 | 
			
		||||
namespace lp{
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <list>
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include <fstream>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
// this is a part of lp_primal_core_solver that deals with the tableau
 | 
			
		||||
#include "math/lp/lp_primal_core_solver.h"
 | 
			
		||||
namespace lp {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/lp_primal_simplex.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <cmath>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -149,7 +149,7 @@ public:
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    virtual ~lp_solver();
 | 
			
		||||
    ~lp_solver() override;
 | 
			
		||||
 | 
			
		||||
    void flip_costs();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include <set>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,7 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <cmath>
 | 
			
		||||
#include <string>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/permutation_matrix.h"
 | 
			
		||||
namespace lp {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "math/lp/random_updater.h"
 | 
			
		||||
#include "math/lp/static_matrix.h"
 | 
			
		||||
#include "math/lp/lar_solver.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/row_eta_matrix.h"
 | 
			
		||||
namespace lp {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include "math/lp/scaler.h"
 | 
			
		||||
#include "math/lp/numeric_pair.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/square_dense_submatrix.h"
 | 
			
		||||
namespace lp {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,7 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include "math/lp/square_sparse_matrix.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ Revision History:
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "util/vector.h"
 | 
			
		||||
#include <utility>
 | 
			
		||||
#include <set>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,6 @@ namespace subpaving {
 | 
			
		|||
        CTX m_ctx;
 | 
			
		||||
    public:
 | 
			
		||||
        context_wrapper(reslimit& lim, typename CTX::numeral_manager & m, params_ref const & p, small_object_allocator * a):m_ctx(lim, m, p, a) {}
 | 
			
		||||
        ~context_wrapper() override {}
 | 
			
		||||
        unsigned num_vars() const override { return m_ctx.num_vars(); }
 | 
			
		||||
        var mk_var(bool is_int) override { return m_ctx.mk_var(is_int); }
 | 
			
		||||
        bool is_int(var x) const override { return m_ctx.is_int(x); }
 | 
			
		||||
| 
						 | 
				
			
			@ -66,8 +65,6 @@ namespace subpaving {
 | 
			
		|||
            m_as(m) 
 | 
			
		||||
        {}
 | 
			
		||||
 | 
			
		||||
        ~context_mpq_wrapper() override {}
 | 
			
		||||
 | 
			
		||||
        unsynch_mpq_manager & qm() const override { return m_ctx.nm(); }
 | 
			
		||||
 | 
			
		||||
        var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override {
 | 
			
		||||
| 
						 | 
				
			
			@ -108,8 +105,6 @@ namespace subpaving {
 | 
			
		|||
            m_q2(m_qm) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ~context_mpf_wrapper() override {}
 | 
			
		||||
 | 
			
		||||
        unsynch_mpq_manager & qm() const override { return m_qm; }
 | 
			
		||||
 | 
			
		||||
        var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override {
 | 
			
		||||
| 
						 | 
				
			
			@ -165,8 +160,6 @@ namespace subpaving {
 | 
			
		|||
            m_qm(qm) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ~context_hwf_wrapper() override {}
 | 
			
		||||
 | 
			
		||||
        unsynch_mpq_manager & qm() const override { return m_qm; }
 | 
			
		||||
 | 
			
		||||
        var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override {
 | 
			
		||||
| 
						 | 
				
			
			@ -223,8 +216,6 @@ namespace subpaving {
 | 
			
		|||
            m_z2(m_qm) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ~context_fpoint_wrapper() override {}
 | 
			
		||||
 | 
			
		||||
        unsynch_mpq_manager & qm() const override { return m_qm; }
 | 
			
		||||
 | 
			
		||||
        var mk_sum(mpz const & c, unsigned sz, mpz const * as, var const * xs) override {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,8 @@ Author:
 | 
			
		|||
Revision History:
 | 
			
		||||
 | 
			
		||||
--*/
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "math/subpaving/subpaving_t.h"
 | 
			
		||||
#include "math/interval/interval_def.h"
 | 
			
		||||
#include "util/buffer.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,8 +37,6 @@ class subpaving_tactic : public tactic {
 | 
			
		|||
            e2v.mk_inv(m_inv);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        virtual ~display_var_proc() {}
 | 
			
		||||
        
 | 
			
		||||
        ast_manager & m() const { return m_inv.get_manager(); }
 | 
			
		||||
        
 | 
			
		||||
        void operator()(std::ostream & out, subpaving::var x) const override {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,8 +32,6 @@ class array_factory : public struct_factory {
 | 
			
		|||
public:
 | 
			
		||||
    array_factory(ast_manager & m, model_core & md);
 | 
			
		||||
 | 
			
		||||
    ~array_factory() override {}
 | 
			
		||||
 | 
			
		||||
    expr * get_some_value(sort * s) override;
 | 
			
		||||
 | 
			
		||||
    bool get_some_values(sort * s, expr_ref & v1, expr_ref & v2) override;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,6 @@ class datatype_factory : public struct_factory {
 | 
			
		|||
 | 
			
		||||
public:
 | 
			
		||||
    datatype_factory(ast_manager & m, model_core & md);
 | 
			
		||||
    ~datatype_factory() override {}
 | 
			
		||||
    expr * get_some_value(sort * s) override;
 | 
			
		||||
    expr * get_fresh_value(sort * s) override;
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,8 +34,6 @@ class fpa_value_factory : public value_factory {
 | 
			
		|||
        value_factory(m, fid),
 | 
			
		||||
        m_util(m) {}
 | 
			
		||||
    
 | 
			
		||||
    ~fpa_value_factory() override {}
 | 
			
		||||
    
 | 
			
		||||
    expr * get_some_value(sort * s) override {
 | 
			
		||||
        mpf_manager & mpfm = m_util.fm();
 | 
			
		||||
        
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,7 +25,6 @@ Revision History:
 | 
			
		|||
class numeral_factory : public simple_factory<rational> {
 | 
			
		||||
public:
 | 
			
		||||
    numeral_factory(ast_manager & m, family_id fid):simple_factory<rational>(m, fid) {}
 | 
			
		||||
    ~numeral_factory() override {}
 | 
			
		||||
};    
 | 
			
		||||
 | 
			
		||||
class arith_factory : public numeral_factory {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue