3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-25 12:35:59 +00:00
Commit graph

20 commits

Author SHA1 Message Date
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
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
Nikolaj Bjorner
ea0876b6d6 add lambda definitions during ast translation #5820
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-21 18:05:29 -08: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
bdd66e1fa0 fix #3180 fix #3181 #3184
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-07 12:13:43 +01:00
Nikolaj Bjorner
520ce9a5ee integrate lambda expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-26 07:23:04 -07:00
Nikolaj Bjorner
c513f3ca09 merge with master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-03-25 14:57:01 -07:00
Bruce Mitchener
76eb7b9ede Use nullptr. 2018-02-12 14:05:55 +07:00
Nikolaj Bjorner
8198a8ce7b bug fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-12-23 14:41:16 -08:00
Miguel Angelo Da Terra Neves
a52fd4c6f2 merge
Signed-off-by: Miguel Angelo Da Terra Neves <t-mineve@microsoft.com>
2017-12-15 14:01:50 -08:00
Miguel Angelo Da Terra Neves
b731d02adc fixes
Signed-off-by: Miguel Angelo Da Terra Neves <t-mineve@microsoft.com>
2017-12-15 13:56:59 -08:00
Nikolaj Bjorner
b3e5fade32 remove cache reset that causes crash
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-12-15 11:22:50 -08:00
Nikolaj Bjorner
030868d8de reset cache in ast_translation periodically to avoid congestion
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-12-15 07:21:37 -08:00
Nikolaj Bjorner
53e36c9cf9 re-organize iterators
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-11-16 09:29:44 -08:00
Nikolaj Bjorner
ba53fc1230 fix scc omitting blocked clauses
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-27 17:29:26 -07:00
Nikolaj Bjorner
0c9711aad7 copy declarations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-08 21:20:54 +03: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
Nikolaj Bjorner
b4cb51cdb3 working on Forking/Serializing a z3 Solver #209
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-11-06 17:29:24 -08:00
Leonardo de Moura
3a15db5244 Fix uninterpreted sort definition. There was a mismatch in the behavior of the API and SMT front-ends. The SMT front-ends were using user_sorts to be able to support parametric uninterpreted sorts. After this fix, the API also creates user_sorts.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-02-12 14:34:31 -08:00
Leonardo de Moura
ded42feeb6 Reorganizing code base
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-20 16:33:01 -07:00
Renamed from lib/ast_translation.cpp (Browse further)