diff options
| author | Brian Campbell | 2018-08-13 11:52:30 +0100 |
|---|---|---|
| committer | Brian Campbell | 2018-08-13 11:52:30 +0100 |
| commit | a8fc6f2480790149a689e58d55a9dd3d6818dd3c (patch) | |
| tree | f62df2bfee80db5ecbb7be803d50fad59ba39866 /lib | |
| parent | 67b48947300cf4ac5f792dc31436cb241a4c7126 (diff) | |
Coq: drop irrelevant definitions before constraint solving
(which were slowing down RISCV unacceptably because dealing with the
xlen max/min values is surprisingly expensive)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/coq/Sail2_values.v | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/coq/Sail2_values.v b/lib/coq/Sail2_values.v index 14ed0459..7766e6af 100644 --- a/lib/coq/Sail2_values.v +++ b/lib/coq/Sail2_values.v @@ -938,6 +938,11 @@ end. Ltac not_Z ty := match ty with Z => fail 1 | _ => idtac end. Ltac clear_non_Z_defns := repeat match goal with H := _ : ?X |- _ => not_Z X; clearbody H end. +Ltac clear_irrelevant_defns := +repeat match goal with X := _ |- _ => + match goal with |- context[X] => idtac end || + match goal with _ : context[X] |- _ => idtac end || clear X +end. Lemma ArithFact_mword (a : Z) (w : mword a) : ArithFact (a >= 0). constructor. @@ -1005,6 +1010,7 @@ Ltac dump_context := match goal with |- ?X => idtac "Goal:" X end. Ltac prepare_for_solver := (*dump_context;*) + clear_irrelevant_defns; clear_non_Z_defns; extract_properties; repeat match goal with w:mword ?n |- _ => apply ArithFact_mword in w end; |
