feat(library/blast/strategies/portfolio): add 'unit' strategy for testing unit propagation

This commit is contained in:
Leonardo de Moura 2015-12-07 08:45:54 -08:00
parent bccf716fd5
commit c7390684ba
3 changed files with 11 additions and 2 deletions

View file

@ -45,6 +45,12 @@ static optional<expr> apply_ematch() {
ematch_action)();
}
static optional<expr> apply_unit() {
return mk_debug_action_strategy(unit_preprocess,
unit_propagate,
[]() { return action_result::failed(); })();
}
optional<expr> apply_strategy() {
std::string s_name(get_config().m_strategy);
if (s_name == "preprocess") {
@ -59,6 +65,8 @@ optional<expr> apply_strategy() {
return apply_cc();
} else if (s_name == "ematch") {
return apply_ematch();
} else if (s_name == "unit") {
return apply_unit();
} else {
// TODO(Leo): add more builtin strategies
return apply_simple();

View file

@ -1,5 +1,5 @@
-- Testing all possible cases of [unit_action]
set_option blast.recursor false
set_option blast.strategy "unit"
variables {A₁ A₂ A₃ A₄ B₁ B₂ B₃ B₄ : Prop}
-- H first, all pos

View file

@ -1,5 +1,6 @@
-- Testing all possible cases of [unit_action]
set_option blast.recursor false
set_option blast.strategy "unit"
universes l1 l2
variables {A B C : Prop}
variables {X : Type.{l1}} {Y : Type.{l2}}