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

354 commits

Author SHA1 Message Date
Nikolaj Bjorner 0b8d7b755d useful string rewrites
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-26 03:48:50 -07:00
Nikolaj Bjorner 7b490543ca add missing simplification; handle nit #6952
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 10:00:15 -07:00
Nikolaj Bjorner 643512613a simplify last_index function 2023-09-18 12:52:59 -07:00
Nikolaj Bjorner a68f91f0a6 fix #6729
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-05-22 14:07:12 +01:00
Nikolaj Bjorner 53ca65a62e fix unsound rewrite 2023-03-20 18:55:40 +01:00
Nikolaj Bjorner d1c7ff1a36 add unconstrained elimination for sequences 2023-03-20 17:07:04 +01:00
Nikolaj Bjorner 6df711254b fix type error when mapping over the empty sequence 2022-09-10 16:03:52 -07:00
Nikolaj Bjorner de892ed9f2 fix #6054
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-26 15:51:57 -04:00
Nikolaj Bjorner 4d8e4b5bd3 fix #6052
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-25 17:21:01 -04:00
Nikolaj Bjorner c850259f89 rw 2022-05-22 07:54:27 -04:00
Nikolaj Bjorner 87d2a3b4e5 map/mapi/foldl/foldli
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-04 01:10:18 -07:00
Nikolaj Bjorner f1806d32d6 remove buggy code, close, fix #5825
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-20 13:25:44 -07:00
Nikolaj Bjorner 081c62d006 allow range comparison for bit-vectors and int/real 2022-03-10 17:08:49 -08:00
Nikolaj Bjorner 11030fc81d disable unsound mk_seq_butlast
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-21 18:56:49 -08:00
Nikolaj Bjorner 773e829c58 #5804 2022-01-31 10:16:09 -08:00
Nikolaj Bjorner 007af9cb8a fix #5784
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-21 03:08:03 +01:00
Margus Veanes 5afb95b34a
improved subset checking for regexes with counters (#5731) 2021-12-22 17:53:34 -08:00
Margus Veanes 1d9aad6ea9
improved regex merging avoiding unsat nontermination (#5728) 2021-12-20 17:44:06 -08:00
Margus Veanes be38b256c8
fixed bug in is_char_const_range (#5724) 2021-12-19 17:46:42 -08:00
Margus Veanes 25d54ebb40
fixing regression of issue 1224 (#5723) 2021-12-19 14:07:53 -08:00
Margus Veanes a7b1db611c
State graph dgml update and fixes in condition simplifier (#5721)
* improved generated dgml graph

* fixed simplification of negated ranges and did some code cleanup

* do not make loops with lower=upper=0, this is epsilon

* do not add loops with lower=upper=1

* bug fix in normalization: forgotten eps case
2021-12-19 11:09:55 -08:00
Nikolaj Bjorner e1ffaa7faf na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-17 11:34:57 -08:00
Nikolaj Bjorner 6963451704 na 2021-12-16 20:13:29 -08:00
Nikolaj Bjorner 5974200444 fixes to previous push and streamlining 2021-12-16 20:06:49 -08:00
Nikolaj Bjorner 4e82a9af5f pin expressions 2021-12-16 19:41:32 -08:00
Margus Veanes a288f9048a
Update regex union and intersection to maintain ANF (#5717)
* added merge for unions and intersections

* added normalization rules to ensure ANF

* fixing PR comments related to merge
2021-12-16 19:19:36 -08:00
Margus Veanes 2be93870c8
Cleanup regex info and some fixes in Derivative code (#5709)
* removed unused regex info fields

* cleanup of info and fixes in antimirov derivatives

* removed extra qualification on operator
2021-12-15 10:59:34 -08:00
Nikolaj Bjorner 51fa40ece5 fix spelling 2021-12-09 10:23:37 -08:00
Henrich Lauko 96671cfc73
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings

* cmake: make missing non-virtual dtors error

* treewide: add missing virtual destructors

* cmake: add a few more checks

* api: add missing virtual destructor to user_propagator_base

* examples: compile cpp example with compiler warnings

* model: fix unused variable warnings

* rewriter: fix logical-op-parentheses warnings

* sat: fix unused variable warnings

* smt: fix unused variable warnings
2021-10-29 15:42:32 +02:00
Margus Veanes f78546cd7c
fixed bug of computing butlast of a sequence (#5602) 2021-10-15 18:02:51 -07:00
Margus Veanes cb120c93f4
Regex range bug fix (#5601)
* added a missing derivative case for nonground range

* further missing cases and a bug fix in re.to_str
2021-10-15 15:30:55 -07:00
Nikolaj Bjorner 9a76bf0aa2 #5591
nth issue
2021-10-12 13:59:28 -07:00
Margus Veanes 146f4621c5
Updated regex derivative engine (#5567)
* updated derivative engine

* some edit

* further improvements in derivative code

* more deriv code edits and re::to_str update

* optimized mk_deriv_accept

* fixed PR comments

* small syntax fix

* updated some simplifications

* bugfix:forgot to_re before reverse

* fixed PR comments

* more PR comment fixes

* more PR comment fixes

* forgot to delete

* deleting unused definition

* fixes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fixes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-08 13:04:49 -07:00
Margus Veanes 22bb4c2db7
more fixes related to issue #5140 (#5466)
* instead of u in to_re(s) make u = s

* bug fix: added missing emptiness check
2021-08-09 17:48:35 -07:00
Nikolaj Bjorner 3eb849ad9e rewrite equality too
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-09 15:32:04 -07:00
Nikolaj Bjorner aa7e9b09f3 fix equality rewrite with itos
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-09 14:22:48 -07:00
Margus Veanes 225204e2f4
updates related to issue #5140 (#5463)
* updates related to issue #5140

* updated/simplified some cases

* fixing feedback comments

* fixed comments and added missing case for get_re_head_tail_reversed

* two bug fixes and some other code improvements
2021-08-09 10:48:56 -07:00
Nikolaj Bjorner 1173c93150 #5140 2021-08-02 17:13:47 -07:00
Nikolaj Bjorner 5652d2a157 #5429 #5431 2021-07-25 11:59:42 -07:00
Nikolaj Bjorner b638405e42 simplify #5431
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-25 09:57:38 -07:00
Margus Veanes 4fd1e6d32c
added derivative support for (str.to_re (str.from_int ...)) (#5431) 2021-07-25 09:51:48 -07:00
Margus Veanes a19910c13d
added regex simplification rules ~() = .+ and .+* = .* (#5416) 2021-07-18 12:09:19 +02:00
CEisenhofer 0fa4b63d26
Added sbv2s (#5413)
* Added sbv2s

* Fixed indention

Co-authored-by: Clemens Eisenhofer <Clemens.Eisenhofer@tuwien.ac.at>
2021-07-16 17:58:28 +02:00
Nikolaj Bjorner 9e5dcf3ecb bound length of ubv2s
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-16 16:17:59 +02:00
Margus Veanes 8e9bc86c23
fixed bug #5343 and did some related optimizations (#5411) 2021-07-15 22:28:59 +02:00
Nikolaj Bjorner f74adb1ebd ubv2s step3 2021-07-12 17:15:08 +02:00
Nikolaj Bjorner 1bc10cebc5 add ubv2s step 1 2021-07-12 12:53:00 +02:00
Nikolaj Bjorner 0f8d2d1d51 fix #5399 2021-07-10 14:47:51 +02:00
Nikolaj Bjorner 92ec81d108 #5140
@veanes
mk_bool_app_helper has a bug:
When it simplifies a disjunction or conjunction of regex membership constraints of the form (and (str.in_re "" R) (str.in_re x Q))
then the first term (str.in_re "" R) is omitted in the result.
You have a test here
3da9d91866/src/ast/rewriter/seq_rewriter.cpp (L438)
that means a regex membership with empty first argument is not put in the two buffers with membership/non-membership.
It isn't put into new_args either because the test bypasses these
3da9d91866/src/ast/rewriter/seq_rewriter.cpp (L485)
2021-06-06 20:30:09 -07:00
Nikolaj Bjorner 20a67e47ca remove symbol -> zstring -> symbol round-trips
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-22 13:12:49 -07:00