diff options
| author | Brian Campbell | 2019-10-25 17:46:33 +0100 |
|---|---|---|
| committer | Brian Campbell | 2019-10-25 17:53:35 +0100 |
| commit | 1bd3a2601bc0b5637f650810ff8a9e108e79d043 (patch) | |
| tree | eea441498b26e4980bb9b262900026331415bf28 /lib | |
| parent | 8182b700da5cc0a4b64b3d5dd1c486b112c0a092 (diff) | |
Coq: make sure solver can't accidentally use recursive definitions
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/coq/Sail2_values.v | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/coq/Sail2_values.v b/lib/coq/Sail2_values.v index 47fa2fda..b29963b6 100644 --- a/lib/coq/Sail2_values.v +++ b/lib/coq/Sail2_values.v @@ -1802,8 +1802,21 @@ Ltac run_main_solver := | run_main_solver_impl (* for cases where there's an evar in the goal *) ]. +Ltac is_fixpoint ty := + match ty with + | forall _reclimit, Acc _ _reclimit -> _ => idtac + | _ -> ?res => is_fixpoint res + end. + +Ltac clear_fixpoints := + repeat + match goal with + | H:_ -> ?res |- _ => is_fixpoint res; clear H + end. + Ltac solve_arithfact := intros; (* To solve implications for derive_m *) + clear_fixpoints; (* Avoid using recursive calls *) solve [ solve_unknown | match goal with |- ArithFact (?x <= ?x <= ?x) => exact trivial_range end |
