rocq/theories/HelloDiagnosticChecks.v
Logical controls for Hello's four-argument diagnostic binding. These use actual fixture literals and the supplied machine, but empty private native inventories. The Iris rule is partial correctness, not native execution or a proof of the complete close_stdout body.
Explore proof 2 tactics
Initial goal
vm_compute
repeat split ; intros;repeat match goal withH : Some_ = Some_ |- _⇒injection H as ←end;vm_compute;intuition congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 15 tactics
Initial goal
induction ps as | k u ps IH ; intros Hdup l v Hin ; set_solver |
inversion Hdup as [ |? ? Hnot Htail ] ; subst
apply elem_of_cons in Hin as E | Hin
2 openfocused goal
–injection E as ← ←
2 opendeferred goal
cbn [ overwrite ]
2 opendeferred goal
apply lookup_insert_eq
deferred goal
–cbn [ overwrite ]
rewrite lookup_insert_ne ; apply IH ; assumption |
simpl
intros E
subst k
apply Hnot
apply list_elem_of_fmap
exists l, v
auto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 3 tactics
Initial goal
intros opened
apply overwrite_owned
apply NoDup_ListNoDup , hello_diagnostic_keys
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 13 tactics
Initial goal
intros opened l v Hl
destruct lookup_overwritehello_diagnostic_pieces HelloErrnoChecks.heap l v Hl as Hin | _ Hold
2 openfocused goal
–eapply all_agree_elem ; exact literals_agree | exact Hin
deferred goal
–unfold HelloErrnoChecks.heap in Hold
apply elem_of_list_to_map_2 in Hold
eapply all_agree_elem ; | exact Hold
change all_agreememory byte_ps5120 0 errno_bytesmemory 5120 0
apply errno_bytes_agree
split ; discriminate |
split ; | reflexivity
split ; simpl ; lia |
exists 5120, mkRegion5120 5128 Heap Live
repeat split ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 3 tactics
Initial goal
intros b reg Hreg
cbn [ memory conversion_mem m_regions app object_region r_base ] in Hreg
repeat destruct _ =? _ eqn :? in Hreg ; try discriminate ; injection Hreg as ←;repeat match goal withH : _ =? _ = true |- _⇒apply Z.eqb_eq in Hend;subst;simpl;tauto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 3 tactics
Initial goal
intros b1 r1 b2 r2 E1 _ E2 _ Hne
apply regions in E1 , E2
repeat destruct E1 as E1 | E1 ; try contradiction ; injection E1 as ← ← ; repeat destruct E2 as E2 | E2 ; try contradiction ; injection E2 as ← ← ; simpl in * ; lia
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 21 tactics
Initial goal
split ; change 0 < 4294967296 ≤ 281474976710656 ; lia |
split
2 open–intros b reg E
2 openapply regions in E
2 openchange 0 ≤ b < 4294967296 ∧ r_endreg ≤ 4294967296 ∧ r_lifereg = Freed → r_endreg = b
2 openrepeat destruct E as E | E ; try contradiction ; injection E as ← ← ; simpl ; intuition try discriminate ; lia
–intros a Ha
change 4294967296 ≤ a in Ha
cbn [ memory conversion_mem m_bytes m_aux ]
assert Htext : 65680 ≤? a && a <? 65692 = false
2 open{apply Bool.andb_false_iff
2 openright
2 openapply Z.ltb_ge
2 openlia
assert Hfmt : 65744 ≤? a && a <? 65747 = false
2 open{apply Bool.andb_false_iff
2 openright
2 openapply Z.ltb_ge
2 openlia
rewrite Htext Hfmt
repeat match goal with|- context [a =? ]⇒destruct Z.eqb_speca b ; subst ; lia | end;auto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Proof 57 steps Qed
Explore proof 14 tactics
Initial goal
intros
unfold heap
rewrite overwrite_out
2 openfocused goal
–unfold HelloErrnoChecks.heap
2 opendeferred goal
apply not_elem_of_list_to_map_1
2 opendeferred goal
rewrite byte_ps_keys
2 opendeferred goal
intros Hin
2 opendeferred goal
apply list_elem_of_fmap in Hin as i & E & _
2 opendeferred goal
discriminate E
deferred goal
–intros Hin
apply list_elem_of_fmap in Hin as l v & E & Hin
apply list_elem_of_In in Hin
vm_compute in Hin
repeat destruct Hin as Hin | Hin ; try contradiction ; injection Hin as ← ← ; discriminate E
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 15 tactics
Initial goal
intros opened l v Hin
unfold heap
rewrite overwrite_out
2 openfocused goal
–unfold HelloErrnoChecks.heap
2 opendeferred goal
apply elem_of_list_to_map_1 ; | exact Hin
2 opendeferred goal
change base.NoDupPByte5120 0; PByte5120 1; PByte5120 2; PByte5120 3
2 opendeferred goal
repeat apply base.NoDup_cons_2 ; set_solver |
2 opendeferred goal
apply base.NoDup_nil_2
deferred goal
–destruct MemLogic.byte_ps_elem_ _ _ _ _ Hin as i & x & Hi & → & →
clear Hin
intros Hkey
apply list_elem_of_fmap in Hkey as l v & E & Hin
apply list_elem_of_In in Hin
vm_compute in Hin
repeat destruct Hin as Hin | Hin ; try contradiction ; injection Hin as ← ← ; discriminate E
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 38 tactics
Initial goal
intros opened
assert Hoff : pieces_offerrno_keys5120 0 stream_data_heap1024 2048 heapopened memory span_containserrno_span5120 0
2 openfocused goal
{intros l v Hl Hnot
2 opendeferred goal
apply stream_data_lookup in Hl as Hl _
2 opendeferred goal
destruct lookup_overwritehello_diagnostic_pieces HelloErrnoChecks.heap l v Hl as Hin | _ Hold
3 openfocused goal
deferred goal
–apply list_elem_of_In in Hin
3 opendeferred goal
deferred goal
vm_compute in Hin
3 opendeferred goal
deferred goal
repeat destruct Hin as Hin | Hin ; try contradiction ; injection Hin as ← ← ; cbn ; try exact I ; intros reg Hlive Hlo Hhi Hspan ; unfold span_contains , errno_span in Hspan ; simpl in Hspan ; lia
2 opendeferred goal
deferred goal
–exfalso
2 opendeferred goal
apply Hnot
2 opendeferred goal
unfold HelloErrnoChecks.heap in Hold
2 opendeferred goal
apply elem_of_list_to_map_2 in Hold
2 opendeferred goal
change l ∈ byte_ps5120 0 0; 0; 0; 0.*1
2 opendeferred goal
apply list_elem_of_fmap
2 opendeferred goal
exists l, v
2 opendeferred goal
auto
deferred goal
assert Hpair : stream_tokens_wiλ_ _ ⇒ True T.out T.err 5120 0 memory F.worldopened heapopened
2 openfocused goal
{split ; split ; reflexivity | simpl ; lia |
2 opendeferred goal
split ; split ; reflexivity | simpl ; lia |
2 opendeferred goal
split ; discriminate |
2 opendeferred goal
split ; discriminate |
2 opendeferred goal
split ; reflexivity |
2 opendeferred goal
split ; reflexivity |
2 opendeferred goal
split ; unfold stream_current ; rewrite names_absent ; exact I |
2 opendeferred goal
split ; unfold stream_current ; rewrite names_absent ; exact I |
2 opendeferred goal
intros d → | →
3 openfocused goal
deferred goal
all: split ; | intros base l v Hin ; destruct opened ; contradiction
3 openfocused goal
deferred goal
all: split ; apply ready |
3 openfocused goal
deferred goal
all: split ; reflexivity |
3 openfocused goal
deferred goal
all: split ; intros root a Hin ; destruct opened ; contradiction |
3 openfocused goal
deferred goal
all: split ; intros base l v Hin ; destruct opened ; contradiction | exact Hoff
deferred goal
split
2 openfocused goal
–split ; exact Hpair |
2 opendeferred goal
split ; intros root a |
2 opendeferred goal
unfold diagnostic_name
2 opendeferred goal
rewrite ! names_absent
2 opendeferred goal
auto
deferred goal
–split ; exists F.err_file ; destruct opened ; reflexivity | destruct opened ; discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 10 tactics
Initial goal
intros
eapply hello_diagnostic_admitted with h := heapopened file := F.err_file
8 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
–lia
7 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–apply heap_agrees
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–apply heap_owned
5 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–exact proj2entry_wiopened
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–apply ready
3 opendeferred goal
deferred goal
deferred goal
–constructor
2 opendeferred goal
deferred goal
–destruct opened ; reflexivity
deferred goal
–destruct opened ; discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 3 tactics
Initial goal
intros m w Hfmt _ _
destruct Hfmt as status & errnum & fmt & rest & format & body & info & Hwords & Hstatus & Herrnum & Hstring & Hformat & Hready & Hrest
exact proj1Hready
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 3 tactics
Initial goal
intros m w Hclosed Hpre
destruct admission_stderrm w Hpre as file Hfile _
congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 2 tactics
Initial goal
intros m w Hwide Hpre
exact proj2admission_stderrm w Hpre Hwide
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Proof 40 steps Qed
Proof 95 steps Qed
Explore proof 31 tactics
Initial goal
intros opened
eapply H.M.E.invoke_normal with born := [ ]
7 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
–split ; reflexivity |
7 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
split
8 openfocused goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
+split ; reflexivity |
8 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
do 4 eexists
12 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
shelved goal
shelved goal
shelved goal
shelved goal
split ; reflexivity |
8 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
constructor ; eexists ; left ; reflexivity | constructor
7 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
+do 4 eexists
11 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
shelved goal
shelved goal
shelved goal
shelved goal
reflexivity
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–apply admitted
5 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
–split
6 openfocused goal
deferred goal
deferred goal
deferred goal
deferred goal
+eapply H.M.E.effects_local ; apply local_store_bytes | constructor
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
intros a Ha
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
left
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
exists errno_span5120 0
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
split ; apply in_or_app ; right ; apply in_or_app ; left ; destruct opened ; left ; reflexivity |
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
split
7 openfocused goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
∗exact proj1proj2proj1proj2proj2readyopened
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
deferred goal
∗unfold span_contains , errno_span
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
simpl
6 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
lia
5 opendeferred goal
deferred goal
deferred goal
deferred goal
deferred goal
+split ; apply format_prefix | constructor ; reflexivity | constructor
4 opendeferred goal
deferred goal
deferred goal
deferred goal
–split ; split ; apply format_prefix | reflexivity | reflexivity
3 opendeferred goal
deferred goal
deferred goal
–intros why Hbad
3 opendeferred goal
deferred goal
discriminate Hbad
2 opendeferred goal
deferred goal
–intros vs Hvs
2 opendeferred goal
injection Hvs as ←
2 opendeferred goal
split ; reflexivity | constructor
deferred goal
–intros status Hbad
discriminate Hbad
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 3 tactics
Initial goal
vm_compute
repeat apply NoDup_cons ; simpl ; intros Hbad ; repeat destruct Hbad as Hbad | Hbad ; try contradiction ; discriminate |
apply NoDup_nil
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 7 tactics
Initial goal
intros
split ; apply heap_agrees |
split ; apply disjoint |
split ; apply runtime_ready |
split ; apply entry_wi |
intros l v Hin
apply elem_of_app in Hin as Hin | Hin ; apply heap_owned | apply heap_errno ; exact Hin
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Proof 31 steps Qed
Explore proof 10 tactics
Initial goal
intros H
apply HPByte5120 3 VByte0
2 openfocused goal
–apply elem_of_cons
2 opendeferred goal
left
2 opendeferred goal
reflexivity
deferred goal
–change PByte5120 3 ∈ PByte5120 0; PByte5120 1; PByte5120 2; PByte5120 3
do 3 apply elem_of_cons ; right
apply elem_of_cons
left
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Explore proof 3 tactics
Initial goal
constructor
intros s m s′ m′ w h → → Hw
exact Hw
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Explore proof 6 tactics
Initial goal
intros args ws s m w tr vs s′ m′ w′ h ys Hi _ _ Hw
split ; exact Hw |
destruct H.D.error_returned_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Hi as _ born Hp
destruct proj2Hp as Hfmt _
destruct Hfmt as status & errnum & fmt & rest & text & body & info & info′ & segments & pieces & actions & Hxs & Hstring & Hformat & Hsegments & Hpieces & Hinfo & Hopen & Hid & Hid′ & Hrun & Haccepted & Hflush & Hready & Hrest
exact proj1Hready
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.