3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00
Commit graph

16473 commits

Author SHA1 Message Date
Matt Thornton
4e0a2f5968
Dispose of intermediate Z3Objects created in dotnet api. (#5901)
* Dispose of intermediate Z3Objects created in dotnet api.

* Set C# LangVersion to 8.0.

* Fix build errors.

* Fix warning about empty using statement.

* Fix Xor to only dispose of objects that it creates internally.
2022-03-17 08:08:05 -07:00
Jan Vraný
bdf7de1703
Care for root index being undefine while calling Z3_algebraic_get_i() (#5888)
In some cases, Z3_algebraic_get_i() returned 0. For example, in the following
Python snippet, the last assert would fail:

    import z3
    x = z3.Real('x')
    s = z3.Solver()
    s.add( (x * x) - 2 == 0, x <= 0)
    s.check()
    val_x = s.model().get_interp(x)
    assert val_x.index() == 1

The problem was that `algebraic_numbers::manager:👿:get_i()` did not
check whether the root index was properly initialized.

This commit fixes this issue by checking whether root index is initialized
the same way various other routines do.

Fixes issue #5807.

Signed-off-by: Jan Vrany <jan.vrany@labware.com>
2022-03-16 19:28:03 -07:00
Nikolaj Bjorner
6455ae4350 Merge branch 'master' of https://github.com/z3prover/z3 2022-03-16 16:30:08 -07:00
Nikolaj Bjorner
0b230ee703 move some functions to using var pattern #5900
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 16:29:54 -07:00
Nikolaj Bjorner
6c4780a845
Update cross-build.yml 2022-03-16 07:32:05 -07:00
Han Gao
3d87d86c28
github action: add riscv64/aarch64/powerpc64 cross compile (#5897)
* github action: add riscv64/aarch64/powerpc64 cross compile

Signed-off-by: Han Gao <rabenda.cn@gmail.com>

* fix: build on non-x86 platform

Signed-off-by: Revy <rabenda.cn@gmail.com>
2022-03-16 07:30:20 -07:00
Nikolaj Bjorner
a1517251dd call dispose on sorts #5900, missing charSort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 07:28:05 -07:00
Nikolaj Bjorner
cd5e114ed3 call dispose on sorts #5900
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 07:24:33 -07:00
Nikolaj Bjorner
cb9dcb799f add regex power to API and for Java per request
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-16 06:17:31 -07:00
Nikolaj Bjorner
e1929ca9b9 add regex power to API and for Java per request
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-15 19:18:33 -07:00
Nikolaj Bjorner
706d7ea893 native context uses legacy mk_context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-15 16:01:05 -07:00
Chaoqi Zhang
313b87f3c6
doc: update readme (#5898)
add the command to `mkdir build` first
2022-03-14 09:30:08 -07:00
Nikolaj Bjorner
545341e699 fix #5895 2022-03-12 09:17:13 -08:00
Nikolaj Bjorner
c51ca86203 add another constant folding case 2022-03-10 17:39:40 -08:00
Nikolaj Bjorner
e839e18381 minimal addition to rewrite bit-vector to character conversion using constant folding. 2022-03-10 17:31:17 -08:00
Nikolaj Bjorner
8f2ea90db1 Merge branch 'master' of https://github.com/Z3Prover/z3 2022-03-10 17:09:36 -08:00
Nikolaj Bjorner
081c62d006 allow range comparison for bit-vectors and int/real 2022-03-10 17:08:49 -08:00
Nikolaj Bjorner
580012e19f fix #5894
expp is not implemented. This is the second time a fuzz bug reports it. Instead of closing the bug, just disable code path as fuzzers are not considering the comment from previous bug.
2022-03-10 09:45:09 -08:00
Hari Govind V K
f26c12a9ad
fix #5882. Use model true when inlining (#5892) 2022-03-09 12:31:39 -08:00
Jan Vraný
8e18a94558
Update README with info about Smalltalk bindings (#5893) 2022-03-09 12:31:12 -08:00
Nuno Lopes
43f7636826 remove some copies/moves 2022-03-09 12:46:41 +00:00
Nikolaj Bjorner
1d224d1bcd na 2022-03-08 08:51:00 -08:00
Nikolaj Bjorner
c6f8ee33d4 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-08 08:36:19 -08:00
Nikolaj Bjorner
3293aeb7c7 na 2022-03-08 08:36:19 -08:00
Nikolaj Bjorner
e7ded9cdbd update to 2022 2022-03-08 08:36:19 -08:00
John Fleisher
97c7ce63b5
Clean up build warnings (#5884)
* Clean up warnings in compile for documentation notes

* remove snk from local build

Co-authored-by: jfleisher <jofleish@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-07 12:55:30 -08:00
Lorenzo Veronese
e3568d5b47
Handle additional cases in rule_properties::check_accessor (#5821)
* Handle additional cases in rule_properties::check_accessor

* Walk parents depth first in rule_properties::check_accessor
2022-03-07 07:49:59 -08:00
Nikolaj Bjorner
882fc31aea doc strings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 15:25:05 -08:00
Nikolaj Bjorner
b0c0f4d1f4 fix #5876
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 15:07:45 -08:00
Nikolaj Bjorner
3e51b69a9a no fun!
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 15:03:02 -08:00
Nikolaj Bjorner
2b71d8bc08 doc macros 2022-03-03 14:59:38 -08:00
Nikolaj Bjorner
87e6f103c6 commenting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 14:00:07 -08:00
Nikolaj Bjorner
676ba78600 fix else case: it is first argument of const array
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 13:10:02 -08:00
John Fleisher
35d26bc282
NativeModel: TryGetArrayValue (#5881)
* WiP:  Disposable, MkAdd, MkApp, MkBool, MkBoolSort, MkBound, MkBvSort, MkFalse, MkTrue, MkIntSort

* WiP: Native z3 mk_ functions

* WiP: mk_ functions for NativeContext

* WiP: add utility functions for getting values

* WiP: Adding more native utility functions

* native model pull

* WiP: NativeContext additions for array access

* WiP: use Z3_symbol in place of managed Symbol

* WiP: add solver, model, and array methods

* WiP: MkSimpleSolver, MkReal

* WiP: GetDomain GetRange

* WiP: MkExists

* Override for MkFuncDecl

* MkConstArray, MkSelect

* WiP: code cleanup

* migrate Context reference to NativeContext

* remove local signing from PR

* minor code cleanup

* Sorts to properties, fix usings,

* make IntSort property

* sort using

* IntSort, RealSort - properties

* WiP: get array value update

Co-authored-by: jfleisher <jofleish@microsoft.com>
2022-03-03 13:06:30 -08:00
Nikolaj Bjorner
248a3676af na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:40:29 -08:00
Nikolaj Bjorner
e1e8d15827 stub out array serialization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:38:23 -08:00
Nikolaj Bjorner
cd324a4734 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:07:00 -08:00
Nikolaj Bjorner
8d1276fa60 using directives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 11:03:31 -08:00
Clemens Eisenhofer
35fb95648b
Updated user-propagator example (#5879) 2022-03-03 10:42:06 -08:00
John Fleisher
a08be497f7
NativeContext, NativeSolver, NativeModel - updates for Pex (#5878)
* WiP:  Disposable, MkAdd, MkApp, MkBool, MkBoolSort, MkBound, MkBvSort, MkFalse, MkTrue, MkIntSort

* WiP: Native z3 mk_ functions

* WiP: mk_ functions for NativeContext

* WiP: add utility functions for getting values

* WiP: Adding more native utility functions

* native model pull

* WiP: NativeContext additions for array access

* WiP: use Z3_symbol in place of managed Symbol

* WiP: add solver, model, and array methods

* WiP: MkSimpleSolver, MkReal

* WiP: GetDomain GetRange

* WiP: MkExists

* Override for MkFuncDecl

* MkConstArray, MkSelect

* WiP: code cleanup

* migrate Context reference to NativeContext

* remove local signing from PR

* minor code cleanup

Co-authored-by: jfleisher <jofleish@microsoft.com>
2022-03-03 10:41:12 -08:00
Nikolaj Bjorner
811cd9d48d add example
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-03 09:14:47 -08:00
Nikolaj Bjorner
ee18c5070c add stubs for injective function axioms, add some parameter functions 2022-03-03 09:09:03 -08:00
Nikolaj Bjorner
757cf7622d sketch ArrayValue, add statistics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-02 10:59:19 -08:00
Nikolaj Bjorner
80506dfdfa sketch ArrayValue, add statistics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-02 10:55:39 -08:00
Nikolaj Bjorner
bf14aeb1bd stub out nativesolver 2022-03-02 10:06:38 -08:00
Nikolaj Bjorner
bbadd17d56 fix #5874 2022-03-02 08:46:28 -08:00
Nikolaj Bjorner
5f79a977fb use conventions from Context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 14:27:57 -08:00
Nikolaj Bjorner
c812d1e890 update native func interp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 14:07:20 -08:00
Nikolaj Bjorner
61d2654770 quantifier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 13:18:18 -08:00
Nikolaj Bjorner
deeb5e9921 finish NativeModel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-01 12:40:03 -08:00