3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 18:05:21 +00:00
Commit graph

14464 commits

Author SHA1 Message Date
Nikolaj Bjorner 85b4fc1865 void
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-23 10:47:39 -07:00
Nikolaj Bjorner 43d932301d apply operator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-23 10:45:31 -07:00
Nikolaj Bjorner 84475ff142 fix #4637
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-23 10:05:17 -07:00
Nikolaj Bjorner 666e835e08 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-23 09:39:36 -07:00
Nikolaj Bjorner af389db2b2 build break
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-23 09:28:56 -07:00
Nikolaj Bjorner 03276b12b1 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-22 19:12:02 -07:00
Nikolaj Bjorner 96f10b8c1c user propagator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-22 19:01:04 -07:00
Margus Veanes 5e5ef50dbc
re info extension (#4659)
* made loop info calculation more accurate

* made loop info calculation more accurate

* updated formattig and added const declarations
2020-08-22 15:59:53 -07:00
Nikolaj Bjorner a58b8ceced na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-21 19:48:12 -07:00
Nikolaj Bjorner db65381f33
extended calculation of info for regexes (#4656)
* extended calculation of info for regexes, updated tracing of state_graph with regex info

* took care of PR comments and fixed some info calculation bugs

* fix rlimit for clang-10 (#4658)

* merge

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

* extended calculation of info for regexes, updated tracing of state_graph with regex info

* took care of PR comments and fixed some info calculation bugs

* added missing return statements, reordered def of compl to match declaration order of methods

* fixed loop lower bound bug in loop info and default nullable value in invalid_info

* fixed type bug: bool to lbool

* trying to remove invisible control characters

* renamed compl method (compl is a reserved c++ keyword) to complement

Co-authored-by: Arie Gurfinkel <arie.gurfinkel@uwaterloo.ca>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-21 19:25:46 -07:00
Nikolaj Bjorner 2d5b749745 extend solver callbacks with methods
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-21 19:24:59 -07:00
Margus Veanes 1e29ba76d0 renamed compl method (compl is a reserved c++ keyword) to complement 2020-08-21 17:34:15 -07:00
Margus Veanes 4dd9249a95 trying to remove invisible control characters 2020-08-21 16:23:24 -07:00
Margus Veanes 8285162c3c fixed type bug: bool to lbool 2020-08-21 16:11:38 -07:00
Margus Veanes 7b478c8406 fixed loop lower bound bug in loop info and default nullable value in invalid_info 2020-08-21 15:59:56 -07:00
Margus Veanes 6b11af7ec6 Merge branch 're-info-extension' of https://github.com/veanes/z3 into re-info-extension 2020-08-21 13:25:23 -07:00
Margus Veanes 3fb226dcd6 added missing return statements, reordered def of compl to match declaration order of methods 2020-08-21 13:20:05 -07:00
Margus Veanes 1099c519ab took care of PR comments and fixed some info calculation bugs 2020-08-21 13:00:36 -07:00
Margus Veanes 93bc1bc983 extended calculation of info for regexes, updated tracing of state_graph with regex info 2020-08-21 13:00:36 -07:00
Nikolaj Bjorner 080be7a2af merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-21 12:14:28 -07:00
Arie Gurfinkel 22b5daf85e
fix rlimit for clang-10 (#4658) 2020-08-21 10:34:10 -07:00
Margus Veanes 48792581eb took care of PR comments and fixed some info calculation bugs 2020-08-21 05:38:20 -07:00
Margus Veanes 738d091b58 extended calculation of info for regexes, updated tracing of state_graph with regex info 2020-08-20 20:46:40 -07:00
Nikolaj Bjorner ecb43ccca2 update smt logging format to follow SAT solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-20 20:00:20 -07:00
Nikolaj Bjorner 77088745d0 missing override specifiers per #4654
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-20 11:25:52 -07:00
Nikolaj Bjorner eef05e00af user propagator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-20 10:39:20 -07:00
Nikolaj Bjorner ba4a218fc0 user propagator fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-19 19:32:36 -07:00
Margus Veanes de65c61ebc
renamed re to rex and added custom pretty printing for info (#4650) 2020-08-19 19:20:14 -07:00
Nikolaj Bjorner 79aa3457c1 prop
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-19 10:39:51 -07:00
Nikolaj Bjorner 5aaa7e0022 fix #4648
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-18 22:47:58 -07:00
Nikolaj Bjorner ed258ca019 approximate min-length for complements
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-18 22:04:09 -07:00
Nikolaj Bjorner 4857d60c99 user propagator over the API 2020-08-18 21:53:02 -07:00
Margus Veanes c50e869e5a
computing and memoizing info for regexes (#4647)
* computing and memoizing info for regex expressions

* computing and memoizing info for regex expressions

* took care of comments of the related pull request

* removed +1 from min_length of ite

* added to_str method for re and fixed STRACE bug in get_info_rec
2020-08-18 20:01:59 -07:00
Nikolaj Bjorner 747a8ff72a initial sketch of python bindings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-18 10:41:47 -07:00
Nikolaj Bjorner 0c93c7aa08 adding user propagation to API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-18 10:30:10 -07:00
Nikolaj Bjorner 578ddf3e9d na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-18 07:19:07 -07:00
Nikolaj Bjorner 152c95f72a adding user-propagator ability
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 22:39:55 -07:00
Nikolaj Bjorner c13e3ce693 fix #4640
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 08:38:07 -07:00
Nikolaj Bjorner df8b14d77c fix #4641
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 08:35:59 -07:00
Nikolaj Bjorner 2611484525 fix #4642
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 08:35:15 -07:00
Nikolaj Bjorner 33d96c1a37 fix #4643
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 08:33:59 -07:00
Nikolaj Bjorner e591b321bb set guard/cf and dynamic base in release
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 08:21:44 -07:00
Nikolaj Bjorner f0308436b5 use lazy scopes to avoid push/pop overhead
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 08:07:06 -07:00
Nikolaj Bjorner 558233dd8e build fixes, add lazy push/pop state to avoid overhead on unused theories
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 00:13:46 -07:00
Nikolaj Bjorner ca3ec22b7a handle better cancellation for parallel, switch between cube mode and base level mode in smt.threads, expose parameters to control theory_bv and phase caching
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-16 23:29:24 -07:00
Nikolaj Bjorner fae206b738 add command-line help descriptions on tactics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-14 19:29:35 -07:00
Nikolaj Bjorner c0a07f9229 tidy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-14 04:26:59 -07:00
Nikolaj Bjorner c4a03dcf7c remove temporary comment
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-14 04:13:30 -07:00
Nikolaj Bjorner 363b416473
pp support for regex expressions in more-or-less standard syntax (#4638)
* pp support for regex expressions is more-or-less standard syntax

* Regex solver updates (#4636)

* std::cout debugging statements

* comment out std::cout debugging as this is now a shared fork

* convert std::cout to TRACE statements for seq_rewriter and seq_regex

* add cases to min_length and max_length for regexes

* bug fix

* update min_length and max_length functions for REs

* initial pass on simplifying derivative normal forms by eliminating redundant predicates locally

* add seq_regex_brief trace statements

* working on debugging ref count issue

* fix ref count bug and convert trace statements to seq_regex_brief

* add compact tracing for cache hits/misses

* seq_regex fix cache hit/miss tracing and wrapper around is_nullable

* minor

* label and disable more experimental changes for testing

* minor documentation / tracing

* a few more @EXP annotations

* dead state elimination skeleton code

* progress on dead state elimination

* more progress on dead state elimination

* refactor dead state class to separate self-contained state_graph class

* finish factoring state_graph to only work with unsigned values, and implement separate functionality for expr* logic

* implement get_all_derivatives, add debug tracing

* trace statements for debugging is_nullable loop bug

* fix is_nullable loop bug

* comment out local nullable change and mark experimental

* pretty printing for state_graph

* rewrite state graph to remove the fragile assumption that all edges from a state are added at a time

* start of general cycle detection check + fix some comments

* implement full cycle detection procedure

* normalize derivative conditions to form 'ele <= a'

* order derivative conditions by character code

* fix confusing names m_to and m_from

* assign increasing state IDs from 1 instead of using get_id on AST node

* remove elim_condition call in get_dall_derivatives

* use u_map instead of uint_map to avoid memory leak

* remove unnecessary call to is_ground

* debugging

* small improvements to seq_regex_brief tracing

* fix bug on evil2 example

* save work

* new propagate code

* work in progress on using same seq sort for deriv calls

* avoid re-computing derivatives: use same head var for every derivative call

* use min_length on regexes to prune search

* simple implementation of can_be_in_cycle using rank function idea

* add a disabled experimental change

* minor cleanup comments, etc.

* seq_rewriter cleanup for PR

* typo noticed by Nikolaj

* move state graph to util/state_graph

* re-add accidentally removed line

* clean up seq_regex code removing obsolete functions and comments

* a few more cleanup items

* oops, missed merge change to fix compilation

* disabled change to lift unions to the top level and treat them seperately in seq_regex solver

* added get_overapprox_regex to over-approximate regex membership constraints

* replace calls to is_epsilon with a centrally available method in seq_decl_plugin

* simplifications and modifications in get_overapprox_regex and related

* added approximation support for sequence expressions that use ite

* removed is_app check that was redundant

* tweak differences with upstream

* rewrite derivative leaves

* enable Antimorov-style derivatives via lifting unions in the solver

* TODO placeholders for outputting state graph

* change order in seq_regex propagate_in_re

* implement a more restricted form of Antimorov derivatives via a special op code to indicate lifting unions

* minor

* new Antimorov optimizations based on BDD compatibility checking

* seq regex tracing for # of derivatives

* fix get_cofactors (currently this fix is buggy)

* partially revert get_cofactors buggy change

* re-implement get_cofactors to more efficiently explore nodes in the derivative expression

* dgml generation for state graph

* fix release build

* improved dgml output

* bug fixes in dgml generation

* dot output support for state_graph and moved dgml and dot output under CASSERT

* updated tracing of what regex corresponds to what state id with /tr:state_graph

* clean up & document Antimorov derivative support

* remove op cache tracing

* remove re_rank experimental idea

* small fix

* fix Antimorov derivative (important change for the good performance)

* remove unused and unnecessary code

* implemented simpler efficient get_cofactors alternative mk_deriv_accept

* simplifications in propagate_accept, and trace unusual cases

* document the various seq_regex tracing & debugging command-line options

* fix debug build (broken tracing)

* guard eager Antimorov lifting for possible disabling

* fix bug in propagate_accept Rule 1

* disable eager version of Antimorov lifting for performance reasons

* remove some remaining obsolete comments

Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
Co-authored-by: Margus Veanes <margus@microsoft.com>

* typo

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

* took care of comments for related PR

* #4637

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

* build

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

* further PR comment fixes

* updated detection of when parenthesis can be omitted to cover empty and epsilon

* always reduce macro expansions in model evaluation #4588

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

* fixed bug in seq_unit

* pp support for regex expressions is more-or-less standard syntax

* took care of comments for related PR

* further PR comment fixes

* updated detection of when parenthesis can be omitted to cover empty and epsilon

* fixed bug in seq_unit

Co-authored-by: Caleb Stanford <caleb.pirsquared@gmail.com>
Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-14 04:12:52 -07:00
Margus Veanes 1233cb4621 added missing const declarations that caused build failure on some platforms 2020-08-13 20:04:35 -07:00