aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Bounds.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-06-21 18:22:00 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-29 15:29:56 +0100
commitaba0e740f25ffa5c338dfa76cab71144802cebc2 (patch)
tree746115009aa60b802a2b5369a5106a2e971eb22f /backend/Bounds.v
parent2e202e2b17cc3ae909628b7b3ae0b8ede3117d82 (diff)
downloadcompcert-kvx-aba0e740f25ffa5c338dfa76cab71144802cebc2.tar.gz
compcert-kvx-aba0e740f25ffa5c338dfa76cab71144802cebc2.zip
Replace `omega` tactic with `lia`
Since Coq 8.12, `omega` is flagged as deprecated and scheduled for removal. Also replace CompCert's homemade tactics `omegaContradiction`, `xomega`, and `xomegaContradiction` with `lia` and `extlia`. Turn back on the deprecation warning for uses of `omega`. Make the proof of `Ctypes.sizeof_pos` more robust to variations in `lia`.
Diffstat (limited to 'backend/Bounds.v')
-rw-r--r--backend/Bounds.v8
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/Bounds.v b/backend/Bounds.v
index fa695234..4231d861 100644
--- a/backend/Bounds.v
+++ b/backend/Bounds.v
@@ -163,7 +163,7 @@ Proof.
intros until valu. unfold max_over_list.
assert (forall l z, fold_left (fun x y => Z.max x (valu y)) l z >= z).
induction l; simpl; intros.
- omega. apply Zge_trans with (Z.max z (valu a)).
+ lia. apply Zge_trans with (Z.max z (valu a)).
auto. apply Z.le_ge. apply Z.le_max_l. auto.
Qed.
@@ -307,7 +307,7 @@ Proof.
let f := fold_left (fun x y => Z.max x (valu y)) c z in
z <= f /\ (In x c -> valu x <= f)).
induction c; simpl; intros.
- split. omega. tauto.
+ split. lia. tauto.
elim (IHc (Z.max z (valu a))); intros.
split. apply Z.le_trans with (Z.max z (valu a)). apply Z.le_max_l. auto.
intro H1; elim H1; intro.
@@ -446,12 +446,12 @@ Lemma size_callee_save_area_rec_incr:
Proof.
Local Opaque mreg_type.
induction l as [ | r l]; intros; simpl.
-- omega.
+- lia.
- eapply Z.le_trans. 2: apply IHl.
generalize (AST.typesize_pos (mreg_type r)); intros.
apply Z.le_trans with (align ofs (AST.typesize (mreg_type r))).
apply align_le; auto.
- omega.
+ lia.
Qed.
Lemma size_callee_save_area_incr: