Nikolaj Bjorner
4a9b38e531
clean up nla_grobner
2023-12-04 17:08:17 -08:00
Nikolaj Bjorner
84a7a79e90
fix #7037
2023-12-04 17:08:01 -08:00
Lev Nachmanson
fc23a498c4
a simple version of choosing a column for gomory cut
2023-12-04 15:06:50 -10:00
Nikolaj Bjorner
f98b42ae42
install importlib-resources for ubuntu doc
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-04 10:33:29 -08:00
Nikolaj Bjorner
de75692cb0
install importlib-resources for ubuntu doc
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-04 10:32:02 -08:00
Nikolaj Bjorner
f7415bb677
install importlib-resources for ubuntu doc
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-04 10:32:02 -08:00
Nikolaj Bjorner
17913f3ec8
remove braces
2023-12-04 10:32:02 -08:00
Andrey Andreyevich Bienkowski
18f14921ba
Clarify optimizer guarantees ( #7030 )
...
* Clarify optimizer guarantees (python)
* Clarify optimization guarantees (OCaml)
* Clarify optimizer guarantees (java)
* Clarify optimizer guarantees (.net)
2023-12-04 09:32:26 -08:00
Christoph M. Wintersteiger
6910a4e18c
Fix to_fp_signed ( #7034 )
2023-12-03 16:38:06 -08:00
Nikolaj Bjorner
ea3628e50b
remove hoist functionality
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-03 16:28:43 -08:00
Nikolaj Bjorner
bd8bed1759
handle ac-op in legacy special relations procedure by adding warning
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-03 12:55:37 -08:00
Nikolaj Bjorner
1b1ebaa3b0
minor simplification during internalization
2023-12-03 12:43:39 -08:00
Nikolaj Bjorner
36725383d3
minor simplification of terms during internalization.
2023-12-03 12:43:14 -08:00
Nikolaj Bjorner
f06e07ad0a
fix cone of influence computation for terms with nested variables
...
exposed by #7027 , but generally missing. It is less likely to be exposed if input is normalized by distributing multiplication over addition.
2023-12-03 12:42:42 -08:00
Nikolaj Bjorner
25dd29907b
refine no-effect predicate to include value of ret
2023-12-03 12:41:21 -08:00
Nikolaj Bjorner
9cc2ce42f7
#7027
...
fix lossy function declaration inclusion functionality exposed when fixing a bug for incomplete model generation.
2023-12-03 11:14:18 -08:00
Nikolaj Bjorner
a8f3396b24
#7033
2023-12-03 10:34:16 -08:00
Nikolaj Bjorner
965bee5801
fix build
2023-12-02 19:52:59 -08:00
Nikolaj Bjorner
1de25ed09c
pending files
2023-12-02 19:43:51 -08:00
Nikolaj Bjorner
b22daa9816
missing header
2023-12-02 19:39:43 -08:00
Nikolaj Bjorner
362d299a5c
#7027
2023-12-02 19:34:36 -08:00
Nikolaj Bjorner
ba8d8f0af7
Disable hoist entirely, it is bad on QF_LIA and does not help on other observed cases
2023-12-02 15:40:47 -08:00
Nikolaj Bjorner
585d027668
remove assert #7032
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-02 14:12:41 -08:00
Nikolaj Bjorner
331507c4cd
#7027
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-02 12:05:06 -08:00
Nikolaj Bjorner
7eab26e3ef
try with missed bounds
2023-12-02 10:48:40 -08:00
Nikolaj Bjorner
5c1e7f7112
fix #7029
2023-12-02 10:48:40 -08:00
Nikolaj Bjorner
a15a7cee7b
touch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-01 14:13:05 -08:00
Nikolaj Bjorner
faf14012ba
Regressions reported by Guido
2023-12-01 13:32:13 -08:00
Nikolaj Bjorner
99e2794a6d
update output
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-30 17:20:43 -08:00
Nikolaj Bjorner
8a0dec1a4b
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-30 14:08:29 -08:00
Nikolaj Bjorner
b52fd8d954
add EUF plugin framework.
...
plugin setting allows adding equality saturation within the E-graph propagation without involving externalizing theory solver dispatch. It makes equality saturation independent of SAT integration.
Add a special relation operator to support ad-hoc AC symbols.
2023-11-30 13:58:30 -08:00
Lev Nachmanson
5784c2da79
remove an unnecessary if
2023-11-30 08:59:05 -10:00
Alper Altuntas
d540d881ef
Add __enter__ and __exit__ methods to Solver class ( #7025 )
...
To enable the usage of the with statement for the Solver class
instances, this commit adds __enter__ and __exit__ methods.
The with statement should offer a more concise and safer
alternative to explicit usage of push() and pop() methods.
2023-11-30 08:35:08 -08:00
Nikolaj Bjorner
26440ed3d8
deal with ubuntu/clang warnings
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-29 15:45:19 -08:00
Nikolaj Bjorner
e9abdbb7a4
fix #7011
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-29 15:08:08 -08:00
Nikolaj Bjorner
9efe6f6afa
fix regression in fix for #7006
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-29 14:54:54 -08:00
Nikolaj Bjorner
faa2d8ac6c
re-enable delayed literal propagation
2023-11-29 14:00:37 -08:00
Nikolaj Bjorner
2f01b5b567
re-enable delayed literal propagation
2023-11-29 14:00:17 -08:00
Nikolaj Bjorner
4289cfac8d
revert some fixes to euf
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-29 13:47:59 -08:00
Nikolaj Bjorner
41a3196c89
fix #7024
2023-11-29 13:35:30 -08:00
Nikolaj Bjorner
d469c1054e
remove separate to_add_literal queue
2023-11-29 12:45:43 -08:00
Nikolaj Bjorner
e972eb33b2
#6523 - contains_ptr bug regarding etable reinserts
2023-11-29 10:44:36 -08:00
Nikolaj Bjorner
79bbbf76d0
fix #7006
2023-11-28 15:06:27 -08:00
Nikolaj Bjorner
8179f8b5d7
fix #7017
2023-11-28 14:32:56 -08:00
Nikolaj Bjorner
f36f21fa8c
add comments for API versions of bit-vector overflow/underflow checks for #7011
2023-11-28 13:36:41 -08:00
Nikolaj Bjorner
f90b10a0c8
fix #7012
...
omitting constructor, simplifying operator definitions, omitting incorrect type annotations
2023-11-28 13:26:10 -08:00
Nikolaj Bjorner
69f9640fdf
fix #7018
2023-11-28 13:14:44 -08:00
Bruce Mitchener
9d1ceab1f2
cmake: Use FindPython3
. ( #7019 )
...
`FindPythonInterp` has been deprecated for a long time and is more
verbal about that deprecation now.
The build system no longer uses `PYTHON_EXECUTABLE` but instead uses
`Python3_EXECUTABLE`.
2023-11-27 11:20:21 +01:00
Bruce Mitchener
b5e8f59eae
mbp: term: Fix reorder ctor warning. ( #7016 )
...
Initialize members in same order they are defined.
2023-11-26 16:34:08 +01:00
Bruce Mitchener
2354998cd2
z3.h: Don't include stdio.h
( #7014 )
...
This doesn't seem to actually be used or needed here.
2023-11-24 16:46:32 +01:00
Christoph M. Wintersteiger
16753e43f1
Add accessors for RCF numeral internals ( #7013 )
2023-11-23 17:54:23 +01:00
Nikolaj Bjorner
9382b96a32
add API to access symbols associated with quantifiers
2023-11-19 16:30:09 -08:00
Nikolaj Bjorner
d272acc3ac
fix crash when api_solver sets reset_tracked_assertions
2023-11-19 12:48:33 -08:00
Nikolaj Bjorner
ac105b7d8c
remove unused code
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-19 11:47:00 -08:00
Nikolaj Bjorner
4350bd77ac
check cancel flag to avoid unsound conflicts
2023-11-19 11:43:52 -08:00
Nikolaj Bjorner
32f8705ac3
#7001 - align is_numeral without to behavior if is_numeral with return numeral.
2023-11-19 10:43:14 -08:00
Nikolaj Bjorner
35bc522dae
#7003
...
minor tweaks to gomory and reset n3 within loop (but the entire function is dead code).
2023-11-19 09:59:44 -08:00
Nikolaj Bjorner
924c296704
add logging
2023-11-18 12:30:40 -08:00
Nikolaj Bjorner
5bec982cc5
chores in theory_lra
2023-11-18 10:05:26 -08:00
Nikolaj Bjorner
e40b8a2d13
household chores in legacy arithmetic solver
2023-11-18 09:56:06 -08:00
Nikolaj Bjorner
5ab1afe5c2
expose enode pp convenciences
2023-11-18 09:53:20 -08:00
Nikolaj Bjorner
1710fe4927
use iterator shortcut
2023-11-18 09:52:58 -08:00
Nikolaj Bjorner
a9f9d3ddf4
build fixes
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-17 10:15:01 -08:00
Nikolaj Bjorner
b9455c3692
#6999 deal with implicit assumptions, more robust pattern matching
...
The code is making some assumptions that arrays are 1-dimensional. This is not generally true.
Introducing pattern matching to ensure the assumption is met.
Avoid get_arg(..) especially when there is an approach based on pattern matching recognizers.
2023-11-17 10:06:20 -08:00
Nikolaj Bjorner
6d6d6b8ed0
build issue
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-17 09:20:17 -08:00
Hari Govind V K
f94a475da3
Qel fixes ( #6999 )
...
* dont use qel for sequences. fix #6950
* handle negation of read-write. fix #6991
* handle neg-peq terms produced by distinct. fix #6889
* dbg print
2023-11-17 09:18:04 -08:00
Nikolaj Bjorner
1b6c7d6541
fix #6996
2023-11-16 18:58:24 -08:00
Christoph M. Wintersteiger
36382ccb57
Fix memory and concurrency issues in OCaml API ( #6992 )
...
* Fix memory and concurrency issues in OCaml API
* Undo locking changes
2023-11-16 18:28:12 -08:00
Nikolaj Bjorner
5b9fdcf462
fix #6997
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-15 18:08:48 -08:00
Nikolaj Bjorner
f1a39b8884
add comment regarding usage model for flush_objects() to relate with pr #6992
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-15 11:54:59 -08:00
Christoph M. Wintersteiger
3baaba5edd
Revert unsound NaN constraints in theory_fpa ( #6993 )
2023-11-14 14:28:30 -08:00
Nikolaj Bjorner
37b283fab9
use python3 in nightly
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-14 08:54:10 -08:00
Nikolaj Bjorner
ad2107f079
fix #6978
2023-11-14 08:45:22 -08:00
Nikolaj Bjorner
4406011881
fix #6984
2023-11-14 07:40:32 -08:00
Nikolaj Bjorner
3c2e97ddb6
fix #6988
2023-11-14 07:30:32 -08:00
Nikolaj Bjorner
c2610cb37c
#6523
...
malformed models on giveup status
2023-11-13 14:32:53 -08:00
Nikolaj Bjorner
8a4e857294
#6523
...
regressions from changes inside math/lp/int_solver
2023-11-13 14:28:03 -08:00
Nikolaj Bjorner
3de5af3cb0
fix bug in bound simplification in Gomory for mixed integer linear cuts, enable fixed variable redution after bugfix, add notes that rewriting bounds does not work
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-10 16:39:04 +01:00
EyalBrilling
aa9c7912dc
fixed possible undefined variable assigment ( #6985 )
2023-11-10 11:36:24 +01:00
Nikolaj Bjorner
0556059bdf
change to expr_ref to allow trying simplification
2023-11-08 13:50:48 +01:00
Nikolaj Bjorner
bd4d580b17
fix #6986
2023-11-08 13:49:30 +01:00
Nikolaj Bjorner
e6385f8c85
disable bound validation in debug mode
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-07 20:49:26 +01:00
Nikolaj Bjorner
3d99ed9dd4
Gomory cut / branch and bound improvements
...
Improve fairness of cut generation by switching to find_infeasible_int_var with cascading priorities, allow stronger cuts by inlining terms.
2023-11-07 19:59:02 +01:00
Nikolaj Bjorner
9f0b3cdc25
Add utility to expand sub-terms
2023-11-07 19:58:32 +01:00
Nikolaj Bjorner
fb95760137
remove template
2023-11-07 19:57:50 +01:00
Nikolaj Bjorner
77dab53e9e
track number of Gomory cuts
2023-11-07 19:57:49 +01:00
Nikolaj Bjorner
2d1f4d5d93
remove verbose logging
2023-11-07 19:57:49 +01:00
Nikolaj Bjorner
e86eae27e6
#6523 and other heap-use-after-free error
2023-11-07 19:57:49 +01:00
Nikolaj Bjorner
eed02b6d86
improved logging, use C++11 for loops instead of iterators
2023-11-07 19:57:49 +01:00
Lev Nachmanson
14312ef8a3
remove some warnings with clang
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-11-02 15:34:41 -07:00
Lev Nachmanson
08d3a82ce0
simplify the jump on entering
2023-11-02 11:09:01 -07:00
Lev Nachmanson
bdf1fcf5c1
remove an assert
2023-11-02 09:59:03 -07:00
Lev Nachmanson
ca6cb0af95
add changes in lp with validate_bound and maximize_term
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-11-02 09:59:03 -07:00
Nikolaj Bjorner
49a071988c
remove temporary algebraic numbers from upper layers, move to owner module
2023-11-01 03:52:20 -07:00
Nikolaj Bjorner
ea915e5b37
#6971
...
clear m_a1, m_a2 before calls that may affect model.
2023-11-01 03:36:01 -07:00
Christoph M. Wintersteiger
3af2b36cd7
Add Z3_solver_interrupt to OCaml API ( #6976 )
2023-10-31 08:48:06 -07:00
Nikolaj Bjorner
91c2139b5d
just use std::string
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-30 17:56:44 -07:00
Nikolaj Bjorner
fe6f38a160
#6951 , fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-30 15:31:56 -07:00
Nikolaj Bjorner
c82b7dd241
Merge branch 'master' of https://github.com/z3prover/z3
2023-10-30 14:54:11 -07:00
Nikolaj Bjorner
f97dd34028
tests
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-30 14:54:04 -07:00
Clemens Eisenhofer
996b844cde
Fixed parsing of | and \ ( #6975 )
...
* Give users ability to see if propagation failed
* Skip propagations in the new core if they are already satisfied
* Fix registration in final
* Don't make it too complicated...
* Fixed next_split when called in pop
Made delay_units available even without quantifiers
* Missing push calls before "decide"-callback
* Fixed parsing of | and \
* Unit-test for parsing bug
2023-10-30 12:30:23 -07:00
Nikolaj Bjorner
938a89e197
prepare for local version of Gomory cuts
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-29 19:45:14 -07:00
Nikolaj Bjorner
160971df60
fix #6969 , again
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-29 19:10:46 -07:00
Nikolaj Bjorner
a957a5673d
remove experiment with theory lemmas
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-29 18:48:48 -07:00
Nikolaj Bjorner
3726960969
fix #6969
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-29 17:44:00 -07:00
Nikolaj Bjorner
589024aa1c
fix #6969
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-29 17:44:00 -07:00
Christoph M. Wintersteiger
9d57bdd2ef
Assorted fixes for floats ( #6968 )
...
* Improve 4be26eb543
* Add-on to 0f4f32c5d0
* Fix mk_numeral
* Fix corner-case in fp.div
* Fixes for corner-cases in mk_to_fp_(un)signed
* Fix out-of-range results in mpf_manager::fma
* Further adjustments for fp.to_fp_(un)signed
* fp.to_fp from real can't be NaN
* fp.to_fp from reals: add bounds
* Fix NaN encodings in theory_fpa.
* Fix fp.fma rounding with tiny floats
* Fix literal creation order in theory_fpa
2023-10-29 17:29:42 -07:00
Nikolaj Bjorner
bd8e5eee4b
add simplification experiment (disabled) for tracking, some reshuffling of equation/fixed_equation structs
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-29 10:21:31 -07:00
Clemens Eisenhofer
e7c17e68b8
Fixed next_split call in pop ( #6966 )
...
* Give users ability to see if propagation failed
* Skip propagations in the new core if they are already satisfied
* Fix registration in final
* Don't make it too complicated...
* Fixed next_split when called in pop
Made delay_units available even without quantifiers
* Missing push calls before "decide"-callback
2023-10-28 12:46:43 -07:00
Nikolaj Bjorner
52d16a11f9
deal with non-termination in new arithmetic solver
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-27 16:15:36 -07:00
Nikolaj Bjorner
93427f1175
regression test 2447
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-26 08:48:58 -07:00
Nikolaj Bjorner
0b8d7b755d
useful string rewrites
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-26 03:48:50 -07:00
Nikolaj Bjorner
5622fd1362
initialize delay bound
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-26 03:26:41 -07:00
Nikolaj Bjorner
76f9e1d2b3
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 17:31:19 -07:00
Nikolaj Bjorner
702744f139
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 16:57:31 -07:00
Nikolaj Bjorner
4434cee5df
merge
2023-10-25 16:38:18 -07:00
Nikolaj Bjorner
20c54048f7
use cone of influence reduction before calling nlsat.
2023-10-25 16:19:23 -07:00
Nikolaj Bjorner
e2db2b864b
add hook for in-processing simplification for NLA
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 15:09:21 -07:00
Nikolaj Bjorner
6ba151599e
Merge branch 'master' of https://github.com/z3prover/z3
2023-10-25 13:15:26 -07:00
Nikolaj Bjorner
55775bdc20
incremnet log level for debug output on cancelation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 13:15:15 -07:00
Bruce Mitchener
236afeb8cb
docs: More intra-doc linking, bit of formatting. ( #6963 )
2023-10-25 10:07:03 -07:00
Nikolaj Bjorner
7b490543ca
add missing simplification; handle nit #6952
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 10:00:15 -07:00
Nikolaj Bjorner
0859be5649
#6953
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 09:07:04 -07:00
dependabot[bot]
8b04049069
Bump @babel/traverse from 7.19.4 to 7.23.2 in /src/api/js ( #6954 )
...
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse ) from 7.19.4 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse )
---
updated-dependencies:
- dependency-name: "@babel/traverse"
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 15:29:42 -07:00
Nikolaj Bjorner
8fac89cdcc
enable more simplification in case inequality triggers a change.
2023-10-21 19:58:39 -07:00
Nikolaj Bjorner
4e21e126a8
update add_lemmas to use check-feasible
2023-10-21 19:58:07 -07:00
Nikolaj Bjorner
c9d298e57f
enable propagate-linear-equations and extend to monomials
2023-10-21 19:57:41 -07:00
Nikolaj Bjorner
53ce18ef34
update backoff for bounded_nla
2023-10-21 19:57:06 -07:00
Nikolaj Bjorner
97058b0d5d
allow for propagations the trigger make-feasible check
2023-10-19 16:08:44 -07:00
Nikolaj Bjorner
8c00181815
fix #6955
2023-10-19 10:41:24 -07:00
Nikolaj Bjorner
11ab583232
fix #6956
2023-10-19 10:34:31 -07:00
Nikolaj Bjorner
37fe9cc764
add Horner saturation to Grobner conflict detection
...
- throttle Grobner
- add (disabled) propagate_linear_equation to prepare for additional propagation.
- add validation code is_nla_conflict/add_nla_conflict to establish missed conflicts
2023-10-17 21:19:57 -07:00
Nikolaj Bjorner
0a1cc4c054
fix exception safety in pdd-solver
2023-10-17 19:50:34 -07:00
Nikolaj Bjorner
3fa67777e5
fix exception safety in pdd-solver
2023-10-17 19:50:13 -07:00
Nikolaj Bjorner
c9c5dbc347
#6523
2023-10-16 09:27:22 -07:00
Nikolaj Bjorner
f678861aef
fix #6947
2023-10-16 08:43:08 -07:00
Nikolaj Bjorner
ba881d9c9b
add facility to experiment with nla justified conflicts from Grobner equations
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-16 00:40:43 -07:00
Nikolaj Bjorner
18fc6914d3
add facility to experiment with nla justified conflicts from Grobner equations
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-16 00:40:24 -07:00
Nikolaj Bjorner
bdac86501d
add facility to check for missing propagations
2023-10-15 20:33:48 -07:00
Nikolaj Bjorner
cafe3acff1
delay detach
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-15 12:41:34 -07:00
Nikolaj Bjorner
891ab8bac5
#6523
...
fixup looping
2023-10-15 12:37:14 -07:00
Nikolaj Bjorner
6553382ec8
remove extra assume-eqs
2023-10-15 12:30:24 -07:00
Nikolaj Bjorner
b2efa592ce
#6523
...
deal with memory leak on exceptions
2023-10-15 12:17:08 -07:00
Nikolaj Bjorner
41b1f47d77
#6523
...
deal with memory leak when there is an exception
2023-10-15 12:15:28 -07:00
Nikolaj Bjorner
5942dc24bd
#6523
2023-10-15 11:41:25 -07:00
Nikolaj Bjorner
5619ed0586
resurrect old bounds propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-14 13:55:56 -07:00
Nikolaj Bjorner
a39d4adf5b
build fixes
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-14 13:45:42 -07:00
Nikolaj Bjorner
47f1c86f93
fix regression
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-14 02:38:49 -07:00
Nikolaj Bjorner
d44d78f9d1
remove temporary configuration parameter used for testing
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-14 01:33:05 -07:00
Nikolaj Bjorner
08af965b56
updates to monomial bounds
2023-10-14 01:33:05 -07:00
Hari Govind V K
ba6c23bbc5
bug fix #6934 ( #6940 )
2023-10-14 01:06:15 -07:00
Nuno Lopes
fcb03aa56c
minor code simplification
2023-10-11 01:38:03 +01:00
Nikolaj Bjorner
01188462d5
build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-10 16:24:05 -07:00
Nikolaj Bjorner
960a024d3d
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-10 13:54:00 -07:00
Nikolaj Bjorner
6445d01557
normalize newlines for if
2023-10-10 13:43:49 -07:00
Nikolaj Bjorner
d04807e8c3
merge
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-10 13:43:38 -07:00
Nikolaj Bjorner
338d7b3283
remove unused variables
2023-10-10 13:42:21 -07:00
Nikolaj Bjorner
f3e9712beb
formatting
2023-10-10 13:42:21 -07:00
Nikolaj Bjorner
e8e636c3ec
fix #6936
2023-10-10 13:42:21 -07:00
Lev Nachmanson
180ab727e7
fix a bug in unit nl prop
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-10 07:32:07 -07:00
Nikolaj Bjorner
adbee0cd3f
fix #6937
2023-10-10 16:02:59 +09:00
Nikolaj Bjorner
267e9e827d
#6935
2023-10-10 15:52:54 +09:00
Nikolaj Bjorner
4a870966ad
add code to enable unit propagation of bounds
...
set UNIT_PROPAGATE_BOUNDS 1 to use the unit propagation version. It applies unit propagation eagerly (does not depend on checking LIA consistency before final check) and avoid creating new literals in most cases
2023-10-09 16:04:39 +09:00
Nikolaj Bjorner
1bdf66b918
move initialization to header file
2023-10-09 10:55:43 +09:00
Lev Nachmanson
1ba0f5aba9
cosmetic changes
2023-10-08 10:16:40 -07:00
Lev Nachmanson
3aac528aef
add a comment
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-08 07:34:03 -07:00
Nikolaj Bjorner
54f7aac0bc
column value is not necessarily at bounds
2023-10-08 17:18:26 +09:00
Lev Nachmanson
4c228fb02c
Merge branch 'master' into unit_prop_on_monomials
2023-10-06 07:24:05 -07:00
Lev Nachmanson
a94a75459e
fixin nla_solver_test.cpp
2023-10-06 06:51:00 -07:00
Lev Nachmanson
f847d039bc
use the simple version of move_non_basic_column_to_bounds
2023-10-05 20:57:54 -07:00
LufyCZ
19e921290e
increase wasm stack size ( #6931 )
2023-10-06 11:49:54 +09:00
Christoph M. Wintersteiger
23de8056d7
Add RCF functions to OCaml API ( #6932 )
2023-10-06 11:49:22 +09:00
Lev Nachmanson
bf3817ef7c
restore move_non_basic_to_bounds
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-05 18:14:52 -07:00
Lev Nachmanson
b61f4ac51f
merge changes from master
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-05 07:50:13 -07:00
Nikolaj Bjorner
b0df74c1c1
#6930
...
simplify assumptions and only replay assumptions after constraints are simplified. This allows simplifying assumptions with the current set of constraints independently of whether there is another check-sat.
2023-10-05 17:23:17 +09:00
Lev Nachmanson
45c0ed126e
remove unnecessery call
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-04 17:39:22 -07:00
Lev Nachmanson
edd1761ff3
restore the scheme of m_columns_with_changed_bounds
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-04 11:06:24 -07:00
Lev Nachmanson
a88aa7ffa5
debug new propagation scheme
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-03 16:25:49 -07:00
Nikolaj Bjorner
00ba064cd3
ensure bounds propagation on changed columns after nla propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-03 14:28:59 +09:00
Clemens Eisenhofer
4133a1cc5a
Fix UP registration in final callback ( #6929 )
...
* Fix registration in final
* Don't make it too complicated...
2023-10-03 09:51:02 +09:00
Lev Nachmanson
7de06c4350
merging master to unit_prop_on_monomials
2023-10-02 16:42:59 -07:00
Lev Nachmanson
a297a2b25c
fixes in lar_solver around nl unit propagation
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-01 11:39:58 -07:00
Nikolaj Bjorner
ab8fe199c5
fix case for 0 multiplier in monomial_bounds
...
disabled in master - it violates invariants in the lra solver.
2023-10-01 18:41:23 +09:00
Nikolaj Bjorner
50654f1f46
add theory propagation to linear monomial propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-30 08:52:09 +09:00
Lev Nachmanson
702322a6e9
change the order of lp and nlp propagation
2023-09-29 15:31:32 -07:00
Lev Nachmanson
b64fdef41f
better tracking changinc rows and monomials
2023-09-29 15:27:22 -07:00
Lev Nachmanson
f30a2c13be
propagate only one non-fixed monomial intrernally
...
lar_solver
2023-09-28 17:24:34 -07:00
Nikolaj Bjorner
ddcd1ee992
non-fixed term should have bound 0
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-28 09:25:36 -07:00
Nikolaj Bjorner
65e59e3ec4
sketch of internal propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-27 20:43:38 -07:00
Nikolaj Bjorner
7207f0ff9c
sketch of internal propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-27 20:40:55 -07:00
Lev Nachmanson
29b5c47a8d
track changed monics efficiently
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-27 09:09:38 -07:00
Nikolaj Bjorner
9033b826f4
debug output with the variable that is fixed and its value
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-27 00:52:26 -07:00
Nikolaj Bjorner
42767b9aab
Merge branch 'master' into unit_prop_on_monomials
2023-09-26 23:55:37 -07:00
Nikolaj Bjorner
2297b0334b
re-introduce simple implementation of linear monomial propagation for evaluation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 23:53:14 -07:00
Nikolaj Bjorner
6559e5fb32
port over std_vector and std-allocator functionality from monomial propagation branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 21:15:07 -07:00
Nikolaj Bjorner
aaa587398e
add propagation flag to monic and method for updating it to emonics. This replaces the bool-vector tracking for propagation and internalizes it to the emonics class
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 20:52:34 -07:00
Nikolaj Bjorner
4b85a105bb
Merge branch 'master' into unit_prop_on_monomials
2023-09-26 20:25:43 -07:00
Nikolaj Bjorner
9c63ea3135
port over cosmetics from unit_prop_on_monomials branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 20:24:49 -07:00
Nikolaj Bjorner
94eb101873
Merge branch 'master' into unit_prop_on_monomials
2023-09-26 20:15:58 -07:00
Nikolaj Bjorner
36566d6193
port over moving m_nla_lemmas into nla_core from the linear monomial propagation branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 20:15:22 -07:00
Nikolaj Bjorner
e4e1d6148c
port over moving m_nla_lemmas into nla_core from the linear monomial propagation branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 20:14:42 -07:00
Nikolaj Bjorner
e8fcc876c9
Merge branch 'master' into unit_prop_on_monomials
2023-09-26 20:14:06 -07:00
Nikolaj Bjorner
ec2937e2de
port over moving m_nla_lemmas into nla_core from the linear monomial propagation branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 20:08:30 -07:00
Nikolaj Bjorner
8d2b65b20b
add options to allow testing the effect of non-linear hammers
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-26 19:18:44 -07:00
Lev Nachmanson
368fe80b3d
fix the build
2023-09-25 16:55:02 -07:00
Lev Nachmanson
6ff4856e38
throttle monomial unit prop and and nl params
2023-09-25 16:47:34 -07:00
Lev Nachmanson
896aba31f8
move monomial propagation from theory_lra to nla_solver
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-25 14:20:24 -07:00
Nikolaj Bjorner
d2c0f7dba7
fix test build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-25 12:48:52 -07:00
Nikolaj Bjorner
0a1ade6f95
move m_nla_lemma_vector to be internal to nla_core
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-25 12:40:52 -07:00
Lev Nachmanson
26a9b776c6
clean m_nla_lemma_vector in nla_solver
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-25 12:10:59 -07:00
Nuno Lopes
029d726eb8
minor code simplification
2023-09-25 15:33:40 +01:00
Nikolaj Bjorner
87a839c794
fixup unit test for added argument to constructor of nla_solver
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-23 18:07:56 -07:00
Nikolaj Bjorner
db097bae05
use format from unit_prop_on_monomials branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-23 17:24:46 -07:00
Nikolaj Bjorner
3433366bef
Merge branch 'unit_prop_on_monomials' of https://github.com/z3prover/z3 into unit_prop_on_monomials
2023-09-23 17:20:08 -07:00
Nikolaj Bjorner
85eacf9bb1
merge with master
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-23 17:20:00 -07:00
Nikolaj Bjorner
61319ffd85
cache is_shared information in the enode
...
observed perf overhead for QF_NIA is that assume_eqs in theory_lra incurs significant overhead when calling is_relevant_and_shared. The call to context::is_shared and the loop checking for beta redexes is a main bottleneck. The bottleneck is avoided by caching the result if is_shared inside the enode. It is invalidated for every merge/unmerge.
2023-09-23 17:19:06 -07:00
Nikolaj Bjorner
a3e2e68d93
Update theory_lra.cpp
2023-09-23 16:26:31 -07:00
Nikolaj Bjorner
acad9fa62c
Update smt_context.cpp
2023-09-23 16:25:46 -07:00
Nikolaj Bjorner
eea9c0bec6
fix #6914
2023-09-23 11:22:25 -07:00
Nikolaj Bjorner
30d1800c31
#6916
...
short circuiting equality consequence appears to have the wrong sign
2023-09-23 10:32:51 -07:00
Nikolaj Bjorner
421fe94607
rmove debug out
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-22 17:59:07 -07:00
Nikolaj Bjorner
886d3f4351
indentation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-22 16:55:34 -07:00
Nikolaj Bjorner
eac54ba084
indentation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-22 16:54:12 -07:00
Nikolaj Bjorner
940775d12d
indentation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-22 16:48:40 -07:00
Lev Nachmanson
caa929f01f
do not use lemmase in monomial propagation
2023-09-22 14:27:26 -07:00
Nikolaj Bjorner
5d8779b05d
Merge branch 'master' into unit_prop_on_monomials
2023-09-22 09:46:41 -07:00
Nikolaj Bjorner
eff3f5f65e
port bug fixes from unit prop branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-22 09:45:58 -07:00
Lev Nachmanson
576309a16f
Revert "reject rows with columns with big numbers for lp bound propagation"
...
This reverts commit c0b55d1435
.
2023-09-21 16:30:43 -07:00
Lev Nachmanson
c0b55d1435
reject rows with columns with big numbers for lp bound propagation
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-21 15:53:53 -07:00
Lev Nachmanson
f423642e9b
try the lemma scheme
2023-09-21 12:18:21 -07:00
Lev Nachmanson
e31cecf5db
transfer propagate monomial bounds to nla_solver
2023-09-21 11:27:53 -07:00
Lev Nachmanson
536930b4a1
make m_ibounds inside of lp_bound_propagator
...
a reference
2023-09-20 17:13:25 -07:00
Lev Nachmanson
20c02f4f45
fix a lambda bug
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-20 17:02:35 -07:00
Nikolaj Bjorner
f9de65a464
indetation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-20 15:22:28 -07:00
Nikolaj Bjorner
615aad7779
get rid of int*, use lambda scoping
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-20 15:18:37 -07:00
Nikolaj Bjorner
7a74b099ba
remove experimental code
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-20 15:04:24 -07:00
Lev Nachmanson
24512d5ec2
typo
2023-09-20 14:12:36 -07:00
Lev Nachmanson
9648793206
add features to std_allocator
2023-09-20 14:11:38 -07:00
Lev Nachmanson
f2a0ddb385
Merge branch 'unit_prop_on_monomials' of https://github.com/z3prover/z3 into unit_prop_on_monomials
2023-09-19 15:47:01 -07:00
Lev Nachmanson
d77c91b1aa
trying to get else on a new line
...
with clang-formatter
2023-09-19 15:46:59 -07:00
Nikolaj Bjorner
f07553ed3a
formatting updates
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-19 15:18:38 -07:00
Nikolaj Bjorner
db84d21e3b
Merge branch 'master' into unit_prop_on_monomials
2023-09-19 14:44:01 -07:00
Nikolaj Bjorner
fba5de3a25
remove unused code
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-19 14:43:02 -07:00
Nikolaj Bjorner
4d742001ab
formatting of else
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-19 14:36:21 -07:00
Nikolaj Bjorner
85db8163fa
move allocator to memory_manager and std_vector to vector
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-19 13:57:28 -07:00
Lev Nachmanson
c5cfd62e0a
remove dead code related to nla unit propagation
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-19 10:56:09 -07:00
Lev Nachmanson
cf63e75898
using structures from util in lp_bound_propagator
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-18 13:25:24 -07:00
Nikolaj Bjorner
643512613a
simplify last_index function
2023-09-18 12:52:59 -07:00
Nikolaj Bjorner
31c91e1674
#6902
...
add parse check for identifiers used for datatype declarations.
2023-09-18 12:52:59 -07:00
Nuno Lopes
b1c52c0b16
don't crash when a function doesn't have a model when converting a solver to string
2023-09-18 10:16:19 +01:00
Nuno Lopes
ff33fa355a
fix debug single-thread build
2023-09-18 09:44:37 +01:00
Lev Nachmanson
af8d192392
add an include
2023-09-17 13:14:36 -07:00
Lev Nachmanson
10095a30b7
add an include file
2023-09-17 12:25:11 -07:00
Lev Nachmanson
66f6a0327f
change type of m_ibounds to std::vector
2023-09-17 11:00:48 -07:00
Lev Nachmanson
30b743d7b3
refactor propagat_monic
2023-09-17 10:45:54 -07:00
Lev Nachmanson
7353d7fb4d
fix dep calculations in lp_bound_propagator
2023-09-17 06:48:12 -07:00
Lev Nachmanson
77e56b0a69
debug
2023-09-16 13:54:14 -07:00
Lev Nachmanson
c240f62ca8
is_linear does not check for is_big
2023-09-15 17:44:10 -07:00
Lev Nachmanson
b621c9fa1c
remove an extrac check in bound_is_interesting
2023-09-15 17:42:18 -07:00
Lev Nachmanson
4cfba9787b
debug lp_bound_propagator
2023-09-15 17:41:10 -07:00
Lev Nachmanson
762ade2a79
check m_unassigned_bounds in bound_is_interesting
2023-09-15 06:15:22 -07:00
Lev Nachmanson
a55aa1a648
add a comment
2023-09-14 19:29:48 -07:00
Lev Nachmanson
b3673d491e
fix the build for gcc
2023-09-14 19:20:47 -07:00
Nikolaj Bjorner
b87a91379c
fix #6894
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-14 17:14:14 -07:00
Nikolaj Bjorner
50d76a2fe3
fix #6894
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-14 17:14:14 -07:00
Lev Nachmanson
cbad61ba2e
propagate monics with lp_bound_propagator
2023-09-13 14:27:34 -07:00
Lev Nachmanson
c309d52283
runs a simple test
2023-09-13 08:12:00 -07:00
Lev Nachmanson
c050af922f
fixing the bugs
2023-09-07 15:59:20 -07:00
Lev Nachmanson
c43b99daae
renaming
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-07 11:57:20 -07:00
Lev Nachmanson
47b64e689c
restore the lemma scheme
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-07 11:33:14 -07:00
Lev Nachmanson
288e66de59
restore m_crossed* and create lemmas
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-06 09:27:30 -07:00
Lev Nachmanson
41f59cb1ed
propagate monomial is nla
2023-09-05 18:49:59 -07:00
Nikolaj Bjorner
4d9af7848d
add parameter to disable pattern inference #6884
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-03 15:27:37 -07:00
Nikolaj Bjorner
99239068ba
some template instantiations #6869
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-03 15:21:49 -07:00
Nikolaj Bjorner
c2e73a6aae
logging pre-processing
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-03 15:19:31 -07:00
Lev Nachmanson
318d7d7564
fixes a bug
2023-09-01 11:32:26 -07:00
Lev Nachmanson
d3258e7084
propagate lineal monomial
2023-09-01 11:18:03 -07:00
Lev Nachmanson
5509b468e9
handle monomial_bounds::unit_propagate()
2023-08-31 17:35:41 -07:00
Nikolaj Bjorner
ff3268e636
move unit propagation into monomial_bounds
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-31 14:32:05 -07:00
Nikolaj Bjorner
c2cbe72b64
sketch linear monomial propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-31 11:49:05 -07:00
Nikolaj Bjorner
38b131386d
add stubs for monomial unit propagation
2023-08-30 17:21:48 -07:00
Nuno Lopes
00593609c5
minor code simplification
2023-08-30 12:50:29 +01:00
Nikolaj Bjorner
09f911d8a8
include rewriter for recursive functions in model-evaluator
...
fixes bug reported by Tahina and Nick, @tahina-pro
2023-08-28 11:31:40 -07:00
Hari Govind V K
5ba06f4e28
print deq in lits2pure. fix #6877 ( #6878 )
2023-08-26 20:53:15 -07:00
Nikolaj Bjorner
63467f9dfa
fix #6876
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-25 17:14:35 -07:00
Nikolaj Bjorner
e8929041b8
fixing calls, signs
2023-08-22 09:29:12 -07:00
Nikolaj Bjorner
818b1129a5
fix regression in sign of literals from new solver
2023-08-22 09:04:08 -07:00
Lev Nachmanson
61a7c6b28d
init m_literal_vec
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-08-21 17:11:55 -07:00
Lev Nachmanson
9aeaed8f53
Merge branch 'master' into nl_branches
2023-08-21 16:15:20 -07:00
Nikolaj Bjorner
1d9e0feb84
Merge branch 'master' of https://github.com/z3prover/z3
2023-08-21 09:19:16 -07:00
Nikolaj Bjorner
79aa317af4
remove if-def inside cpp file that should not be there #6869
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-21 09:19:06 -07:00
Hari Govind V K
b8d8553c41
support or, and, implies, distinct in mbp_basic ( #6867 )
2023-08-20 15:36:22 -07:00
Nikolaj Bjorner
37ddaaef69
make destructors virtual
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-20 15:30:57 -07:00
Nuno Lopes
dda0c8ff42
array theory: use expr_ref for mk_default() so it doesnt leak if internalize throws
...
like on timeout/memout
2023-08-20 22:28:57 +01:00
Lev Nachmanson
9b672bc5cc
remove tracking of bounds
2023-08-20 10:10:48 -07:00
Nuno Lopes
57c667e355
remove unused code
2023-08-20 15:16:47 +01:00
Nuno Lopes
a694d27557
revert removal of virtual destructor of relevancy_eh since clang doesnt play along
2023-08-20 14:20:20 +01:00
Nuno Lopes
8210aafb69
ast compare_nodes: fail faster when comparing quantifier expressions
2023-08-20 14:09:04 +01:00
Nuno Lopes
c469c6e1d5
attempt to fix clang buildbots
2023-08-20 13:39:15 +01:00
Nuno Lopes
28884b398c
remove unneeded virtual destructor (optimization)
2023-08-20 12:57:47 +01:00
Nuno Lopes
3b546b2348
smt_context: we can't assert that the resource limits were exceeded on cancel_exception
...
It happens sometimes that e.g. the internalizer goes above the soft memory limit
But since it's only by a small amount, when the exception propagates back to the context, some stuff
has been freed already and we are not longer above the memory threshold
Just delete these asserts
2023-08-20 10:34:28 +01:00
Nuno Lopes
5d33805c8b
optimize ~relevancy_propagator_imp() so it just dec refs the exprs in the trail
...
It avoid doing all the funky watch stuff
One extreme Alive2 test case goes from 40s to 28s :)
2023-08-20 10:07:56 +01:00
Nikolaj Bjorner
5e3df9ee77
Arith min max ( #6864 )
...
* prepare for dependencies
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* snapshot
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* more refactoring
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* more refactoring
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* pass in u_dependency_manager
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* address NYIs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* more refactoring names
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* eq_explanation update
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* add outline of bounds improvement functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* fix unit tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* remove unused structs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* more bounds
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* more bounds
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* convert more internals to use u_dependency instead of constraint_index
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* convert more internals to use u_dependency instead of constraint_index
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* remember to push/pop scopes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* use the main function for updating bounds
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* remove reset of shared dep manager
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* disable improve-bounds, add statistics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
---------
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-19 17:44:09 -07:00
Nikolaj Bjorner
c3b344ec47
fix #6865
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-18 16:51:58 -07:00
Lev Nachmanson
610313946d
split free vars in nla
2023-08-18 12:36:14 -07:00
Nikolaj Bjorner
59b56f2ce7
update unit test to be compatible with C++ vs C exception semantics #6537
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 19:13:50 -07:00
Nikolaj Bjorner
73724f9cab
lines that go away
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 18:45:49 -07:00
Lev Nachmanson
252a30e727
use param_ref in nla_solver ( #6862 )
...
* use param_ref in nla_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
* add parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* add parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* replace nla_setting by command line parameters
* delete nla_setting.h
---------
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 18:44:27 -07:00
Nikolaj Bjorner
63ea8efcfb
remove output
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 15:20:12 -07:00
Nikolaj Bjorner
2dbf9bcab2
Merge branch 'master' of https://github.com/z3prover/z3
2023-08-17 15:18:36 -07:00
Nikolaj Bjorner
51df7b75ce
fix 6800
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 15:18:22 -07:00
Hari Govind V K
1be692002d
split on all ite terms. fix #6852 ( #6859 )
2023-08-16 10:07:30 -07:00
Nikolaj Bjorner
b04e48f374
fix #6850
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-13 15:06:39 -07:00
Nikolaj Bjorner
33c35b0c31
fix #6851
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-13 14:49:25 -07:00
Nikolaj Bjorner
6366f8f6b2
na
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-13 14:05:07 -07:00
Nikolaj Bjorner
9804ba9fd2
Merge branch 'master' of https://github.com/z3prover/z3
2023-08-12 20:34:21 -07:00
Nikolaj Bjorner
41cac5f69e
remove output
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-12 20:34:15 -07:00
Lev Nachmanson
eb817f779d
small change in factor to support TRACE
2023-08-11 12:04:08 -10:00
Lev Nachmanson
a932e596eb
add a constructor from a variable to factor
2023-08-10 08:34:53 -10:00
Nikolaj Bjorner
a6ab0a7d49
formatting hygiene
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-08 13:50:49 -07:00
Lev Nachmanson
a7966dc436
remove an assert
2023-08-07 14:55:13 -10:00
Lev Nachmanson
858eebca82
more efficient column_is_fixed
2023-08-07 14:55:13 -10:00
Lev Nachmanson
0fbf8f92f5
delete remove_fixed_vars_from_base() from
...
int_solver
2023-08-07 14:55:13 -10:00
Nikolaj Bjorner
c3a373e225
format
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-07 14:55:13 -10:00
Lev Nachmanson
0c98c755ba
new equality propagation scheme, etc
2023-08-07 14:55:13 -10:00
Nikolaj Bjorner
125787c458
remove dead code
2023-08-07 11:22:34 -07:00
Hari Govind V K
dd0b0b47b8
fix #5925 ( #6846 )
2023-08-04 15:18:16 -07:00
Nikolaj Bjorner
84520d53ea
remove out
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-04 11:33:39 -07:00
Nikolaj Bjorner
b0055df4ab
revert arithmetic final check to original order
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-04 10:48:44 -07:00
Lev Nachmanson
f58b703ac5
u_set replaced by indexed_uint_set ( #6841 )
...
* replace u_set by indexed_uint_set
* replace u_set by indexed_uint_set
* create insert-fresh and insert for indexed_uint_set to make use cases with non-fresh inserts easier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* update nightly to pull arm
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* update nightly to pull arm
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* fixing the build of lp_tst
* update nightly to pull arm
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* replace u_set by indexed_uint_set
* replace u_set by indexed_uint_set
* fixing the build of lp_tst
* remove unnecessery call to contains() before
insert to indexed_uint_set
* formatting, no check for contains()
in indexed_uint_set, always init m_touched_rows to nullptr
---------
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-03 16:01:27 -07:00
Nikolaj Bjorner
4637339091
update model validate to include arithmetic
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-03 15:51:29 -07:00
Nikolaj Bjorner
7b36563196
create insert-fresh and insert for indexed_uint_set to make use cases with non-fresh inserts easier
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-03 09:48:07 -07:00
Nikolaj Bjorner
5b287bff09
nits
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 16:59:59 -07:00
Nikolaj Bjorner
09dd7688ce
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 11:19:41 -07:00
Nikolaj Bjorner
9b5727adde
enable arm for non-osx
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 10:51:52 -07:00
Nikolaj Bjorner
606940e60c
nits
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 10:29:48 -07:00
Arie Gurfinkel
51d3c279d0
QEL: Fast Approximated Quantifier Elimination ( #6820 )
...
* qe_lite: cleanup and comment
no change to code
* mbp_arrays: refactor out partial equality (peq)
Partial array equality, PEQ, is used as an intermediate
expression during MBP for arrays. We need to factor it out
so that it can be shared between MBP-QEL and existing MBP.
Partial array equality (peq) is used in MBP for arrays.
Factoring this out to be used by multiple MBP implementations.
* rewriter: new rewrite rules
These rules are specializes for terms that are created in QEL.
QEL commit is comming later
* datatype_rw: new rewrite rule for ADTs
The rule handles this special case:
(cons (head x) (tail x)) --> x
* array_rewriter rules for rewriting PEQs
Special rules to simplify PEQs
* th_rewriter: wire PEQ simplifications
* spacer_iuc: avoid terms with default in IUC
Spacer prfers to not have a term representing default value of an array.
This guides IUC from picking such terms in interpolation
* mbp_term_graph: replace root with repr
* mbp_term_graph: formatting
* mbp_term_graph: class_props, getters, setters
Class properties allow to keep information for an equivalence class.
Getters and setters for terms allow accessing information
* mbp_term_graph: auxiliary methods for qel
QEL commit is comming later in the history
* mbp_term_graph: bug fix
* mbp_term_graph: pick, refine repr, compute cgrnd
* mbp_term_graph: internalize deq
* mbp_term_graph: constructor
* mbp_term_graph: optionally internalize equalities
Reperesent equalities explicitly by nodes in the term_graph
* qel
* formatting
* comments on term_lt
* get terms and other api for mbp_qel
* plugins for mbp_qel
* mbp_qel_util: utilities for mbp_qel
* qe_mbp: QEL-based mbp
* qel: expose QEL API
* spacer: replace qe_lite in qe_project_spacer by qel
This changes the default projection engine that spacer uses.
* cmd_context: debug commands for qel and mbp_qel
New commands are
mbp-qel -- MBP with term graphs
qel -- QEL with term graphs
qe-lite -- older qelite
* qe_mbp: model-based rewriters for arrays
* qe_mbp: QEL-based projection functions
* qsat: wire in QEL-based mbp
* qsat: debug code
* qsat: maybe a bug fix
Changed the code to follow the paper by adding all predicates above a given
level, not just predicates of immediately preceding level.
* chore: use new api to create solver in qsat
* mbp_term_graph use all_of idiom
* feat: solver for integer multiplication
* array_peq: formatting, no change to code
* mbp_qel_util: block comment + format
* mbt_term_graph: clang-format
* bug fix. Move dt rewrite to qe_mbp
* array_peq: add header
* run clang format on mbp plugins
* clang format on mul solver
* format do-while
* format
* format do-while
* update release notes
---------
Co-authored-by: hgvk94 <hgvk94@gmail.com>
Co-authored-by: Isabel Garcia <igarciac@uwaterloo.ca>
2023-08-02 09:34:06 -07:00
Nikolaj Bjorner
5b2519d7a3
#6523
...
attach original variable to pb expression.
2023-08-01 08:41:26 -07:00
Nikolaj Bjorner
adad468cd7
allow copy within a user scope #6827
...
this will allow copying the solver state within a scope.
The new solver state has its state at level 0. It is not possible to pop scopes from the new solver (you can still pop scopes from the original solver). The reason for this semantics is the relative difficulty of implementing (getting it right) of a state copy that preserves scopes.
2023-07-31 19:46:08 -07:00
Nikolaj Bjorner
403340498c
format
2023-07-31 19:41:11 -07:00
Nikolaj Bjorner
0606ca15d9
track lia conflicts as cuts
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-28 17:40:56 -07:00
Nikolaj Bjorner
de1cf30ea8
strengthen Tseitin checker to take true/false constants into account
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-28 16:54:33 -07:00
Nikolaj Bjorner
7135283135
update format and checker for implied-eq
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-27 13:23:17 -07:00
Nikolaj Bjorner
f0184c3fde
update format and checker for implied-eq
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-27 13:21:45 -07:00
Nikolaj Bjorner
249f0de80b
fix order for inequalities in arithmetic justifications such that implied bound literal is last. The self-checker uses this property to identify the implied bound
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-26 10:06:41 -07:00
Nikolaj Bjorner
c6aab89662
add rewrite for partially interpreted arithmetic functions
2023-07-25 14:57:27 -07:00
Nikolaj Bjorner
0f2fe6031a
patching up trim
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-25 11:32:20 -07:00
Nikolaj Bjorner
6da4f6815e
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-25 09:47:09 -07:00
Nikolaj Bjorner
423a7b6888
also add separate cut rule
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-25 09:46:59 -07:00
Nikolaj Bjorner
68a437e615
revert to logging conflict to get EUF trim to work
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-25 09:45:35 -07:00
Bruce Mitchener
8cc6969510
Remove Z3_literals
remnants. ( #6829 )
...
The bulk of the functionality using these was removed between
Z3 4.4.1 and 4.5.0, back in 2015.
Co-authored-by: Bruce Mitchener <bruce.mitchener@configura.com>
2023-07-23 19:38:57 -07:00
Nikolaj Bjorner
6c8b8609ee
tweak control flow for empty clauses
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-23 18:16:00 -07:00
Nikolaj Bjorner
48deb4d3e0
fix proof generation for euf-solver
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-23 14:31:44 -07:00
Nikolaj Bjorner
e64bab4bb8
simplify code
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-22 13:19:03 -07:00
Nikolaj Bjorner
d0f2b00f96
fix build warnings
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-22 12:24:30 -07:00
Nikolaj Bjorner
a0892c6669
rename antecedent utilities for clarity
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-22 11:30:34 -07:00
Nikolaj Bjorner
4d31ff7a38
remove unused variable
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-21 08:35:09 -07:00
Nikolaj Bjorner
3479cdc10b
separate hint literals
2023-07-20 10:52:58 -07:00
Nikolaj Bjorner
e8a38c5482
build fixes
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-18 19:14:45 -07:00
Nikolaj Bjorner
3d8f75b3d8
enable on-clause with dependencies
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-18 16:59:02 -07:00
Nikolaj Bjorner
9db636c38b
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-17 11:00:11 -07:00
Nikolaj Bjorner
3e74989a9d
fixup dependencies for trim'
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-17 11:00:02 -07:00
Lev Nachmanson
bfc37bd266
add to m_touched_rows only when bound
...
propagation is required
2023-07-17 08:00:01 -10:00
Lev Nachmanson
0a91465e13
comment out debug output
2023-07-16 18:40:53 -10:00
Nikolaj Bjorner
75a9038aa2
add missing dependencies in rup
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-16 16:54:26 -07:00
Lev Nachmanson
fd5902f76e
relax an assertion in int_solver::patcher
2023-07-16 11:55:42 -10:00
Nikolaj Bjorner
305c1c1dc2
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-15 17:52:33 -07:00
Nikolaj Bjorner
715081cbd1
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-15 17:04:54 -07:00
Nikolaj Bjorner
30e8330907
fix #6813
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-15 17:03:44 -07:00
Nikolaj Bjorner
8a913981f6
fix #6813 - proofs terms are fragile with respect to simplificiation of not(not(e)). It would be better if proof terms didn't have to track this level of detail, but the legacy proof format assumes strictly checkable proofs. A patch is to fixup terms within the mk_transitivity constructor
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-15 17:03:04 -07:00
Lev Nachmanson
144c9a7b82
restore the change_rows population in lar_solver
2023-07-15 10:09:48 -07:00
Lev Nachmanson
401ec04ec3
code cleaning around m_touched_rows of lar_solver ( #6814 )
2023-07-14 20:19:13 -07:00
Nikolaj Bjorner
3849f665d6
#6523
2023-07-14 10:17:19 -07:00
Nikolaj Bjorner
a8da0a6851
#6696
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 21:48:46 -07:00
Nikolaj Bjorner
dda9242616
revert lt change
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 21:39:04 -07:00
Nikolaj Bjorner
3727f70363
fix #6742
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 19:22:31 -07:00
Nikolaj Bjorner
4a9c4ca2ce
initialize poly solver in incremental mode
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 14:12:29 -07:00
Nikolaj Bjorner
d1482287d4
fix #6793 , disable unbound_compressor when used in context of a moel converter
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 14:03:40 -07:00
Nikolaj Bjorner
08599177d0
fix #6808
...
remove bv_eq_axioms as an external option to toggle.
Diseqalities have to be enforced for extensionality.
There are no internal code paths where the option is set to false.
2023-07-13 10:47:55 -07:00
Nikolaj Bjorner
d0d434e4f1
fix #6807
2023-07-13 10:23:28 -07:00
Nikolaj Bjorner
3e58f0cff1
build fixes
2023-07-13 09:25:20 -07:00
Nikolaj Bjorner
b909b87acc
build fixes
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-13 09:13:41 -07:00
Nikolaj Bjorner
939bf1c725
wip - alpha support for polymorphism
...
An initial update to support polymorphism from SMTLIB3 and the API (so far C, Python).
The WIP SMTLIB3 format is assumed to be supporting the following declaration
```
(declare-type-var A)
```
Whenever A is used in a type signature of a function/constant or bound quantified variable, it is taken to mean that all instantiations of A are included in the signature and assertions.
For example, if the function f is declared with signature A -> A, then there is a version of f for all instances of A.
The semantics of polymorphism appears to follow previous proposals: the instances are effectively different functions.
This may clash with some other notions, such as the type signature forall 'a . 'a -> 'a would be inhabited by a unique function (the identity), while this is not enforced in this version (and hopefully never because it is more busy work).
The C API has the function 'Z3_mk_type_variable' to create a type variable and applying functions modulo polymorphic type signatures is possible.
The kind Z3_TYPE_VAR is added to sort discriminators.
This version is considered as early alpha. It passes a first rudimentary unit test involving quantified axioms, declare-fun, define-fun, and define-fun-rec.
2023-07-12 18:09:02 -07:00
Nikolaj Bjorner
d6f2c23627
#6805
2023-07-11 09:41:29 -07:00
Lev Nachmanson
9ae6c88e3f
fix the build
2023-07-10 12:19:32 -07:00
Lev Nachmanson
1840fd17da
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-10 12:06:06 -07:00
Lev Nachmanson
e091a2e775
remove the line with clang-format off
2023-07-10 12:05:59 -07:00
Nikolaj Bjorner
241e845da8
fix #6802
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-09 12:07:43 -07:00
THE Spellchecker
dc0887db5a
Typo Fixes ( #6803 )
2023-07-09 11:56:10 -07:00
Nikolaj Bjorner
28a0c2d18f
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-07 17:23:08 -07:00
Nikolaj Bjorner
5806869ae4
fix #6792 , add scaffolding for type variables
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-07 17:22:56 -07:00
Lev Nachmanson
56b5492752
remove dead code
2023-07-07 15:05:17 -07:00
Lev Nachmanson
0fceb80e0f
edit tracing, add lar_solver::column_is_feasible()
2023-07-07 11:48:21 -07:00
Clemens Eisenhofer
4cb158a79b
User Propagator: Return if propagated lemma is redundant ( #6791 )
...
* Give users ability to see if propagation failed
* Skip propagations in the new core if they are already satisfied
2023-07-07 09:58:41 -07:00
Nikolaj Bjorner
f645bcf605
add direct detection for integer expressions
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-07 09:54:18 -07:00
Nikolaj Bjorner
f450bc4ae0
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-07 09:29:49 -07:00
Nikolaj Bjorner
8c7525c97f
revert log addition
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-07 09:29:38 -07:00
Nikolaj Bjorner
0ab102cbec
fix coefficient extraction and passing in Farkas lemmas, thanks to H. F. Bryant
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-07 09:28:47 -07:00
Lev Nachmanson
ff875c936f
add TRACE stmts, more efficient remove from inf_heap
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-07-06 16:45:22 -07:00
Lev Nachmanson
167e0dc66d
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-06 15:07:32 -07:00
Lev Nachmanson
4e327babda
remove dead code
2023-07-06 15:07:26 -07:00
Nikolaj Bjorner
68663fd97a
fix indentation for python file
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-06 09:02:58 -07:00
Nikolaj Bjorner
3782eb1be4
fix #6785
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-05 19:50:07 -07:00
Nikolaj Bjorner
f4b87b3763
fix memory smash in euf completion
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-05 13:04:49 -07:00
Nikolaj Bjorner
14f69c6c01
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-05 12:58:23 -07:00
Nikolaj Bjorner
4ad3324d2e
fixes to trim
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-05 12:58:17 -07:00
Lev Nachmanson
1c907e8d09
add a comment
2023-07-05 09:14:57 -07:00
Lev Nachmanson
e360de6d71
improve tracing and a small fix in
...
lp_core_solver_base::make_column_feasible
2023-07-04 13:23:56 -07:00
Lev Nachmanson
8a49cf62f4
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-04 11:38:20 -07:00
Lev Nachmanson
75897b7a2e
a small change in trace feas
2023-07-04 11:38:10 -07:00
Nikolaj Bjorner
f0d3cbe39d
add dependency tracking to proof from trim
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-04 16:24:09 +02:00
Nikolaj Bjorner
abf5aff0b3
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-04 09:13:12 +02:00
Nikolaj Bjorner
ae29a54876
categorize theory axioms as inferences in output to capture justifications
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-04 09:12:58 +02:00
Lev Nachmanson
5ed2a82893
set clang format off for lp files ( #6795 )
...
* adding // clang-format off
* set clang-format off at the beginning of lp files
* set clang-format off
* remove dead code
2023-07-03 17:35:16 -07:00
Nikolaj Bjorner
47fc0cf75c
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-03 19:30:24 +02:00
Nikolaj Bjorner
d9e7b8c21f
fixes to trim
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-03 19:26:19 +02:00
Lev Nachmanson
61948fa1ff
find minimal deltas in patching
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-07-01 07:48:07 -07:00
Lev Nachmanson
f5d9ffaca1
clean up and add clang-format off
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-06-30 11:57:42 -07:00
Lev Nachmanson
30a2ced9aa
patching merge ( #6780 )
...
* patching merge
* fix the format and some warnings
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
* a fix in the delta calculation
* test patching
* try a new version of get_patching_deltas
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
* remove dead code from lp_tst and try optimizing patching
* add comments, replace VERIFY with lp_assert
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
* cleanup
---------
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-06-27 17:53:27 -07:00
Nikolaj Bjorner
b2c035ea3f
missing negation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-26 18:46:03 -07:00
Clemens Eisenhofer
d42693d5b5
Equalities in C# UP-Propagation ( #6786 )
...
* Query Boolean Assignment in the UP
* UP's decide ref arguments => next_split
* Fixed wrapper
* More fixes
* Equalities in C# UP-Propagation
---------
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-26 10:59:57 -07:00
Nikolaj Bjorner
7221c84156
fix #6783
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-25 21:21:06 -07:00
Nikolaj Bjorner
b451735aa0
fix #6778
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-25 21:08:13 -07:00
Guido Martínez
7c380fd6a0
bool_rewriter: fix possible segfault when disabling rewriter.sort_disjunctions ( #6779 )
...
After introducing the rewriter.sort_disjunctions option (#6774 ), I
noticed a segfault in a Z3 run that was working fine for me before the
PR.
I traced the difference to a slight discrepancy between the first patch
I submitted and the one we ended up merging: my first version would skip
sorting the disjuncts in mk_nflat_core, but still return BR_DONE, while
the patch in master returns BR_FAILED instead.
This patch fixes that problem, and it makes slightly more sense to me to
return a BR_DONE since, if `s` is true, some disjunct (e.g. a `false`
or a repeat) might have been simplified away. However I don't fully
understand this code.
... and I can't say I understand why the segfault happens. Perhaps that
is a separate issue?
This is the file to reproduce:
https://gist.github.com/mtzguido/b7360c74d3d2e42d89f1bd9149ad26f6
Here's a stack trace of the failure, mk_nflat_or_core is not involved.
```
(gdb) where
#0 0x0000555555b98497 in smt::context::get_lit_assignment(unsigned int) const ()
#1 0x0000555555b984cb in smt::context::get_assignment(sat::literal) const ()
#2 0x0000555555b98504 in smt::context::get_assignment(unsigned int) const ()
#3 0x0000555555ca83b8 in smt::context::get_assignment_core(expr*) const ()
#4 0x0000555555c9af5a in smt::context::get_assignment(expr*) const ()
#5 0x0000555555d7bd1d in (anonymous namespace)::has_child_assigned_to(smt::context&, app*, lbool, expr*&, unsigned int) ()
#6 0x0000555555d7c413 in (anonymous namespace)::rel_case_split_queue::next_case_split_core(ptr_vector<expr>&, unsigned int&, unsigned int&, lbool&) ()
#7 0x0000555555d7c589 in (anonymous namespace)::rel_case_split_queue::next_case_split(unsigned int&, lbool&) ()
#8 0x0000555555c9c1b7 in smt::context::decide() ()
#9 0x0000555555ca39fd in smt::context::bounded_search() ()
#10 0x0000555555ca30c2 in smt::context::search() ()
#11 0x0000555555ca273d in smt::context::check(unsigned int, expr* const*, bool) ()
#12 0x0000555555cb166a in smt::kernel::check(unsigned int, expr* const*) ()
#13 0x0000555555cb9695 in (anonymous namespace)::smt_solver::check_sat_core2(unsigned int, expr* const*) ()
#14 0x00005555560dc0c6 in solver_na2as::check_sat_core(unsigned int, expr* const*) ()
#15 0x00005555560d73f3 in combined_solver::check_sat_core(unsigned int, expr* const*) ()
#16 0x00005555560d34e3 in solver::check_sat(unsigned int, expr* const*) ()
#17 0x0000555556097b26 in cmd_context::check_sat(unsigned int, expr* const*) ()
#18 0x0000555556082ff0 in smt2::parser::parse_check_sat() ()
#19 0x0000555556084dc0 in smt2::parser::parse_cmd() ()
#20 0x00005555560861b6 in smt2::parser::operator()() ()
#21 0x00005555560757e6 in parse_smt2_commands(cmd_context&, std::basic_istream<char, std::char_traits<char> >&, bool, params_ref const&, char const*) ()
#22 0x00005555555e8f68 in read_smtlib2_commands(char const*) ()
#23 0x00005555555ee6f6 in main ()
(gdb)
```
2023-06-23 11:45:29 -07:00
Nikolaj Bjorner
1b263f85e4
compile numeral constants into separate variables in the new core
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-21 09:36:20 -07:00
Guido Martínez
3517361a73
Adding some options in support of F* ( #6774 )
...
* patterns: add option for pattern decomposition (pi.decompose_patterns)
True by default, retaining current behavior.
* rewriter: add option for sorting of disjunctions (rewriter.sort_disjunctions)
True by default, retaining current behavior.
2023-06-20 16:10:37 -07:00
Nikolaj Bjorner
eb1caee18a
compile constants into different variables instead of reusing a single variable 1 and coefficients. It delays introducing large coefficients and allows more efficient bounds propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-20 16:09:34 -07:00
Lev Nachmanson
32ec02778e
use heap to track infeasible columns. ( #6771 )
...
* use heap to track infeasible columns
* fix the formatting
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
---------
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-06-19 13:50:14 -07:00
Nikolaj Bjorner
4d44e60c33
fix #6757
2023-06-18 16:36:26 -07:00
Nikolaj Bjorner
df77541aae
#6758
...
check-assumptions with compound formulas create fresh proxy variables both during compilation to internal format and for the assumptions. These fresh variables may occur in lemmas that are created during search. The lemmas are garbage for future check-sats, but the solver needs to be allowed to invoke GC. Adding a GC call before a check-sat with assumptions allows removing some lemmas every time a new assumptions are used. Eager GC when using assumptions is used elsewhere, for example in cube&conquer scenarios where lemmas learned from one set of assumptions are less likely to be useful for other assumptions.
With the GC invocation memory grows at a lesser pace. However, it is not entirely free of memory increases. To avoid memory bloat, have the solver pre-compile the assumptions by defining them as propositional variables, add assertions that the propositional variables are equivalent to the compound formulas and use the propositional variables as assumptions. The same propositional variables come with no extra overhead when invoking check-assumptions. The lemmas are then over the same fixed vocabulary. It is generally a good idea to recycle useful lemmas during the enumeration pass.
2023-06-18 16:21:41 -07:00
Nikolaj Bjorner
5f22e98396
fix #6766
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-18 10:05:34 -07:00
tcely
b93171de78
pattern_inference.h: include rewriter_def.h ( #6765 )
...
Needed to use the `rewriter_tpl` constructor.
2023-06-16 08:46:40 -07:00
Nikolaj Bjorner
cc4ac0e65a
add guard for eq adapter
2023-06-13 16:39:53 -07:00
Nikolaj Bjorner
ac00306355
fix context simplification
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-09 11:30:56 -07:00
Nikolaj Bjorner
d0085b41c1
disable breaking change
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-09 11:15:54 -07:00
Nikolaj Bjorner
555ccc8aab
simplify bounds by subsumption checks
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-09 10:21:45 -07:00
Lev Nachmanson
1006955215
get cached tv value ( #6756 )
2023-06-08 19:46:38 -07:00
Lev Nachmanson
f7ec5c5c64
fix sort_non_basis ( #6755 )
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-06-08 13:08:09 -07:00
Nikolaj Bjorner
1d62964c58
avoid name clash for multiple special relations #6743
2023-06-07 17:55:11 -07:00
Nikolaj Bjorner
ab4b7c50ed
fix #6749
2023-06-07 16:09:50 -07:00
Nikolaj Bjorner
06a8987314
fix #6748
...
destructive equality resolution uses an occurs check function that is only safe for quantifier-free formulas. In the special case where a bound variable is Boolean and occurs on a side of an equality the other side cannot have a quantifier.
2023-06-07 15:59:39 -07:00
Jakob Rath
57e92b2a59
Fix bvnego ( #6750 )
2023-06-07 11:24:40 -07:00
Nikolaj Bjorner
73c3f34d66
remove debug output
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-06 16:37:24 -07:00
Nikolaj Bjorner
2bff0a6b8a
regression on quantifier weight computation when weights are 0 vs non-0. It modifies a change made for the fix of #2667 . That fix caused a regression in F*. Reported @mtzguido
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-06 16:35:37 -07:00
Nikolaj Bjorner
68f43ac7a4
make der selective to configuration. For F*, quantifiers are hand or machine generated in specific formats and the tool depends on e-matching to use precisely the format of the quantifiers that have been entered. For other cases of quantifiers, destructive equality resolution (der) can be expected to offer simplifications
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-06 16:15:04 -07:00
Nikolaj Bjorner
81068981aa
fix #6746 , fix type errors in java bindings
2023-06-03 09:41:29 +02:00
Clemens Eisenhofer
82667bd86b
Fix UP's decide callback ( #6707 )
...
* Query Boolean Assignment in the UP
* UP's decide ref arguments => next_split
* Fixed wrapper
* More fixes
2023-06-02 09:52:54 +02:00
Nikolaj Bjorner
d59bf55539
fix formatting bug reported by Alex Nutz
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-05-30 22:19:42 +02:00
Nikolaj Bjorner
621f1f8a85
sanity check parameters #6737
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-05-30 09:44:06 +02:00
Manuel Carrasco
230306ddfc
Add solver::interrupt to Python's API. ( #6739 )
2023-05-28 21:04:36 +02:00