3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-25 18:15:32 +00:00
Commit graph

126 commits

Author SHA1 Message Date
Nikolaj Bjorner
ff104c4b13 move definitions to cpp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-07-15 11:09:59 -07:00
Nikolaj Bjorner
b831a589e5 fixes to #7250 2024-06-12 08:50:24 -07:00
Nikolaj Bjorner
bc70282a18 mute some compiler warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-02-03 15:42:06 -08:00
Nikolaj Bjorner
9425c419ad port remaining egraph update
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-02-03 15:38:05 -08:00
Nikolaj Bjorner
a5a819c291 port updates to egraph from poly
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-02-03 12:48:58 -08:00
Nikolaj Bjorner
ddf2eb57d6 deleted parameter
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-12 10:42:08 -08:00
Nikolaj Bjorner
955c80e98b import updates from poly branch
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-10 19:42:58 -08:00
Bruce Mitchener
d66df2616f
Fix some typos. (#7075) 2023-12-29 15:20:06 +00:00
Jakob Rath
ec2b8eb4ca
Merge shared parts from polysat branch (#7063)
* sat_literal: make constants constexpr

* dlist: rename elem -> list

* tbv: use get_bit

* additional pdd and rational tests

* egraph: callback setters take functions by value

This allows to set callbacks without defining a separate variable for
the callback lambda.

(previous usage does one copy of the function, exactly as before)

* cmake: enable compiler error when non-void function does not return value
2023-12-28 11:11:53 -08:00
Nikolaj Bjorner
ad07e0e18d add sub and super-slice functionality directory to euf-bv-plugin 2023-12-23 10:27:54 -08:00
Nikolaj Bjorner
9293923b8a Add intblast solver 2023-12-15 13:50:38 -08:00
Nikolaj Bjorner
1de25ed09c pending files 2023-12-02 19:43:51 -08:00
Nikolaj Bjorner
b52fd8d954 add EUF plugin framework.
plugin setting allows adding equality saturation within the E-graph propagation without involving externalizing theory solver dispatch. It makes equality saturation independent of SAT integration.
Add a special relation operator to support ad-hoc AC symbols.
2023-11-30 13:58:30 -08:00
Nikolaj Bjorner
26440ed3d8 deal with ubuntu/clang warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-29 15:45:19 -08:00
Nikolaj Bjorner
2f01b5b567 re-enable delayed literal propagation 2023-11-29 14:00:17 -08:00
Nikolaj Bjorner
4289cfac8d revert some fixes to euf
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-29 13:47:59 -08:00
Nikolaj Bjorner
d469c1054e remove separate to_add_literal queue 2023-11-29 12:45:43 -08:00
Nikolaj Bjorner
e972eb33b2 #6523 - contains_ptr bug regarding etable reinserts 2023-11-29 10:44:36 -08:00
Nikolaj Bjorner
ad2107f079 fix #6978 2023-11-14 08:45:22 -08:00
Nikolaj Bjorner
5942dc24bd #6523 2023-10-15 11:41:25 -07:00
Nikolaj Bjorner
61319ffd85 cache is_shared information in the enode
observed perf overhead for QF_NIA is that assume_eqs in theory_lra incurs significant overhead when calling is_relevant_and_shared. The call to context::is_shared and the loop checking for beta redexes is a main bottleneck. The bottleneck is avoided by caching the result if is_shared inside the enode. It is invalidated for every merge/unmerge.
2023-09-23 17:19:06 -07:00
Nikolaj Bjorner
d0f2b00f96 fix build warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-22 12:24:30 -07:00
Lev Nachmanson
0a91465e13 comment out debug output 2023-07-16 18:40:53 -10:00
Nikolaj Bjorner
8a913981f6 fix #6813 - proofs terms are fragile with respect to simplificiation of not(not(e)). It would be better if proof terms didn't have to track this level of detail, but the legacy proof format assumes strictly checkable proofs. A patch is to fixup terms within the mk_transitivity constructor
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-15 17:03:04 -07:00
THE Spellchecker
dc0887db5a
Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
Nikolaj Bjorner
d1c7ff1a36 add unconstrained elimination for sequences 2023-03-20 17:07:04 +01:00
Nikolaj Bjorner
9290de8223 make euf-egraph resilient to when there are no consumers to literal propagation.
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-18 07:57:19 -08:00
Nikolaj Bjorner
7368f9f7d3 increase build version, better propagation in euf-egraph, handle assumptions in sat.smt
- increase build version to 4.12.1. This prepares updated release for MacOs-11 build on x86
- move literal propagation mode in euf-egraph to a callback and traversal of equivalence class. Track antecedent by newest equality instead of root. This makes equality propagation to literals have similar behavior as in legacy solver and appears to result in a speedup (10% fewer conflicts on QF_UF/QG-classification/qg5/iso_icl478.smt2 in preliminary testing)
- fix interaction of pre-processing and assumptions. Pre-processing has to freeze assumption literals so they don't get eliminated. This is similar to dependencies that are already frozen.
2023-01-17 14:07:07 -08:00
Nikolaj Bjorner
15dc7b78a0 Move merge_tf handling to euf_internalize
literals true/false are not necessarily created when the merge flag is set.
Also disable merge_tf for if-then-else expressions
Perhaps even not insert children of if expressions into congruence table?
2022-11-24 15:09:13 +07:00
Nikolaj Bjorner
f87e187b62 #6429 2022-11-23 17:52:14 +07:00
Nikolaj Bjorner
22353c2d6c new core perf - add merge_tf and enable_cgc distinction
perf fix for propagation behavior for equalities in the new core.
The old behavior was not to allow congruence closure on equalities.
The new behavior is to just not allow merging tf with equalities unless they appear somewhere in a foreign context (not under a Boolean operator)

The change re-surfaces merge_tf and enable_cgc distinction from the old core.
They can both be turned on or off.

merge_enabled renamed to cgc_enabled

The change is highly likely to introduce regressions in the new core.

Change propagation of literals from congruence:
- track antecedent enode. There are four ways to propagate
literals from the egraph.
- the literal is an equality and the two arguments are congruent
- the antecedent is merged with node n and the antecedent has a Boolean variable assignment.
- the antecedent is true or false, they are merged.
- the merge_tf flag is toggled to true but the node n has not been merged with true/false
2022-11-23 11:37:24 +07:00
Nikolaj Bjorner
59b7845c7d reset visited (fast mark) to not clash with occurs 2022-11-17 17:36:21 +09:00
Nikolaj Bjorner
1646a41b2f minor fixes
- ensure mk_extract performs simplification to distribute over extract and removing extract if the range is the entire bit-vector
- ensure bool_rewriter simplifeis disjunctions when applicable.
2022-11-02 08:44:55 -07:00
Nikolaj Bjorner
7b3a634b8d wip - features and bug-fixes to proof logging 2022-10-18 07:54:49 -07:00
Nikolaj Bjorner
ac1552d194 wip - updates to proof logging and self-checking
move self-checking functionality to inside sat/smt so it can be used on-line and not just off-line.

when self-validation fails, use vs, not clause, to check. It allows self-validation without checking and maintaining RUP validation.

new options sat.smt.proof.check_rup, sat.smt.proof.check for online validation.

z3 sat.smt.proof.check=true sat.euf=true /v:1 sat.smt.proof.check_rup=true /st file.smt2 sat.smt.proof=p.smt2
2022-10-16 23:33:30 +02:00
Nikolaj Bjorner
9be8fc7857 Add EUF (congruence closure) proof hints and checker to the new core
EUF proofs are checked modulo union-find.
Equalities are added to to union-find if they are assumptions or if they can be derived using congruence closure. The congruence closure assumptions are added as proof-hints.
Note that this proof format does not track equality inferences, symmetry and transitivity. Instead they are handled by assuming a union-find based checker.
2022-09-25 14:26:20 -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
815c971c9a #5778
regression when tracking literal explanations
2022-03-22 01:55:43 -07:00
Nikolaj Bjorner
20bd59bb20 #5778 - missed tracking literal assignment justification
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-21 10:15:00 -07:00
Nikolaj Bjorner
cd56d55e34 #5753 2022-01-16 09:31:16 -08:00
Nikolaj Bjorner
d1fb831030 relevancy overhaul 2022-01-04 16:03:31 -08:00
Nikolaj Bjorner
84f514a4f4 throttle ackerman on arrays 2022-01-01 15:33:33 -08:00
Nikolaj Bjorner
e8833f4dac working on relevancy=3 2021-12-30 17:07:14 -08:00
Nikolaj Bjorner
b87b464e69 set relevancy flag on enode 2021-12-29 17:57:28 -08:00
Nikolaj Bjorner
28bce8f09c working on relevant 2021-12-28 11:00:02 -08:00
Nikolaj Bjorner
281fb67d88 unit propagate with fingerprints 2021-10-04 20:01:46 -07:00
Nikolaj Bjorner
137e5c5263 fix tmp_eq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-28 14:28:41 -07:00
Nikolaj Bjorner
67ae75bac7 fix tmp_eq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-28 14:27:46 -07:00
Nikolaj Bjorner
92c1b600c3 tuning eval 2021-09-28 09:56:00 -07:00
Nikolaj Bjorner
18d1b368d1 #5532 2021-09-21 20:12:32 -07:00