3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-08 17:01:55 +00:00
Commit graph

251 commits

Author SHA1 Message Date
Nikolaj Bjorner
c75b8ec752 add option to control epsilon #7791
#7791 reports on using model values during lex optimization that break soft constraints.
This is an artifact of using optimization where optimal values can be arbitrarily close to a rational.
In a way it is by design, but we give the user now an option to control the starting point for epsilon when converting infinitesimals into rationals.
2025-08-17 16:51:00 -07:00
Nikolaj Bjorner
bfed237a6c expose scope level 2025-07-01 14:14:16 -07:00
Nikolaj Bjorner
5ad1647061 missing ; 2025-06-22 21:32:32 -07:00
Nikolaj Bjorner
95ffad80c6 dealloc m_imp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-06-22 21:32:32 -07:00
Copilot
218379aaca
[WIP] Leaks (#7691)
* Initial plan for issue

* Initial analysis of memory leak issue

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Fix memory leak in lar_solver by adding var_register cleanup

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Complete memory leak fix: add dealloc(m_imp) to lar_solver destructor

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Delete leak.smt2

* Update lar_solver.cpp

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-06-20 20:26:43 -07:00
Nikolaj Bjorner
8d1e954709 introduce notion of auxiliary constraints created by nla_solver lemmas
notes: auxiliary constraints could extend to Gomory and B&B.
2025-06-12 20:37:51 -07:00
Nikolaj Bjorner
c387b20ac6 move smt params to params directory, update release.yml 2025-06-09 10:47:22 -07:00
LeeYoungJoon
0a93ff515d
Centralize and document TRACE tags using X-macros (#7657)
* 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).
2025-05-28 14:31:25 +01:00
Lev Nachmanson
6b32aaed10 remove slack heuristic
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
a5e5d4dbd3 testing
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
bbaec0bf95 trying randomly shuffle the indices in the slack utilization
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
52241b6474 some refactoring of lar_solver.h
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
fef954c028 shring lar_solver.h
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
4abd9843a0 fix the build
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
e3f5e8c8a6 restore lar_solver::add_named_var
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
b375faa77c continue PIMPL refactor in lar_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
b7ffcb7e61 implement imp of lar_solver as lar_solver::imp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
39955f1d04 remove a function from lar_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
4e56834b76 test
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
a527667fc0 shuffle more functionality from lar_solver.h to lar_solver::imp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
c81eb74c93 apply the slack idea in a loop
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
e041fe95bc slack
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Nikolaj Bjorner
792ffeeda7 fix latent sign bug 2025-04-23 17:22:57 -07:00
Nikolaj Bjorner
fe1fff3b7e add scaffolding for experiments with slack 2025-04-23 17:07:50 -07:00
Nikolaj Bjorner
e41acd7b50 convert m_r_upper and m_r_lower bounds to plain vectors
manage backtracking state together with backtracking of column data.
2025-04-23 16:33:38 -07:00
Nikolaj Bjorner
7641393f8a use inlined functions 2025-04-23 14:28:31 -07:00
Nikolaj Bjorner
5cc57b8958 coalesce updates to bounds 2025-04-23 14:05:17 -07:00
Nikolaj Bjorner
8035edbe65 remove lp_assert 2025-04-14 11:10:26 -07:00
Lev Nachmanson
0a3c118701 more aggressive term tightening
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-03-24 07:44:13 -10:00
Lev Nachmanson
f501aea3eb add comments and renaming
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-03-24 07:44:13 -10:00
Lev Nachmanson
6f7b749ff9 improved dio handler
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-03-24 07:44:13 -10:00
Nikolaj Bjorner
b784b748d4 fix #7550 2025-02-27 14:43:11 -08:00
Nikolaj Bjorner
f977b48161 adjust solve_for to handle rationals 2025-02-17 13:59:23 -08:00
Lev Nachmanson
bedc95c4c7 use static_cast to avoid the warnings
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-13 07:07:12 -10:00
Lev Nachmanson
3e7e903d19 use the trail to undo add_term
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
89eec4cc80 test dio
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
5a72117528 debug dio
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
083926c658 debug dio
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
c1ece49694 track changed columns in dio\
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
862dc91cb2 work on incremental dio
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
7fe703e229 simplify column
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
30f5599064 use fixed vars to explain tightening
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
36293ac773 test that pivoting is correct in dioph_eq.cpp 2025-02-11 12:23:00 -10:00
Lev Nachmanson
44fd0e48a8 fixes in dio
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
798f0e2e8a test tightening with S
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson
193116bf84 handle sat with tightening 2025-02-11 12:23:00 -10:00
Lev Nachmanson
52653e6e43 a version with less pointers: got a conflict
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Nikolaj Bjorner
8d2b9b41fd fix compiler warnings 2025-01-12 13:39:13 -08:00
Nikolaj Bjorner
85356c5548 enable propagation when there are changed columns
- to fix bug reported by Nikhil Swamy/F*
- deal with some compiler warnings by adding annotations
2025-01-12 13:30:31 -08:00
Nikolaj Bjorner
9a237d55ca fix misc build warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-01-11 17:41:24 -08:00