mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
Reorganizing the code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
d8cd3fc3ab
commit
6bdb009c3e
22
mk_make.py
22
mk_make.py
|
@ -8,16 +8,13 @@
|
|||
############################################
|
||||
from mk_util import *
|
||||
|
||||
BUILD_DIR='build-test'
|
||||
SRC_DIR='src'
|
||||
MODES=['Debug', 'Release']
|
||||
PLATFORMS=['Win32', 'x64']
|
||||
VS_COMMON_OPTIONS='WIN32;_WINDOWS;ASYNC_COMMANDS'
|
||||
VS_DBG_OPTIONS='Z3DEBUG;_TRACE;_DEBUG'
|
||||
VS_RELEASE_OPTIONS='NDEBUG;_EXTERNAL_RELEASE'
|
||||
|
||||
# Initialization
|
||||
mk_dir(BUILD_DIR)
|
||||
set_build_dir('build-test')
|
||||
set_src_dir('src')
|
||||
set_modes(['Debug', 'Release'])
|
||||
set_platforms(['Win32', 'x64'])
|
||||
set_vs_options('WIN32;_WINDOWS;ASYNC_COMMANDS',
|
||||
'Z3DEBUG;_TRACE;_DEBUG',
|
||||
'NDEBUG;_EXTERNAL_RELEASE')
|
||||
|
||||
add_lib('util', [])
|
||||
add_lib('polynomial', ['util'])
|
||||
|
@ -32,5 +29,8 @@ add_lib('simplifier', ['util', 'ast', 'rewriter'])
|
|||
# Model module should not depend on simplifier module.
|
||||
# We must replace all occurrences of simplifier with rewriter.
|
||||
add_lib('model', ['util', 'ast', 'rewriter', 'simplifier'])
|
||||
add_lib('tactic', ['util', 'ast'])
|
||||
# Old (non-modular) parameter framework. It has been subsumed by util\params.h.
|
||||
# However, it is still used by many old components.
|
||||
add_lib('old_params', ['util', 'ast', 'simplifier', 'model'])
|
||||
add_lib('framework', ['util', 'ast', 'model', 'old_params', 'simplifier', 'rewriter'])
|
||||
|
||||
|
|
32
mk_util.py
32
mk_util.py
|
@ -9,6 +9,38 @@
|
|||
import os
|
||||
import glob
|
||||
|
||||
BUILD_DIR='build'
|
||||
SRC_DIR='src'
|
||||
MODES=[]
|
||||
PLATFORMS=[]
|
||||
|
||||
def set_build_dir(d):
|
||||
global BUILD_DIR
|
||||
BUILD_DIR = d
|
||||
mk_dir(BUILD_DIR)
|
||||
|
||||
def set_src_dir(d):
|
||||
global SRC_DIR
|
||||
SRC_DIR = d
|
||||
|
||||
def set_modes(l):
|
||||
global MODES
|
||||
MODES=l
|
||||
|
||||
def set_platforms(l):
|
||||
global PLATFORMS
|
||||
PLATFORMS=l
|
||||
|
||||
VS_COMMON_OPTIONS='WIN32'
|
||||
VS_DBG_OPTIONS='_DEBUG'
|
||||
VS_RELEASE_OPTIONS='NDEBUG'
|
||||
|
||||
def set_vs_options(common, dbg, release):
|
||||
global VS_COMMON_OPTIONS, VS_DBG_OPTIONS, VS_RELEASE_OPTIONS
|
||||
VS_COMMON_OPTIONS = common
|
||||
VS_DBG_OPTIONS = dbg
|
||||
VS_RELEASE_OPTIONS = release
|
||||
|
||||
def is_debug(mode):
|
||||
return mode == 'Debug'
|
||||
|
||||
|
|
1
src/framework/README
Normal file
1
src/framework/README
Normal file
|
@ -0,0 +1 @@
|
|||
tactic and command context frameworks.
|
|
@ -27,7 +27,6 @@ Notes:
|
|||
#include"cmd_util.h"
|
||||
#include"simplify_cmd.h"
|
||||
#include"eval_cmd.h"
|
||||
#include"qe_cmd.h"
|
||||
|
||||
class help_cmd : public cmd {
|
||||
svector<symbol> m_cmds;
|
||||
|
@ -770,5 +769,4 @@ void install_ext_basic_cmds(cmd_context & ctx) {
|
|||
ctx.insert(alloc(builtin_cmd, "reset", 0, "reset the shell (all declarations and assertions will be erased)"));
|
||||
install_simplify_cmd(ctx);
|
||||
install_eval_cmd(ctx);
|
||||
install_qe_cmd(ctx);
|
||||
}
|
|
@ -21,6 +21,7 @@ Revision History:
|
|||
#include"array_decl_plugin.h"
|
||||
#include"bv_decl_plugin.h"
|
||||
#include"ast_pp.h"
|
||||
#include"for_each_expr.h"
|
||||
|
||||
struct check_logic::imp {
|
||||
ast_manager & m;
|
|
@ -19,7 +19,7 @@ Revision History:
|
|||
#ifndef _CHECK_LOGIC_H_
|
||||
#define _CHECK_LOGIC_H_
|
||||
|
||||
#include"assertion_set.h"
|
||||
#include"ast.h"
|
||||
|
||||
class check_logic {
|
||||
struct imp;
|
|
@ -16,6 +16,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include<signal.h>
|
||||
#include"front_end_params.h"
|
||||
#include"tptr.h"
|
||||
#include"cmd_context.h"
|
||||
#include"func_decl_dependencies.h"
|
||||
|
@ -36,6 +37,7 @@ Notes:
|
|||
#include"decl_collector.h"
|
||||
#include"well_sorted.h"
|
||||
#include"model_evaluator.h"
|
||||
#include"for_each_expr.h"
|
||||
|
||||
func_decls::func_decls(ast_manager & m, func_decl * f):
|
||||
m_decls(TAG(func_decl*, f, 0)) {
|
||||
|
@ -321,7 +323,7 @@ cmd_context::cmd_context(front_end_params & params, bool main_ctx, ast_manager *
|
|||
SASSERT(m != 0 || !has_manager());
|
||||
install_basic_cmds(*this);
|
||||
install_ext_basic_cmds(*this);
|
||||
install_tactic_cmds(*this);
|
||||
install_core_tactic_cmds(*this);
|
||||
SASSERT(m != 0 || !has_manager());
|
||||
if (m)
|
||||
init_external_manager();
|
|
@ -24,7 +24,6 @@ Notes:
|
|||
#include<sstream>
|
||||
#include"ast.h"
|
||||
#include"pdecl.h"
|
||||
#include"front_end_params.h"
|
||||
#include"dictionary.h"
|
||||
#include"solver.h"
|
||||
#include"datatype_decl_plugin.h"
|
||||
|
@ -37,6 +36,8 @@ Notes:
|
|||
#include"progress_callback.h"
|
||||
#include"scoped_ptr_vector.h"
|
||||
|
||||
struct front_end_params;
|
||||
|
||||
class func_decls {
|
||||
func_decl * m_decls;
|
||||
public:
|
|
@ -58,16 +58,19 @@ public:
|
|||
m_last = symbol::null;
|
||||
}
|
||||
virtual void set_next_arg(cmd_context & ctx, sort * s) {
|
||||
m_params.set_sort(m_last, s);
|
||||
m_last = symbol::null;
|
||||
NOT_IMPLEMENTED_YET();
|
||||
// m_params.set_sort(m_last, s);
|
||||
// m_last = symbol::null;
|
||||
}
|
||||
virtual void set_next_arg(cmd_context & ctx, expr * t) {
|
||||
m_params.set_expr(m_last, t);
|
||||
m_last = symbol::null;
|
||||
NOT_IMPLEMENTED_YET();
|
||||
// m_params.set_expr(m_last, t);
|
||||
// m_last = symbol::null;
|
||||
}
|
||||
virtual void set_next_arg(cmd_context & ctx, func_decl * f) {
|
||||
m_params.set_func_decl(m_last, f);
|
||||
m_last = symbol::null;
|
||||
NOT_IMPLEMENTED_YET();
|
||||
// m_params.set_func_decl(m_last, f);
|
||||
// m_last = symbol::null;
|
||||
}
|
||||
};
|
||||
|
|
@ -17,7 +17,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include"solver.h"
|
||||
#include"smt_solver.h"
|
||||
// #include"smt_solver.h"
|
||||
|
||||
unsigned solver::get_num_assertions() const {
|
||||
NOT_IMPLEMENTED_YET();
|
||||
|
@ -33,6 +33,7 @@ void solver::display(std::ostream & out) const {
|
|||
out << "(solver)";
|
||||
}
|
||||
|
||||
#if 0
|
||||
class default_solver : public solver {
|
||||
front_end_params * m_params;
|
||||
smt::solver * m_context;
|
||||
|
@ -191,3 +192,4 @@ public:
|
|||
solver * mk_default_solver() {
|
||||
return alloc(default_solver);
|
||||
}
|
||||
#endif
|
|
@ -20,7 +20,6 @@ Notes:
|
|||
#include"cmd_context.h"
|
||||
#include"cmd_util.h"
|
||||
#include"parametric_cmd.h"
|
||||
#include"install_tactics.h"
|
||||
#include"scoped_timer.h"
|
||||
#include"scoped_ctrl_c.h"
|
||||
#include"cancel_eh.h"
|
||||
|
@ -390,13 +389,12 @@ public:
|
|||
};
|
||||
|
||||
|
||||
void install_tactic_cmds(cmd_context & ctx) {
|
||||
void install_core_tactic_cmds(cmd_context & ctx) {
|
||||
ctx.insert(alloc(declare_tactic_cmd));
|
||||
ctx.insert(alloc(get_user_tactics_cmd));
|
||||
ctx.insert(alloc(help_tactic_cmd));
|
||||
ctx.insert(alloc(check_sat_using_tactict_cmd));
|
||||
ctx.insert(alloc(apply_tactic_cmd));
|
||||
install_tactics(ctx);
|
||||
}
|
||||
|
||||
static tactic * mk_and_then(cmd_context & ctx, sexpr * n) {
|
|
@ -45,7 +45,7 @@ public:
|
|||
tactic * mk(ast_manager & m);
|
||||
};
|
||||
|
||||
void install_tactic_cmds(cmd_context & ctx);
|
||||
void install_core_tactic_cmds(cmd_context & ctx);
|
||||
tactic * sexpr2tactic(cmd_context & ctx, sexpr * n);
|
||||
|
||||
class probe_info {
|
2
src/simplifier/README
Normal file
2
src/simplifier/README
Normal file
|
@ -0,0 +1,2 @@
|
|||
Simplifier module is now obsolete.
|
||||
It is still being used in many places, but we will eventually replace all occurrences with the new rewriter module.
|
Loading…
Reference in a new issue