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

16765 commits

Author SHA1 Message Date
Nikolaj Bjorner 202ce1edf0 #6100 - two perf fixes
remaining perf bug is dealing with very large bit-widths. mod 2^n should be computed natively based on n instead of 2^n because we pre-populate an array with all values up to n. Suppose n is 10000, the array has size 10000.
2022-06-21 12:45:29 -07:00
Nikolaj Bjorner f24c5ca99a #6095
arrays that are interpreted using as-array should be reflected back to store expressions
2022-06-21 12:42:44 -07:00
Nikolaj Bjorner 5ba8231d07 make it work with old pythons
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-21 09:10:38 -07:00
Nikolaj Bjorner d792d30e88 Update NativeContext.cs
TraceToFile does not correspond to the functionality of enable_trace. Z3_enable_trace tags a trace tag as input. It can be invoked multiple times with different tags. The debug tracing then shows logs with the corresponding tags.
2022-06-21 09:09:42 -07:00
Nikolaj Bjorner b254f4086b Separate out native static content for Java
Make it easier to add native methods for callbacks (for user propagator) #6097

The Java User propagator wrapper should define a base class with virtual methods that can be invoked from functions defined in NativeStatic.txt
2022-06-21 09:09:42 -07:00
Nuno Lopes 25e915fe95 fix #5990: deadlock in the scoped_timer
Thanks to Felix Kohlgrueber for reporting the bug and for the analysis
2022-06-21 16:29:09 +01:00
Nikolaj Bjorner 911134b3c7 add new heuristic rc2bin (to be tested) to maxsat
The rc2bin heuristic is a hybrid of rc2 and binary maxres.
It follows the suggestion by Nina to use rc2 on large cores after a single maxres relaxation step; otherwise maxres (binary) on smaller cores. In the design space of possible hybrids, this variant chooses to always apply a single layer of maxres and then rc2 for large cores.
2022-06-20 11:50:25 -07:00
AndreiL 940d10ae6d
Update coverage CI (#6099)
Ignore errors withing `gcov` when using `gcovr`, as per
https://github.com/gcovr/gcovr/issues/627.

Co-authored-by: Andrei Lascu <al2510@bencher14.nms.kcl.ac.uk>
2022-06-20 11:38:38 -07:00
Clemens Eisenhofer 2fa60aa43c
Added function to select the next variable to split on (User-Propagator) (#6096)
* Added function to select the next variable to split on

* Fixed typo

* Small fixes

* uint -> int
2022-06-19 10:49:25 -07:00
Nuno Lopes f08e3d70a9 attempt to fix windows build bot 2022-06-17 21:15:54 +01:00
Nuno Lopes f3c00a0a03 attempt to fix windows build bot 2022-06-17 18:05:19 +01:00
Nuno Lopes c3407fc304 fix build of tests 2022-06-17 17:11:18 +01:00
Nuno Lopes fcbbf7ba76 fix build warning+error in c++ example 2022-06-17 16:43:34 +01:00
Nuno Lopes d9fcfdab34 fix debug build 2022-06-17 14:35:33 +01: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
Nuno Lopes 70bcf0b51d reduce sizeof(enode) from 120 to 112 bytes by swapping the order of fields
Yes, those 8 bytes are yours now, use responsibly.
2022-06-17 12:07:15 +01:00
Nikolaj Bjorner 08c44bc6f6 remove unused static features
remove static features that tax solving time on large instances.
2022-06-16 15:40:01 -07:00
Nikolaj Bjorner 477e9625ef Don't reset the cache between applications of replace
tactic/lia2card shows a huge slowdown because the same replace function is called on thousands of assertions. Each time the cache gets reset with thousands of entries - they are all the same.
So don't reset the cache just because... Instead reset the cache if m_refs grows large.
2022-06-16 15:40:01 -07:00
Nikolaj Bjorner 99b606b861 add logging 2022-06-16 15:40:00 -07:00
Olaf Tomalka 7fdcbbaee9
Add high level bindings for js (#6048)
* [Draft] Added unfinished code for high level bindings for js

* * Rewrote structure of js api files
* Added more high level apis

* Minor fixes

* Fixed wasm github action

* Fix JS test

* Removed ContextOptions type

* * Added Ints to JS Api
* Added tests to JS Api

* Added run-time checks for contexts

* Removed default contexts

* Merged Context and createContext so that the api behaves the sames as in other constructors

* Added a test for Solver

* Added Reals

* Added classes for IntVals and RealVals

* Added abillity to specify logic for solver

* Try to make CI tests not fail

* Changed APIs after a round of review

* Fix test

* Added BitVectors

* Made sort into getter

* Added initial JS docs

* Added more coercible types

* Removed done TODOs
2022-06-14 09:55:58 -07:00
Nikolaj Bjorner 3d00d1d56b prepare for equality propagation from Grobner basis
Attempt to remedy performance regressions from the new solver core for NLA. It misses easy lemmas, presumably due to weaker bounds information.
2022-06-14 09:51:07 -07:00
Nikolaj Bjorner 8e2027107d fix spacing 2022-06-14 09:51:06 -07:00
Nikolaj Bjorner 55421afd61 fix regression in top-sort fix #6060 2022-06-14 09:51:06 -07:00
Nikolaj Bjorner 637120ced5 Treat arguments to recursive functions as beta redexes
An argument to a recursive function would escape the scope of the function application when the recursive function definitions are unfolded. Therefore, such argument occurrences need not be considered for extensional equality / equality sharing.

This filter is mostly relevant for recursive functions that take a lambda expression as argument. Lambda expressions / arrays that occur in shared occurrences are checked for extensionality.
2022-06-14 09:51:06 -07:00
Nikolaj Bjorner 25ad5cb073 prepare ground for drup trim
By not deleting justifications in base level unit literals it is possible for drup-trim to inspect the trail for dependencies - which clauses were used to derive a literal.
2022-06-14 09:51:06 -07:00
Nikolaj Bjorner 35d4605425 remove spurious output to stdout 2022-06-14 09:51:06 -07:00
Nikolaj Bjorner 04f94d818f fix #6091 2022-06-14 09:51:06 -07:00
Dominic Steinhöfel 46bc726391
Better error message for mismatching sorts in substitutions in z3.substitute (#6093) 2022-06-13 13:46:30 -07:00
Nikolaj Bjorner 470bf27d1d drat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-11 09:15:32 -07:00
Nikolaj Bjorner 9cd339841a for Arie
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-10 18:07:54 -07:00
Nikolaj Bjorner 994dab8eb6 add pre-filter for F* use case
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-10 17:56:48 -07:00
Nikolaj Bjorner 8efa3c8ade introduce notion of beta redex to deal with lambdas in non-extensional positions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-10 17:35:01 -07:00
Nikolaj Bjorner b9b5377c69 add a way to supress lambdas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-10 14:37:25 -07:00
Nikolaj Bjorner 5db133f875 add a way to supress lambdas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-10 14:35:20 -07:00
Nikolaj Bjorner 97437bce4c Update sat_params.pyg 2022-06-09 10:09:30 -07:00
Nikolaj Bjorner 828850f298 prepare for trim 2022-06-09 10:08:57 -07:00
Nikolaj Bjorner c5847504ff contains-partition 2022-06-08 12:20:45 -07:00
Nikolaj Bjorner 6a1193eebd reorg if-then-else structure 2022-06-08 10:00:45 -07:00
Nikolaj Bjorner 72a6384353 time overflow before stack overflow 2022-06-08 10:00:16 -07:00
Nikolaj Bjorner e468386359 #5656
guard __del__ operator by checking if library was unloaded.
2022-06-08 09:59:29 -07:00
Nikolaj Bjorner dee6c30f1b na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-08 08:05:19 -07:00
Nikolaj Bjorner 80604c7bc5 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-08 07:00:59 -07:00
Nikolaj Bjorner 51ed13f96a update topological sort to use arrays instead of hash tables, expose Context over Z3Object for programmability
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-08 06:28:24 -07:00
Nikolaj Bjorner 0e6c64510a display model in add/del format
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-07 13:14:36 -07:00
dependabot[bot] a7b6f30b29
Bump docker/metadata-action from 3 to 4 (#6086) 2022-06-07 19:41:36 +01:00
Nikolaj Bjorner 35986f3979 fix #6084
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-07 11:29:57 -07:00
Nikolaj Bjorner fe08c9976e fix #6081 2022-06-06 11:29:11 -07:00
Nikolaj Bjorner cc045debac again 2022-06-06 11:23:18 -07:00
Nikolaj Bjorner bb6c274ad3 fix #6085
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-06 10:00:08 -07:00
Nikolaj Bjorner dca1dcca6d ea
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-06 08:42:47 -07:00