3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-16 17:36:39 +00:00
Commit graph

126 commits

Author SHA1 Message Date
Nikolaj Bjorner
fc6c4c98e2 initial warppers for seq-map/seq-fold
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-09 14:52:49 -07:00
Nuno Lopes
b2d5c24c1d remove a few string copies 2023-12-20 16:55:09 +00:00
Nuno Lopes
fcc7b25c19 remove a few string copies 2023-12-19 14:34:37 +00: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
f17691715b make default argument to ensure_def and mk_def explicit
- insert also macro definitions into models
2023-05-02 12:18:31 -07:00
Nikolaj Bjorner
7d364bf786 Allow building AC functions without requiring arity check from API 2023-01-22 14:39:58 -08:00
Nikolaj Bjorner
84af521514 fixes #6439 #6436 2022-11-04 09:36:06 -07:00
Bruce Mitchener
72f4ee9230 api: Correctly map OP_BSREM0 to Z3_BSREM0. 2022-08-12 14:40:16 -04: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
15c47808d6 #6059
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-30 11:03:50 -07:00
Nikolaj Bjorner
c9fa00aec1 expose recursive functions with own op-code over API 2022-04-13 11:24:24 +02:00
Frédéric Bour
f43d9d00d4
Z3_add_rec_def body is not a macro (#5963) 2022-04-11 13:38:20 +02:00
Nikolaj Bjorner
011c1b2dd2 remove refs to bare_str 2022-04-09 12:06:27 +02:00
Nikolaj Bjorner
7091b1c856 add additional regex operators to API 2022-02-20 10:29:18 +02:00
Nikolaj Bjorner
dfe2b27f9a #5773 2022-01-12 13:28:15 -08:00
Nikolaj Bjorner
7a6070506d #5727
Expose diff function,
expose allchar in Java API
expose op codes for replace/re/all
2021-12-20 10:17:06 -08:00
Nikolaj Bjorner
518ef9f916 fix #5674
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-18 21:14:50 -08:00
CEisenhofer
c58b2f4a9c
Added character functions to API (#5549)
* Added character functions to API

* Changed names of c++ functions
2021-09-15 13:34:58 +01:00
Nikolaj Bjorner
592c53e46d char sort
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-23 20:45:26 -07:00
Nikolaj Bjorner
170ef1dcca add character sort to Python API and allchar function to API for ease. #5500 2021-08-23 20:02:50 -07:00
Nikolaj Bjorner
c8a83749dd #5484 2021-08-16 11:19:22 -07:00
Nikolaj Bjorner
0ba518b0c0 avoid perf abyss for macros
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-20 20:07:06 -07:00
CEisenhofer
0fa4b63d26
Added sbv2s (#5413)
* Added sbv2s

* Fixed indention

Co-authored-by: Clemens Eisenhofer <Clemens.Eisenhofer@tuwien.ac.at>
2021-07-16 17:58:28 +02:00
Nikolaj Bjorner
7ae78da850 adding access to characters over API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-13 15:56:08 +02: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
Nuno Lopes
bcad4d9435 revert my mess with the ast hashtable
will share results form the experiments later
2021-02-17 14:29:07 +00:00
Nikolaj Bjorner
1da7522893 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-02-14 17:47:19 -08:00
Nikolaj Bjorner
8f577d3943 remove ast_manager get_sort method entirely 2021-02-02 13:57:01 -08:00
Nikolaj Bjorner
3ae4c6e9de refactor get_sort 2021-02-02 04:45:54 -08:00
Nuno Lopes
30fd01b526 api: avoid copying param_refs whenever possible 2020-11-06 10:51:51 +00:00
Nikolaj Bjorner
ceedd7e84d #4721
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-10-29 16:55:30 -07:00
Nikolaj Bjorner
78a1736bd2 prepare symbols to be more abstract, update mbi, delay initialize some modules
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-01-10 12:02:08 -08:00
Nikolaj Bjorner
7e174f50c1 use Z3_char_ptr
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-08 09:14:10 -07:00
Nikolaj Bjorner
1203af83eb expose cardinality declarations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-24 12:30:25 -07:00
Nikolaj Bjorner
fcc7bd35e5 fix #2489
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-08-15 21:04:04 -07:00
Nikolaj Bjorner
f128398bf9 add clause proof module, small improvements to bapa
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-05-30 15:57:19 -07:00
Nikolaj Bjorner
86b98e3477 remove trc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-04-17 10:47:46 -07:00
Nikolaj Bjorner
ae982c5225 add tc and trc functionals for binary relations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-04-10 04:12:45 +02:00
Nikolaj Bjorner
f55e4ccc41 support indexed relations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-28 07:04:22 -07:00
Nikolaj Bjorner
5536834019 add API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-28 07:04:21 -07:00
Nikolaj Bjorner
dc0e9c1919 completing user print experience with seq/re #2200
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-24 11:46:36 -07:00
Nikolaj Bjorner
9bc4914268 add nth remapping
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-17 11:32:28 -07:00
Nikolaj Bjorner
092c25d596 fix #2007
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-12-10 18:37:30 -08:00
Bruce Mitchener
edf8ba44d1 Switch from using Z3_bool to using bool.
This is a continuation of the work started by using stdbool and
continued by switching from Z3_TRUE|FALSE to true|false.
2018-11-20 11:27:09 +07:00
Bruce Mitchener
56bbed173e Remove usages of Z3_TRUE / Z3_FALSE.
Now that this is all using stdbool.h, we can just use true/false.

For now, we leave the aliases in place in z3_api.h.
2018-11-20 00:25:37 +07:00
Nikolaj Bjorner
b02fec91cc fixing python build errors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-01 09:34:42 -05:00
Nikolaj Bjorner
51a0022450 add recfun to API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-27 11:41:18 -05:00
Bruce Mitchener
cdfc19a885 Use nullptr. 2018-10-02 09:11:19 +07:00
Nikolaj Bjorner
77d68409c2 handle null declarations for kind
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-08-01 08:43:32 -07:00
Nikolaj Bjorner
1cb3f7c792 fixing #1520
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-28 18:03:13 -07:00