3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 17:54:43 +00:00
Commit graph

49 commits

Author SHA1 Message Date
Nikolaj Bjorner
eb812e47be cleanup 2022-11-24 22:46:35 +07:00
Nikolaj Bjorner
a64c7c5d19 add incremental version of value propagate 2022-11-24 21:52:55 +07:00
Nikolaj Bjorner
decb3d3907 stashed header file 2022-11-24 19:51:26 +07:00
Nikolaj Bjorner
3479129582 remove unused structs 2022-11-24 19:47:26 +07:00
Nikolaj Bjorner
caf204ab95 hoist macro-replacer as shared utility, update eliminate-predicates and model reconstruction 2022-11-24 19:45:51 +07:00
Nikolaj Bjorner
9a2693bb72 tune euf-completion 2022-11-23 16:39:20 +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
b9f34286a7 generalize macro head detection and elaboration 2022-11-20 11:36:45 +07:00
Nikolaj Bjorner
c3c45f495a add some comments to elim_predicates 2022-11-19 19:45:25 +07:00
Nikolaj Bjorner
251d49d133 remove outdated comment 2022-11-19 18:55:30 +07:00
Nikolaj Bjorner
3f10933225 remove VERBOSE 0 2022-11-19 18:55:01 +07:00
Nikolaj Bjorner
771157696b new simplifier/tactic
eliminate_predicates finds macros and eliminates predicates from formulas as pre-processing.
2022-11-19 18:51:20 +07:00
Nikolaj Bjorner
d735faae4e add isolated hide/add model converter functions 2022-11-19 18:50:37 +07:00
Nikolaj Bjorner
a81a5ec68c add virtual function requirement to dependent_expr_state 2022-11-19 18:46:31 +07:00
Nikolaj Bjorner
59b7845c7d reset visited (fast mark) to not clash with occurs 2022-11-17 17:36:21 +09:00
Nikolaj Bjorner
6662afdd26 perf improvements to solve-eqs and euf-completion 2022-11-16 22:15:02 -08:00
Nikolaj Bjorner
2c7799939e wip - tuning and fixes to euf-completion 2022-11-16 03:47:38 -08:00
Nikolaj Bjorner
55ab7778f4 fix perf bug in new solve_eqs. 2022-11-16 03:46:17 -08:00
Nikolaj Bjorner
d70dbdad50 wip euf-completion - debugging 2022-11-15 20:17:39 -08:00
Nikolaj Bjorner
48c0f8694f euf-completion bug fix, streamline name to solve_eqs 2022-11-14 20:01:00 -08:00
Nikolaj Bjorner
3eeb59db34 fix #6451 missing occurrence marking when there is an unsafe equality already
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-14 19:23:27 -08:00
Nikolaj Bjorner
95e07ffe8e disable unsound context equality solving
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-14 19:14:51 -08:00
Nikolaj Bjorner
6297c001ee remove legacy solve_eqs_tactic entirely
also, bug fixes to elim_unconstrained (elim_uncnstr2) which is to replace legacy tactic for eliminating unconstrained constants.
2022-11-14 18:57:16 -08:00
Nikolaj Bjorner
3d2bf13577 streamline statistics, fix bug in updating goals 2022-11-13 20:30:00 -08:00
Nikolaj Bjorner
ce6cfeaa68 fix bug in euf-completion relating to missed normalization 2022-11-13 18:01:17 -08:00
Nikolaj Bjorner
3fa81d6527 bug fixes to elim-uncnstr2 tactic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-13 13:25:19 -08:00
Nikolaj Bjorner
196788a091 bug fix for equality solving 2022-11-13 12:09:56 -08:00
Nikolaj Bjorner
9d09064ad0 add comments to elim_unconstrained and remove unused function 2022-11-12 18:01:38 -08:00
Nikolaj Bjorner
efbe0a6554 wip - updated version of elim_uncstr_tactic
- remove reduce_invertible. It is subsumed by reduce_uncstr(2)
- introduce a simplifier for reduce_unconstrained. It uses reference counting to deal with inefficiency bug of legacy reduce_uncstr. It decomposes theory plugins into expr_inverter.

reduce_invertible is a tactic used in most built-in scenarios. It is useful for removing subterms that can be eliminated using "cheap" quantifier elimination. Specifically variables that occur only once can be removed in many cases by computing an expression that represents the effect computing a value for the eliminated occurrence.

The theory plugins for variable elimination are very partial and should be augmented by extensions, esp. for the case of bit-vectors where the invertibility conditions are thoroughly documented by Niemetz and Preiner.
2022-11-12 17:56:45 -08:00
Nikolaj Bjorner
3faca52c40 re-enable new solve_eqs with bug fixes 2022-11-08 14:17:17 -08:00
Nikolaj Bjorner
3a37cfca30 switch to solve_eqs2 tactic 2022-11-08 12:23:36 -08:00
Nikolaj Bjorner
d8133a47c2 Update solve_eqs.cpp 2022-11-05 22:47:46 -07:00
Nikolaj Bjorner
6c12aaad74 wip - testing solve-eqs2, added as tactic 2022-11-05 22:42:59 -07:00
Nikolaj Bjorner
4d8860c0bc wip - adding context equation solver
the solve_eqs_tactic is to be replaced by a re-implementation that uses solve_eqs in the simplifiers directory.
The re-implementation should address efficiency issues with the previous code.
At this point it punts on low level proofs. The plan is to use coarser
dependency tracking instead of low level proofs for pre-processing. Dependencies can be converted into a proof hint representation that can be checked using a stronger checker.
2022-11-05 10:34:57 -07:00
Nikolaj Bjorner
154b09309b fixing build, wip on model reconstruction integration into dependent-expr-state 2022-11-04 14:04:44 -07:00
Nikolaj Bjorner
7bb962d934 add ad-hoc any-of for cross compatibility and simplifying interface
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-04 12:49:55 -07:00
Nikolaj Bjorner
49d1490454 add ad-hoc any-of for cross compatibility and simplifying interface
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-04 12:48:30 -07:00
Nikolaj Bjorner
28668c6efc set up model reconstruction trail 2022-11-04 11:25:39 -07:00
Nikolaj Bjorner
626380b3c7 fixing build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-03 22:08:21 -07:00
Nikolaj Bjorner
e8112a6564 add initial stubs for model reconstruction trail 2022-11-03 21:35:07 -07:00
Nikolaj Bjorner
06eb460c75 move tactic_params to params 2022-11-03 05:50:46 -07:00
Nikolaj Bjorner
1dca6402fb move model and proof converters to self-contained module 2022-11-03 05:23:01 -07:00
Nikolaj Bjorner
7b12a5c5a8 build fix 2022-11-03 04:49:20 -07:00
Nikolaj Bjorner
070c5c624a wip - converting the equation solver as a simplifier 2022-11-03 03:35:30 -07:00
Nikolaj Bjorner
c0f483528d working on solve_eqs 2022-11-03 03:35:29 -07:00
Nikolaj Bjorner
e141759768 init solve_eqs 2022-11-03 03:35:29 -07:00
Nikolaj Bjorner
df71e83428 remove incorrect assertion
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-02 17:32:09 -07:00
Nikolaj Bjorner
0d97d2214c adding virtual destructor
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-02 09:37:55 -07:00
Nikolaj Bjorner
e57674490f adding simplifiers layer
simplifiers layer is a common substrate for global non-incremental and incremental processing.
The first two layers are new, but others are to be ported form tactics.

- bv::slice - rewrites equations to cut-dice-slice bit-vector extractions until they align. It creates opportunities for rewriting portions of bit-vectors to common sub-expressions, including values.
- euf::completion - generalizes the KB simplifcation from asserted formulas to use the E-graph to establish a global and order-independent canonization.

The interface dependent_expr_simplifier is amenable to forming tactics. Plugins for asserted-formulas is also possible but not yet realized.
2022-11-02 08:51:30 -07:00