3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-23 16:57:51 +00:00
Commit graph

86 commits

Author SHA1 Message Date
Copilot
317dd92105 Standardize for-loop increments to prefix form (++i) (#8199)
* Initial plan

* Convert postfix to prefix increment in for loops

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

* Fix member variable increment conversion bug

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

* Update API generator to produce prefix increments

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>
2026-02-18 20:57:29 -08:00
Josh Berdine
2b1583a7f0 Return bool instead of int from Z3_rcf_interval (#8046)
In the underlying realclosure implementation, the interval operations for
{`lower`,`upper`}`_is_`{`inf`,`open`} return `bool` results. Currently these
are cast to `int` when surfacing them to the API. This patch keeps them at
type `bool` through to `Z3_rcf_interval`.

Signed-off-by: Josh Berdine <josh@berdine.net>
2026-02-18 20:56:01 -08:00
Josh Berdine
2a785bf291 Make rcf is_rational and is_rational_function operations handle zero (#8025)
The representation of the zero rcf numeral is nullptr, and the is_rational
and is_rational_function operations are not expecting to be called with
nullptr. But there isn't a way to test for that in the API, other than
checking if Z3_rcf_num_to_string returns "0".

This patch adds a couple conditions so that is_rational and
is_rational_function operations handle zero. Maybe this isn't the desired
change. For instance, the is_zero operation could instead be exposed in the
API and preconditions added to the relevant operations.

Signed-off-by: Josh Berdine <josh@berdine.net>
2026-02-18 20:55:56 -08: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
Nuno Lopes
3586b613f7 remove default destructors 2024-10-02 22:20:12 +01:00
Bruce Mitchener
50e0fd3ba6
Use noexcept more. (#7058) 2023-12-16 12:14:53 +00:00
Christoph M. Wintersteiger
16753e43f1
Add accessors for RCF numeral internals (#7013) 2023-11-23 17:54:23 +01:00
Nuno Lopes
1eed058b98 use std::move 2022-10-02 21:34:17 +01:00
Nuno Lopes
73a24ca0a9 remove '#include <iostream>' from headers and from unneeded places
It's harmful to have iostream everywhere as it injects functions in the compiled files
2022-06-17 14:10:19 +01:00
Nikolaj Bjorner
4a6083836a call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
Nikolaj Bjorner
e0d8cefde4 remove cooperate
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-12 20:15:46 -07:00
Bruce Mitchener
3149d7f7a4 Fix typos. 2018-11-30 22:19:30 +07:00
Bruce Mitchener
e570940662 Prefer using empty rather than size comparisons. 2018-11-27 21:42:04 +07:00
Florian Pigorsch
326bf401b9 Fix some spelling errors (mostly in comments). 2018-10-20 17:07:41 +02:00
Bruce Mitchener
76eb7b9ede Use nullptr. 2018-02-12 14:05:55 +07:00
Bruce Mitchener
7167fda1dc Use override rather than virtual. 2018-02-10 09:56:33 +07:00
Nikolaj Bjorner
2b82fd5d0c updated include directives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-08-01 10:51:47 -07:00
Nikolaj Bjorner
b19f94ae5b make include paths uniformly use path relative to src. #534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00
Christoph M. Wintersteiger
4e37821dde "canceled" -> Z3_CANCELED_MSG
Relates to #431
2016-02-04 13:52:43 +00:00
Nikolaj Bjorner
96d1066c6a reworking cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 16:43:48 -08:00
Nikolaj Bjorner
baee4225a7 reworking cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-11 16:21:24 -08:00
Nikolaj Bjorner
c09ac5422b fix by anomaly detection, issue #118
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-06-02 10:42:03 -07:00
Leonardo de Moura
f6f59ad6bc Fix memory allocation problems in RCF module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-04-10 19:03:25 -07:00
Leonardo de Moura
4624919786 Improve html pretty printer for RCF package
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-27 11:24:23 -08:00
Leonardo de Moura
77f58269ed Add html pretty printing mode for RCF package
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-27 10:19:54 -08:00
Leonardo de Moura
5d938a5fe2 Fix bug
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-20 18:41:24 -08:00
Leonardo de Moura
3344151aca Replace # with x in the definition of algebraic elements
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-20 18:21:09 -08:00
Leonardo de Moura
bb386c0f18 Fix problem in inv_rf
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-16 11:19:11 -08:00
Leonardo de Moura
eea3384106 Add lazy normalization for algebraic extension values. Increase default max_precision to 128.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-15 16:35:36 -08:00
Leonardo de Moura
217c8375ce Add new rational function normalization procedure.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-15 14:34:34 -08:00
Leonardo de Moura
f0737bdf7f Replace expensive_eval_sign_at with version that does not generate rational numbers
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-14 18:30:36 -08:00
Leonardo de Moura
799fe073db Add API for extracting numerator/denominator of RCF numerals. Add field to store the original isolating interval before refinement.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-14 18:29:08 -08:00
Leonardo de Moura
991a1528cd Cache isolating interval for better pretty printing
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-14 12:17:15 -08:00
Leonardo de Moura
025cb2a2a8 Avoid wasteful memory allocation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-14 12:03:22 -08:00
Leonardo de Moura
38e0b4a20a Fix bug. Add is_denominator_one macro.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-14 11:55:52 -08:00
Leonardo de Moura
742f2b07dd Add support for compact string representation in the RCF API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-14 11:08:32 -08:00
Leonardo de Moura
6c35e08e43 Make sure we do not use denominators != 1 when encoding values of algebraic extensions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-14 10:43:18 -08:00
Leonardo de Moura
7312f49f88 Fix Visual Studio warnings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-13 09:06:07 -08:00
Leonardo de Moura
f747bde548 Add restore_interval for extensions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 21:59:41 -08:00
Leonardo de Moura
be2bf861c7 Use clean_denominators before root isolation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 20:43:17 -08:00
Leonardo de Moura
2b5883454c Add support for prem_gcd in square_free
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 19:49:50 -08:00
Leonardo de Moura
551d0b7de0 Fix bug in sprem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 19:44:05 -08:00
Leonardo de Moura
7711146d23 Add prem_gcd based on pseudo-remainder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 19:36:07 -08:00
Leonardo de Moura
13d5c3e07a Add normalize_int_coeffs to control the coefficient growth in Sturm sequences
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 18:01:29 -08:00
Leonardo de Moura
e6102a8260 Move clean_denominators code to the top
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 17:11:42 -08:00
Leonardo de Moura
1e362e6fec Add comments to mark sections
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 17:08:58 -08:00
Leonardo de Moura
a9fa232f11 Fix bug in compare
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 16:45:24 -08:00
Leonardo de Moura
ea9421bb38 Expose rcf module parameters
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 16:40:45 -08:00
Leonardo de Moura
e6a35c6241 Add prem to avoid rational function values
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 16:27:56 -08:00
Leonardo de Moura
09d3686d58 Fix memory leak in realclosure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-01-12 15:54:07 -08:00