Nikolaj Bjorner
c33e58ee1a
update distribute forall
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-12-06 17:59:33 -08:00
Nikolaj Bjorner
80033e8744
cave in to supporting proofs (partially) in simplifiers, updated doc
2022-12-06 17:02:04 -08:00
Nikolaj Bjorner
5a5758baaa
add documentation to initial selection of tactics
2022-12-05 20:05:06 -08:00
Nuno Lopes
eb8c53c164
simplify factory of dependent_expr_state_tactic
...
And as a side-effect, remove heap allocations for factories
2022-12-05 14:07:57 +00:00
Nikolaj Bjorner
de916f50d6
add demodulator tactic based on demodulator-simplifier
...
- some handling for commutative operators
- fix bug in demodulator_index where fwd and bwd are swapped
2022-12-05 03:20:46 -08:00
Nikolaj Bjorner
87095950cb
fix #6477
2022-12-04 13:02:45 -08:00
Nikolaj Bjorner
ead2a46a88
build
2022-12-04 10:38:24 -08:00
Nikolaj Bjorner
b76ed6a47f
proper fix to #6476
2022-12-04 10:19:39 -08:00
Nikolaj Bjorner
9b58135876
try to fix linux builds
2022-12-04 09:55:31 -08:00
Nikolaj Bjorner
0f7bebcbed
try big M for linux build
2022-12-04 09:49:32 -08:00
Nikolaj Bjorner
1974c224ab
add demodulator simplifier
...
refactor demodulator-rewriter a bit to separate reusable features.
2022-12-04 09:39:28 -08:00
Nikolaj Bjorner
9acbfa3923
move it into substitution to handle dependencies
2022-12-04 06:23:32 -08:00
Nikolaj Bjorner
3d7bd40a87
a round of cleanup
2022-12-04 06:07:45 -08:00
Nikolaj Bjorner
d218083145
The demodulator doesn't produce proofs so remove code path that depends it does.
2022-12-04 04:48:48 -08:00
Nikolaj Bjorner
7fe6787748
ufbv-rewriter is really a demodulator rewriter and does not reference ufbv
...
so moving first the rewriter into place of other rewriters
2022-12-04 04:44:02 -08:00
Nikolaj Bjorner
79e6d4e32d
tune and debug elim-unconstrained (v2 - for simplifiers infrastructure)
2022-12-04 03:53:31 -08:00
Nikolaj Bjorner
3ebbb8472a
fix perf bugs in new value propagation
2022-12-04 03:53:30 -08:00
Nikolaj Bjorner
758c3b2c3b
fix filtering for recursive functions
2022-12-04 03:53:30 -08:00
Nikolaj Bjorner
cf7bba6288
use ast_manager as an attribute
2022-12-04 03:53:30 -08:00
Nikolaj Bjorner
5073959ae0
add macro attribute
2022-12-04 03:53:29 -08:00
Nikolaj Bjorner
a96b7d243a
remove incorrect check for quantifier
2022-12-01 00:04:08 -08:00
Nikolaj Bjorner
e5984dd397
add cnf/nnf simplifier
2022-11-30 23:04:38 -08:00
Nikolaj Bjorner
e3e2c21632
Create cnf_nnf.h
2022-11-30 22:53:14 -08:00
Nikolaj Bjorner
529f116be0
disable new code until pre-condition gets fixed
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-30 22:29:59 -08:00
Nikolaj Bjorner
f24ecde35c
wip - fixes to simplifiers
2022-12-01 09:31:52 +09:00
Nikolaj Bjorner
cfc8e19baf
add more simplifiers, fix model reconstruction order for elim_unconstrained
...
- enable sat.smt in smt_tactic that
is invoked by default on first goals
add flatten-clauses
add push-ite
have tptp5 front-end pretty print SMT2 formulas a little nicer.
2022-12-01 02:35:43 +09:00
Nikolaj Bjorner
edb0fc394b
rewrite some simplifiers
2022-11-30 23:15:32 +09:00
Nikolaj Bjorner
23c53c6820
fix build
2022-11-30 19:36:13 +09:00
Nikolaj Bjorner
c1ff3d3192
wip - adding quasi macro detection
2022-11-30 13:46:00 +07:00
Nikolaj Bjorner
b084821a0c
wip - dependent expr simpliifer
...
- simplify iterator over current indices
- add more simplifiers used by asserted_formulas
- improve diagnostics printing
2022-11-30 13:41:40 +07:00
Nikolaj Bjorner
bec3acd146
consolidate freeze functionality into dependent_expr_state
...
rename size() to qtail() and introduce shortcuts
ensure tactic goals are not updated if they are in inconsistent state (because indices could be invalidated)
2022-11-30 08:35:29 +07:00
Nikolaj Bjorner
73a652cf4b
some fixes to backtracking restore points in new solver
2022-11-29 16:42:42 +07:00
Nikolaj Bjorner
dd1ca8f6bd
move qhead to attribute on the state instead of the simplifier,
...
- add sat.smt option to enable the new incremental core (it is not ready for mainstream consumption as cloning and other features are not implemented and it hasn't been tested in any detail yet).
- move "name" into attribute on simplifier so it can be reused for diagnostics by the seq-simplifier.
2022-11-29 16:36:02 +07:00
Nikolaj Bjorner
82d9e4a4fc
update goal2sat interface to use explicit initialization
2022-11-28 15:04:12 +07:00
Nikolaj Bjorner
500626e814
add sat-smt-preprocess module
...
self-contained pre-processing initialization
2022-11-28 12:13:00 +07:00
Nikolaj Bjorner
85f9c7eefa
replace restore_size_trail by more generic restore_vector
...
other updates:
- change signature of advance_qhead to simplify call sites
- have model reconstruction replay work on a tail of dependent_expr state, while adding formulas to the tail.
2022-11-28 11:45:56 +07:00
Nikolaj Bjorner
6454014119
enable incrementality for model reconstruction
2022-11-25 15:28:38 +07:00
Nikolaj Bjorner
4e9f21c2a1
add rewriter and seq simplifiers
2022-11-25 15:16:14 +07:00
Nikolaj Bjorner
a152f9cfd6
port bit-blaster to simplifiers
...
inc_sat_solver uses bit-blaster, card2bv and max_bv_sharing.
By turning these into simplifiers it will be possible to remove
dependencies on tactics and goals in inc_sat_simplifier and instead use a modular and general incremental pre-processing infrastructure.
2022-11-25 13:37:16 +07:00
Nikolaj Bjorner
f0570fbc0e
remove tactic exception dependency
2022-11-25 11:48:44 +07:00
Nikolaj Bjorner
e95b0bd2cd
remove include of tactical
2022-11-25 11:47:38 +07:00
Nikolaj Bjorner
8184e7fe0a
keep track of qhead
2022-11-25 11:42:16 +07:00
Nikolaj Bjorner
5af6e1a046
make max_bv_sharing a simplifier
2022-11-25 11:38:41 +07:00
Nikolaj Bjorner
db74e23de1
make card2bv a simplifier
2022-11-25 11:07:31 +07:00
Nikolaj Bjorner
cb789f6ca8
add arithmetical macros
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-24 23:44:35 +07:00
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
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
eceeb295fc
fix #6457
2022-11-24 14:41:50 +07:00
Nikolaj Bjorner
f87e187b62
#6429
2022-11-23 17:52:14 +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
cd0d52acec
using C++11 features to simplify for-loops
2022-11-23 11:37:23 +07:00
Nuno Lopes
477b90228e
fix #6460 : crash in mk_to_ieee_bv_i
2022-11-20 19:19:12 +00:00
Nuno Lopes
0445d6f264
FPA->BV fix unused vars
2022-11-20 19:03:32 +00:00
Nikolaj Bjorner
b9f34286a7
generalize macro head detection and elaboration
2022-11-20 11:36:45 +07:00
Nikolaj Bjorner
86f3702403
prevent re-declaration of enumeration sort names
...
preventing redeclaration of all ADT cases is not part of this update.
2022-11-19 19:46:34 +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
dcc995f0e5
code simplification
2022-11-19 18:45:54 +07:00
Nikolaj Bjorner
41b40c3a51
remove dead code
2022-11-19 18:45:07 +07:00
Nikolaj Bjorner
c2e9016d04
display model-add parameters in correct order
2022-11-19 18:44:52 +07:00
Nikolaj Bjorner
ba68652c72
add destructive equality resolution to existentials
2022-11-19 18:43:46 +07:00
Nikolaj Bjorner
7da91f4313
allow printing declarations with reverse variable order
2022-11-19 18:43:21 +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
98fc8c99db
add shortcut to equality mk utility
2022-11-16 03:47:01 -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
255414f4a9
fix regression crash
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-15 11:20:12 -08:00
Nikolaj Bjorner
9845c33236
add shortcuts in rewriter, eliminate redundancies in dependent_expr tactic
2022-11-15 09:13:13 -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
38cde14e08
wip missing updates
2022-11-13 12:10:43 -08:00
Nikolaj Bjorner
196788a091
bug fix for equality solving
2022-11-13 12:09:56 -08:00
Nikolaj Bjorner
ce76e3138d
streamlining expr-inverter code
2022-11-13 11:48:32 -08:00
Nikolaj Bjorner
3d570aaa0a
add missing process_eq
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-12 18:43:57 -08:00
Nikolaj Bjorner
0b83732b82
missing override specifier
2022-11-12 18:35:41 -08:00
Nikolaj Bjorner
343603f643
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-12 18:34:04 -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
f769e2f1f6
have bool rewriter use flat_and_or, and integrate hoist rewriter
2022-11-08 12:21:50 -08:00
Nikolaj Bjorner
238ea0a264
add shorthands for concatentation
2022-11-08 12:21:25 -08:00
Nikolaj Bjorner
3a4b8e2334
add rewrite rules to bv-rewriter
2022-11-08 12:20:51 -08:00
Nikolaj Bjorner
a34701471f
clean up hoist rewriter
2022-11-08 12:20:25 -08:00