feat(library/blast/strategies/portfolio): add 'unit' strategy for testing unit propagation
This commit is contained in:
parent
bccf716fd5
commit
c7390684ba
3 changed files with 11 additions and 2 deletions
|
@ -45,6 +45,12 @@ static optional<expr> apply_ematch() {
|
||||||
ematch_action)();
|
ematch_action)();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static optional<expr> apply_unit() {
|
||||||
|
return mk_debug_action_strategy(unit_preprocess,
|
||||||
|
unit_propagate,
|
||||||
|
[]() { return action_result::failed(); })();
|
||||||
|
}
|
||||||
|
|
||||||
optional<expr> apply_strategy() {
|
optional<expr> apply_strategy() {
|
||||||
std::string s_name(get_config().m_strategy);
|
std::string s_name(get_config().m_strategy);
|
||||||
if (s_name == "preprocess") {
|
if (s_name == "preprocess") {
|
||||||
|
@ -59,6 +65,8 @@ optional<expr> apply_strategy() {
|
||||||
return apply_cc();
|
return apply_cc();
|
||||||
} else if (s_name == "ematch") {
|
} else if (s_name == "ematch") {
|
||||||
return apply_ematch();
|
return apply_ematch();
|
||||||
|
} else if (s_name == "unit") {
|
||||||
|
return apply_unit();
|
||||||
} else {
|
} else {
|
||||||
// TODO(Leo): add more builtin strategies
|
// TODO(Leo): add more builtin strategies
|
||||||
return apply_simple();
|
return apply_simple();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-- Testing all possible cases of [unit_action]
|
-- 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}
|
variables {A₁ A₂ A₃ A₄ B₁ B₂ B₃ B₄ : Prop}
|
||||||
|
|
||||||
-- H first, all pos
|
-- H first, all pos
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
-- Testing all possible cases of [unit_action]
|
-- Testing all possible cases of [unit_action]
|
||||||
set_option blast.recursor false
|
set_option blast.strategy "unit"
|
||||||
|
|
||||||
universes l1 l2
|
universes l1 l2
|
||||||
variables {A B C : Prop}
|
variables {A B C : Prop}
|
||||||
variables {X : Type.{l1}} {Y : Type.{l2}}
|
variables {X : Type.{l1}} {Y : Type.{l2}}
|
||||||
|
|
Loading…
Reference in a new issue