Bruce Mitchener
9a99c78ffb
Enable thread_local code more broadly.
...
This was only being enabled on Windows, Linux, and FreeBSD. (FreeBSD
only had it enabled in the legacy build system, not in cmake.)
`thread_local` is part of C++11, so now that we require C++17
or later and more recent compilers, this should work everywhere
that threading does, so only disable it within a `SINGLE_THREAD`
build.
2022-08-02 09:24:51 +03:00
Bruce Mitchener
77e5d6ab19
Use nullptr consistently instead of 0
or NULL
.
2022-08-01 14:24:32 +03: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
Julien Schueller
224cc8f8dd
Fix case sensitive fs include Windows.h
...
Fixes compilation on case-sensitive filesystems (eg MinGW from Linux)
2019-10-13 05:28:36 -07:00
Nuno Lopes
5fbfc0f9f7
minor code simplification
2019-09-05 13:47:45 +01:00
Nuno Lopes
87a96d7bd4
fix mutexes hanging due to access to free'd memory
...
Thanks to Kevin de Vos for reporting the bug & testing the fix
2019-09-03 20:02:21 +01:00
Nuno Lopes
e603bc1ea1
remove suport for VS 2013
2019-06-19 15:06:39 +01:00
Nuno Lopes
c21f0c2f00
restore most global muxes as heap-allocated to avoid crashes with hard-kills like ctrl-c
2019-06-13 18:42:57 +01:00
Nuno Lopes
38eeaeae7a
memory_allocator: allocate mutex in global init since allocate() is called from API functions before memory initialization
2019-06-13 12:02:28 +01:00
Nuno Lopes
cf3e649462
fix crash on Mac due to different destruction order of globals
...
the mutex in memory_manager has to be destroyed after all mem deallocations happen
2019-06-13 11:22:18 +01:00
Nuno Lopes
04a2cce830
don't use thread-local storage if running a single thread
2019-06-12 09:59:19 +01: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
Bruce Mitchener
4bc1b0b8c8
Fix typos.
2018-12-05 21:07:34 +07:00
Nikolaj Bjorner
030f458017
add vs2013 specific def for thread local
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-12-03 09:15:30 -08:00
Bruce Mitchener
a332eb10bc
Use C++11 thread_local for portability.
...
This should work on all supported compilers rather than using
__declspec(thread) and __thread.
2018-12-02 22:10:37 +07:00
Nikolaj Bjorner
0c1408b30e
fixing #1948
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-21 13:48:48 -08:00
Nikolaj Bjorner
d74978c277
fix #1762 , #1764 , #1768
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-26 20:29:26 +01: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
a6ac6958a6
fix gcc compilation error
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-02-02 09:48:02 -08:00
Nikolaj Bjorner
ad92bfb1a1
fix python build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-02-01 20:19:24 -08:00
Nikolaj Bjorner
1a6f8c2fad
working on parallel solver
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-10 16:35:05 -07:00
Nikolaj Bjorner
79b2a4f605
bug fixes
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-09 07:22:02 -07:00
Nikolaj Bjorner
133f376172
assertion fixes
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-29 19:53:22 -07:00
Nikolaj Bjorner
651587ce01
merge with master branch
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-19 09:39:22 -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
Nikolaj Bjorner
e65f106a83
ccc
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-04-19 08:59:49 -07:00
Nikolaj Bjorner
5f5819f029
fix xor handling, and defaults for cardinality
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-03-09 22:44:41 +01:00
Nikolaj Bjorner
6cf76f2113
remove references to _DEBUG use Z3DEBUG instead
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-02-29 20:23:20 -08:00
Nikolaj Bjorner
b4d0e6076e
change behavior on allocation excess to process exit to avoid memory smashes on exception unsafe code blocks. Fixes issue #175
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-09-02 16:12:19 -07:00
Nuno Lopes
eeef4d29d6
remove the optimization for 0-byte allocations
...
I wasn't able to trigger with any SMT or API benchmark
Removing it ensures the function never returns null and enables further optimizations.
I get an amazing avg speedup of 0.9%
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
2015-07-01 14:38:33 +01:00
Nikolaj Bjorner
108d76270e
set undo trail after set-watches to avoid crash during exception handling (the relevancy trail is scoped so ends up traversing the trail if allocating the watch throws an exception). Fixes crash.smt in issue #56
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-06-23 19:18:03 +02:00
Nikolaj Bjorner
564da787fb
add count of memory allocations and way to limit allocations globally. Fix purification in nlsat_smt to fix regressions on QF_UFNRA
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-06-22 07:45:40 +02:00
Nikolaj Bjorner
b08ccc7816
added missing Copyright forms
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-06-10 11:54:02 -07:00
Nuno Lopes
44e647e72b
add reallocate() function and use it in bit_vector and vector containers
...
give a speedup of 1-4%
Signed-off-by: Nuno Lopes <a-nlopes@microsoft.com>
2015-03-10 16:53:47 +00:00
Nuno Lopes
8029e31ddd
add compiler attributes to allocation functions
...
Signed-off-by: Nuno Lopes <a-nlopes@microsoft.com>
2015-02-28 17:31:50 +00:00
Nuno Lopes
5676fbbc9e
compiler love: make a few symbols static and avoid unneeded relocations
...
Signed-off-by: Nuno Lopes <a-nlopes@microsoft.com>
2015-02-22 11:13:51 +00:00
Christoph M. Wintersteiger
23af977d68
Multi-threading bugfix, DLL could be used from other threads before the main thread initializes it.
...
Thanks to user xor88 for reporting this one.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2014-09-03 17:49:10 +01:00
Nikolaj Bjorner
c58b4f9a53
optimize rule processing
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-04-26 11:43:06 -07:00
Nuno Lopes
7ce88d4da9
fix a few compilation warnings
...
- remove unused variables and class fields
- add support for gcc 4.5 & clang's __builtin_unreachable
- fix 2 bugs related to strict aliasing
- remove a few unused function parameters
Signed-off-by: Nuno Lopes <t-nclaud@microsoft.com>
2013-04-21 14:36:39 -07:00
Leonardo de Moura
5e4d1151eb
fixing clang compilation problems
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-12-05 15:20:16 -08:00
Leonardo de Moura
589f096e6e
working on new parameter framework
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-12-01 15:54:34 -08:00
Leonardo de Moura
ed5d154f78
broke dependency between components that need initialization and memory_manager
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-11-17 11:30:25 -08:00
Leonardo de Moura
2c464d413d
Reorganizing source code. Created util dir
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-20 10:19:38 -07:00