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

14284 commits

Author SHA1 Message Date
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
Nikolaj Bjorner 7eb05dd952 ensure lengths are registered for disequality fixe #4613
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-02 16:13:11 -07:00
Alexander Lisianoi b82dff531e
Use Z3_ option prefix in cmake with Java bindings build command (#4612)
Just s/BUILD_JAVA_BINDINGS/Z3_BUILD_JAVA_BINDINGS/ to make the build command
actually build Java bindings instead of just throwing a warning.
2020-08-02 09:50:22 -07:00
Margus Veanes 7fa5b31fe1
adding back dropped return statement (#4611) 2020-08-01 18:59:47 -07:00
Nikolaj Bjorner 06f34bd42b tidy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-01 16:54:05 -07:00
Margus Veanes 8137143ada
string to regex approximation used to strengthen membership constraints (#4610)
* string to regex approximation used to strengthen membership constraints

* fixed pull request comments
2020-08-01 16:45:00 -07:00
Lev Nachmanson fb035c0634 fixed a but with insertion of a null vertex
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2020-07-31 16:59:57 -07:00
Nikolaj Bjorner 566a0d540a simplify has-fixed-length
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 11:57:07 -07:00
Nikolaj Bjorner 97ed1cd07d don't rewrite empty/non-empty checking predicates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 11:47:52 -07:00
Nikolaj Bjorner 615e2cf37c don't rewrite empty/non-empty checking predicates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 11:47:52 -07:00
Nikolaj Bjorner b4f994b5c8 fix loop
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 11:47:51 -07:00
Nikolaj Bjorner 4392c03b57 better behavior on disequality and branch selection
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 11:47:47 -07:00
Nikolaj Bjorner 02084dc95b misc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 01:21:24 -07:00
Nikolaj Bjorner 3f862cb2ee
better behavior on disequality and branch selection (#4605)
* better behavior on disequality and branch selection

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

* fix loop

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 01:14:11 -07:00
Nikolaj Bjorner e0d4669116 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 23:47:45 -07:00
Nikolaj Bjorner ac64a370d7 change default
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 15:55:41 -07:00
Nikolaj Bjorner 6cfbda0f08 remove automata references
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 15:26:32 -07:00
Caleb Stanford 976e4c91b0
Integrate new regex solver (#4602)
* 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

* remove experimental functionality for integration

* fix compilation

* remove some tracing and TODOs

* remove old comment

* update copyright dates to 2020

* feedback from Nikolaj

* use [] for map access

* make state_graph methods constant

* avoid recursion in mark_dead_recursive and mark_live_recursive

* a possible bug fix in propagate_nonempty

* write down list of invariants in state_graph

* implement partial invariant check and insert CASSERT statements

* expand on invariant check and tracing

* finish state graph invariant check

* minor tweaks

* regex propagation: convert first two axioms to propagations

* remove obsolete regex solver functionality

Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
2020-07-30 13:54:49 -07:00
Nikolaj Bjorner 293b0b8cc2 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 12:49:18 -07:00
Nikolaj Bjorner 3a26dccc8a fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 12:48:43 -07:00
Nikolaj Bjorner e0a9848e01 fixing build 2020-07-30 12:33:32 -07:00
Nikolaj Bjorner 69b4a819a6 rewrite to_int comparisons 2020-07-30 10:23:23 -07:00
Nikolaj Bjorner f6cbe3a016 propagate on variables 2020-07-30 10:22:04 -07:00
Nikolaj Bjorner 4039352837 add ability to touch variables for bound propagation 2020-07-30 10:20:17 -07:00
Nikolaj Bjorner a74ef394ec some more rewrites 2020-07-30 10:19:32 -07:00
Nikolaj Bjorner 59d8895d15 add accessors for implied values to API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-28 19:46:39 -07:00
Nikolaj Bjorner 4628cb8e79 check for negation, not complement 2020-07-28 11:30:35 -07:00
Nikolaj Bjorner 42b42dd89a use bounded pp for cubes 2020-07-28 10:15:16 -07:00
Nikolaj Bjorner f7b2407a11 for #4588 2020-07-28 10:14:56 -07:00
Nikolaj Bjorner 8857a67e4f fix model return after shutdown, reported in #4532
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-27 23:48:19 -07:00
Nikolaj Bjorner b71a64365d sketch fixed-length heuristic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-27 19:34:32 -07:00
Caleb Stanford 5664b570a3
Seq rewriter integration (#4599)
* 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

* remove cache hit/miss counts tracing

* remove changes not in the rewriter

* remove cache hit/miss count tracing

Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
2020-07-27 19:08:45 -07:00
Murphy Berzish afdfc5e8a6
z3str3: fix incorrect automaton polarity in intersection check, and clean up code (#4595) 2020-07-27 20:11:38 -05:00
Nikolaj Bjorner 6910c0d5eb
Revert "Seq rewriter integration (#4597)" (#4598)
This reverts commit e90f01006c.
2020-07-27 18:10:14 -07:00
Nikolaj Bjorner e90f01006c
Seq rewriter integration (#4597)
* 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

* remove cache hit/miss counts tracing

* remove changes not in the rewriter

* remove cache hit/miss count tracing

Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
Co-authored-by: Caleb Stanford <caleb.pirsquared@gmail.com>
2020-07-27 18:08:51 -07:00
Murphy Berzish 2fb914d2a2
z3str3: construct correct counterexamples for string-integer in model construction (#4562) 2020-07-27 14:15:41 -05:00
Nikolaj Bjorner d591bf62c1 add to readme #4575
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-27 09:35:50 -07:00
Nikolaj Bjorner 9624df942f na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-27 09:24:35 -07:00
Nikolaj Bjorner a08082e392 fix #4594
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-27 09:22:53 -07:00
Nikolaj Bjorner ae502bc2c4 simplify a few of the several axiom trace commands 2020-07-26 18:02:34 -07:00
Nikolaj Bjorner c7704ef9af pass algebraic manager to arith-plugin mk-numeral because rational check may overwrite the argument using the current manager deals with crash as part of #4532
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-26 17:52:28 -07:00
Nikolaj Bjorner ac39ddb43f flush gmc for sat-preprocessor model bug #4532
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-26 14:30:48 -07:00
Nikolaj Bjorner e8ef9a85a4 fix #4327
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-26 13:22:13 -07:00
Nikolaj Bjorner 4be6927460 unused variable warning
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-26 13:22:12 -07:00