3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-16 13:58:45 +00:00
Commit graph

12353 commits

Author SHA1 Message Date
Nikolaj Bjorner 25106866b5 fix dotnet build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 14:46:31 -07:00
Nikolaj Bjorner 9f0b303263 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 12:08:15 -07:00
Nikolaj Bjorner 727ea43b16 remove lazy push from theory_lra
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 12:07:14 -07:00
Nikolaj Bjorner 9b5dc0ca26 fix misc issues around #4661 introduced when adding lazy push/pop to selected theories
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 10:57:05 -07:00
Nikolaj Bjorner b992f59aad expose name inclusion as optional
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 10:32:17 -07:00
Nikolaj Bjorner dbe2c9b305 encoding options #4665
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 10:24:42 -07:00
Nikolaj Bjorner e8826bb20f fix #4651
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 09:49:12 -07:00
Nikolaj Bjorner 4682b48d3a na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 19:24:43 -07:00
Nikolaj Bjorner 86310a1a27 updated sat_smt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 19:21:51 -07:00
Nikolaj Bjorner e9a4e486ae dbg
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 19:21:50 -07:00
Nikolaj Bjorner a35d00e4c4 remove pragma
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 12:56:21 -07:00
Nikolaj Bjorner 996905a2c1 fix warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 12:54:55 -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 49838057a4 virtual method
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 10:51:06 -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 455d53ef27 missing cmakelists
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 10:46:17 -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 79fc3f2375 warnings /errors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 09:53:24 -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 4e6476c90a fix cmake build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-29 09:22:04 -07:00
Nikolaj Bjorner 60f8884dbd sr
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-28 15:10:52 -07:00
Nikolaj Bjorner b8fb744935 reset caches
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-28 15:09:12 -07:00
Nikolaj Bjorner 739b5376e3 dbg build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-28 13:45:06 -07:00
Nikolaj Bjorner 93ee2a68a4 persist fields
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-28 13:41:50 -07:00
Nikolaj Bjorner ba21ffa31b missing file
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-28 12:59:57 -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 6706b0dfcd na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-27 15:07:45 -07:00
Nikolaj Bjorner 872fd5e9ff fix #4662
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-27 15:05:35 -07:00
Nikolaj Bjorner c6135a40d5 virtual
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-26 17:59:40 -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 21e13bc5f9 re-add pb extraction
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-26 13:53:28 -07: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 9c77fbc2a9 use virtual destructors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-26 11:26:10 -07:00
Nikolaj Bjorner 1a36d44450 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-26 10:41:20 -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 ab10616b77 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-25 13:19:55 -07:00
Nikolaj Bjorner ecd3315a74 add sat-euf
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-25 12:16:57 -07:00
Nuno Lopes a7b51d04cd remove unused file 2020-08-25 15:10:41 +01: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 c722962124 fix regressions in python API for user-propagator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 10:55:43 -07:00
Nikolaj Bjorner e46ad45968 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 02:20:30 -07:00
Nikolaj Bjorner 6beec7b642 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 02:04:44 -07:00
Nikolaj Bjorner dc1783aafa na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 02:02:49 -07:00
Nikolaj Bjorner 65e6d942ac euf
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-24 01:55:13 -07:00
Nikolaj Bjorner 96587bf708 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-23 13:13:27 -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 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
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 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
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
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
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
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
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
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 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
Nikolaj Bjorner 78afa2527c unused variable warning
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-26 13:22:12 -07:00
Nikolaj Bjorner 105f97d3ee #4582 again 2020-07-25 15:12:25 -07:00
Nikolaj Bjorner 2133ba06a7 prepare for theory variables othe rthan seq/re 2020-07-25 15:11:13 -07:00
Nikolaj Bjorner f789573d12 prepare for alternative axiom 2020-07-25 15:10:39 -07:00
Nikolaj Bjorner 2d4839f89e #4582 again 2020-07-25 15:09:30 -07:00
Nikolaj Bjorner 1059f6d3b8 #4582 again 2020-07-25 11:54:05 -07:00
Nikolaj Bjorner 963daab268 #4582 again 2020-07-25 11:18:20 -07:00
Nikolaj Bjorner e63992c8bd fix #4589
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-24 15:46:54 -07:00
Nikolaj Bjorner 780346c7ca address model generation bugs raised in #4518 and #4324
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-24 13:22:19 -07:00
Nikolaj Bjorner e1d2b88a82 access polynomial expressions from algebraic numerals
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-23 15:08:11 -07:00
Nikolaj Bjorner a6a041ec5d setting defaults in AUFLIRA and AUFLIA to conservative ite-lifting. Fixing conservative setting to be after constructor in asserted_formulas. fixes #4586
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-23 13:43:54 -07:00
Nikolaj Bjorner 71a32f5bb2 remove unused
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-22 11:38:27 -07:00
Nikolaj Bjorner 45855fce06 fix
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-22 10:45:29 -07:00
Nikolaj Bjorner dd5e2e8930 check for 0
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-22 10:44:00 -07:00
Iain Scott b6867d69c2
Return significand bits correctly (dotnet API). Fixes #4584 2020-07-22 16:57:33 +01:00
Nikolaj Bjorner ed58175e1b issue #4582
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-21 18:23:41 -07:00
Nikolaj Bjorner aab50ff3f5 fixing bugs reported in #4518
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-21 15:50:19 -07:00
Nikolaj Bjorner b1824fea10 fix lifetimes for crashes in #4525
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-21 12:53:56 -07:00
Nikolaj Bjorner 1d8d85add9 fix #4575 - correction set resolution only works with uniform weights
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-20 15:05:06 -07:00
Nikolaj Bjorner ebce0b3612 fix #4577
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-20 14:40:45 -07:00
Nikolaj Bjorner 61b85d7123 verbosity
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-20 14:11:59 -07:00
Nikolaj Bjorner 00491148f0 string
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-20 10:22:57 -07:00
Nikolaj Bjorner 549ef0e052 fix typos #4573
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-20 10:22:57 -07:00
Christoph M. Wintersteiger a298091322
Fix for fp.roundToIntegral of tiny, denormal floats. Fixes #4190. 2020-07-17 15:58:01 +00:00
Christoph M. Wintersteiger 2ef57d7f8d
Fix FP rounding of huge exponents. Fixes #3776. 2020-07-17 13:42:12 +00:00
Christoph M. Wintersteiger d3ae40130a
Fix rounding bug in mpf_manager. Fixes #2970. 2020-07-16 12:39:12 +00:00
Christoph M. Wintersteiger ccdae7af24
Fix for corner-case in fp.roundToIntegral. Fixes #2894. 2020-07-16 11:58:18 +00:00
Christoph M. Wintersteiger c321fb7726
Correctly report unsupported features in bvarray2uf_rewriter. Fixes #4046 and #4047. 2020-07-15 16:16:29 +00:00
Nuno Lopes b7caabbd0f fix crashes with MSVC 2019 2020-07-14 13:14:44 +01:00
Nuno Lopes aeac0b46a0 remove copy 2020-07-14 12:26:49 +01:00
Nuno Lopes d1a0e83423 fix crash 2020-07-13 14:25:12 +01:00
Nuno Lopes 122f5a1464 remove unused field 2020-07-12 23:12:00 +01:00
Nuno Lopes 90fc8d854f add rval methods to scoped_vector 2020-07-12 22:16:24 +01:00