mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
Merge branch 'master' of https://github.com/z3prover/z3
This commit is contained in:
commit
a3ccdaf318
|
@ -36,15 +36,8 @@ function(z3_add_component_dependencies_to_target target_name)
|
|||
# Remaing args should be component names
|
||||
set(_expanded_deps ${ARGN})
|
||||
foreach (dependency ${_expanded_deps})
|
||||
# FIXME: Adding these include paths wouldn't be necessary if the sources
|
||||
# used include paths rooted in the ``src`` directory.
|
||||
get_property(_dep_include_dirs GLOBAL PROPERTY Z3_${dependency}_INCLUDES)
|
||||
foreach (inc_dir ${_dep_include_dirs})
|
||||
target_include_directories(${target_name} PRIVATE "${inc_dir}")
|
||||
endforeach()
|
||||
unset(_dep_include_dirs)
|
||||
# Ensure this component's dependencies are built before this component.
|
||||
# This important because we might need the generated header files in
|
||||
# This is important because we might need the generated header files in
|
||||
# other components.
|
||||
add_dependencies(${target_name} ${dependency})
|
||||
endforeach()
|
||||
|
@ -214,18 +207,14 @@ macro(z3_add_component component_name)
|
|||
target_compile_options(${component_name} PRIVATE ${flag})
|
||||
endforeach()
|
||||
|
||||
# It's unfortunate that we have to manage the include directories and dependencies ourselves.
|
||||
# It's unfortunate that we have to manage dependencies ourselves.
|
||||
#
|
||||
# If we weren't building "object" libraries we could use
|
||||
# ```
|
||||
# target_include_directories(${component_name} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
# target_link_libraries(${component_name} INTERFACE ${Z3_MOD_COMPONENT_DEPENDENCIES})
|
||||
# ```
|
||||
# but we can't do that with "object" libraries.
|
||||
|
||||
# Record this component's include directories
|
||||
set_property(GLOBAL PROPERTY Z3_${component_name}_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set_property(GLOBAL APPEND PROPERTY Z3_${component_name}_INCLUDES "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set_property(GLOBAL PROPERTY Z3_${component_name}_DEPS "")
|
||||
# Record this component's dependencies
|
||||
foreach (dependency ${Z3_MOD_COMPONENT_DEPENDENCIES})
|
||||
|
@ -243,12 +232,6 @@ macro(z3_add_component component_name)
|
|||
endif()
|
||||
#message(STATUS "Component \"${component_name}\" has the following dependencies ${_expanded_deps}")
|
||||
|
||||
# For any generated header files for this component
|
||||
target_include_directories(${component_name} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
# So that any generated header files can refer to source files in the component's
|
||||
# source tree
|
||||
target_include_directories(${component_name} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
# Add any extra include directories
|
||||
foreach (extra_include ${Z3_COMPONENT_EXTRA_INCLUDE_DIRS})
|
||||
target_include_directories(${component_name} PRIVATE "${extra_include}")
|
||||
|
@ -283,7 +266,6 @@ macro(z3_add_install_tactic_rule)
|
|||
endforeach()
|
||||
unset(_component_tactic_header_files)
|
||||
|
||||
list(APPEND _search_paths "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
add_custom_command(OUTPUT "install_tactic.cpp"
|
||||
COMMAND "${PYTHON_EXECUTABLE}"
|
||||
"${CMAKE_SOURCE_DIR}/scripts/mk_install_tactic_cpp.py"
|
||||
|
@ -311,13 +293,6 @@ macro(z3_add_memory_initializer_rule)
|
|||
)
|
||||
endif()
|
||||
z3_expand_dependencies(_expanded_components ${ARGN})
|
||||
# Get paths to search
|
||||
set(_search_paths "")
|
||||
foreach (dependency ${_expanded_components})
|
||||
get_property(_dep_include_dirs GLOBAL PROPERTY Z3_${dependency}_INCLUDES)
|
||||
list(APPEND _search_paths ${_dep_include_dirs})
|
||||
endforeach()
|
||||
list(APPEND _search_paths "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
# Get header files that declare initializers and finalizers
|
||||
set(_mem_init_finalize_headers "")
|
||||
|
|
|
@ -1573,7 +1573,7 @@ def def_APIs(api_files):
|
|||
|
||||
def write_log_h_preamble(log_h):
|
||||
log_h.write('// Automatically generated file\n')
|
||||
log_h.write('#include\"z3.h\"\n')
|
||||
log_h.write('#include\"api/z3.h\"\n')
|
||||
log_h.write('#ifdef __GNUC__\n')
|
||||
log_h.write('#define _Z3_UNUSED __attribute__((unused))\n')
|
||||
log_h.write('#else\n')
|
||||
|
@ -1592,14 +1592,14 @@ def write_log_h_preamble(log_h):
|
|||
def write_log_c_preamble(log_c):
|
||||
log_c.write('// Automatically generated file\n')
|
||||
log_c.write('#include<iostream>\n')
|
||||
log_c.write('#include\"z3.h\"\n')
|
||||
log_c.write('#include\"api_log_macros.h\"\n')
|
||||
log_c.write('#include\"z3_logger.h\"\n')
|
||||
log_c.write('#include\"api/z3.h\"\n')
|
||||
log_c.write('#include\"api/api_log_macros.h\"\n')
|
||||
log_c.write('#include\"api/z3_logger.h\"\n')
|
||||
|
||||
def write_exe_c_preamble(exe_c):
|
||||
exe_c.write('// Automatically generated file\n')
|
||||
exe_c.write('#include\"z3.h\"\n')
|
||||
exe_c.write('#include\"z3_replayer.h\"\n')
|
||||
exe_c.write('#include\"api/z3.h\"\n')
|
||||
exe_c.write('#include\"api/z3_replayer.h\"\n')
|
||||
#
|
||||
exe_c.write('void Z3_replayer_error_handler(Z3_context ctx, Z3_error_code c) { printf("[REPLAYER ERROR HANDLER]: %s\\n", Z3_get_error_msg(ctx, c)); }\n')
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_ast_vector.h"
|
||||
#include "math/polynomial/algebraic_numbers.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/array_decl_plugin.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include<iostream>
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/well_sorted.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_ast_map.h"
|
||||
#include "api/api_ast_vector.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_ast_vector.h"
|
||||
#include "ast/ast_translation.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Revision History:
|
|||
#include "api/z3.h"
|
||||
#include "api/api_context.h"
|
||||
#include "ast/pp.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_util.h"
|
||||
#include "cmd_context/cmd_context.h"
|
||||
#include "util/symbol.h"
|
||||
|
|
|
@ -20,10 +20,10 @@ Revision History:
|
|||
#include<typeinfo>
|
||||
#include "api/api_context.h"
|
||||
#include "parsers/smt/smtparser.h"
|
||||
#include"version.h"
|
||||
#include "util/version.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/ast_ll_pp.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/reg_decl_plugins.h"
|
||||
#include "math/realclosure/realclosure.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ Revision History:
|
|||
#include "api/api_util.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "api/api_ast_vector.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_stats.h"
|
||||
#include "muz/fp/datalog_parser.h"
|
||||
#include "util/cancel_eh.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/datatype_decl_plugin.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Notes:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "ast/fpa_decl_plugin.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_goal.h"
|
||||
#include "ast/ast_translation.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include<sstream>
|
||||
#include<vector>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_tactic.h"
|
||||
#include "api/api_solver.h"
|
||||
|
|
|
@ -17,9 +17,9 @@ Revision History:
|
|||
--*/
|
||||
#include<fstream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "util/util.h"
|
||||
#include"version.h"
|
||||
#include "util/version.h"
|
||||
|
||||
std::ostream * g_z3_log = 0;
|
||||
bool g_z3_log_enabled = false;
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_model.h"
|
||||
#include "api/api_ast_vector.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_stats.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
|
|
|
@ -19,7 +19,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "util/params.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "cmd_context/cmd_context.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/pb_decl_plugin.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_polynomial.h"
|
||||
#include "api/api_ast_vector.h"
|
||||
|
|
|
@ -19,7 +19,7 @@ Notes:
|
|||
|
||||
#include <iostream>
|
||||
#include "api/z3.h"
|
||||
#include "api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "api/api_model.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "parsers/util/pattern_validation.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ Notes:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "math/realclosure/realclosure.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_util.h"
|
||||
#include "ast/ast_pp.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_tactic.h"
|
||||
#include "api/api_solver.h"
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_stats.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Revision History:
|
|||
--*/
|
||||
#include<iostream>
|
||||
#include "api/z3.h"
|
||||
#include"api_log_macros.h"
|
||||
#include "api/api_log_macros.h"
|
||||
#include "api/api_context.h"
|
||||
#include "api/api_tactic.h"
|
||||
#include "api/api_model.h"
|
||||
|
|
|
@ -729,8 +729,13 @@ void pattern_inference::reduce1_quantifier(quantifier * q) {
|
|||
return;
|
||||
}
|
||||
|
||||
cache_result(q, new_q, pr);
|
||||
IF_IVERBOSE(10,
|
||||
verbose_stream() << "(smt.inferred-patterns :qid " << q->get_qid() << "\n";
|
||||
for (unsigned i = 0; i < new_patterns.size(); i++)
|
||||
verbose_stream() << " " << mk_ismt2_pp(new_patterns[i], m, 2) << "\n";
|
||||
verbose_stream() << ")\n"; );
|
||||
|
||||
cache_result(q, new_q, pr);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include "cmd_context/cmd_context.h"
|
||||
#include"version.h"
|
||||
#include "util/version.h"
|
||||
#include "ast/ast_smt_pp.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
#include "ast/ast_pp.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include<vector>
|
||||
#include<list>
|
||||
#include <set>
|
||||
#include"version.h"
|
||||
#include "util/version.h"
|
||||
#include<limits.h>
|
||||
|
||||
#include "interp/iz3hash.h"
|
||||
|
|
|
@ -26,7 +26,7 @@ Revision History:
|
|||
#include "shell/smtlib_frontend.h"
|
||||
#include "shell/z3_log_frontend.h"
|
||||
#include "util/warning.h"
|
||||
#include"version.h"
|
||||
#include "util/version.h"
|
||||
#include "shell/dimacs_frontend.h"
|
||||
#include "shell/datalog_frontend.h"
|
||||
#include "shell/opt_frontend.h"
|
||||
|
|
|
@ -2088,6 +2088,7 @@ namespace smt {
|
|||
if (p->get_decl() == f &&
|
||||
m_context.is_relevant(p) &&
|
||||
p->is_cgr() &&
|
||||
i < p->get_num_args() &&
|
||||
p->get_arg(i)->get_root() == n) {
|
||||
v->push_back(p);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace smt {
|
|||
m_max_cexs(1),
|
||||
m_iteration_idx(0),
|
||||
m_curr_model(0),
|
||||
m_new_instances_bindings(m) {
|
||||
m_pinned_exprs(m) {
|
||||
}
|
||||
|
||||
model_checker::~model_checker() {
|
||||
|
@ -200,8 +200,12 @@ namespace smt {
|
|||
}
|
||||
|
||||
void model_checker::add_instance(quantifier* q, expr_ref_vector const& bindings, unsigned max_generation) {
|
||||
SASSERT(q->get_num_decls() == bindings.size());
|
||||
|
||||
for (unsigned i = 0; i < bindings.size(); i++)
|
||||
m_new_instances_bindings.push_back(bindings[i]);
|
||||
m_pinned_exprs.push_back(bindings[i]);
|
||||
m_pinned_exprs.push_back(q);
|
||||
|
||||
void * mem = m_new_instances_region.allocate(instance::get_obj_size(q->get_num_decls()));
|
||||
instance * new_inst = new (mem) instance(q, bindings.c_ptr(), max_generation);
|
||||
m_new_instances.push_back(new_inst);
|
||||
|
@ -469,8 +473,9 @@ namespace smt {
|
|||
}
|
||||
|
||||
void model_checker::reset_new_instances() {
|
||||
m_new_instances_region.reset();
|
||||
m_pinned_exprs.reset();
|
||||
m_new_instances.reset();
|
||||
m_new_instances_region.reset();
|
||||
}
|
||||
|
||||
void model_checker::reset() {
|
||||
|
|
|
@ -73,8 +73,8 @@ namespace smt {
|
|||
};
|
||||
|
||||
region m_new_instances_region;
|
||||
expr_ref_vector m_new_instances_bindings;
|
||||
ptr_vector<instance> m_new_instances;
|
||||
expr_ref_vector m_pinned_exprs;
|
||||
bool add_instance(quantifier * q, model * cex, expr_ref_vector & sks, bool use_inv);
|
||||
void reset_new_instances();
|
||||
void assert_new_instances();
|
||||
|
@ -83,8 +83,8 @@ namespace smt {
|
|||
|
||||
struct is_model_value {};
|
||||
expr_mark m_visited;
|
||||
bool contains_model_value(expr* e);
|
||||
void add_instance(quantifier* q, expr_ref_vector const& bindings, unsigned max_generation);
|
||||
bool contains_model_value(expr * e);
|
||||
void add_instance(quantifier * q, expr_ref_vector const & bindings, unsigned max_generation);
|
||||
|
||||
public:
|
||||
model_checker(ast_manager & m, qi_params const & p, model_finder & mf);
|
||||
|
|
Loading…
Reference in a new issue