diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2020-12-13 14:08:04 +0100 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2020-12-13 14:08:04 +0100 |
commit | ffc27e4048ac3e963054de1ff27bb5387f259ad1 (patch) | |
tree | 8a3f63dfee609e3d2dbbb5cf53d4b8bf096ada37 /aarch64/Asmblock.v | |
parent | 9d5f379cd9e36def513357363308f1e0b0f4e082 (diff) | |
download | compcert-kvx-ffc27e4048ac3e963054de1ff27bb5387f259ad1.tar.gz compcert-kvx-ffc27e4048ac3e963054de1ff27bb5387f259ad1.zip |
Removing the PseudoAsm IR
Diffstat (limited to 'aarch64/Asmblock.v')
-rw-r--r-- | aarch64/Asmblock.v | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/aarch64/Asmblock.v b/aarch64/Asmblock.v index f12e8922..5e41d96a 100644 --- a/aarch64/Asmblock.v +++ b/aarch64/Asmblock.v @@ -420,6 +420,22 @@ Fixpoint size_blocks (l: bblocks): Z := end . +Lemma to_nat_pos : forall z:Z, (Z.to_nat z > 0)%nat -> z > 0. +Proof. + intros. destruct z; auto. + - contradict H. cbn. apply gt_irrefl. + - apply Zgt_pos_0. + - contradict H. cbn. apply gt_irrefl. +Qed. + +Lemma size_positive (b:bblock): size b > 0. +Proof. + unfold size. destruct b as [hd bdy ex cor]. cbn. + destruct ex; destruct bdy; try (apply to_nat_pos; rewrite Nat2Z.id; cbn; omega); + unfold non_empty_bblockb in cor; simpl in cor. + inversion cor. +Qed. + Record function : Type := mkfunction { fn_sig: signature; fn_blocks: bblocks }. Definition fundef := AST.fundef function. Definition program := AST.program fundef unit. |