3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 01:24:08 +00:00
Commit graph

14477 commits

Author SHA1 Message Date
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
Margus Veanes 0d9dc032d7 Merge branch 'regex-pp-compact' of https://github.com/veanes/z3 into regex-pp-compact 2020-08-13 18:15:28 -07:00
Margus Veanes 1567587b97 fixed bug in seq_unit 2020-08-13 18:14:21 -07:00
Margus Veanes e80b143e71 updated detection of when parenthesis can be omitted to cover empty and epsilon 2020-08-13 18:14:21 -07:00
Margus Veanes ae413365e9 further PR comment fixes 2020-08-13 18:14:21 -07:00
Margus Veanes 5f9a326910 took care of comments for related PR 2020-08-13 18:14:21 -07:00
Margus Veanes 2c33bd6faf pp support for regex expressions is more-or-less standard syntax 2020-08-13 18:13:51 -07:00
Margus Veanes bfae1c4205 fixed bug in seq_unit 2020-08-13 17:45:35 -07:00
Nikolaj Bjorner 9729db16a2 always reduce macro expansions in model evaluation #4588
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 17:39:15 -07:00
Margus Veanes 5b663aad70 updated detection of when parenthesis can be omitted to cover empty and epsilon 2020-08-13 17:12:59 -07:00
Margus Veanes be6f7bb4d7 further PR comment fixes 2020-08-13 16:44:13 -07:00
Nikolaj Bjorner 094e41d21d build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 16:40:41 -07:00
Nikolaj Bjorner 7d391d44a2 #4637
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 13:32:38 -07:00
Margus Veanes 024ccf1b53 took care of comments for related PR 2020-08-13 13:14:00 -07:00
Nikolaj Bjorner a892e4793b typo
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 12:48:18 -07:00
Caleb Stanford 2c02264a94
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>
2020-08-13 12:47:36 -07:00
Margus Veanes 3ab75bdf3b pp support for regex expressions is more-or-less standard syntax 2020-08-13 12:40:35 -07:00
Nikolaj Bjorner 9df6c10ad8 handle small powers in theory_lra #4616
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 11:47:51 -07:00
Nikolaj Bjorner c63ad2e834 enable ranges for bit-vectors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 10:53:37 -07:00
Nikolaj Bjorner 72d140334f fixes for #4634
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 08:45:22 -07:00
Nikolaj Bjorner c41abf2241 fix #4624 #4633 #4632 #4631
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 08:36:16 -07:00
Nikolaj Bjorner 84390575e2 fix #4624
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-12 10:15:09 -07:00
Nikolaj Bjorner 11d5b508be fix #4625
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-12 10:14:39 -07:00
Nikolaj Bjorner 4045563223 fix #4626
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-12 10:13:52 -07:00
Nikolaj Bjorner 5ecc59b6bc fix #4627
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-12 10:13:13 -07:00
Nikolaj Bjorner a5e4e520fb fix #4628 - not really a bug, but style nit. uf1 and uf2 need both to be called
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-12 10:12:22 -07:00
Nikolaj Bjorner be3c3dacb3 add bound refinement propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-12 10:10:31 -07:00
Nikolaj Bjorner 7fc4653e47 fix #4623
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-11 14:08:53 -07:00
Nikolaj Bjorner 9f7e80c440 trace also declarations in assumptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-11 09:39:17 -07:00
Nikolaj Bjorner 1f48eabea5 allow Boolean arguments to bit-wise logical operators #4618
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-09 22:01:42 -07:00
Margus Veanes e5693b8a98
added support for saving state graph in dot format (#4621)
* added support for saving state graph in dot format

* moved write_dgml and write_dot under CASSERT

* updated dgml and dot generation a bit so that a state that is both and alive state is detected as having green background but red border when the invariant is vioalted
2020-08-09 14:53:29 -07:00
Rocco Salvia 3852d4516d
modular Axiom Profiler (#4619)
* Rocco first commit

* Rocco: clean the log

* Rocco: version 0.1 beta of the causality graph

* Rocco: minimal fix to separate lines

* Rocco: fix the enodes

* Rocco: our trace has to reflect same behaviour of the native trace for what concern used_enodes

* Rocco: disable trace when dummy instantiations

* Rocco: fix to enodes

* Update README.md

* Rocco: remove causality details and add the pattern (trigger)

* Rocco: add ; at the end of the bindings

* Rocco: add triggers as separate trace

* Rocco README file

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Rocco: bug in tout flush

* Update README.md

* Update README.md

* Rocco: clean code

* Ready for pull request

* Remove commented line bindings

* Add space between // and first char

* Substitute or with || for compatibility; Add space around >
2020-08-08 12:09:24 -07:00
Margus Veanes 934f87a336
dgml output generation for regex state graphs (#4620)
* dgml output generation for regex state graphs

* fixed issue in header file
2020-08-08 09:40:20 -07:00
Nikolaj Bjorner a51e40a6cd gc perf fix
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-06 14:26:59 -07:00
Murphy Berzish f4ec63f39c
z3str3: add auxiliary str.substr axioms (#4617) 2020-08-06 14:00:50 -05:00
Nikolaj Bjorner 4fa2e23704 overload bit-wise operators to work for Booleans for convenience #4618
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-05 16:22:49 -07:00
Nikolaj Bjorner db009e2805 overload bit-wise operators to work for Booleans for convenience #4618
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-05 16:19:31 -07:00
Nikolaj Bjorner 7ae706844d revert breaking change
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-03 08:49:38 -07:00