3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-09 10:51:50 +00:00
Commit graph

2340 commits

Author SHA1 Message Date
Bruce Mitchener 42f5047463 cmake: Cleanup remnants of workaround for USES_TERMINAL.
In older versions, this was dependent upon the version of cmake,
but when it was updated for newer cmake, these remnants were
left.
2022-08-02 17:39:10 +03:00
Bruce Mitchener fe1e301735 Remove Z3_bool, Z3_TRUE, Z3_FALSE from the API.
These have just been aliases for the standard type `bool` and
values `true` and `false` for a long time now.
2022-08-01 14:25:00 +03:00
Bruce Mitchener 77e5d6ab19 Use nullptr consistently instead of 0 or NULL. 2022-08-01 14:24:32 +03:00
Bruce Mitchener 5d0dea05aa
Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
Bruce Mitchener fc40e3c510 Remove usages of Z3_bool, just use bool. 2022-07-30 05:49:05 +02:00
Bruce Mitchener 1eb84fe4b9
Mark override methods appropriately. (#6207) 2022-07-29 23:29:15 +02:00
Bruce Mitchener 75339c6db7
Fix doxygen warnings in C API docs. (#6202) 2022-07-29 11:49:24 +02:00
Nikolaj Bjorner ee80414e55 sketch initial for mpz/mpq numeral creation 2022-07-27 10:46:03 +02:00
Nikolaj Bjorner b6c80e8b00 fix #6193 2022-07-27 04:28:41 +02:00
Nikolaj Bjorner cd7ef11593 add decide callbacks to propagator API
this is an intermediary state. The decide_eh is only partially implemented.
2022-07-27 04:28:41 +02:00
Bruce Mitchener 70895b2375
Improve intra-doc linking. (#6191) 2022-07-25 23:14:10 +02:00
Nikolaj Bjorner 5c2c0ae900 force-push on new_eq, new_diseq in user propagator, other fixes to Python bindings for user propagator
This update allows the python bindings for user-propagator to handle functions that are declared to be registered with the user propagator plugin. It fixes a bug in UserPropagateBase.add to allow registering terms dynamically during search.
It also fixes a bug in theory_user_propagate as scopes were not fully pushed when the solver gets the callbacks for new equalities and new disequalities.
It also adds equality and disequality interfaces to the sat/smt solver version (which isn't being exercised in earnest yet)
2022-07-25 03:42:29 +02:00
Bruce Mitchener 3e38bbb009
Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
Nikolaj Bjorner 1155ea69a1 add await
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-22 12:42:19 -07:00
Nikolaj Bjorner 212a0657a2 try .ast
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-22 12:34:07 -07:00
Nikolaj Bjorner 7c0ec21af8 try to add basic expression simplification
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-22 12:21:25 -07:00
Nikolaj Bjorner 4368ec9953 startswith
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-22 11:53:07 -07:00
Nikolaj Bjorner 87dd837b55 Merge branch 'master' of https://github.com/Z3Prover/z3 2022-07-21 23:22:37 -07:00
Nikolaj Bjorner 89af9df02d add IEnumerable for distinct
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-21 23:22:24 -07:00
Nikolaj Bjorner 0f9684e1f8 make fresh_eh() work for Python bindings of user-propagator 2022-07-21 21:44:02 -07:00
Nikolaj Bjorner 907dc2c2d2 adding toString() to model object
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-21 20:45:45 -07:00
Nikolaj Bjorner a66095bb08 fix the path to ../build/z3-built
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-20 22:36:34 -07:00
Nikolaj Bjorner dc9565990c did I mess up wasm paths in jest - or not?
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-20 22:15:22 -07:00
Nikolaj Bjorner 37008226c3 did I mess up wasm paths in jest?
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-20 22:14:21 -07:00
Nikolaj Bjorner 5b219aab76 add mutual recursive datatypes to c++ API #6179
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-20 20:32:00 -07:00
Nikolaj Bjorner 2e13c0bf41 add API and example for one dimensional algebraic datatype #6179 2022-07-20 19:43:18 -07:00
Nikolaj Bjorner 81cb575c22 simplify
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-19 22:58:12 -07:00
Nikolaj Bjorner 2e52029114 add command-line overwrite capability to setup.py
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-19 22:53:25 -07:00
Nikolaj Bjorner 2c8df54b70 enable fresh for python wrapper for user-propagator
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-19 13:48:44 -07:00
Nikolaj Bjorner dead0c9de2 reverting relative path
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-18 11:47:57 -07:00
Nikolaj Bjorner afcfc80c42 the relative path seems out of sync with how it is set up in node.ts 2022-07-18 11:21:16 -07:00
Nikolaj Bjorner 7f1893d781 add missing MkSub to NativeContext
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-18 10:21:27 -07:00
Nikolaj Bjorner 393c63fe0c fix #6114 2022-07-18 09:33:39 -07:00
Nikolaj Bjorner 527914db05 update documentation to use latest conventions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-17 11:49:28 -07:00
Nikolaj Bjorner b5a89eb4ab add missing generation of z3.z3 for pydoc and add some explanations to logging function declaration 2022-07-17 11:03:55 -07:00
Nuno Lopes 6e5ced0080 optimizations to api ctx ref counting 2022-07-17 11:44:35 +01:00
Nikolaj Bjorner eb2ee34dfe fix typo
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-16 16:58:57 -07:00
Nikolaj Bjorner aefd336c18 set OCaml default behaivor to enable concurrent dec ref #6160
Add Z3_enable_concurrent_dec_ref to the API.
It is enables behavior of dec_ref functions that are exposed over the API to work with concurrent GC. The API calls to dec_ref are queued and processed in the main thread where context operations take place (in a way that is assumed thread safe as context operations are only allowed to be serialized on one thread at a time).
2022-07-16 16:49:39 -07:00
Nikolaj Bjorner 6688c1d62a prepare for #6160
The idea is to set _concurrent_dec_ref from the API
(function not yet provided externally, but you can experiment with it by setting the default of m_concurrent_dec_ref to true).
It then provides concurrency support for dec_ref operations.
2022-07-15 03:53:15 -07:00
Stefan Muenzel 2f5fef92b7
Cache param descrs when modifying solver params (#6156) 2022-07-14 11:11:56 -07:00
Nikolaj Bjorner 49b7e9084f Merge branch 'master' of https://github.com/z3prover/z3 2022-07-11 09:26:34 -07:00
Stefan Muenzel 99212a2726
Use int64 for ocaml api functions that require it (#6150)
* Use int64 for ocaml api functions that require it

Signed-off-by: Stefan Muenzel <source@s.muenzel.net>

* Use elif

Signed-off-by: Stefan Muenzel <source@s.muenzel.net>
2022-07-11 09:25:05 -07:00
Nikolaj Bjorner 9dd529bb12 missing initialization of List for cmd interpreter 2022-07-11 08:17:38 -07:00
Kevin Gibbons 0d4169533a
fix js distributable (#6139) 2022-07-06 10:59:01 -07:00
Nikolaj Bjorner 02a92fb9e9 revert to use GCHandle for UserPropagator
avoids using a global static array
2022-07-03 17:00:40 -07:00
Nikolaj Bjorner bb966776b8
Update UserPropagator.cs 2022-07-02 13:15:05 -07:00
Nikolaj Bjorner d37ed4171d
Update Expr.cs
Add a Dup functionality that allows extending the life-time of expressions that are passed by the UserPropagator callbacks (or other code).
2022-07-02 13:12:54 -07:00
Nikolaj Bjorner 54b16f0496
Update NativeStatic.txt
not so automatically generated
2022-07-02 13:04:09 -07:00
Nikolaj Bjorner 4d23f2801c ml pre
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-01 20:35:47 -07:00
Nikolaj Bjorner 815518dc02 add facility for incremental parsing #6123
Adding new API object to maintain state between calls to parser.
The state is incremental: all declarations of sorts and functions are valid in the next parse. The parser produces an ast-vector of assertions that are parsed in the current calls.

The following is a unit test:

```
from z3 import *

pc = ParserContext()

A = DeclareSort('A')

pc.add_sort(A)
print(pc.from_string("(declare-const x A) (declare-const y A) (assert (= x y))"))
print(pc.from_string("(declare-const z A) (assert (= x z))"))

print(parse_smt2_string("(declare-const x Int) (declare-const y Int) (assert (= x y))"))

s = Solver()
s.from_string("(declare-sort A)")
s.from_string("(declare-const x A)")
s.from_string("(declare-const y A)")
s.from_string("(assert (= x y))")
print(s.assertions())
s.from_string("(declare-const z A)")
print(s.assertions())
s.from_string("(assert (= x z))")
print(s.assertions())
```

It produces results of the form

```
[x == y]
[x == z]
[x == y]
[x == y]
[x == y]
[x == y, x == z]
```
Thus, the set of assertions returned by a parse call is just the set of assertions added.
The solver maintains state between parser calls so that declarations made in a previous call are still available when declaring the constant 'z'.
The same holds for the parser_context_from_string function: function and sort declarations either added externally or declared using SMTLIB2 command line format as strings are valid for later calls.
2022-07-01 20:27:18 -07:00