Nikolaj Bjorner
5c583299f1
Remove unnecessary const qualifiers from comparison operator overloads in z3++.h
2024-09-23 13:38:07 +01:00
Nikolaj Bjorner
4b4a28239f
Add const qualifiers to comparison operators and update iterator equality checks in various classes
2024-09-23 11:45:11 +01:00
Nikolaj Bjorner
0f896503a9
Add initial value setting API for solver and optimize contexts and update related function signatures
2024-09-18 16:18:47 +03:00
Nikolaj Bjorner
48712b4f60
Add initial value setting for variables in Z3 API, solver, and optimize modules
2024-09-18 16:13:15 +03:00
Nikolaj Bjorner
0ba306e7b3
y
2024-09-17 12:27:13 +03:00
Audrey Dutcher
0837e3b8e8
Fix nightly ( #7365 )
...
- add some logic to setup.py to handle cross platform tagging correctly
this adds a dependency on setuptools>=70
- rearrange the nightly CI to use these new builds correctly
2024-09-03 16:11:42 -07:00
Nikolaj Bjorner
5360656440
fix expected
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-08-28 09:40:57 -07:00
Audrey Dutcher
e1f1d677ff
New python packaging and tests ( #7356 )
...
* Simplify/modernize python packaging
* Modify azure CI to utilize new python packaging
2024-08-27 17:12:31 -07:00
Philip Zucker
e7382d6ff9
Added "λ" pretty printing to python ( #7320 )
2024-07-31 08:14:16 -07:00
Nikolaj Bjorner
374609bd46
kludge to address #7232 , probably superseeded by planned revision to setup/pypi
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-07-08 16:54:09 -07:00
Sergey Bronnikov
1da132005a
Fix a comment for Z3_solver_from_string ( #7271 )
...
Z3_solver_from_string accepts a string buffer with solver
assertions, not a string buffer with filename.
2024-07-02 07:09:33 -07:00
Nikolaj Bjorner
3bf2b3f741
fix #7260
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-06-19 15:37:20 -07:00
dependabot[bot]
758d886fac
Bump braces from 3.0.2 to 3.0.3 in /src/api/js ( #7261 )
...
Bumps [braces](https://github.com/micromatch/braces ) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md )
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3 )
---
updated-dependencies:
- dependency-name: braces
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 15:29:38 -07:00
Nikolaj Bjorner
cb50dcabda
fix #7229
2024-05-17 18:28:08 -07:00
Nuno Lopes
552068a71e
let the replayer stop when it encounters a C command with invalid args
2024-05-17 11:10:09 +01:00
Nikolaj Bjorner
e036a5bd9b
add parameter validation to ternary and 4-ary functions for API #7219
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-11 18:06:18 -07:00
Nikolaj Bjorner
efc893263a
add abs function to API
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-09 20:54:39 -07:00
Nikolaj Bjorner
b120745078
add C++ bindings for sequence operations
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-09 20:20:05 -07:00
Nikolaj Bjorner
c7529d0b25
expose fold as well
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-09 14:56:18 -07:00
Nikolaj Bjorner
fc6c4c98e2
initial warppers for seq-map/seq-fold
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-09 14:52:49 -07:00
Nikolaj Bjorner
2f02278227
add virtual destructor to z3::object class
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-01 16:35:25 -07:00
Nikolaj Bjorner
19eb7225ea
add virtual destructor to z3::object class
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-01 16:20:05 -07:00
Nikolaj Bjorner
231a985bf9
add virtual destructor to z3::object class
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-01 16:17:06 -07:00
Steven Moy
111fcb9366
Implement API to set exit action to exception ( #7192 )
...
* Implement API to set exit action to exception
* Turn on exit_action_to_throw_exception upon API context creation
2024-03-27 19:06:58 -07:00
Nikolaj Bjorner
b8a69987c3
fix #7165
2024-03-17 16:33:40 -07:00
Nikolaj Bjorner
0b3bbc2972
#7158
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-03-11 18:19:43 -07:00
Nikolaj Bjorner
620efbb67b
add aacrhc
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-03-06 13:53:47 -08:00
Steven Moy
e8c8d8aa7d
Put in workaround to rename manylinux_arm64 to manylinux_aarch64 ( #7149 )
2024-03-05 13:38:12 -08:00
Nikolaj Bjorner
10687082f1
Revert "For many linux build, use aarch64 instead of arm64 ( #7147 )" ( #7148 )
...
This reverts commit 7694bca5f4
.
2024-03-05 12:25:31 -08:00
Steven Moy
7694bca5f4
For many linux build, use aarch64 instead of arm64 ( #7147 )
2024-03-05 11:27:43 -08:00
Nikolaj Bjorner
77a07bb791
detect arm64 for manylinux setup
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-03-04 21:14:19 -08:00
zapashcanon
91886dafca
some code cleaning and complexity improvements ( #7133 )
...
* do not use `and` for non mutually recursive types
* use List.init, fix complexity of a few operations and make some code
more readable
* explicit some parameters to make working without LSP/Merlin easier
* use fold_left instead of filteri because it is not available on old
OCaml versions
2024-02-29 08:54:53 -08:00
Bruce Mitchener
143a35d370
Fix typos. ( #7137 )
2024-02-22 09:35:15 -08:00
Thomas Haas
a3d00ce356
Improved Java phantom references ( #7131 )
...
* Reworked phantom reference handling.
- Replaced IDecRefQueue with a new Z3ReferenceQueue class
- Z3ReferenceQueue manages custom subclasses of phantom references in a doubly-linked list
- Replaced all subclasses of IDecRefQueue with subclasses of Z3ReferenceQueue.Reference. These custom reference classes are embedded in the class they reference count.
- Context now owns a single Z3ReferenceQueue for all types of references.
* Made Statistics.Entry a static subclass
* Made Context.close idempotent (as recommended)
* Update CMakeLists.txt for building the Java API.
* Updated CMakeLists.txt again.
* Use correct SuppressWarning annotation to silence the compiler
* Formatting
2024-02-21 08:39:58 -08:00
Cal Jacobson
199ef30e0c
conditionally depend on importlib_resources ( #7116 )
...
In python >= 3.9, it's available as part of the stdlib.
2024-02-18 12:20:24 +07:00
Bruce Mitchener
155dfb10c4
Fix some typos in identifiers. ( #7118 )
2024-02-14 09:25:32 +07:00
Nikolaj Bjorner
f1d97c7a3a
allow callbacks to be nested
2024-02-13 20:30:17 +07:00
Bruce Mitchener
53f89a81c1
Fix some typos. ( #7115 )
2024-02-07 23:06:43 -08:00
Yisu Remy Wang
2280e9562a
Improve instructions for working with the Julia API ( #7108 )
2024-02-02 09:46:31 -08:00
Nikolaj Bjorner
738c5b6d0d
add warning messages for #7100
2024-01-30 21:30:37 -08:00
Nikolaj Bjorner
28c44a6ed0
fix #7105
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-30 15:41:14 -08:00
Nikolaj Bjorner
2af1cff11f
updating java cmake scrip
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-27 16:29:19 -08:00
Yisu Remy Wang
dec5715f03
Expose forall and exists to Julia ( #7099 )
2024-01-25 09:49:01 -08:00
Thomas Haas
d2706bab64
Fixes in Java's User Propagator ( #7088 )
...
* Fixed decide callback for Java user propagators
* Java User Prop:
- Added return value to conflict
- Added consequence method
- Added missing access modifier to decideWrapper
* Removed type parameters of expressions in UserPropagatorBase
* Renamed propagateConflict to propagateConsequence
2024-01-18 09:29:15 -08:00
Nikolaj Bjorner
4f75153186
Update z3_api.h
...
Updated doc https://github.com/Z3Prover/z3/discussions/7087
2024-01-17 13:53:38 -08:00
Nikolaj Bjorner
c340233df6
fix #7081
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-16 10:31:31 -08:00
Nikolaj Bjorner
afba43a5a7
fix #7085
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-16 10:18:46 -08:00
Nikolaj Bjorner
59b18d4a14
create as_bin as_hex wrappers for display
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-12 09:19:22 -08:00
Christoph M. Wintersteiger
68a2c08d5e
Add Z3_get_estimated_alloc_size to OCaml API ( #7068 )
2023-12-21 12:54:30 -08:00
Nuno Lopes
b2d5c24c1d
remove a few string copies
2023-12-20 16:55:09 +00:00
Nuno Lopes
fcc7b25c19
remove a few string copies
2023-12-19 14:34:37 +00:00
Nikolaj Bjorner
575538d325
follow error message to put dependencies in setup args
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 18:38:29 -08:00
Nikolaj Bjorner
4123405d17
add version
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 15:50:09 -08:00
Nikolaj Bjorner
6282f40255
try add name to project
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 14:57:45 -08:00
Nikolaj Bjorner
7e716f7cfe
try fix suggested in #7041
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 13:12:05 -08:00
Nikolaj Bjorner
6cd619d377
kludge to fixup osver in python for Mac
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-08 11:39:55 -08:00
Nikolaj Bjorner
111ce01702
update path reference to readme
2023-12-05 13:47:05 -08:00
Nikolaj Bjorner
d566eb3df7
include readme in package
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-05 13:04:25 -08:00
Nikolaj Bjorner
76c05f171a
specify a readme file with the nuget package
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-05 12:32:30 -08:00
Asger Hautop Drewsen
a9513c1998
Improve BoolRef addition ( #7045 )
2023-12-05 09:12:25 -08:00
Asger Hautop Drewsen
764f0d54a4
Overload xor operator for BoolRef ( #7043 )
2023-12-05 07:48:57 -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
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
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
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
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
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
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
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
Nikolaj Bjorner
37b283fab9
use python3 in nightly
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-14 08:54:10 -08:00
Christoph M. Wintersteiger
3af2b36cd7
Add Z3_solver_interrupt to OCaml API ( #6976 )
2023-10-31 08:48:06 -07:00
Bruce Mitchener
236afeb8cb
docs: More intra-doc linking, bit of formatting. ( #6963 )
2023-10-25 10:07:03 -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
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
Nuno Lopes
ff33fa355a
fix debug single-thread build
2023-09-18 09:44:37 +01: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
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
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
THE Spellchecker
dc0887db5a
Typo Fixes ( #6803 )
2023-07-09 11:56:10 -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
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
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
b451735aa0
fix #6778
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-06-25 21:08:13 -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
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
ditto
11264c38d8
Java user propagator interface ( #6733 )
...
* Java API: user propagator interface
* Java API: improved user propagator interface
* Java API: Add UserPropagatorBase.java
* Remove redundant header file
* Initialize `JavaInfo` object and error handling
* Native.UserPropagatorBase implements AutoCloseable
* Add Override annotation
2023-05-24 18:27:28 +01:00
Nikolaj Bjorner
2c21072c99
remove stub class, it may as well go into NativeStatic.txt as C++
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-05-22 18:23:10 +01:00
Nikolaj Bjorner
b93529997e
more stubs #6097
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-05-22 16:25:54 +01:00
Nikolaj Bjorner
7963ecaf63
stubs for #6097
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-05-22 16:21:34 +01:00
Guillaume Bagan
0c9a5f69fd
JS/TS: add Optimize class ( #6712 )
...
* implement Optimize class for the high level Typescript API
* javascript and wasm: add _malloc to exported functions
fix the bug https://github.com/Z3Prover/z3/issues/6709
* javascript: add tests for the Optimize class
* javascript: no reason that minimize and optimize must be constants
2023-05-06 11:53:43 -07:00
Nikolaj Bjorner
f17691715b
make default argument to ensure_def and mk_def explicit
...
- insert also macro definitions into models
2023-05-02 12:18:31 -07:00