3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 21:38:44 +00:00
Commit graph

72 commits

Author SHA1 Message Date
Nikolaj Bjorner 3526d03cca remove VERIFY output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-12-28 18:01:32 -08:00
Nikolaj Bjorner f41134d1b6 h
- avoid more platform specific behavior when using m_mk_extract,
- rename mk_eq in bool_rewriter to mk_eq_plain to distinguish it from mk_eq_rw
- rework bv_lookahead to be more closely based on sls_engine, which has much better heuristic behavior than attempt 1.
2024-12-28 17:40:25 -08:00
Nikolaj Bjorner 23c4728d68 remove some platform specific behavior 2024-12-23 16:28:10 -08:00
Nikolaj Bjorner bc70282a18 mute some compiler warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-02-03 15:42:06 -08:00
Nikolaj Bjorner 7486e8724f track quantifier instantiation method in proof hint #7080
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-20 17:44:07 -08:00
Nikolaj Bjorner ea3628e50b remove hoist functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-03 16:28:43 -08:00
Nikolaj Bjorner ba8d8f0af7 Disable hoist entirely, it is bad on QF_LIA and does not help on other observed cases 2023-12-02 15:40:47 -08:00
Nikolaj Bjorner faf14012ba Regressions reported by Guido 2023-12-01 13:32:13 -08:00
Nikolaj Bjorner dda9242616 revert lt change
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 21:39:04 -07:00
Nikolaj Bjorner 3727f70363 fix #6742
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 19:22:31 -07:00
Nikolaj Bjorner 5806869ae4 fix #6792, add scaffolding for type variables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-07 17:22:56 -07:00
Guido Martínez 7c380fd6a0
bool_rewriter: fix possible segfault when disabling rewriter.sort_disjunctions (#6779)
After introducing the rewriter.sort_disjunctions option (#6774), I
noticed a segfault in a Z3 run that was working fine for me before the
PR.

I traced the difference to a slight discrepancy between the first patch
I submitted and the one we ended up merging: my first version would skip
sorting the disjuncts in mk_nflat_core, but still return BR_DONE, while
the patch in master returns BR_FAILED instead.

This patch fixes that problem, and it makes slightly more sense to me to
return a BR_DONE since, if `s` is true, some disjunct (e.g. a `false`
or a repeat) might have been simplified away. However I don't fully
understand this code.

... and I can't say I understand why the segfault happens. Perhaps that
is a separate issue?

This is the file to reproduce:
 https://gist.github.com/mtzguido/b7360c74d3d2e42d89f1bd9149ad26f6

Here's a stack trace of the failure, mk_nflat_or_core is not involved.
```
 (gdb) where
 #0  0x0000555555b98497 in smt::context::get_lit_assignment(unsigned int) const ()
 #1  0x0000555555b984cb in smt::context::get_assignment(sat::literal) const ()
 #2  0x0000555555b98504 in smt::context::get_assignment(unsigned int) const ()
 #3  0x0000555555ca83b8 in smt::context::get_assignment_core(expr*) const ()
 #4  0x0000555555c9af5a in smt::context::get_assignment(expr*) const ()
 #5  0x0000555555d7bd1d in (anonymous namespace)::has_child_assigned_to(smt::context&, app*, lbool, expr*&, unsigned int) ()
 #6  0x0000555555d7c413 in (anonymous namespace)::rel_case_split_queue::next_case_split_core(ptr_vector<expr>&, unsigned int&, unsigned int&, lbool&) ()
 #7  0x0000555555d7c589 in (anonymous namespace)::rel_case_split_queue::next_case_split(unsigned int&, lbool&) ()
 #8  0x0000555555c9c1b7 in smt::context::decide() ()
 #9  0x0000555555ca39fd in smt::context::bounded_search() ()
 #10 0x0000555555ca30c2 in smt::context::search() ()
 #11 0x0000555555ca273d in smt::context::check(unsigned int, expr* const*, bool) ()
 #12 0x0000555555cb166a in smt::kernel::check(unsigned int, expr* const*) ()
 #13 0x0000555555cb9695 in (anonymous namespace)::smt_solver::check_sat_core2(unsigned int, expr* const*) ()
 #14 0x00005555560dc0c6 in solver_na2as::check_sat_core(unsigned int, expr* const*) ()
 #15 0x00005555560d73f3 in combined_solver::check_sat_core(unsigned int, expr* const*) ()
 #16 0x00005555560d34e3 in solver::check_sat(unsigned int, expr* const*) ()
 #17 0x0000555556097b26 in cmd_context::check_sat(unsigned int, expr* const*) ()
 #18 0x0000555556082ff0 in smt2::parser::parse_check_sat() ()
 #19 0x0000555556084dc0 in smt2::parser::parse_cmd() ()
 #20 0x00005555560861b6 in smt2::parser::operator()() ()
 #21 0x00005555560757e6 in parse_smt2_commands(cmd_context&, std::basic_istream<char, std::char_traits<char> >&, bool, params_ref const&, char const*) ()
 #22 0x00005555555e8f68 in read_smtlib2_commands(char const*) ()
 #23 0x00005555555ee6f6 in main ()
 (gdb)
```
2023-06-23 11:45:29 -07:00
Guido Martínez 3517361a73
Adding some options in support of F* (#6774)
* patterns: add option for pattern decomposition (pi.decompose_patterns)

True by default, retaining current behavior.

* rewriter: add option for sorting of disjunctions (rewriter.sort_disjunctions)

True by default, retaining current behavior.
2023-06-20 16:10:37 -07:00
Nikolaj Bjorner 7cd8edce1f perf and memory smash fixes to internal node count routine 2023-04-12 21:01:05 -07:00
Nikolaj Bjorner e8222433c3 count internal nodes, use to block expanding use of hoist, #6683 2023-04-12 19:40:31 -07:00
Nikolaj Bjorner c2fe76569f remove dependency on bool-rewriter in hoist rewriter
deal with regression reported in
cac5052685 (commitcomment-100606067)
and unit tests doc.cpp
2023-02-14 17:48:02 -08:00
Nikolaj Bjorner fcea32344e add missing tactic descriptions, add rewrite for tamagochi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-08 13:32:26 -08:00
Nikolaj Bjorner 9a2693bb72 tune euf-completion 2022-11-23 16:39:20 +07:00
Nikolaj Bjorner 98fc8c99db add shortcut to equality mk utility 2022-11-16 03:47:01 -08:00
Nikolaj Bjorner 255414f4a9 fix regression crash
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-15 11:20:12 -08:00
Nikolaj Bjorner 9845c33236 add shortcuts in rewriter, eliminate redundancies in dependent_expr tactic 2022-11-15 09:13:13 -08:00
Nikolaj Bjorner f769e2f1f6 have bool rewriter use flat_and_or, and integrate hoist rewriter 2022-11-08 12:21:50 -08:00
Nikolaj Bjorner 6c12aaad74 wip - testing solve-eqs2, added as tactic 2022-11-05 22:42:59 -07:00
Nikolaj Bjorner 1646a41b2f minor fixes
- ensure mk_extract performs simplification to distribute over extract and removing extract if the range is the entire bit-vector
- ensure bool_rewriter simplifeis disjunctions when applicable.
2022-11-02 08:44:55 -07:00
Nikolaj Bjorner 1fae3aa152 rename set-flat to set-flat-and-or to allow to differentiate parameters 2022-10-27 11:22:57 -07:00
Nikolaj Bjorner bd4db4c41f add option to rewrite and for arithmetic simplification 2022-09-18 17:22:59 -07:00
Nikolaj Bjorner 199daead50 remove Z3_bool_opt #5757
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-07 11:52:10 -08:00
Nikolaj Bjorner 708602dfbb fix #5560 - add a throttle on maximal size of bignums created for propagate-value lemmas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-21 08:56:13 -07:00
Nikolaj Bjorner 2e96557827 fix #5560 - add a throttle on maximal size of bignums created for propagate-value lemmas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-21 08:55:28 -07:00
Nikolaj Bjorner 2daf569da6 update Bool rewriter to pull negations up 2021-08-25 17:50:49 -07:00
Nikolaj Bjorner a61e9d6b49 #5260 2021-05-10 10:33:43 -07:00
Nikolaj Bjorner 4a6083836a call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
Nikolaj Bjorner 11c90cc142 move parameters from ast/rewriter to params
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 11:11:16 -07:00
Nikolaj Bjorner 02084dc95b misc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 01:21:24 -07:00
Nikolaj Bjorner e0d4669116 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 23:47:45 -07:00
Nikolaj Bjorner a08082e392 fix #4594
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-27 09:22:53 -07:00
Nikolaj Bjorner f0d33ddddb some simplifications based on #4178 2020-05-02 06:44:34 -07:00
Nikolaj Bjorner 835b57b775 fix #3961 fix #3940
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-14 17:33:44 -07:00
Nikolaj Bjorner 719c5dd911 fix #3342
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-17 12:14:28 -07:00
Nikolaj Bjorner d002423133 fix ? #3342
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-16 20:09:28 -07:00
Nikolaj Bjorner 356a9bb9ed fix #3255
The model is fine, but debug facility that checks the model reports a false positive.
It exposed some further opportunities for simplification
2020-03-12 10:57:35 -07:00
Nikolaj Bjorner 1d77e3e19f fix #2830
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-12-26 14:41:09 -08:00
Nikolaj Bjorner efbcdcbffd simplify diff rewriting 2019-12-20 23:20:19 -08:00
Nikolaj Bjorner 4389ed0f58 fix #2812
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-12-20 17:12:44 -08:00
Nikolaj Bjorner 335543b374 adding comparison #2360
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-28 21:14:58 -07:00
Nikolaj Bjorner e8080d2307 revert normalizing ordering on equality as it breaks others and doesn't necessarily lead to simplification
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-22 23:55:11 +02:00
Nikolaj Bjorner 2a1f8ac2d8 revert normalizing ordering on equality as it breaks others and doesn't necessarily lead to simplification
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-22 23:48:00 +02:00
Nikolaj Bjorner 5177cc4a9a change lt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-21 09:08:20 +02:00
Nikolaj Bjorner 0f7ff2a3d0 swap
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-17 10:40:09 -07:00
Nikolaj Bjorner 1e770af1cc local sort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-17 07:56:38 -07:00