Phil Clayton
e6a089e63d
Fix build when Z3_API macro is non-empty ( #7553 )
...
API function definitions are updated to be consistent with header files.
2025-02-13 08:46:08 -08:00
Nuno Lopes
bd8c870bbe
api: avoid some string copies when using mk_external_string
2024-12-28 09:42:54 +00:00
Nikolaj Bjorner
92065462b4
use std::exception as base class to z3_exception
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-04 11:08:15 -08:00
Steven Moy
111fcb9366
Implement API to set exit action to exception ( #7192 )
...
* Implement API to set exit action to exception
* Turn on exit_action_to_throw_exception upon API context creation
2024-03-27 19:06:58 -07:00
Nuno Lopes
b2d5c24c1d
remove a few string copies
2023-12-20 16:55:09 +00:00
Nikolaj Bjorner
f1a39b8884
add comment regarding usage model for flush_objects() to relate with pr #6992
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-15 11:54:59 -08:00
Nuno Lopes
ff33fa355a
fix debug single-thread build
2023-09-18 09:44:37 +01:00
Nikolaj Bjorner
3f2bbe5589
harness del_object #6452
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-14 08:54:08 -08:00
Facundo Domínguez
91cdc082c4
Optimize calls to Z3_eval_smtlib2_string ( #6422 )
...
* Allow reseting the stream of smt2::scanner
* Put the parser of parse_smt2_commands in the cmd_context
* Move parser streams to cmd_context
* Move parser fields from cmd_context to api::context
* Move forward declarations from cmd_context.h to api_context.h
* Change parse_smt2_commands_with_parser to use *& instead of **
* Add tests for Z3_eval_smtlib2_string
* Don't reuse the streams in Z3_eval_smtlib2_string
* Fix indentation
* Add back unnecessary deleted line
Co-authored-by: Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt>
2022-10-28 13:57:22 -07:00
Nikolaj Bjorner
a5ad109707
suppress debug warnings when concurrent dec-ref is enabled. The contract with the client is that it doesn't invoke methods on auxiliary objects after the context is deleted. The client is not required to decrement reference counts
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-09-11 19:06:23 -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
Nikolaj Bjorner
127af83c53
remove ad-hoc diagnostics
2022-05-21 10:27:37 -04:00
Nikolaj Bjorner
363b69f588
fix #6034
2022-05-16 16:44:13 -07:00
Nikolaj Bjorner
b1aa6b260b
disable normalize
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 13:31:35 -07:00
Nikolaj Bjorner
6deb4dee37
disable normalize
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 13:30:50 -07:00
Nikolaj Bjorner
41aa7d7b60
stack
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-02 09:00:51 -08:00
Nuno Lopes
9b5ec6d004
logging cleanup
...
move everything out-of-line as common path doesn't log
fix some race conditions on file ptr vs enable_logging vars
2021-08-29 12:24:19 +01: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
Nuno Lopes
49906a5a58
api_context: remove basic&arith fids fields
...
these are now constant,s o we can save some space
the remaining ones need to be made constant as well..
2021-04-13 17:42:42 +01:00
Nuno Lopes
afdf80509a
remove api_context::m_search as it's always constant (false)
2021-04-13 17:32:17 +01:00
Nuno Lopes
853ce099ec
api_context: consolidate ast trail vectors
...
a context never changes between user rc/non-user rc, so we can reuse the trail for both options
and save memory & smallish speedup
2021-04-13 17:21:42 +01:00
Nikolaj Bjorner
d03fdf5fed
more descriptive naming convention
2021-03-15 15:48:33 -07:00
Nikolaj Bjorner
4b3fecc35e
remove dependency on ast from params
2021-03-15 15:40:41 -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
fa5567fa1f
fix #4905
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-12-18 14:00:05 -08:00
Nikolaj Bjorner
8d76470a8a
fixes to mostly solver arith/euf and backtracking scopes
2020-10-26 11:06:41 -07:00
Nuno Lopes
4e9035d4b9
cleanup thread pool of scoped_timer on memory finalize
...
but keep it alive on Z3_memory_reset()
2020-10-24 12:46:50 +01:00
Nikolaj Bjorner
96f10b8c1c
user propagator
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-22 19:01:04 -07:00
Nikolaj Bjorner
65e6b73873
fix #4538 - regression when renaming family from special_relations to specrels
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-08 14:46:40 -07:00
Nuno Lopes
8fda4f904d
API: dont deref already free'd memory on error
2020-06-30 15:04:40 +01:00
Nuno Lopes
64f1a759a7
inline api_context::reset_error_code()
2020-06-29 19:14:17 +01:00
Nikolaj Bjorner
cbe52e298b
remove tracing, fix doctext
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-21 15:08:26 +02:00
Nuno Lopes
a53ff6f21c
turn locks into no-ops when compiled with -DSINGLE_THREAD
2019-06-05 12:11:27 +01:00
Nikolaj Bjorner
9262908ebb
mux
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-05 09:06:17 +01:00
Nikolaj Bjorner
b2845d888e
add get_lstring per #2286
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-05-22 18:32:57 +04:00
Nikolaj Bjorner
5536834019
add API
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-28 07:04:21 -07:00
Nuno Lopes
cd4b53500c
avoid a few str copies + symbol hiding
2019-03-08 10:13:46 +00:00
Nikolaj Bjorner
a3f9e3168d
simplify ~context #1948
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-12-11 09:29:59 -08:00
Bruce Mitchener
374b80f37f
Remove Z3_get_manager.
...
This was publicly exported from the shared library, but it isn't
in any header files and isn't used anywhere in the repository.
2018-12-04 21:38:33 +07: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
Nikolaj Bjorner
7d0d7e6343
have replayer handle oom natively
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-19 10:59:12 -08:00
Nikolaj Bjorner
51a0022450
add recfun to API
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-27 11:41:18 -05:00
Florian Pigorsch
326bf401b9
Fix some spelling errors (mostly in comments).
2018-10-20 17:07:41 +02:00
Nikolaj Bjorner
8e0eebf507
fix include path for z3_version.h
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-09-21 20:37:13 -07:00
Nikolaj Bjorner
f306f75e36
harness internalization and API for #1776
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-08-02 20:18:27 -07:00