Suppose a user propagator encodes axioms using quantifiers and uses E-matching for instantiation. If it wants to implement a custom priority scheme or drop some instances based on internal checks it can register a callback with quantifier instantiation
* 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
Use built-in `importlib.resources` module rather than the external
`importlib_resources` package on Python 3.9 and newer. The latter
is only intended as a backport for old Python versions, and since modern
Linux distributions may no longer support such old Python versions,
they also no longer provide importlib_resources (this is the case
on Gentoo).
This happens when generating the Python API and you are using
Python 3.12 in the build environment:
```
.../z3/scripts/update_api.py:1828: SyntaxWarning: invalid escape sequence '\#'
```
This was a `DeprecationWarning` previously, but Python 3.12 changed
it to a `SyntaxWarning` to make it more visible. The release notes
indicate that this will be a syntax error in the future.
* Use int64 for ocaml api functions that require it
Signed-off-by: Stefan Muenzel <source@s.muenzel.net>
* Use elif
Signed-off-by: Stefan Muenzel <source@s.muenzel.net>
Make it easier to add native methods for callbacks (for user propagator) #6097
The Java User propagator wrapper should define a base class with virtual methods that can be invoked from functions defined in NativeStatic.txt
Z3_simplify() does RETURN_Z3(simplify(...)), hence the function was being called twice
it turns out simplify is not idempotent, so calling it twice can result in different results
thus breaking the log.
* limit range of environment variable for loading the native library in Java to "true".
This change specifies the range of values that are allowed to set the environment
variable "z3.skipLibraryLoad".
Only the value "true" (in upper-, lower-, and mixed-case is accepted as valid value.
Other values, such as "false", "0", "1", "foo", an empty or a missing value are
evaluated to "false" and cause the default loading of the native library.
* adding documentation about environment variable for (not) loading the native library in Java.
This is a follow-up commit for #4667 to provide a publicly visible documentation.