diff --git a/doc/footer.html b/doc/footer.html index 6400db92b..724bd6e7c 100644 --- a/doc/footer.html +++ b/doc/footer.html @@ -1,3 +1,4 @@ -
+ diff --git a/doc/update_website.cmd b/doc/update_website.cmd new file mode 100644 index 000000000..1b1ede627 --- /dev/null +++ b/doc/update_website.cmd @@ -0,0 +1,4 @@ +REM Script for updating the website containing the Z3 API documentation. +REM You must be inside the Microsoft network to execute this script, and +REM robocopy must be in your PATH. +robocopy /S html \\research\root\web\external\en-us\UM\redmond\projects\z3 \ No newline at end of file diff --git a/doc/website.dox b/doc/website.dox index f6bc7fe6c..91034aafa 100644 --- a/doc/website.dox +++ b/doc/website.dox @@ -6,10 +6,12 @@ The Z3 website moved to z3.codeplex.com. + The old Z3 website can be found here. + This website hosts the automatically generated documentation for the Z3 APIs. - \ref capi - .NET API - Python API - - Try Z3 online at RiSE4Fun. + - Try Z3 online at RiSE4Fun using Python or SMT 2.0. */ diff --git a/src/cmd_context/cmd_context.cpp b/src/cmd_context/cmd_context.cpp index 0fb4b8512..afcac48ac 100644 --- a/src/cmd_context/cmd_context.cpp +++ b/src/cmd_context/cmd_context.cpp @@ -477,7 +477,8 @@ bool cmd_context::logic_has_bv_core(symbol const & s) const { s == "QF_UFBV" || s == "QF_ABV" || s == "QF_AUFBV" || - s == "QF_BVRE"; + s == "QF_BVRE" || + s == "HORN"; } bool cmd_context::logic_has_horn(symbol const& s) const { @@ -518,7 +519,8 @@ bool cmd_context::logic_has_array_core(symbol const & s) const { s == "AUFBV" || s == "ABV" || s == "QF_ABV" || - s == "QF_AUFBV"; + s == "QF_AUFBV" || + s == "HORN"; } bool cmd_context::logic_has_array() const { diff --git a/src/muz_qe/horn_tactic.cpp b/src/muz_qe/horn_tactic.cpp index 1e76faf13..59e9e6fec 100644 --- a/src/muz_qe/horn_tactic.cpp +++ b/src/muz_qe/horn_tactic.cpp @@ -90,6 +90,24 @@ class horn_tactic : public tactic { m_ctx.register_predicate(to_app(a)->get_decl(), true); } + void check_predicate(expr* a) { + expr* a1 = 0; + while (true) { + if (is_quantifier(a)) { + a = to_quantifier(a)->get_expr(); + continue; + } + if (m.is_not(a, a1)) { + a = a1; + continue; + } + if (is_predicate(a)) { + register_predicate(a); + } + break; + } + } + enum formula_kind { IS_RULE, IS_QUERY, IS_NONE }; formula_kind get_formula_kind(expr_ref& f) { @@ -99,13 +117,12 @@ class horn_tactic : public tactic { expr* a = 0, *a1 = 0; datalog::flatten_or(f, args); for (unsigned i = 0; i < args.size(); ++i) { - a = args[i].get(); + a = args[i].get(); + check_predicate(a); if (m.is_not(a, a1) && is_predicate(a1)) { - register_predicate(a1); body.push_back(a1); } else if (is_predicate(a)) { - register_predicate(a); if (head) { return IS_NONE; } diff --git a/src/muz_qe/qe_lite.cpp b/src/muz_qe/qe_lite.cpp index 97f55fb6f..8a14aeb4c 100644 --- a/src/muz_qe/qe_lite.cpp +++ b/src/muz_qe/qe_lite.cpp @@ -340,15 +340,23 @@ class der2 { } } - void apply_substitution(quantifier * q, expr_ref & r) { + void flatten_args(quantifier* q, unsigned& num_args, expr*const*& args) { expr * e = q->get_expr(); - unsigned num_args = 1; - expr* const* args = &e; + num_args = 1; + args = &e; if ((q->is_forall() && m.is_or(e)) || (q->is_exists() && m.is_and(e))) { num_args = to_app(e)->get_num_args(); args = to_app(e)->get_args(); } + } + + void apply_substitution(quantifier * q, expr_ref & r) { + + expr * e = q->get_expr(); + unsigned num_args = 1; + expr* const* args = &e; + flatten_args(q, num_args, args); bool_rewriter rw(m); // get a new expression @@ -395,11 +403,7 @@ class der2 { set_is_variable_proc(is_v); unsigned num_args = 1; expr* const* args = &e; - if ((q->is_forall() && m.is_or(e)) || - (q->is_exists() && m.is_and(e))) { - num_args = to_app(e)->get_num_args(); - args = to_app(e)->get_args(); - } + flatten_args(q, num_args, args); unsigned def_count = 0; unsigned largest_vinx = 0;