3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-30 15:00:08 +00:00
Commit graph

929 commits

Author SHA1 Message Date
Nuno Lopes
23e6adcad3 fix a couple hundred deref-after-free bugs due to .c_str() on a temporary string 2020-07-11 20:24:45 +01:00
Nikolaj Bjorner
d0e20e44ff booyah
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-04 15:56:30 -07:00
Nikolaj Bjorner
d91ca423ab enforce reference count ownership in context of mk_derivative calls.
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-01 13:13:17 -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
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
41430cd128 register unhandled expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-12 16:12:24 -07:00
Nikolaj Bjorner
5a2b6d9c92 bounds on loop expressions 2020-06-11 00:04:41 -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
Nikolaj Bjorner
d2a12f6db5 tuning
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-07 12:52:13 -07:00
Nikolaj Bjorner
ba1ca33637 normalization of union/intersection
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-06 12:54:44 -07:00
Nikolaj Bjorner
1b9fcc7098 integrate ite-normalized derivatives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-05 17:28:48 -07:00
Nikolaj Bjorner
4dbf7b183d inline conditions with derivative computation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-05 13:51:31 -07:00
Nikolaj Bjorner
b013df9a9f fix #4431
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-04 00:47:27 -07:00
Nikolaj Bjorner
bfb5c95b9a use op-cache for is-nullable
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-02 13:30:18 -07:00
Nikolaj Bjorner
e388055a33 connecting op-cache
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-02 13:13:32 -07:00
Nikolaj Bjorner
4ef480e2a5 add op cache
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-02 12:52:42 -07:00
Nikolaj Bjorner
2da7a8dd70 fix #4491
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-01 20:12:41 -07:00
Nikolaj Bjorner
084cd335eb add (disabled) stubs for decomposing re-membership on regex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-31 12:25:21 -07:00
Nikolaj Bjorner
7f7663a3b4 fix #4478
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-31 11:16:21 -07:00
Nikolaj Bjorner
d41ecda03e skip non-overlap simplification in rewriter
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-29 17:27:54 -07:00
Nikolaj Bjorner
e68c72755a fix leak
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-29 14:49:53 -07:00
Nikolaj Bjorner
f381d51c83 update badge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-29 14:04:12 -07:00
calebstanford-msr
c939195c10
add regex support for reverse and left/right derivative rewriting (#4477)
* partial work on adding 'reverse' (broken code)

* new op codes for derivative and reverse + associated rewrite rules

* incorporate reverses and derivatives in rewriter + some fixes

* enable rewriting str.in_re constraints with right derivative
2020-05-29 13:00:37 -07:00
Nikolaj Bjorner
3d9d52f742 add detection of string equalities
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-29 10:40:47 -07:00
Nikolaj Bjorner
e0130f5cf4 remove Kleene naming as it is a misnomer in this context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-28 20:41:03 -07:00
Nikolaj Bjorner
0911a06d81 bounds
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-28 20:05:32 -07:00
Nikolaj Bjorner
ea1f50b77e simplify extended contains patterns
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-28 19:11:29 -07:00
Nikolaj Bjorner
6a90072a98 bug in non-member disjunction
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-28 12:03:40 -07:00
Nikolaj Bjorner
90708576fe from #4468
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-27 14:04:30 -07:00
Nikolaj Bjorner
87f8da022e fix non-empty -> empty typo
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-27 12:13:25 -07:00
Nikolaj Bjorner
9dd8ebb474 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-27 10:10:25 -07:00
Nikolaj Bjorner
88e36c6bf3 add general purpose emptiness/non-emptiness check
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-26 20:42:21 -07:00
Nikolaj Bjorner
a97bc65af4 hoist co-factors eagerly without adding axioms
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-25 15:10:45 -07:00
Nikolaj Bjorner
e938ee33bb na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-25 14:11:59 -07:00
Nikolaj Bjorner
4e01d5b5c1 tune axioms for derivatives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-25 14:11:59 -07:00
Nikolaj Bjorner
eb3f20832e initial pass at using derivatives in regex unfolding
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-23 11:53:07 -07:00
Nikolaj Bjorner
9eedd4ecd6 gate mk_bool_app by existence of regex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-22 10:09:16 -07:00
Nikolaj Bjorner
82fb7573d7 more rewrites for emptiness
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-22 09:56:21 -07:00
Margus Veanes
5d6be3f17f
adding regex simplification rewriter (#4440) 2020-05-22 09:55:29 -07:00
Nikolaj Bjorner
18bb90f93d fix #4426
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-21 21:27:26 -07:00
Nikolaj Bjorner
6381cfdc05 remove old functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-19 16:34:21 -07:00
Nikolaj Bjorner
209f6a9e2e regression free behavior
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-19 16:21:19 -07:00
Nikolaj Bjorner
287bccde30 disable new incomplete functionality for master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-19 15:56:57 -07:00
Nikolaj Bjorner
7756e2c6d5
in progress (#4386)
* initial work on replacing str in regex check

* finish rewriter for empty string in regex

* remove unnecessary argument in mk_regexp_contains_emptystr; initial template for eval_regexp_derivative

* progress on string in regexp general check using derivatives

* added recursive nullable and derivative funcitons, partially working

* remove tests from z3test

* fix rewriting infinite loop and some failing simplify checks

* several fixes addressing comments for z3 main branch PR #4386

* redo derivative to return an expr_ref, and null on failure

Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
2020-05-19 15:55:19 -07:00
Nikolaj Bjorner
5fe0eeda63 disable regressions in ST mode
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-19 09:37:06 -07:00
Nikolaj Bjorner
0f8f886389 use single return pattern
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-18 20:27:50 -07:00
Nikolaj Bjorner
bc03ffb800 typing error
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-18 20:19:33 -07:00