3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-18 14:49:01 +00:00
Commit graph

12000 commits

Author SHA1 Message Date
Nuno Lopes 8fda4f904d API: dont deref already free'd memory on error 2020-06-30 15:04:40 +01:00
Nuno Lopes 64f1a759a7 inline api_context::reset_error_code() 2020-06-29 19:14:17 +01:00
pinzaghi aec8000bda
in check method, as_ast() call fails when True passed as assumption (#4550) 2020-06-29 09:59:10 -07:00
Nikolaj Bjorner eaffe46468 revert debug changes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-28 10:27:47 -07:00
Nikolaj Bjorner 9a642215eb avoid infinite loop between is-nullable and mk-bool-app
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-28 10:27:47 -07:00
Nikolaj Bjorner 9bc5552ca2 add vcrunime pattern to distribution directive #4542
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-25 08:56:13 -07:00
Nikolaj Bjorner 85cb0293f5 fix #4541
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-24 20:26:59 -07:00
Federico Mora Rocha 8d16a9a034
z3str3: fix Issues 4349, 4354, and 4310 (#4529)
* regex needs lesson; m.mk_eq not ctx.mk_eq

* when unsat core is of size 0, then do naive learning

* remove two extra comments, and correct positive regex learning

* replace magic numbers for fixed-length lessons with constants
2020-06-24 15:46:32 -05:00
Nikolaj Bjorner c0fbb31379 use nonse based seed for transition characters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-24 12:07:37 -07:00
Murphy Berzish b0633ecc86
Z3str3: safety checks for substr and propagate (#4528)
* z3str3: handle str.substr arguments missing arith values in model construction safely

* z3str3: reset propagation vectors on scope pop
2020-06-24 12:14:03 -05:00
Nikolaj Bjorner 7f3bdea0d5 unused methods
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-23 19:28:07 -07:00
Nikolaj Bjorner 5d36578684 some unused variables reported by Caleb
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-22 19:04:10 -07:00
Nikolaj Bjorner 8758baf24e perf and div/mod axioms #4532
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-22 14:51:58 -07:00
Nikolaj Bjorner 38d6771a5e na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-22 12:23:42 -07:00
Lev Nachmanson 6ced6995d0 check for m.get_sort(lhs->get_owner()) == m.get_sort(rhs->get_owner()) in equality propagation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-22 11:48:46 -07:00
Nikolaj Bjorner 4b6ca6a10c replace size by data_size
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-22 11:16:36 -07:00
Nikolaj Bjorner 85661c415d remove ex-act
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-22 09:08:04 -07:00
Nikolaj Bjorner 6a54c0bc04 fix issues reported in #4525
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-21 17:43:05 -07:00
Nikolaj Bjorner 02f34ea4b1 address some crashes reported by Caleb
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-20 18:35:35 -07:00
Lev Nachmanson 6524a70c32 remove un unnecessary call
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 8f588a9263 fix the build
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson b703d2786c fix the build cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 3bde9f54d8 add some comments cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 115ae8fe14 check for integrality when adding an equality
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson c4fbe05a96 simplify cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson e3503f060f debug cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 42ed1e62a9 debug cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 2e2e98925a debug cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson ffaa7d0b27 debug cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 7a2aa28644 make the tree option in cheap_eqs the default
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 525f747e3c cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson c2cead4fb6 cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson b5fc9635c4 cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 3b00b34c6f cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 80467f1400 cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson 431bb36cf5 cheap_eqs tree
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Lev Nachmanson f7f9c15676 cheap_eqs tree
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-20 11:31:22 -07:00
Nikolaj Bjorner 274323b818 fix reset order for #4533
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-19 16:07:45 -07:00
Nikolaj Bjorner 1204671595 fix #4534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-19 14:10:49 -07:00
Arie Gurfinkel 07a1aea689 fix(spacer): bug in assign_bounds to Farkas conversion
The fix is to remove a hack that used a theory rewriter to simplify
the conversion. Now the conversion happens less often than possible.
Will need more thinking to fix properly.

The unsoundness at this point would cause SPACER to generate lemmas
that do not block a proof obligation and then get stuck in an infinite loop
blocking and generating the same lemma.
2020-06-18 21:19:53 -04:00
Nuno Lopes 38d4418f94 simplify string_buffer::append 2020-06-18 19:55:34 +01:00
Nuno Lopes fdeba2102c fix deref of free'd memory in mk_fresh_const 2020-06-18 19:25:32 +01:00
Nikolaj Bjorner 3b1149330d enable theory propagation of regex accept condition
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-17 13:42:40 -07:00
Nikolaj Bjorner be36a8fd80 fix for SPACER models using bit2bool
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-16 10:45:11 -07:00
Nikolaj Bjorner 48d4d8d7af fix tracking of bounds
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-15 17:36:20 -07:00
Lev Nachmanson f882219081 fix a bug in cheap_eqs with table
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-15 13:30:45 -07:00
Lev Nachmanson 09516d74f6 change the default for cheap eqs to table
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-15 13:30:45 -07:00
Lev Nachmanson d13e584706 simplify the fixed var table
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-15 13:30:45 -07:00
Nikolaj Bjorner d09e6eccf0 re-enable proofs for qe-lite #3153
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-15 12:03:15 -07:00
Nikolaj Bjorner 395a304262 add optional feature to bound search within ranges
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-14 21:34:54 -07:00
Nikolaj Bjorner 180fb3abf6 tidy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-14 11:36:09 -07:00
Nikolaj Bjorner 7387fc9dec avoid some bignum overhead in addmul
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-14 11:20:05 -07:00
Nikolaj Bjorner 53e49eb428 neatify
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-13 15:20:21 -07:00
Nikolaj Bjorner 5ee9edf46b fix incorrect bound in order-lemma
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-13 14:28:42 -07:00
Lev Nachmanson 23c12b75af remove a duplicate option gb==grobner
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-13 10:03:19 -07:00
Lev Nachmanson e5632736d2 review comments
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson fbfcc6796a fix the build
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 66701de157 fix the test build
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 06826adec3 fix the race in add_var_bound and add_def_constraint
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson fe0e042e40 move m_fixed_var_table to lar_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 3b87cdfd0f remove the debug output
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 67eaff4490 testing cheap equalities
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 6c115bf896 cheap eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 94263167ec cheap eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 50b9915c57 avoid big nums in is_offset_row in cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 713eb6319d fix
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 1587497562 cheap equalities
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson ccc8651800 cheap eqs on table
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson b3bdce7837 make lp_bound_propagator a field of theory_lra::imp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson dd30b5e3af some simplifications in cheap eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 4de38d09e2 cheap eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 4f0bd93124 debug cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 110ab5e6ef debug cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 9c078c6d59 relaxing asserts in column_to_reported_index
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 6a678fd5be rename in lar_solver and memory corruption bug in cheap_eq
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 4936ace7cd more guards on cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 0ff18dd5a7 a small example passing with cheap eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 54921d08dc cheap_eq debug
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 4a9f031502 cheap_eqs progress
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 62bd19242e replace graph by a tree in cheap_eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 5d3070bc2d implement graph integrality
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Lev Nachmanson 1e4e887221 propagate cheap eqs
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-06-12 22:11:11 -07:00
Nikolaj Bjorner 865dfe0590 own refs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-12 17:07:06 -07:00
Jack Yao 55cd1e996c
add sat option for doing a global simplification before the bounded search and the main CDCL search loop. The option is also used for the sat-preprocess tacitc (#4514)
Co-authored-by: rainoftime <rainoftime@gmail.com>
2020-06-12 16:45:50 -07:00
Nikolaj Bjorner 41430cd128 register unhandled expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-12 16:12:24 -07:00
Nikolaj Bjorner 2613f74baa fix #4494 2020-06-11 00:05:19 -07:00
Nikolaj Bjorner 5a2b6d9c92 bounds on loop expressions 2020-06-11 00:04:41 -07:00
Nikolaj Bjorner b0da5409c1 substitute into non-ground regexes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 14:58:25 -07:00
Nikolaj Bjorner bac4726531 remove redundant method
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 14:40:17 -07:00
Nikolaj Bjorner 571e345d07 add mkStringSort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 14:39:02 -07:00
Nikolaj Bjorner e3d45b9850 refcount leaks
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 14:19:26 -07:00
Nikolaj Bjorner 4fdfc65b37 tune seq rewriting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 13:30:39 -07:00
Nikolaj Bjorner 08cc5bc2e5 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-09 11:39:26 -07:00
calebstanford-msr 1fd567d1e9
fix bug in seq rewriter op_cache::find (#4509)
* remove unneeded reverse case in derivative; placeholder for generalized lifted derivative

* experimental tweaks to RE rewriter to improve performance

* if-then-else lifting
(broken code -- preserving this commit in case this idea is useful later)

* if-then-else derivative optimizations: new approach templates

* implement if-then-else BDD normal form for derivatives
(code compiles but is still buggy)

* remove std::cout debugging for PR

* Revert "remove std::cout debugging for PR"

This reverts commit c7bdc44d31.

* debugging

* fix derivative interaction with reverse; add flags for left/right derivative and lifting over union/intersection

* remove debugging statements for PR

* Revert "remove debugging statements for PR"

This reverts commit 38e85a7288.

* revert some purely cosmetic changes from upstream; fix a bug

* revert unnecessary changes

* remove some redundant rewrites and add a new one for str.in_re(s, comp(r))

* add disabled rewrite for complement

* fix bug in op cache find (result was not saved)

* remove debugging std::cout for PR
2020-06-09 11:36:31 -07:00
Nuno Lopes ec1e733ef2 fix crash in qe_array ref counting due to wrong assignment operator of ptr_vector being called
thanks to Arie Gurfinkel for reporting this
2020-06-09 10:02:27 +01:00
Nikolaj Bjorner 5f9973d8c4 fix #4508
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-07 16:28:53 -07:00
Nikolaj Bjorner d2a12f6db5 tuning
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-07 12:52:13 -07:00
FabianWolff cfed69caae
Remove __DATE__ to make the build more reproducible (#4505) 2020-06-07 12:28:39 -07:00
Nuno Lopes 1809ee5107 fix regression in FPA internalization 2020-06-07 15:50:53 +01:00
Nikolaj Bjorner ba1ca33637 normalization of union/intersection
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-06 12:54:44 -07:00