3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-08 08:15:47 +00:00
Commit graph

40 commits

Author SHA1 Message Date
Arie Gurfinkel
51d3c279d0
QEL: Fast Approximated Quantifier Elimination (#6820)
* qe_lite: cleanup and comment

no change to code

* mbp_arrays: refactor out partial equality (peq)

Partial array equality, PEQ, is used as an intermediate
expression during MBP for arrays. We need to factor it out
so that it can be shared between MBP-QEL and existing MBP.

Partial array equality (peq) is used in MBP for arrays.
Factoring this out to be used by multiple MBP implementations.

* rewriter: new rewrite rules

These rules are specializes for terms that are created in QEL.
QEL commit is comming later

* datatype_rw: new rewrite rule for ADTs

The rule handles this special case:

    (cons (head x) (tail x)) --> x

* array_rewriter rules for rewriting PEQs

Special rules to simplify PEQs

* th_rewriter: wire PEQ simplifications

* spacer_iuc: avoid terms with default in IUC

Spacer prfers to not have a term representing default value of an array.
This guides IUC from picking such terms in interpolation

* mbp_term_graph: replace root with repr

* mbp_term_graph: formatting

* mbp_term_graph: class_props, getters, setters

Class properties allow to keep information for an equivalence class.

Getters and setters for terms allow accessing information

* mbp_term_graph: auxiliary methods for qel

QEL commit is comming later in the history

* mbp_term_graph: bug fix

* mbp_term_graph: pick, refine repr, compute cgrnd

* mbp_term_graph: internalize deq

* mbp_term_graph: constructor

* mbp_term_graph: optionally internalize equalities

Reperesent equalities explicitly by nodes in the term_graph

* qel

* formatting

* comments on term_lt

* get terms and other api for mbp_qel

* plugins for mbp_qel

* mbp_qel_util: utilities for mbp_qel

* qe_mbp: QEL-based mbp

* qel: expose QEL API

* spacer: replace qe_lite in qe_project_spacer by qel

This changes the default projection engine that spacer uses.

* cmd_context: debug commands for qel and mbp_qel

New commands are

  mbp-qel -- MBP with term graphs
  qel     -- QEL with term graphs
  qe-lite -- older qelite

* qe_mbp: model-based rewriters for arrays

* qe_mbp: QEL-based projection functions

* qsat: wire in QEL-based mbp

* qsat: debug code

* qsat: maybe a bug fix

Changed the code to follow the paper by adding all predicates above a given
level, not just predicates of immediately preceding level.

* chore: use new api to create solver in qsat

* mbp_term_graph use all_of idiom

* feat: solver for integer multiplication

* array_peq: formatting, no change to code

* mbp_qel_util: block comment + format

* mbt_term_graph: clang-format

* bug fix. Move dt rewrite to qe_mbp

* array_peq: add header

* run clang format on mbp plugins

* clang format on mul solver

* format do-while

* format

* format do-while

* update release notes

---------

Co-authored-by: hgvk94 <hgvk94@gmail.com>
Co-authored-by: Isabel Garcia <igarciac@uwaterloo.ca>
2023-08-02 09:34:06 -07:00
Nikolaj Bjorner
25b0b1430c move bound_manager to simplifiers, add bound manager to extract_eqs for solve-eqs #6532 2023-01-12 12:42:28 -08:00
Nikolaj Bjorner
d4885abdc0 fix #6400
bi-implication was treated as an atomic formula leading to incorrect projection.
2022-10-17 11:00:21 -07:00
Nikolaj Bjorner
32614722ef fix #6176
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-20 21:19:20 -07:00
Nikolaj Bjorner
fc77345bec breaking change. Enforce append semantics everywhere for parameter updates #5744
Replace semantics doesn't work with assumptions made elsewhere in code.
The remedy is to apply append (override) semantics for parameter changes.
2021-12-30 19:11:14 -08:00
Nikolaj Bjorner
4a6083836a call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
Nikolaj Bjorner
937b61fc88 fix build, refactor 2021-02-02 05:26:57 -08:00
Nikolaj Bjorner
2f756da294
adding dt-solver (#4739)
* adding dt-solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* move mbp to self-contained module

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* files

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* Create CMakeLists.txt

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* rename to bool_var2expr to indicate type class

* mbp

* na
2020-10-18 15:28:21 -07:00
Nikolaj Bjorner
794aafa6f8 fix warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-01-23 12:14:34 -06:00
Nikolaj Bjorner
4e81085292 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-01-21 10:29:42 -06:00
Nikolaj Bjorner
78a1736bd2 prepare symbols to be more abstract, update mbi, delay initialize some modules
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-01-10 12:02:08 -08:00
Nikolaj Bjorner
9566d379d6 merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-12 19:44:56 -07:00
Nikolaj Bjorner
9bd4050e0c use ref-vector for shared occurrences to avoid hash-table overhead
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-01-11 13:43:39 -08:00
Nikolaj Bjorner
0d400a5ad6 fix bit2bool bug reported by Jianying Li
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-01-04 07:46:53 -08:00
Nikolaj Bjorner
bd53fa801e handle case input format
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-17 21:42:18 -07:00
Nikolaj Bjorner
20fc573d5b add laxer check for oeq_quant_intro
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-27 11:24:56 -07:00
Nikolaj Bjorner
520ce9a5ee integrate lambda expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-26 07:23:04 -07:00
Nikolaj Bjorner
9ba76a1332 fixing eufi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:52 -07:00
Nikolaj Bjorner
ec8e3f2aee consolidate use of plugin by moving declarations up front (separate from constructor at this point)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:52 -07:00
Nikolaj Bjorner
ba504e4243 debugging mbi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:52 -07:00
Nikolaj Bjorner
008f003aa0 initial working version
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:52 -07:00
Nikolaj Bjorner
da18f0e0b7 prepare term-graph unit testing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:51 -07:00
Nikolaj Bjorner
d26609ebdd prepare term-graph for cc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:51 -07:00
Nikolaj Bjorner
0784074b67 fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:51 -07:00
Nikolaj Bjorner
688cf79619 working on mbi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:51 -07:00
Arie Gurfinkel
275b99e408 Add missing override 2018-06-14 16:08:50 -07:00
Nikolaj Bjorner
692a701516 updates to mbp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:49 -07:00
Nikolaj Bjorner
7642106e73 add way to unit test mbp from command line
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:49 -07:00
Nikolaj Bjorner
d95e167d61 updates to mbqi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:49 -07:00
Nikolaj Bjorner
e281f85586 add way to unit test mbp from command line
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-06-14 16:08:49 -07:00
Nikolaj Bjorner
b8193a0ae6 fix #1604
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-04-29 10:04:42 -07:00
Bruce Mitchener
76eb7b9ede Use nullptr. 2018-02-12 14:05:55 +07:00
Bruce Mitchener
b7d1753843 Use override rather than virtual. 2018-02-09 21:19:27 +07:00
Nikolaj Bjorner
cab4e4b461 add feature to display benchmark in format seen by SAT solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-21 18:32:46 -05: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
Arie Gurfinkel
78467077f6 fixing a build error 2017-07-28 12:18:12 -04:00
Christoph M. Wintersteiger
27a1758857 Added rewriter.ignore_patterns_on_ground_qbody option to disable simplification of quantifiers that have their universals appear only in patterns, but otherwise have a ground body. 2017-04-07 21:19:20 +01:00
Leonardo de Moura
cf28cbab0a saved params work
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-11-29 17:19:12 -08:00
Leonardo de Moura
96676efeb6 had to nuke mip_tactic, it was based on the smt_solver_exp (experimental), that depends on assertion_sets. This change will affect Z3's performance on QF_LIA and QF_LRA benchmarks. The new mcsat should fix that.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-24 13:58:24 -07:00
Leonardo de Moura
9e299b88c4 reorganizing the code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-23 21:53:34 -07:00
Renamed from src/extra_cmds/dbg_cmds.cpp (Browse further)