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

2162 commits

Author SHA1 Message Date
Nikolaj Bjorner
dbe2c9b305 encoding options #4665
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 10:24:42 -07:00
Nikolaj Bjorner
35e3d8425c move fpa
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 11:16:21 -07:00
Nikolaj Bjorner
11c90cc142 move parameters from ast/rewriter to params
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 11:11:16 -07:00
Nikolaj Bjorner
507b4c7848 path
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 11:05:05 -07:00
Nikolaj Bjorner
98084d7da7 add depend
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 10:49:19 -07:00
Nikolaj Bjorner
7c592d4543 add depend
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 10:48:05 -07:00
Nikolaj Bjorner
f6b242e581 update cmake
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 10:46:58 -07:00
Nikolaj Bjorner
e2bdf54d5e update include
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 10:45:26 -07:00
Nikolaj Bjorner
b9cbb08858 shuffle dependencies
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 09:51:39 -07:00
Nikolaj Bjorner
4244ce4aad adding ack/model
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-28 12:55:47 -07:00
Nikolaj Bjorner
4ab35a9bb5 euf model
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-26 15:55:20 -07:00
Nuno Lopes
e6e635b2e8 remove unneeded pragma 2020-08-26 22:56:14 +01:00
Nikolaj Bjorner
526d76b447 re-add pb extraction
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-26 13:52:43 -07:00
Nikolaj Bjorner
c21a2fcf9f sat solver setup
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-26 09:40:42 -07:00
Margus Veanes
78b88f761c
updated rewrite rules to propagate nullability over nonground regexes (#4663)
* updated rewrite rules to propagate nullability over nonground regexes

* updated rewrite rules to propagate nullability over nonground regexes

* fixed incorrect rewrite status flag
2020-08-26 00:26:17 -07:00
Nikolaj Bjorner
ecd3315a74 add sat-euf
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-25 12:16:57 -07:00
Nikolaj Bjorner
22aee4d08d fix issue in #4655
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 17:45:50 -07:00
Nikolaj Bjorner
6beec7b642 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 02:04:44 -07:00
Nikolaj Bjorner
65e6d942ac euf
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 01:55:13 -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
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
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
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
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
ed258ca019 approximate min-length for complements
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-18 22:04:09 -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
c0a07f9229 tidy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-14 04:26:59 -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
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
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
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
Nikolaj Bjorner
72d140334f fixes for #4634
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-13 08:45:22 -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
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
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
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
02084dc95b misc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-31 01:21:24 -07:00
Nikolaj Bjorner
e0d4669116 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 23:47:45 -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
3a26dccc8a fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-30 12:48:43 -07:00