From a838a8d6da926d68219e3c9c4dee021395d03f70 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 8 Apr 2020 20:26:48 +0200 Subject: progress in proofs --- backend/Profilingproof.v | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) (limited to 'backend/Profilingproof.v') diff --git a/backend/Profilingproof.v b/backend/Profilingproof.v index 72023792..7b770f50 100644 --- a/backend/Profilingproof.v +++ b/backend/Profilingproof.v @@ -137,6 +137,96 @@ Proof. lia. Qed. +Fixpoint inject_l_position extra_pc + (injections : list node) + (k : nat) {struct injections} : node := + match injections with + | nil => extra_pc + | pc::l' => + match k with + | O => extra_pc + | S k' => inject_l_position (extra_pc + 2) l' k' + end + end. + +Lemma inject_l_position_increases : forall injections pc k, + pc <= inject_l_position pc injections k. +Proof. + induction injections; simpl; intros. + lia. + destruct k. + lia. + specialize IHinjections with (pc := pc + 2) (k := k). + lia. +Qed. + +Lemma inject_l_injected0: + forall f_id cond args ifso ifnot expected injections body injnum pc extra_pc + (INSTR : body ! pc = Some (Icond cond args ifso ifnot expected)) + (BELOW : forallb (fun pc => pc