Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Z3 to 4.13.4 #205

Merged
merged 415 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
415 commits
Select commit Hold shift + click to select a range
ea417bb
Update README.md
NikolajBjorner Aug 28, 2024
cd89867
add back auditwheel
NikolajBjorner Aug 28, 2024
ea93f07
Update azure-pipelines.yml
NikolajBjorner Aug 28, 2024
c79477a
update nightly
NikolajBjorner Aug 29, 2024
59853d0
Update nightly.yaml
NikolajBjorner Aug 29, 2024
96417d4
Update nightly.yaml
NikolajBjorner Aug 29, 2024
dcdb7c4
wheelhouse
NikolajBjorner Aug 29, 2024
84b2c21
Update nightly.yaml for Azure Pipelines
NikolajBjorner Aug 30, 2024
46d602e
update gitignore to prepare for genaiscript
NikolajBjorner Aug 30, 2024
9a87bb1
#7362
NikolajBjorner Aug 30, 2024
01a4195
#7362
NikolajBjorner Aug 30, 2024
a1bcf13
fix build
NikolajBjorner Aug 31, 2024
a3eb2ff
revert update to vector for testing #6902
NikolajBjorner Aug 31, 2024
ef58376
replace a few old-school constructors for a 0.5% reduction in code size
nunoplopes Sep 2, 2024
db4176a
#6902
NikolajBjorner Sep 3, 2024
6086a30
Add reference URL to GenAI script file for auto Git commit guide
NikolajBjorner Sep 3, 2024
5237e7d
Adjust memory reallocation to consider SIZE_T_ALIGN in memory_manager
NikolajBjorner Sep 3, 2024
0837e3b
Fix nightly (#7365)
rhelmot Sep 3, 2024
8061765
remove default destructors & some default constructors
nunoplopes Sep 4, 2024
1ace3d0
fix #7372
NikolajBjorner Sep 12, 2024
99a9a4a
fix #7372
NikolajBjorner Sep 12, 2024
0ba306e
y
NikolajBjorner Sep 17, 2024
48712b4
Add initial value setting for variables in Z3 API, solver, and optimi…
NikolajBjorner Sep 18, 2024
0f89650
Add initial value setting API for solver and optimize contexts and up…
NikolajBjorner Sep 18, 2024
1c163db
remove output
NikolajBjorner Sep 18, 2024
a3f35b6
Add command to set initial value hints for solver in various components
NikolajBjorner Sep 18, 2024
4896edf
Add tracking of values size in scoped_state push method in opt_context
NikolajBjorner Sep 19, 2024
8349ee0
Add support for const array in all logics as per issue #7383
NikolajBjorner Sep 19, 2024
b99c4a4
Add override specifiers to methods in set_initial_value_cmd class for…
NikolajBjorner Sep 19, 2024
342dccd
correctly process cancellation in gomory cuts
levnach Sep 19, 2024
0c48a50
Add support for initializing variable values in solver and optimize c…
NikolajBjorner Sep 19, 2024
d66609e
fix #7389
NikolajBjorner Sep 21, 2024
fa7fc8e
Refactor bv_rewriter functions using unified variable assignment and …
NikolajBjorner Sep 22, 2024
ba5cec7
additional rewrites for bv2int
NikolajBjorner Sep 22, 2024
a9f8ec1
updated handling of value initialization for bit-vectors
NikolajBjorner Sep 22, 2024
96c1375
#7391
NikolajBjorner Sep 22, 2024
1e580a7
update to c++20, remove debug output
NikolajBjorner Sep 22, 2024
1121815
Standardize C++20 flag across different platforms in build script
NikolajBjorner Sep 22, 2024
22d9bfa
fix warning with iterators due to non-const comparator
nunoplopes Sep 23, 2024
a62fede
remove a few default constructors
nunoplopes Sep 23, 2024
4b4a282
Add const qualifiers to comparison operators and update iterator equa…
NikolajBjorner Sep 23, 2024
737c220
delete more default constructors
nunoplopes Sep 23, 2024
499ed5d
remove unneeded iterator functions
nunoplopes Sep 23, 2024
eb8c630
Refactor and fix uninitialized variables and improve function consist…
NikolajBjorner Sep 23, 2024
ee34773
remove junk
NikolajBjorner Sep 23, 2024
5c58329
Remove unnecessary const qualifiers from comparison operator overload…
NikolajBjorner Sep 23, 2024
5a6dc18
Override convert_initialize_value method in bit_blaster_model_convert…
NikolajBjorner Sep 23, 2024
0604d23
Check if model_converter is non-null before initializing values in sa…
NikolajBjorner Sep 23, 2024
95d2e00
Update OCaml jobs to use Ubuntu-latest in Azure Pipelines configuration
NikolajBjorner Sep 23, 2024
ec14ef7
Update Ubuntu job name in Azure pipeline and add string variable crea…
NikolajBjorner Sep 23, 2024
c34c847
Add .gitattributes for genaiscript and update git commit flow script.…
pelikhan Sep 23, 2024
fa1a2cd
disable simple check in nlsat
levnach Sep 23, 2024
afaa48d
sample fix script
NikolajBjorner Sep 23, 2024
a831fe9
fix some build warnings
NikolajBjorner Sep 24, 2024
716a815
update lock file
NikolajBjorner Sep 24, 2024
994056f
C API now used by Julia. (#7387)
PallHaraldsson Sep 24, 2024
8b81bda
Julia now used the C API. (#7388)
PallHaraldsson Sep 24, 2024
2655301
comment out simple proofs unit test
NikolajBjorner Sep 24, 2024
eb5d036
fix #7392
NikolajBjorner Sep 25, 2024
82eb186
remove ubuntu build 20 from nightly
NikolajBjorner Sep 25, 2024
103c5ad
wasm: attempt to GC in tests (#7400)
bakkot Sep 25, 2024
77aa528
wasm: increase timeout in tests (#7401)
bakkot Sep 25, 2024
c690279
skip pypi publish during dry run
NikolajBjorner Sep 26, 2024
ebdb037
fix indent
NikolajBjorner Sep 26, 2024
b39bcd6
remove ubuntu20
NikolajBjorner Sep 26, 2024
8d831a1
set to macos latest
NikolajBjorner Sep 26, 2024
649c36a
align nightly and release yamls
NikolajBjorner Sep 26, 2024
3df7299
update signature of operator==
NikolajBjorner Sep 26, 2024
f4452a0
pypi publish
NikolajBjorner Sep 26, 2024
d047b86
pypi publish
NikolajBjorner Sep 26, 2024
01cf042
fix #7404, relates to #7400.
NikolajBjorner Sep 27, 2024
40b0210
fixes to lazy tactic uses
NikolajBjorner Sep 27, 2024
11bb19d
make default tactic cases lazy
NikolajBjorner Sep 27, 2024
9a8ff74
update version number and release notes
NikolajBjorner Sep 27, 2024
fc1c6b4
try to build java on linux/arm nightly
NikolajBjorner Sep 30, 2024
2123d38
Update nightly.yaml for Azure Pipelines
NikolajBjorner Sep 30, 2024
c2b2626
remove --java option
NikolajBjorner Sep 30, 2024
2ac6f8b
increment minor revision number
NikolajBjorner Sep 30, 2024
826835f
fixes to build warnings
NikolajBjorner Sep 30, 2024
5413018
Update euf_ac_plugin.cpp
NikolajBjorner Sep 30, 2024
b65afd4
attempt to use uniform java library location under bin #7406
NikolajBjorner Sep 30, 2024
30b4fe6
2nd attempt to use uniform java library location under bin #7406
NikolajBjorner Sep 30, 2024
7da58b9
fix build warnings
NikolajBjorner Sep 30, 2024
2c94a3a
fix build warnings
NikolajBjorner Sep 30, 2024
551cc53
fix un-intialized variable warnings
NikolajBjorner Sep 30, 2024
86b9718
fix build warnings
NikolajBjorner Sep 30, 2024
19f63cd
add sequoia to os versions #7407
NikolajBjorner Sep 30, 2024
4cefc51
add sequoia to os versions #7407
NikolajBjorner Sep 30, 2024
8c39863
fix typo in arch for setup.py
NikolajBjorner Sep 30, 2024
328616b
fix build warnings
NikolajBjorner Oct 1, 2024
c7af973
fixes for #7402
NikolajBjorner Oct 1, 2024
93ff89b
add == for const_ref and ref to disambiguate equality.
NikolajBjorner Oct 2, 2024
d686e92
disambiguate
NikolajBjorner Oct 2, 2024
6dec943
Bump docker/build-push-action from 6.7.0 to 6.9.0 (#7408)
dependabot[bot] Oct 2, 2024
b170f10
reorder template definition
NikolajBjorner Oct 2, 2024
3586b61
remove default destructors
nunoplopes Oct 2, 2024
e58eb9f
fix indentation for mbp
NikolajBjorner Oct 3, 2024
f5db6bf
install Julia for macos build
NikolajBjorner Oct 3, 2024
a98c925
optimize var_subst
NikolajBjorner Oct 4, 2024
66bb310
reset before manager is deallocated
NikolajBjorner Oct 4, 2024
969511a
fixup std-order / inv-order
NikolajBjorner Oct 4, 2024
b60e1a2
fixup variables
NikolajBjorner Oct 4, 2024
2ae4ac8
fix build
NikolajBjorner Oct 4, 2024
24d7b05
refactor and optimize git operations for commit messages and failure …
pelikhan Oct 4, 2024
c6cd25c
mico-tuning
NikolajBjorner Oct 8, 2024
0fec7ef
micro-tuning
NikolajBjorner Oct 8, 2024
8a95dd4
A slice solver option for interactive use case
NikolajBjorner Oct 8, 2024
cfd00ad
add slice solver option to command context
NikolajBjorner Oct 8, 2024
6bd46b0
fix #7363. Replay relevancy on unit literals that are re-asserted dur…
NikolajBjorner Oct 9, 2024
da614c6
remove m_level attribute, use s->get_scope_level directly
NikolajBjorner Oct 9, 2024
48aa2f6
setup python dist to remove internal build suffix for macos
NikolajBjorner Oct 9, 2024
5dc1b1a
remove hard-wired osx=11.0
NikolajBjorner Oct 9, 2024
fe71b75
remove : from setup.py
NikolajBjorner Oct 9, 2024
00f1f1b
fix typo in setup.py
NikolajBjorner Oct 9, 2024
b268b56
update release notes
NikolajBjorner Oct 10, 2024
6e3b99f
downgrade to macos13 in builds until fully supported by pypi
NikolajBjorner Oct 10, 2024
54d30f2
add _0 to platform tag for pypi
NikolajBjorner Oct 10, 2024
efde656
fix recursive self call for slice_solver check-sat-cc method
NikolajBjorner Oct 10, 2024
7a0b58b
increment minor version number
NikolajBjorner Oct 11, 2024
3a8195b
#7419
NikolajBjorner Oct 12, 2024
56b706a
fixes for #7420 #7405
NikolajBjorner Oct 13, 2024
62478db
Update docker-image.yml
NikolajBjorner Oct 14, 2024
5993735
simplify string patterns into prefix/suffix constraints
NikolajBjorner Oct 14, 2024
3896e18
fix the code to cube at the correct frequency (#7422)
stormckey Oct 15, 2024
8ff4036
update unit_lim to the correct value (#7423)
stormckey Oct 16, 2024
5a5e39a
fix incrementality bug for pre-processing: replay has to be invoked o…
NikolajBjorner Oct 16, 2024
92376e6
better model replay for loose entries
NikolajBjorner Oct 16, 2024
a23a8cd
add variables from definitions
NikolajBjorner Oct 17, 2024
5cee19f
It uses C++20 BTW (#7429)
catap Oct 21, 2024
45ef6d0
js: Adding manual release methods (#7428)
HalfdanJ Oct 22, 2024
d18831c
Update sat_ddfw.cpp
NikolajBjorner Oct 20, 2024
253f7d7
fix non-termination bug in elim-unconstrained, add parameter validati…
NikolajBjorner Oct 22, 2024
0ebea1c
remove debug out
NikolajBjorner Oct 22, 2024
78d1139
add shortcut to retrieve kind of application
NikolajBjorner Oct 22, 2024
8b657f2
add shortcut to retrieve kind of application
NikolajBjorner Oct 22, 2024
b0fef64
Add assert_and_track support to Optimize class in .NET binding (#7437)
NikolajBjorner Oct 26, 2024
ecdfab8
fix #7434
NikolajBjorner Oct 29, 2024
91dc02d
Sls (#7439)
NikolajBjorner Nov 2, 2024
604714b
js: Add pseudo-boolean high-level functions (#7426)
HalfdanJ Nov 2, 2024
1957b4d
fix reporting on cancelation when based on cancel flag
NikolajBjorner Nov 2, 2024
9206546
use std::exception as base class to z3_exception
NikolajBjorner Nov 4, 2024
75e4677
Make build process work with pyodide (#7442)
rhelmot Nov 4, 2024
42894f7
add noexcept for signature compatibility
NikolajBjorner Nov 4, 2024
407bad3
add noexcept
NikolajBjorner Nov 4, 2024
a38bf3e
port to inherit from std::exception
NikolajBjorner Nov 4, 2024
abd1674
inherit more exceptions from std::exception
NikolajBjorner Nov 4, 2024
4f060dd
fix #7445
NikolajBjorner Nov 10, 2024
1856ab7
fix #7448
NikolajBjorner Nov 10, 2024
879bb4b
avoid circular dependencies in justifications that get updated. fixes…
NikolajBjorner Nov 11, 2024
30ad22a
fix #7449
NikolajBjorner Nov 11, 2024
1cc808c
fix #7446, by adding rewrite simplification
NikolajBjorner Nov 12, 2024
c0e748a
fix #7446, by adding rewrite simplification
NikolajBjorner Nov 12, 2024
d3009da
Proposed fix for #7451 (#7452)
linusheck Nov 13, 2024
0dc4c5e
Create pyodide.yml
NikolajBjorner Nov 15, 2024
4d0394e
Update pyodide.yml
NikolajBjorner Nov 15, 2024
4cdc3d6
Update pyodide.yml
NikolajBjorner Nov 15, 2024
e53ea00
Update pyodide.yml
NikolajBjorner Nov 15, 2024
75d0dd8
Update pyodide.yml
NikolajBjorner Nov 15, 2024
eab49da
Update pyodide.yml
NikolajBjorner Nov 15, 2024
3fed840
update pyodide.yml
rhelmot Nov 15, 2024
62db764
refine rewriting depth for lt constraints
NikolajBjorner Nov 15, 2024
6eae3f0
add cases for unconstrained sequences and strings
NikolajBjorner Nov 15, 2024
6a9d591
add method for resetting limit
NikolajBjorner Nov 15, 2024
8e3b9f6
add sequential option for SLS, fixes to import/export methods SLS<->SMT
NikolajBjorner Nov 15, 2024
ca6ec0d
fixes to pyodide action
NikolajBjorner Nov 15, 2024
3f40798
build fixes
NikolajBjorner Nov 15, 2024
77eacef
build fixes
NikolajBjorner Nov 15, 2024
1d8a904
build fixes
NikolajBjorner Nov 15, 2024
ea590de
remove breaking experiment
NikolajBjorner Nov 15, 2024
8804890
Update pyodide.yml
NikolajBjorner Nov 15, 2024
ccbe6c3
fixes
NikolajBjorner Nov 15, 2024
aab6c1e
Update pyodide.yml
NikolajBjorner Nov 16, 2024
329e1dd
Update pyodide.yml
NikolajBjorner Nov 16, 2024
231248d
Update pyodide.yml
NikolajBjorner Nov 16, 2024
704278c
Update pyodide.yml
NikolajBjorner Nov 16, 2024
dba1674
Update pyodide.yml
NikolajBjorner Nov 16, 2024
24f9a86
Update pyodide.yml
NikolajBjorner Nov 16, 2024
751d666
Update pyodide.yml
NikolajBjorner Nov 16, 2024
bd5f8b1
Update pyodide.yml
NikolajBjorner Nov 16, 2024
e7d0833
Update pyodide.yml
NikolajBjorner Nov 16, 2024
60b14f3
Update pyodide.yml
NikolajBjorner Nov 16, 2024
8bfe403
Update pyodide.yml
NikolajBjorner Nov 16, 2024
7c5ff7c
moving compile time flags to setup for pyodide
NikolajBjorner Nov 16, 2024
197951c
fixes to sls
NikolajBjorner Nov 16, 2024
f39198d
move build-env setting to correct place
NikolajBjorner Nov 16, 2024
b929996
update to set single threaded
NikolajBjorner Nov 16, 2024
e4e5735
update to set single threaded
NikolajBjorner Nov 16, 2024
f64d077
fix re-entrancy bug during flip in arith_base
NikolajBjorner Nov 16, 2024
750dd68
enable par_then and par_or even if single threaded - fall back to seq…
NikolajBjorner Nov 16, 2024
00c5600
Update pyodide.yml
NikolajBjorner Nov 16, 2024
cdc4833
Update pyodide.yml
NikolajBjorner Nov 16, 2024
836802e
Update pyodide.yml
NikolajBjorner Nov 16, 2024
5fd1231
incorporate ls during propagation
NikolajBjorner Nov 16, 2024
2310514
fix #7454
NikolajBjorner Nov 17, 2024
e380903
Update README.md
NikolajBjorner Nov 17, 2024
c7ea496
bug fixes to sls
NikolajBjorner Nov 17, 2024
84447b7
remove incremental mode from EUF, include statistics about restart vs…
NikolajBjorner Nov 18, 2024
4b72e51
SLS: log clause , allow more frequent export of SLS state to SMT
NikolajBjorner Nov 18, 2024
24dfc17
Update README.md
NikolajBjorner Nov 18, 2024
15f954e
add picture of z3guide
NikolajBjorner Nov 18, 2024
a8a5069
Update README.md
NikolajBjorner Nov 18, 2024
5168a13
track exceptions in reason-unknown
NikolajBjorner Nov 19, 2024
e855a50
add exception handling to easier diagnose #7418
NikolajBjorner Nov 19, 2024
7de0c29
Update pyodide.yml
NikolajBjorner Nov 19, 2024
012fc1b
more detailed tracing of where unmaterialized exceptions happen
NikolajBjorner Nov 20, 2024
10d9c81
adapt for pyodide built
NikolajBjorner Nov 20, 2024
8965123
fix type in setup.py
NikolajBjorner Nov 20, 2024
76795a4
remove -pthread from options
NikolajBjorner Nov 20, 2024
94f0aff
remove the use-pthread
NikolajBjorner Nov 20, 2024
71bad71
#7418 - circumvent use of timer threads to make WASM integration of z…
NikolajBjorner Nov 21, 2024
3672575
fix typos POLING -> POLLING in setup.py and remove unused CFLAGS
NikolajBjorner Nov 21, 2024
b4e768c
adding plugin for local search strings
NikolajBjorner Nov 22, 2024
4559b23
add local search functionality to sls_seq_plugin
NikolajBjorner Nov 24, 2024
7ed185a
add comments
NikolajBjorner Nov 25, 2024
1e839e5
add missing new_value_eh when repaired up
NikolajBjorner Nov 25, 2024
aed3279
add missing new_value_eh when repaired up
NikolajBjorner Nov 25, 2024
b143a95
add notes and additional functions to sls-seq
NikolajBjorner Nov 25, 2024
fce377e
add basic regex functions
NikolajBjorner Nov 26, 2024
1e62029
use ztring
NikolajBjorner Nov 26, 2024
1ccfba6
remove unreachble code
nunoplopes Nov 27, 2024
ab1be5c
internalize the reduce_args_tactic to reduce the number of heap alloc…
nunoplopes Nov 27, 2024
b7b611d
inherit from std::exception
NikolajBjorner Nov 27, 2024
d241156
add projection with witnesses
NikolajBjorner Nov 27, 2024
05e0532
add facility to solve for a linear term over API
NikolajBjorner Nov 30, 2024
24c3cd3
add v0 of equality solver
NikolajBjorner Dec 1, 2024
e6feb84
sls: fix bug where unsat remains empty after a literal is flipped. Th…
NikolajBjorner Dec 2, 2024
aec8675
updates to equality solving search
NikolajBjorner Dec 2, 2024
6ea4110
Bump docker/build-push-action from 6.9.0 to 6.10.0 (#7469)
dependabot[bot] Dec 2, 2024
a17d4e6
bugfix to elim_uncnstr to ensure nodes are created. Prepare smt_inter…
NikolajBjorner Dec 4, 2024
4be4067
Typescript high-level api for Sets (#7471)
YuantianDing Dec 5, 2024
bcb61ee
v0 of edit distance repair
NikolajBjorner Dec 5, 2024
1ab0962
partial fix to make computed term integer well-formed for solve_for f…
NikolajBjorner Dec 6, 2024
4fbf54a
fixes to regex membership and edit updates
NikolajBjorner Dec 6, 2024
e5f8327
Update emscripten (#7473)
bakkot Dec 7, 2024
8f5658b
add another baseline heuristic for string equalities, add cases for a…
NikolajBjorner Dec 9, 2024
e8c2360
fix #7461
NikolajBjorner Dec 10, 2024
1e5c59a
add repair step for str.replace
NikolajBjorner Dec 12, 2024
b429562
Add __enter__ and __exit__ methods on Optimize class (#7477)
BarrensZeppelin Dec 13, 2024
538f74d
extract stats with finalize for parallel mode
NikolajBjorner Dec 13, 2024
31ee56c
wip - incremental edit distance algorithm
NikolajBjorner Dec 13, 2024
b529a58
add unit test for incremental equation edit distance with repair
NikolajBjorner Dec 15, 2024
e40972b
Update release.yml
NikolajBjorner Dec 15, 2024
200ef23
Update RELEASE_NOTES.md
NikolajBjorner Dec 15, 2024
a97ad76
publish pypi
NikolajBjorner Dec 15, 2024
a6e59ea
fix build flags for release.yaml
NikolajBjorner Dec 16, 2024
6f24123
reduce hash table lookups in expr_abstract in half
nunoplopes Dec 16, 2024
d935db5
Merge branch 'master' into new_z3_4.13.4
jurajsic Dec 31, 2024
983a432
turn off new rewriter rule which makes noodler not work correctly
jurajsic Jan 1, 2025
de1d253
remove the file that was supposed to be removed
jurajsic Jan 1, 2025
63d1ccd
update version of Z3 in readme
jurajsic Jan 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
* reorg sls

* sls

* na

* split into base and plugin

* move sat_params to params directory, add op_def repair options

* move sat_ddfw to sls, initiate sls-bv-plugin

* porting bv-sls

* adding basic plugin

* na

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

* add sls-sms solver

* bv updates

* updated dependencies

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

* updated dependencies

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

* use portable ptr-initializer

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

* move definitions to cpp

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

* use template<> syntax

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

* fix compiler errors for gcc

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

* Bump docker/build-push-action from 6.0.0 to 6.1.0 (Z3Prover#7265)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v6.0.0...v6.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* set clean shutdown for local search and re-enable local search when it parallelizes with PB solver

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

* Bump docker/build-push-action from 6.1.0 to 6.2.0 (Z3Prover#7269)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix a comment for Z3_solver_from_string (Z3Prover#7271)

Z3_solver_from_string accepts a string buffer with solver
assertions, not a string buffer with filename.

* trigger the build with a comment change

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* remove macro distinction Z3Prover#7270

* fix Z3Prover#7268

* kludge to address Z3Prover#7232, probably superseeded by planned revision to setup/pypi

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

* add new ema invariant (Z3Prover#7288)

* Bump docker/build-push-action from 6.2.0 to 6.3.0 (Z3Prover#7280)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* merge

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

* fix unit test build

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

* remove shared attribute

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

* remove stale files

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

* fix build of unit test

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

* fixes and rename sls-cc to sls-euf-plugin

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

* na

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

* testing / debugging arithmetic

* updates to repair logic, mainly arithmetic

* fixes to sls

* evolve sls arith

* bugfixes in sls-arith

* fix typo

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

* bug fixes

* Update sls_test.cpp

* fixes

* fixes

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

* fix build

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

* refactor basic plugin and clause generation

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

* fixes to ite and other

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

* updates

* update

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

* fix division by 0

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

* disable fail restart

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

* disable tabu when using reset moves

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

* update sls_test

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

* add factoring

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

* fixes to semantics

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

* re-add tabu override

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

* generalize factoring

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

* fix bug

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

* remove restart

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

* disable tabu in fallback modes

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

* localize impact of factoring

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

* delay factoring

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

* flatten products

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

* perform lookahead update + nested mul

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

* disable nested mul

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

* disable nested mul, use non-lookahead

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

* make reset updates recursive

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

* include linear moves

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

* include 5% reset probability

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

* separate linear update

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

* separate linear update remove 20% threshold

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

* remove linear opt

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

* enable multiplier expansion, enable linear move

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

* use unit coefficients for muls

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

* disable non-tabu version of find_nl_moves

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

* remove coefficient from multiplication definition

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

* reorg monomials

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

* add smt params to path

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

* avoid negative reward

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

* use reward as proxy for score

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

* use reward as proxy for score

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

* use exponential decay with breaks

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

* use std::pow

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

* fixes to bv

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

* fixes to fixed

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

* fixup repairs

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

* reserve for multiplication

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

* fixing repair

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

* include bounds checks in set random

* na

* fixes to mul

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

* fix mul inverse

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

* fixes to handling signed operators

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

* logging and fixes

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

* gcm

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

* peli

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

* Add .env to gitignore to prevent environment files from being tracked

* Add m_num_pelis counter to stats in sls_context

* Remove m_num_pelis member from stats struct in sls_context

* Enhance bv_sls_eval with improved repair and logging, refine is_bv_predicate in sls_bv_plugin

* Remove verbose logging in register_term function of sls_basic_plugin and fix formatting in sls_context

* Rename source files for consistency in `src/ast/sls` directory

* Refactor bv_sls files to sls_bv with namespace and class name adjustments

* Remove typename from member declarations in bv_fixed class

* fixing conca

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

* Add initial implementation of bit-vector SLS evaluation module in bv_sls_eval.cpp

* Remove bv_sls_eval.cpp as part of code cleanup and refactoring

* Refactor alignment of member variables in bv_plugin of sls namespace

* Rename SLS engine related files to reflect their specific use for bit-vectors

* Refactor SLS engine and evaluator components for bit-vector specifics and adjust memory manager alignment

* Enhance bv_eval with use_current, lookahead strategies, and randomization improvements in SLS module

* Refactor verbose logging and fix logic in range adjustment functions in sls bv modules

* Remove commented verbose output in sls_bv_plugin.cpp during repair process

* Add early return after setting fixed subterms in sls_bv_fixed.cpp

* Remove redundant return statement in sls_bv_fixed.cpp

* fixes to new value propagation

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

* Refactor sls bv evaluation and fix logic checks for bit operations

* Add array plugin support and update bv_eval in ast_sls module

* Add array, model value, and user sort plugins to SLS module with enhancements in array propagation logic

* Refactor array_plugin in sls to improve handling of select expressions with multiple arguments

* Enhance array plugin with early termination and propagation verification, and improve euf and user sort plugins with propagation adjustments and debugging enhancements

* Add support for handling 'distinct' expressions in SLS context and user sort plugin

* Remove model value and user sort plugins from SLS theory

* replace user plugin by euf plugin

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

* remove extra file

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

* Refactor handling of term registration and enhance distinct handling in sls_euf_plugin

* Add TODO list for enhancements in sls_euf_plugin.cpp

* add incremental mode

* updated package

* fix sls build

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

* break sls build

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

* fix build

* break build again

* fix build

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

* fixes

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

* fixing incremental

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

* avoid units

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

* fixup handling of disequality propagation

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

* fx

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

* recover shift-weight loop

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

* alternate

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

* throttle save model

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

* allow for alternating

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

* fix test for new signature of flip

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

* bug fixes

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

* restore use of value_hash

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

* fixes

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

* adding dt plugin

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

* adt

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

* dt updates

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

* added cycle detection

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

* updated sls-datatype

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

* Refactor context management, improve datatype handling, and enhance logging in sls plugins.

* axiomatize dt

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

* add missing factory plugins to model

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

* fixup finite domain search

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

* fixup finite domain search

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

* fixes

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

* redo dfs

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

* fixing model construction for underspecified operators

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

* fixes to occurs check

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

* fixup interpretation building

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

* saturate worklist

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

* delay distinct axiom

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

* adding model-based sls for datatatypes

* update the interface in sls_solver to transfer phase between SAT and SLS

* add value transfer option

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

* rename aux functions

* Track shared variables using a unit set

* debugging parallel integration

* fix dirty flag setting

* update log level

* add plugin to smt_context, factor out sls_smt_plugin functionality.

* bug fixes

* fixes

* use common infrastructure for sls-smt

* fix build

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

* fix build

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

* remove declaration of context

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

* add virtual destructor

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

* build warnings

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

* reorder inclusion order to define smt_context before theory_sls

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

* change namespace for single threaded

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

* check delayed eqs before nla

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

* use independent completion flag for sls to avoid conflating with genuine cancelation

* validate sls-arith lemmas

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

* bugfixes

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

* add intblast to legacy SMT solver

* fixup model generation for theory_intblast

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

* na

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

* mk_value needs to accept more cases where integer expression doesn't evalate

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

* use th-axioms to track origins of assertions

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

* add missing operator handling for bitwise operators

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

* add missing operator handling for bitwise operators

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

* normalizing inequality

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

* add virtual destructor

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

* rework elim_unconstrained

* fix non-termination

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

* use glue as computed without adjustment

* update model generation to fix model bug

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

* fixes to model construction

* remove package and package lock

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

* fix build warning

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

* use original gai

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

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Bronnikov <estetus@gmail.com>
Co-authored-by: Lev Nachmanson <levnach@hotmail.com>
Co-authored-by: LiviaSun <33578456+ChuyueSun@users.noreply.github.com>
  • Loading branch information
5 people authored Nov 2, 2024
commit 91dc02d8628ef791b7e10c21318de49db98572d8
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rebase.cmd
callgrind.out.*
# .hpp files are automatically generated
*.hpp
.env
.z3-trace
.env
.genaiscript
Expand All @@ -28,6 +29,8 @@ ocamlz3
# Emacs temp files
\#*\#
# Directories with generated code and documentation
node_modules/*
.genaiscript/*
release/*
build/*
trace/*
Expand Down Expand Up @@ -105,3 +108,4 @@ CMakeSettings.json
.DS_Store
dbg/**
*.wsp
CppProperties.json
14 changes: 7 additions & 7 deletions scripts/mk_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ def init_project_def():
add_lib('parser_util', ['ast'], 'parsers/util')
add_lib('euf', ['ast'], 'ast/euf')
add_lib('grobner', ['ast', 'dd', 'simplex'], 'math/grobner')
add_lib('sat', ['params', 'util', 'dd', 'grobner'])
add_lib('nlsat', ['polynomial', 'sat'])
add_lib('lp', ['util', 'nlsat', 'grobner', 'interval', 'smt_params'], 'math/lp')
add_lib('rewriter', ['ast', 'polynomial', 'interval', 'automata', 'params'], 'ast/rewriter')
add_lib('bit_blaster', ['rewriter'], 'ast/rewriter/bit_blaster')
add_lib('normal_forms', ['rewriter'], 'ast/normal_forms')
add_lib('substitution', ['rewriter'], 'ast/substitution')
add_lib('proofs', ['rewriter'], 'ast/proofs')
add_lib('macros', ['rewriter'], 'ast/macros')
add_lib('model', ['macros'])
add_lib('converters', ['model'], 'ast/converters')
add_lib('ast_sls', ['ast','normal_forms','converters','smt_params','euf'], 'ast/sls')
add_lib('sat', ['params', 'util', 'dd', 'ast_sls', 'grobner'])
add_lib('nlsat', ['polynomial', 'sat'])
add_lib('lp', ['util', 'nlsat', 'grobner', 'interval', 'smt_params'], 'math/lp')
add_lib('bit_blaster', ['rewriter'], 'ast/rewriter/bit_blaster')
add_lib('substitution', ['rewriter'], 'ast/substitution')
add_lib('proofs', ['rewriter'], 'ast/proofs')
add_lib('simplifiers', ['euf', 'normal_forms', 'bit_blaster', 'converters', 'substitution'], 'ast/simplifiers')
add_lib('ast_sls', ['ast','normal_forms','converters'], 'ast/sls')
add_lib('tactic', ['simplifiers'])
add_lib('mbp', ['model', 'simplex'], 'qe/mbp')
add_lib('qe_lite', ['tactic', 'mbp'], 'qe/lite')
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ add_subdirectory(ast/euf)
add_subdirectory(ast/converters)
add_subdirectory(ast/substitution)
add_subdirectory(ast/simplifiers)
add_subdirectory(ast/sls)
add_subdirectory(tactic)
add_subdirectory(qe/mbp)
add_subdirectory(qe/lite)
Expand All @@ -74,6 +73,7 @@ add_subdirectory(parsers/smt2)
add_subdirectory(solver/assertions)
add_subdirectory(ast/pattern)
add_subdirectory(math/lp)
add_subdirectory(ast/sls)
add_subdirectory(sat/smt)
add_subdirectory(sat/tactic)
add_subdirectory(nlsat/tactic)
Expand Down
1 change: 1 addition & 0 deletions src/ast/arith_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ class arith_recognizers {
MATCH_BINARY(is_div0);
MATCH_BINARY(is_idiv0);
MATCH_BINARY(is_power);
MATCH_BINARY(is_power0);

MATCH_UNARY(is_sin);
MATCH_UNARY(is_asin);
Expand Down
2 changes: 1 addition & 1 deletion src/ast/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ ast * ast_manager::register_node_core(ast * n) {

n->m_id = is_decl(n) ? m_decl_id_gen.mk() : m_expr_id_gen.mk();

// track_id(*this, n, 77);
// track_id(*this, n, 9213);

// TRACE("ast", tout << (s_count++) << " Object " << n->m_id << " was created.\n";);
TRACE("mk_var_bug", tout << "mk_ast: " << n->m_id << "\n";);
Expand Down
4 changes: 2 additions & 2 deletions src/ast/bv_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,13 +932,13 @@ unsigned bv_util::get_int2bv_size(parameter const& p) {
return static_cast<unsigned>(sz);
}

app * bv_util::mk_bv2int(expr* e) {
app * bv_util::mk_bv2int(expr* e) const {
sort* s = m_manager.mk_sort(m_manager.mk_family_id("arith"), INT_SORT);
parameter p(s);
return m_manager.mk_app(get_fid(), OP_BV2INT, 1, &p, 1, &e);
}

app* bv_util::mk_int2bv(unsigned sz, expr* e) {
app* bv_util::mk_int2bv(unsigned sz, expr* e) const {
parameter p(sz);
return m_manager.mk_app(get_fid(), OP_INT2BV, 1, &p, 1, &e);
}
Expand Down
4 changes: 2 additions & 2 deletions src/ast/bv_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ class bv_util : public bv_recognizers {
app * mk_bv_ashr(expr* arg1, expr* arg2) { return m_manager.mk_app(get_fid(), OP_BASHR, arg1, arg2); }
app * mk_bv_lshr(expr* arg1, expr* arg2) { return m_manager.mk_app(get_fid(), OP_BLSHR, arg1, arg2); }

app * mk_bv2int(expr* e);
app * mk_int2bv(unsigned sz, expr* e);
app * mk_bv2int(expr* e) const;
app * mk_int2bv(unsigned sz, expr* e) const;

app* mk_bv_rotate_left(expr* arg1, expr* arg2) { return m_manager.mk_app(get_fid(), OP_EXT_ROTATE_LEFT, arg1, arg2); }
app* mk_bv_rotate_right(expr* arg1, expr* arg2) { return m_manager.mk_app(get_fid(), OP_EXT_ROTATE_RIGHT, arg1, arg2); }
Expand Down
2 changes: 2 additions & 0 deletions src/ast/datatype_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,10 @@ namespace datatype {
ast_manager & get_manager() const { return m; }
// sort * mk_datatype_sort(symbol const& name, unsigned n, sort* const* params);
bool is_datatype(sort const* s) const { return is_sort_of(s, fid(), DATATYPE_SORT); }
bool is_datatype(expr* e) const { return is_datatype(e->get_sort()); }
bool is_enum_sort(sort* s);
bool is_recursive(sort * ty);
bool is_recursive(expr* e) { return is_recursive(e->get_sort()); }
bool is_recursive_nested(sort * ty);
bool is_constructor(func_decl * f) const { return is_decl_of(f, fid(), OP_DT_CONSTRUCTOR); }
bool is_recognizer(func_decl * f) const { return is_recognizer0(f) || is_is(f); }
Expand Down
17 changes: 16 additions & 1 deletion src/ast/euf/euf_egraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ namespace euf {

void egraph::reinsert_equality(enode* p) {
SASSERT(p->is_equality());
if (p->value() != l_true && p->get_arg(0)->get_root() == p->get_arg(1)->get_root())
if (p->value() != l_true && p->get_arg(0)->get_root() == p->get_arg(1)->get_root()) {
queue_literal(p, nullptr);
if (p->value() == l_false && !m_on_propagate_literal)
set_conflict(p->get_arg(0), p->get_arg(1), p->m_lit_justification);
}
}

void egraph::queue_literal(enode* p, enode* ante) {
Expand Down Expand Up @@ -201,6 +204,18 @@ namespace euf {
}
}

void egraph::new_diseq(enode* n, void* reason) {
force_push();
SASSERT(m.is_eq(n->get_expr()));
auto j = justification::external(reason);
auto a = n->get_arg(0), b = n->get_arg(1);
auto r1 = a->get_root(), r2 = b->get_root();
if (r1 == r2)
set_conflict(a, b, j);
else
set_value(n, l_false, j);
}

void egraph::new_diseq(enode* n) {
SASSERT(n->is_equality());
SASSERT(n->value() == l_false);
Expand Down
3 changes: 2 additions & 1 deletion src/ast/euf/euf_egraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,11 @@ namespace euf {
*/
void merge(enode* n1, enode* n2, void* reason) { merge(n1, n2, justification::external(reason)); }
void new_diseq(enode* n);
void new_diseq(enode* n, void* reason);


/**
\brief propagate set of merges.
\brief propagate set of merges.
This call may detect an inconsistency. Then inconsistent() is true.
Use then explain() to extract an explanation for the conflict.

Expand Down
1 change: 1 addition & 0 deletions src/ast/rewriter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ z3_add_component(rewriter
array_rewriter.cpp
ast_counter.cpp
bit2int.cpp
bv2int_translator.cpp
bool_rewriter.cpp
bv_bounds.cpp
bv_elim.cpp
Expand Down
125 changes: 124 additions & 1 deletion src/ast/rewriter/arith_rewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,129 @@ br_status arith_rewriter::reduce_power(expr * arg1, expr * arg2, op_kind kind, e
}
}

bool arith_rewriter::is_mul_factor(expr* s, expr* t) {
if (m_util.is_mul(t))
return any_of(*to_app(t), [&](expr* m) { return is_mul_factor(s, m); });
return s == t;
}

bool arith_rewriter::is_add_factor(expr* s, expr* t) {
if (m_util.is_add(t))
return all_of(*to_app(t), [&](expr* f) { return is_add_factor(s, f); });
return is_mul_factor(s, t);
}

expr_ref arith_rewriter::remove_factor(expr* s, expr* t) {

if (m_util.is_mul(t)) {
ptr_buffer<expr> r;
r.push_back(t);
for (unsigned i = 0; i < r.size(); ++i) {
expr* arg = r[i];
if (m_util.is_mul(arg)) {
r.append(to_app(arg)->get_num_args(), to_app(arg)->get_args());
r[i] = r.back();
r.pop_back();
--i;
continue;
}
if (s == arg) {
r[i] = r.back();
r.pop_back();
break;
}
}
switch (r.size()) {
case 0:
return expr_ref(m_util.mk_numeral(rational(1), m_util.is_int(t)), m);
case 1:
return expr_ref(r[0], m);
default:
return expr_ref(m_util.mk_mul(r.size(), r.data()), m);
}
}
if (m_util.is_add(t)) {
expr_ref_vector sum(m);
sum.push_back(t);
for (unsigned i = 0; i < sum.size(); ++i) {
expr* arg = sum.get(i);
if (m_util.is_add(arg)) {
sum.append(to_app(arg)->get_num_args(), to_app(arg)->get_args());
sum[i] = sum.back();
sum.pop_back();
--i;
continue;
}
sum[i] = remove_factor(s, arg);
}
if (sum.size() == 1)
return expr_ref(sum.get(0), m);
else
return expr_ref(m_util.mk_add(sum.size(), sum.data()), m);
}
else {
SASSERT(s == t);
return expr_ref(m_util.mk_numeral(rational(1), m_util.is_int(t)), m);
}
}


void arith_rewriter::get_nl_muls(expr* t, ptr_buffer<expr>& muls) {
if (m_util.is_mul(t)) {
for (expr* arg : *to_app(t))
get_nl_muls(arg, muls);
}
else if (!m_util.is_numeral(t))
muls.push_back(t);
}

expr* arith_rewriter::find_nl_factor(expr* t) {
ptr_buffer<expr> sum, muls;
sum.push_back(t);

for (unsigned i = 0; i < sum.size(); ++i) {
expr* arg = sum[i];
if (m_util.is_add(arg))
sum.append(to_app(arg)->get_num_args(), to_app(arg)->get_args());
else if (m_util.is_mul(arg)) {
muls.reset();
get_nl_muls(arg, muls);
if (muls.size() <= 1)
continue;
for (auto m : muls) {
if (is_add_factor(m, t))
return m;
}
return nullptr;
}
}
return nullptr;
}

br_status arith_rewriter::factor_le_ge_eq(expr * arg1, expr * arg2, op_kind kind, expr_ref & result) {

if (is_zero(arg2)) {
expr* f = find_nl_factor(arg1);
if (!f)
return BR_FAILED;
expr_ref f2 = remove_factor(f, arg1);
expr* z = m_util.mk_numeral(rational(0), m_util.is_int(arg1));
result = m.mk_or(m_util.mk_eq(f, z), m_util.mk_eq(f2, z));
switch (kind) {
case EQ:
break;
case GE:
result = m.mk_or(m.mk_iff(m_util.mk_ge(f, z), m_util.mk_ge(f2, z)), result);
break;
case LE:
result = m.mk_or(m.mk_not(m.mk_iff(m_util.mk_ge(f, z), m_util.mk_ge(f2, z))), result);
break;
}
return BR_REWRITE3;
}
return BR_FAILED;
}

br_status arith_rewriter::mk_le_ge_eq_core(expr * arg1, expr * arg2, op_kind kind, expr_ref & result) {
expr *orig_arg1 = arg1, *orig_arg2 = arg2;
expr_ref new_arg1(m);
Expand Down Expand Up @@ -655,7 +778,7 @@ br_status arith_rewriter::mk_le_ge_eq_core(expr * arg1, expr * arg2, op_kind kin
default: result = m.mk_eq(arg1, arg2); return BR_DONE;
}
}
return BR_FAILED;
return factor_le_ge_eq(arg1, arg2, kind, result);
}


Expand Down
6 changes: 6 additions & 0 deletions src/ast/rewriter/arith_rewriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ class arith_rewriter : public poly_rewriter<arith_rewriter_core> {
br_status is_separated(expr * arg1, expr * arg2, op_kind kind, expr_ref & result);
bool is_non_negative(expr* e);
br_status mk_le_ge_eq_core(expr * arg1, expr * arg2, op_kind kind, expr_ref & result);
bool is_add_factor(expr* s, expr* t);
bool is_mul_factor(expr* s, expr* t);
expr* find_nl_factor(expr* t);
void get_nl_muls(expr* t, ptr_buffer<expr>& muls);
expr_ref remove_factor(expr* s, expr* t);
br_status factor_le_ge_eq(expr * arg1, expr * arg2, op_kind kind, expr_ref & result);

bool elim_to_real_var(expr * var, expr_ref & new_var);
bool elim_to_real_mon(expr * monomial, expr_ref & new_monomial);
Expand Down
Loading