* very basic setup
* ensure solve_eqs is fully disabled when smt.solve_eqs=false, #7743
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* respect smt configuration parameter in elim_unconstrained simplifier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* indentation
* add bash files for test runs
* add option to selectively disable variable solving for only ground expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* remove verbose output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* fix#7745
axioms for len(substr(...)) escaped due to nested rewriting
* ensure atomic constraints are processed by arithmetic solver
* #7739 optimization
add simplification rule for at(x, offset) = ""
Introducing j just postpones some rewrites that prevent useful simplifications. Z3 already uses common sub-expressions.
The example highlights some opportunities for simplification, noteworthy at(..) = "".
The example is solved in both versions after adding this simplification.
* fix unsound len(substr) axiom
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* FreshConst is_sort (#7748)
* #7750
add pre-processing simplification
* Add parameter validation for selected API functions
* updates to ac-plugin
fix incrementality bugs by allowing destructive updates during saturation at the cost of redoing saturation after a pop.
* enable passive, add check for bloom up-to-date
* add top-k fixed-sized min-heap priority queue for top scoring literals
* set up worker thread batch manager for multithreaded batch cubes paradigm, need to debug as I am getting segfault still
* fix bug in parallel solving batch setup
* fix bug
* allow for internalize implies
* disable pre-processing during cubing
* debugging
* remove default constructor
* remove a bunch of string copies
* Update euf_ac_plugin.cpp
include reduction rules in forward simplification
* Update euf_completion.cpp
try out restricting scope of equalities added by instantation
* Update smt_parallel.cpp
Drop non-relevant units from shared structures.
* process cubes as lists of individual lits
* merge
* Add support for Algebraic Datatypes in JavaScript/TypeScript bindings (#7734)
* Initial plan
* Add datatype type definitions to types.ts (work in progress)
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Complete datatype type definitions with working TypeScript compilation
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Implement core datatype functionality with TypeScript compilation success
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Complete datatype implementation with full Context integration and tests
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* chipping away at the new code structure
---------
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: humnrdble <83878671+humnrdble@users.noreply.github.com>
Co-authored-by: Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* very basic setup
* ensure solve_eqs is fully disabled when smt.solve_eqs=false, #7743
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* respect smt configuration parameter in elim_unconstrained simplifier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* indentation
* add bash files for test runs
* add option to selectively disable variable solving for only ground expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* remove verbose output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* fix#7745
axioms for len(substr(...)) escaped due to nested rewriting
* ensure atomic constraints are processed by arithmetic solver
* #7739 optimization
add simplification rule for at(x, offset) = ""
Introducing j just postpones some rewrites that prevent useful simplifications. Z3 already uses common sub-expressions.
The example highlights some opportunities for simplification, noteworthy at(..) = "".
The example is solved in both versions after adding this simplification.
* fix unsound len(substr) axiom
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* FreshConst is_sort (#7748)
* #7750
add pre-processing simplification
* Add parameter validation for selected API functions
* updates to ac-plugin
fix incrementality bugs by allowing destructive updates during saturation at the cost of redoing saturation after a pop.
* enable passive, add check for bloom up-to-date
* add top-k fixed-sized min-heap priority queue for top scoring literals
---------
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: humnrdble <83878671+humnrdble@users.noreply.github.com>
* Initial plan
* Add proper pyproject.toml metadata for dist-info creation
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Clean up setup.py and add comprehensive test for dist-info fix
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Fix build errors in setup.py and pyproject.toml
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Fix ModuleNotFoundError by removing dynamic version loading from pyproject.toml
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Remove hardcoded version from pyproject.toml, use dynamic version from setup.py
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* fix: add generating META for ocamlfind.
* Patch macos. We need to keep the `@rpath` and use environment var to enable the test because we need to leave it to be fixed by package managers.
* Trigger CI.
* Debug.
* Debug.
* Debug.
* Debug.
* Debug.
* Debug.
* Hacky fix for ocaml building warning.
* Fix typo and rename variables.
The scenario works as expected when disabling model compression:
```
from z3 import *
pre_processor = Tactic("bit-blast")
solver = Solver()
set_param("model.compact", False)
x = BitVec('x', 8)
pre_processed = pre_processor(x == 5)
print(pre_processed[0])
solver.add(pre_processed[0]) # add the sole assertion
if solver.check() == sat:
print(solver.model())
model = pre_processed[0].convert_model(solver.model())
print(model)
print(model[x].as_long())
```
* Introduce X-macro-based trace tag definition
- Created trace_tags.def to centralize TRACE tag definitions
- Each tag includes a symbolic name and description
- Set up enum class TraceTag for type-safe usage in TRACE macros
* Add script to generate Markdown documentation from trace_tags.def
- Python script parses trace_tags.def and outputs trace_tags.md
* Refactor TRACE_NEW to prepend TraceTag and pass enum to is_trace_enabled
* trace: improve trace tag handling system with hierarchical tagging
- Introduce hierarchical tag-class structure: enabling a tag class activates all child tags
- Unify TRACE, STRACE, SCTRACE, and CTRACE under enum TraceTag
- Implement initial version of trace_tag.def using X(tag, tag_class, description)
(class names and descriptions to be refined in a future update)
* trace: replace all string-based TRACE tags with enum TraceTag
- Migrated all TRACE, STRACE, SCTRACE, and CTRACE macros to use enum TraceTag values instead of raw string literals
* trace : add cstring header
* trace : Add Markdown documentation generation from trace_tags.def via mk_api_doc.py
* trace : rename macro parameter 'class' to 'tag_class' and remove Unicode comment in trace_tags.h.
* trace : Add TODO comment for future implementation of tag_class activation
* trace : Disable code related to tag_class until implementation is ready (#7663).
* Update doc for `mk_context`.
* Migrating to cmake.
* Migrating to cmake. It builds both internal or external libz3.
* Start to work on platform-specific problem.
* Messy notes.
* debug.
* Cleanup a bit.
* Fixing shared lib extension.
* Minor.
* Resume working on this PR.
* Remove including `AddOCaml`.
* Keep `z3.ml` and `z3.mli` in the src but specify the generated file in the bin.
* Keep `ml_example.ml` in the src.
* Try github action for ocaml.
* Add workflow using matrix.
* Fix mac linking once more.
* Bypass @rpath in building sanity check.
Update setup.py so that we copy LICENSE.TXT to src/api/python before
creating the sdist. Any wheels built from this sdist will now
contain the LICENSE.txt file.
Fixes#7604
* Check that Z3_get_numeral_small is given non-null out params
Analogous to other Z3_get_numeral_* functions with out params.
* Note that Z3_get_numeral_small is essentially redundant
The error behavior of Z3_get_numeral_small does not follow the pattern of
the other functions. The functions that have out params and return a bool
indicating success (such as Z3_get_numeral_rational_int64) return false
rather than signaling an error when given an unsupported expression
argument (such as a rounding mode value). The functions that do not have out
params signal an error in such cases. Z3_get_numeral_small is the odd one
out in that it signals errors and returns a status bool.
This error handling is the only difference between Z3_get_numeral_small and
Z3_get_numeral_rational_int64, so this patch adds a comment to the
documentation.
Rather than pulling `cmake` from PyPI unconditionally, add it to build
dependencies only if the system `cmake` executable cannot be found.
This eliminates an unnecessary dependency on systems featuring CMake,
and ensures that whenever possible, a downstream patched CMake version
is used that is more compatible with the system in question.