File tree Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -98,39 +98,6 @@ Proof.
9898 rewrite PC'. constructor; auto.
9999Qed .
100100
101- (** The [find_label] function returns the code tail starting at the
102- given label. A connection with [code_tail] is then established. *)
103-
104- Fixpoint find_label (lbl: label) (c: code) {struct c} : option code :=
105- match c with
106- | nil => None
107- | instr :: c' =>
108- if is_label lbl instr then Some c' else find_label lbl c'
109- end .
110-
111- Lemma label_pos_code_tail:
112- forall lbl c pos c',
113- find_label lbl c = Some c' ->
114- exists pos',
115- label_pos lbl pos c = Some pos'
116- /\ code_tail (pos' - pos) c c'
117- /\ pos < pos' <= pos + list_length_z c.
118- Proof .
119- induction c.
120- simpl; intros. discriminate.
121- simpl; intros until c'.
122- case (is_label lbl a).
123- intro EQ; injection EQ; intro; subst c'.
124- exists (pos + 1). split. auto. split.
125- replace (pos + 1 - pos) with (0 + 1) by lia. constructor. constructor.
126- rewrite list_length_z_cons. generalize (list_length_z_pos c). lia.
127- intros. generalize (IHc (pos + 1) c' H). intros [pos' [A [B C]]].
128- exists pos'. split. auto. split.
129- replace (pos' - pos) with ((pos' - (pos + 1)) + 1) by lia.
130- constructor. auto.
131- rewrite list_length_z_cons. lia.
132- Qed .
133-
134101(** The following lemmas show that the translation from Mach to ARM
135102 preserves labels, in the sense that the following diagram commutes:
136103<<
You can’t perform that action at this time.
0 commit comments