3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-18 22:59:02 +00:00
z3/src/muz/spacer
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
..
.clang-format Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
CMakeLists.txt Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_antiunify.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_antiunify.h booyah 2020-07-04 15:56:30 -07:00
spacer_arith_generalizers.cpp fix #2548 fix #2530 2019-09-13 15:03:04 +02:00
spacer_arith_kernel.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_arith_kernel.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_callback.cpp Extend spacer with callback events 2018-06-14 16:08:48 -07:00
spacer_callback.h booyah 2020-07-04 15:56:30 -07:00
spacer_cluster.cpp compiler warning 2023-02-02 19:21:34 -08:00
spacer_cluster.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_cluster_util.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_concretize.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_concretize.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_conjecture.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_context.cpp bug fix. Prevent resetting gg stats #6062 (#6618) 2023-03-03 12:32:23 -08:00
spacer_context.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_convex_closure.cpp clean up build warnings 2023-02-19 10:08:31 -08:00
spacer_convex_closure.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_dl_interface.cpp Renamed spacer options 2018-06-14 16:08:52 -07:00
spacer_dl_interface.h booyah 2020-07-04 15:56:30 -07:00
spacer_expand_bnd_generalizer.cpp spacer: trying to make C++ happy 2022-09-01 15:44:22 -07:00
spacer_expand_bnd_generalizer.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_farkas_learner.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
spacer_farkas_learner.h booyah 2020-07-04 15:56:30 -07:00
spacer_generalizers.cpp exposing user propagators over .Net 2022-05-07 11:08:40 -07:00
spacer_generalizers.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_global_generalizer.cpp fix #6543. don't assume order on bindings 2023-02-23 17:35:55 -05:00
spacer_global_generalizer.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_ind_lemma_generalizer.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_iuc_proof.cpp Catch exceptions by const-reference 2018-10-16 19:16:07 +02:00
spacer_iuc_proof.h booyah 2020-07-04 15:56:30 -07:00
spacer_iuc_solver.cpp set up model reconstruction trail 2022-11-04 11:25:39 -07:00
spacer_iuc_solver.h experimental feature to access congruence closure of SimpleSolver 2022-12-30 21:41:27 -08:00
spacer_legacy_frames.cpp move files for build script 2018-06-15 15:13:55 -07:00
spacer_legacy_frames.h Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
spacer_legacy_mbp.cpp update release notes 2023-01-31 12:19:33 -08:00
spacer_legacy_mev.cpp update release notes 2023-01-31 12:19:33 -08:00
spacer_legacy_mev.h booyah 2020-07-04 15:56:30 -07:00
spacer_manager.cpp move model and proof converters to self-contained module 2022-11-03 05:23:01 -07:00
spacer_manager.h call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
spacer_matrix.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_matrix.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_mbc.cpp Fix caching bug in mbc 2018-06-14 16:08:51 -07:00
spacer_mbc.h fix misspelled \brief for doxygen (#5632) 2021-10-29 15:34:28 +02:00
spacer_mev_array.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
spacer_mev_array.h booyah 2020-07-04 15:56:30 -07:00
spacer_notes.txt Spacer engine for HORN logic 2017-07-31 17:02:29 -04:00
spacer_pdr.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
spacer_pdr.h booyah 2020-07-04 15:56:30 -07:00
spacer_proof_utils.cpp Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_proof_utils.h booyah 2020-07-04 15:56:30 -07:00
spacer_prop_solver.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
spacer_prop_solver.h booyah 2020-07-04 15:56:30 -07:00
spacer_qe_project.cpp update release notes 2023-01-31 12:19:33 -08:00
spacer_qe_project.h booyah 2020-07-04 15:56:30 -07:00
spacer_quant_generalizer.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
spacer_sat_answer.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
spacer_sat_answer.h booyah 2020-07-04 15:56:30 -07:00
spacer_sem_matcher.cpp unused variables 2022-10-20 09:09:06 -07:00
spacer_sem_matcher.h Spacer Global Guidance (#6026) 2022-08-30 15:47:00 -07:00
spacer_sym_mux.cpp add tactic descriptions 2022-12-14 20:38:28 -08:00
spacer_sym_mux.h booyah 2020-07-04 15:56:30 -07:00
spacer_unsat_core_learner.cpp preserve model order to avoid clobbering regression tests 2020-03-10 16:56:49 -07:00
spacer_unsat_core_learner.h booyah 2020-07-04 15:56:30 -07:00
spacer_unsat_core_plugin.cpp QEL: Fast Approximated Quantifier Elimination (#6820) 2023-08-02 09:34:06 -07:00
spacer_unsat_core_plugin.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
spacer_util.cpp QEL: Fast Approximated Quantifier Elimination (#6820) 2023-08-02 09:34:06 -07:00
spacer_util.h QEL: Fast Approximated Quantifier Elimination (#6820) 2023-08-02 09:34:06 -07:00