rocq/theories/HelloWorld.v
One fixed-launch Hello world. The layout below is a model witness, not a fabricated exported name for libc's private getopt_data. Identifying it with the selected native image, including errno TLS, remains the trusted libc/startup binding. No runtime axiom supplies it.
Shared getopt storage is not thread-local. Only the selected errno cell is the current thread's TLS binding. All native identities are disjoint from Hello's own image and the copied launch arguments.
Public optarg cell.
Public optind cell.
Public opterr cell.
Public optopt cell.
The selected thread's errno cell.
Public stdout pointer cell.
Public stderr pointer cell.
Public full invocation-name cell, handed to main.
Public short invocation-name cell, handed to main.
The synthetic stdout FILE object.
The synthetic stderr FILE object.
Borrowed initial C-locale name.
The launch's empty environment vector.
Only the actual public data imports extend Hello's symbol map.
Hello's own symbols together with its public libc data imports.
The two launch strings and their copied writable vector.
The copied argv vector's object identity.
The actual getopt arguments for this fixed launch.
Exact private inventory, not merely membership of the parser root. Argv is deliberately absent: it is the program-owned output.
Environment storage the parser may inspect on initialization.
Fixed identities and exact private parser inventory.
A completed exact-option scan. The private continuation is decoded from memory, not named by an independent ghost phase. Bounds permit both the selected return and a subsequent end-of-options control.
Ordinary coherent cutpoints for this launch only. Running resource prefixes do not inherit this disjunction. Errno is sampled through getopt_state_at; it is not frozen across locale or output calls.
Positive argument/input facts are essential here: getopt_step existentially quantifies a transition without requiring an invoke. A false argument guard must never admit a spurious return code.
The physical native component has no ghost heap, returned code or call-restoration law. FILE/native realization is still the libc trust boundary; these are the concrete model's coherent views.
Private identities exclude caller memory pieces, including life pieces. This main-stage interpretation owns neither FILE lives nor errno bytes. Callback acquisition is a distinct later operation.
One composite interpretation. Current ghost names observe the same payload as physical locale/parser/FILE readiness. Native pools must stay apart from the program, but getopt's public argv writes are intentionally not classified as private roots.
The initial ghost token rules out the finished cutpoint by its public optind, exposing the actual decoded fresh private storage.
Explore proof 6 tactics
Initial goal
intros m w h Hnative & _ & _ & _ & _ & Hcurrent Htoken
destruct Hnative as _ & _ & _ & Hfresh | Hfinished & _ ; exact Hfresh |
assert Hin : PNamegetopt_key, VGetoptnull 1 ∈ getopt_psnull 1 by constructor
destruct Hcurrentnull 1 Htoken_ _ Hin as _ Hi
destruct Hfinished as _ & Hi′ & _
congruence
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
This is the selection implication main_to_version consumes. It applies to every transition witness, not only to admitted invokes.
Explore proof 2 tactics
Initial goal
intros xs m w h born trace values m′ w′ Hw Htoken _ & _ & Hselected & _
exact proj1Hselectedfirst_call_fresh_ _ _ Hw Htoken
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
One joint model image extends, rather than replaces, the actual linked initializer. Its private parser starts zero-initialized; public optopt starts at '?' independently of that private copy.
Program-owned launch regions, outside the linked image.
Keep the linked initializer below the native/launch allocation band.
Address, width and integer value for each nonzero startup store.
Capabilities written by the six nonnull pointer stores.
The single physical entry image; scalar folds avoid expanding memory records underneath symbolic addresses during certificate checking.
Initial C-locale observation and its private name storage.
Public initial values and the private parser's exact authorities.
Structural stdout representation with no pending bytes.
Structural stderr representation with no pending bytes.
One shared payload, errno cell and authoritative shutdown inventory.
Outside startup writes, the seed's byte is preserved.
Explore proof 18 tactics
Initial goal
intros a Houtside
change fold_rightλaw old ⇒ if fstfstaw ≤? a && a <? fstfstaw + sndfstaw then byte_ofsndaw a − fstfstaw else old m_bytesimage_seed a image_words = m_bytesimage_seed a
generalize dependent image_words
intros ws
induction ws as | p n x ws IH ; intros Houtside ; reflexivity |
inversion Houtside as [ |? ? Hspan Htail ] ; subst
change if p ≤? a && a <? p + n then byte_ofx a − p else fold_rightλaw old ⇒ if fstfstaw ≤? a && a <? fstfstaw + sndfstaw then byte_ofsndaw a − fstfstaw else old m_bytesimage_seed a ws = m_bytesimage_seed a
assert Htest : p ≤? a && a <? p + n = false
2 openfocused goal
{apply andb_false_iff
2 opendeferred goal
destruct Hspan as Hspan | Hspan
3 openfocused goal
deferred goal
–left
3 opendeferred goal
deferred goal
apply Z.leb_gt
3 opendeferred goal
deferred goal
exact Hspan
2 opendeferred goal
deferred goal
–right
2 opendeferred goal
apply Z.ltb_ge
2 opendeferred goal
exact Hspan
deferred goal
rewrite Htest
exact IHHtail
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The entire private parser is zero-initialized, byte by byte.
Explore proof 7 tactics
Initial goal
intros i Hi
rewrite entry_bytes_unwritten
2 openfocused goal
–unfold parser ; cbn [ ptr_addr ]
2 opendeferred goal
destruct Z.ltb_spec131072 + i 131072 ; lia | reflexivity
deferred goal
–change Forallλaw ⇒ 131072 + i < fstfstaw ∨ fstfstaw + sndfstaw ≤ 131072 + i image_words
repeat apply List.Forall_cons ; cbn [ fst snd ] ; lia |
constructor
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Freshness decodes the initialized word from the joint physical image.
Explore proof 20 tactics
Initial goal
split
2 openfocused goal
–split ; left ; reflexivity |
2 opendeferred goal
split
3 openfocused goal
deferred goal
+split ; simpl ; lia |
3 opendeferred goal
deferred goal
split
4 openfocused goal
deferred goal
deferred goal
∗exists 131072, mkRegion131072 131128 GlobalData Live
4 opendeferred goal
deferred goal
deferred goal
split ; left ; reflexivity |
4 opendeferred goal
deferred goal
deferred goal
split ; reflexivity
3 opendeferred goal
deferred goal
deferred goal
∗split ; reflexivity |
3 opendeferred goal
deferred goal
intros i Hi
3 opendeferred goal
deferred goal
rewrite entry_parser_zeroi Hi
3 opendeferred goal
deferred goal
lia
2 opendeferred goal
deferred goal
+split
3 openfocused goal
deferred goal
∗split ; simpl ; lia |
3 opendeferred goal
deferred goal
exists 131072, mkRegion131072 131128 GlobalData Live
3 opendeferred goal
deferred goal
repeat split ; reflexivity
2 opendeferred goal
deferred goal
∗reflexivity
deferred goal
–split ; reflexivity |
change load_bytesentry_memory 131096 4 = 0
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
All public getopt observations, including sampled errno, are coherent.
Explore proof 4 tactics
Initial goal
split ; entry_pointer |
split ; entry_int |
split ; entry_int |
split ; entry_int
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Both imported stream cells expose the corresponding FILE capability.
Explore proof 1 tactics
Source script
The empty environment is a readable sentinel-terminated vector.
Explore proof 3 tactics
Initial goal
split ; reflexivity |
split ; cbn ; lia |
split ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
No synthetic FILE shadow slot delegates an external object.
Explore proof 3 tactics
Initial goal
intros a Ha
cbn [ entry_memory image_pointers fold_right fst snd m_aux image_seed ]
image_bounds ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Neither FILE owns or reaches the shared errno cell.
Explore proof 13 tactics
Initial goal
intros a Ha
split
2 openfocused goal
–intros root [ <-| [ ] ]
2 opendeferred goal
unfold spans_apart
2 opendeferred goal
cbn [ span_ptr span_size ptr_addr errno_pointer ]
2 opendeferred goal
lia
deferred goal
–intros b Hb | Hb ; injection Hb as <-| discriminate
split ; intros |
split
2 openfocused goal
all: intros Hnone | source & Hin & Hcap | source & addr & Hin & Haddr & Hsize & _ & Haux | b & & _ ; try discriminate
4 openfocused goal
focused goal
focused goal
all: cbn [ file_sources file_handle file_reads file_roots app ] in Hin ; destruct Hin as [ <-| [ <-| [ ] ] ] ; cbn [ file_handle span_ptr ptr_cap span_size ptr_addr ] in * ; try discriminate ; try injection Hcap ; lia
4 openfocused goal
focused goal
focused goal
all: unfold span_contains in Haddr ; cbn [ file_handle span_ptr span_size ptr_addr ] in Haddr ; try lia
2 openfocused goal
all: rewrite entry_file_auxaddr ltac:lia in Haux ; discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Both synthetic FILE objects meet structural capability readiness.
Proof 27 steps Qed
Exact pointer-slot capabilities, with empty interior shadow slots.
The full three-slot argv allocation.
Hello's own program_name cell, from its linked initializer.
The full invocation-name cell's allocation.
The short invocation-name cell's allocation.
Ownership of all three cells consumed by Hello's name setup.
One resource bundle for main's selected version path.
The single ghost heap holding that resource bundle.
These pieces supply main_to_version's resources, not separate per-contract admissions. In particular the full argv block, actual strings, name cells, locale names and output literals coexist.
Explore proof 4 tactics
Initial goal
pose eqp := ltac:intros x y ; change x = y + x ≠ y ; decide equality ; apply Z.eq_dec : EqDecisionpiece
apply @bool_decide_eq_true_ @NoDup_decpiece eqp _
vm_compute
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
A finite certificate checks the unique registered region rather than expanding a universally quantified region once per literal byte. Exact aux equality is sufficient for the weaker collector-aware agreement. This checker is only a proof device for the model image.
The finite certificate implies the public heap agreement predicate.
Explore proof 18 tactics
Initial goal
destruct l , v ; cbn [ checked_piece agree_piece ] ; try tauto
2 open–destruct object_regionb m_regionsm as reg | eqn: E ; | tauto
2 openintros H
2 opensplit ; unfold registered ; congruence |
2 openintros reg′ E′ Hlive
2 openrewrite E in E′
2 openinjection E′ as ←
2 openexact HHlive
–destruct object_regionb m_regionsm as reg | eqn: E ; | tauto
intros H
split ; unfold registered ; congruence |
intros reg′ E′ Hlive
rewrite E in E′
injection E′ as ←
destruct HHlive as Ho & Hb & Ha
repeat split ; try assumption
left
exact Ha
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
All operations in a certificate have transparent finite decisions.
Proof 5 steps Defined
Every piece in the single initial resource bundle agrees.
Explore proof 9 tactics
Initial goal
assert Hcheck : forallbλlv ⇒ bool_decidechecked_pieceentry_memory lv.1 lv.2 entry_pieces = true by vm_compute ; reflexivity
apply all_agree_intro
intros l v Hin
apply checked_piece_sound
rewrite forallb_forall in Hcheck
apply bool_decide_eq_true_1checked_pieceentry_memory l v
apply Hcheckl, v
clear Hcheck
induction Hin ; cbn ; auto
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Agreement lifts from the entire resource list to its ghost heap.
Explore proof 5 tactics
Initial goal
intros l v Hlookup
apply lookup_overwrite in Hlookup as Hin | _ Hempty
2 openfocused goal
–exact all_agree_elem_ _ _ _ entry_pieces_agree Hin
deferred goal
–rewrite lookup_empty in Hempty
discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Every initial locale name is a readable aligned C string.
Explore proof 23 tactics
Initial goal
split ; exact I |
split ; constructor |
split
2 openfocused goal
–intros k Hk
2 opendeferred goal
split ; discriminate |
2 opendeferred goal
split ; reflexivity |
2 opendeferred goal
split ; simpl ; lia |
2 opendeferred goal
split ; reflexivity
deferred goal
–split
2 openfocused goal
+constructor ; | constructor
2 opendeferred goal
split ; simpl ; lia |
2 opendeferred goal
split
3 openfocused goal
deferred goal
∗exists 131840, mkRegion131840 131842 GlobalData Live
3 opendeferred goal
deferred goal
split ; right ; reflexivity |
3 opendeferred goal
deferred goal
split ; reflexivity
2 opendeferred goal
deferred goal
∗split ; reflexivity |
2 opendeferred goal
intros i Hi
2 opendeferred goal
cbn [ span_size ] in Hi
2 opendeferred goal
assert i = 0 ∨ i = 1 as → | → by lia ; change 0 ≤ 67 < 256 | change 0 ≤ 0 < 256 ; lia
deferred goal
+split ; constructor |
intros k Hk
∃ base : Z,
(ptr_cap (locale_name entry_locale k) = Obj base
∨ ptr_cap (locale_name entry_locale k) = Ro base)
∧ base `mod` 8 = 0exists 131840
(ptr_cap (locale_name entry_locale k) = Obj 131840
∨ ptr_cap (locale_name entry_locale k) = Ro 131840)
∧ 131840 `mod` 8 = 0split ; right ; reflexivity | reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Locale, FILEs, errno and shutdown are structurally coherent together.
Explore proof 17 tactics
Initial goal
split ; exact I |
split ; exact entry_locale_ready |
split
2 openfocused goal
–split ; discriminate |
2 openwritable_span entry_memory
{| span_ptr := libc_errno entry_world.1; span_size := 4 |}
∧ ptr_addr (libc_errno entry_world.1) `mod` 4 = 0deferred goal
split ; entry_writable | reflexivity
deferred goal
–split ; apply stdout_initial_wf |
split ; apply stdout_initial_wf |
split ; constructor |
split ; simpl ; lia |
split ; exact I |
split ; discriminate |
split ; reflexivity |
split ; intros _ ; exact proj1entry_files_ready |
split ; intros _ ; exact proj2entry_files_ready |
intros p file Hfile b Hin
unfold libc_file_at in Hfile
destruct same_filep libc_stdoutentry_world ; | destruct same_filep libc_stderrentry_world ; try discriminate ; injection Hfile as ← ; contradiction
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Hello's actual option string and sentinel-terminated table are readable.
Explore proof 8 tactics
Initial goal
unfold hello_table_at
split
2 openfocused goal
–vm_compute
2 opendeferred goal
repeat split ; congruence
deferred goal
–split ; reflexivity |
cbn [ getopt_records hello_options ]
pointer_slot entry_memory (ptr_addr longopts_ptr)
(option_name
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|})
∧ ptr_addr
(option_name
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|})
≠ 0
∧ c_string entry_memory
(option_name
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|})
(option_text
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|})
∧ 0
≤ option_argument
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|}
≤ 2
∧ load_bytes entry_memory (ptr_addr longopts_ptr + 8) 4 =
option_argument
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|}
∧ pointer_slot entry_memory (ptr_addr longopts_ptr + 16)
(option_flag
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|})
∧ getopt_int
(option_value
{|
option_name :=
{| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|})
∧ load_bytes entry_memory (ptr_addr longopts_ptr + 24) 4 =
option_value
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|}
`mod` 2 ^ 32
∧ getopt_optional_int entry_memory
(option_flag
{|
option_name :=
{| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text :=
[103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|})
∧ pointer_slot entry_memory (ptr_addr longopts_ptr + 32)
(option_name
{|
option_name :=
{| ptr_addr := 69488; ptr_cap := Ro 69488 |};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111; 110; 97;
108];
option_argument := 0;
option_flag := null;
option_value := 116
|})
∧ ptr_addr
(option_name
{|
option_name :=
{| ptr_addr := 69488; ptr_cap := Ro 69488 |};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111; 110; 97;
108];
option_argument := 0;
option_flag := null;
option_value := 116
|})
≠ 0
∧ c_string entry_memory
(option_name
{|
option_name :=
{| ptr_addr := 69488; ptr_cap := Ro 69488 |};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111; 110;
97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|})
(option_text
{|
option_name :=
{| ptr_addr := 69488; ptr_cap := Ro 69488 |};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111; 110;
97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|})
∧ 0
≤ option_argument
{|
option_name :=
{| ptr_addr := 69488; ptr_cap := Ro 69488 |};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111; 110;
97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|}
≤ 2
∧ load_bytes entry_memory
(ptr_addr longopts_ptr + 32 + 8) 4 =
option_argument
{|
option_name :=
{| ptr_addr := 69488; ptr_cap := Ro 69488 |};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111; 110;
97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|}
∧ pointer_slot entry_memory
(ptr_addr longopts_ptr + 32 + 16)
(option_flag
{|
option_name :=
{|
ptr_addr := 69488; ptr_cap := Ro 69488
|};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111;
110; 97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|})
∧ getopt_int
(option_value
{|
option_name :=
{|
ptr_addr := 69488;
ptr_cap := Ro 69488
|};
option_text :=
[116; 114; 97; 100; 105; 116; 105;
111; 110; 97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|})
∧ load_bytes entry_memory
(ptr_addr longopts_ptr + 32 + 24) 4 =
option_value
{|
option_name :=
{|
ptr_addr := 69488;
ptr_cap := Ro 69488
|};
option_text :=
[116; 114; 97; 100; 105; 116; 105; 111;
110; 97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|}
`mod` 2 ^ 32
∧ getopt_optional_int entry_memory
(option_flag
{|
option_name :=
{|
ptr_addr := 69488;
ptr_cap := Ro 69488
|};
option_text :=
[116; 114; 97; 100; 105; 116; 105;
111; 110; 97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|})
∧ pointer_slot entry_memory
(ptr_addr longopts_ptr + 32 + 32)
(option_name
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|})
∧ ptr_addr
(option_name
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|})
≠ 0
∧ c_string entry_memory
(option_name
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[
104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|})
(option_text
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[
104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|})
∧ 0
≤ option_argument
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|}
≤ 2
∧ load_bytes entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 8)
4 =
option_argument
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|}
∧ pointer_slot entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 16)
(option_flag
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|})
∧ getopt_int
(option_value
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|})
∧
load_bytes entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 24) 4 =
option_value
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|}
`mod`
2 ^ 32
∧
getopt_optional_int
entry_memory
(option_flag
{|
option_name :=
{|
ptr_addr := 69520;
ptr_cap := Ro 69520
|};
option_text :=
[104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|})
∧
pointer_slot entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 32)
(option_name
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|})
∧
ptr_addr
(option_name
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|})
≠ 0
∧
c_string entry_memory
(option_name
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|})
(option_text
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|})
∧
0
≤
option_argument
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|}
≤ 2
∧
load_bytes entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 32 + 8) 4 =
option_argument
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|}
∧
pointer_slot entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 32 + 16)
(option_flag
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|})
∧
getopt_int
(option_value
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|})
∧
load_bytes entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 32 + 24) 4 =
option_value
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|}
`mod`
2 ^ 32
∧
getopt_optional_int
entry_memory
(option_flag
{|
option_name :=
{|
ptr_addr := 69552;
ptr_cap := Ro 69552
|};
option_text :=
[118; 101; 114; 115; 105;
111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|})
∧
∃ p : ptr,
ptr_addr p = 0
∧
pointer_slot entry_memory
(ptr_addr longopts_ptr + 32 +
32 + 32 + 32) prepeat match goal with|- _ ∧ _⇒splitend
41 openfocused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
load_bytes entry_memory (ptr_addr longopts_ptr + 24) 4 =
option_value
{|
option_name := {| ptr_addr := 69456; ptr_cap := Ro 69456 |};
option_text := [103; 114; 101; 101; 116; 105; 110; 103];
option_argument := 1;
option_flag := null;
option_value := 103
|}
`mod` 2 ^ 32focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
load_bytes entry_memory (ptr_addr longopts_ptr + 32 + 24) 4 =
option_value
{|
option_name := {| ptr_addr := 69488; ptr_cap := Ro 69488 |};
option_text := [116; 114; 97; 100; 105; 116; 105; 111; 110; 97; 108];
option_argument := 0;
option_flag := null;
option_value := 116
|}
`mod` 2 ^ 32focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
load_bytes entry_memory (ptr_addr longopts_ptr + 32 + 32 + 24) 4 =
option_value
{|
option_name := {| ptr_addr := 69520; ptr_cap := Ro 69520 |};
option_text := [104; 101; 108; 112];
option_argument := 0;
option_flag := null;
option_value := 128
|}
`mod` 2 ^ 32focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
focused goal
load_bytes entry_memory (ptr_addr longopts_ptr + 32 + 32 + 32 + 24) 4 =
option_value
{|
option_name := {| ptr_addr := 69552; ptr_cap := Ro 69552 |};
option_text := [118; 101; 114; 115; 105; 111; 110];
option_argument := 0;
option_flag := null;
option_value := 129
|}
`mod` 2 ^ 32focused goal
focused goal
all: lazymatch goal with|- pointer_slot_ _ _⇒vm_compute ; repeat split ; congruence|- c_string_ _ _⇒vm_compute ; repeat split ; congruence|- getopt_int_⇒unfold getopt_int ; cbn [ option_value ] ; lia|- getopt_optional_int_ _⇒left ; reflexivity|- ∃p, _⇒exists null ; vm_compute ; repeat split ; congruence_⇒vm_compute ; congruenceend
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The native-view predicate has this explicit synthetic model witness.
Explore proof 12 tactics
Initial goal
split ; exact entry_stream_ready |
split
2 openfocused goal
–split ; repeat split ; reflexivity |
2 opendeferred goal
split ; exact entry_public_state |
2 opendeferred goal
left
2 opendeferred goal
exact entry_parser_fresh
deferred goal
–split ; reflexivity |
split ; reflexivity |
split ; reflexivity |
split ; exact proj1entry_stream_cells |
split ; exact proj2entry_stream_cells |
split ; exact entry_environment | exact entry_table
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Every initial heap lookup comes from the one joint resource bundle.
Explore proof 4 tactics
Initial goal
intros Hl
apply lookup_overwrite in Hl as Hin | _ Hempty ; exact Hin |
rewrite lookup_empty in Hempty
discriminate
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The initial bundle's only ghost observations are the parser token, the locale names and the codec; none freezes native FILE contents.
Explore proof 12 tactics
Initial goal
intros Hl
apply entry_lookup_member in Hl
apply list_elem_of_In in Hl
Local Transparent entry_pieces
assert Hfilter : List.filterλlv ⇒ match lv.1 with PName_ ⇒ true _ ⇒ false end entry_pieces = getopt_psnull 1 ++ mapλk ⇒ PNamek, VNamelocale_pointer 67 locale_categories ++ codec_psTAtom"C"
2 openfocused goal
{unfold entry_pieces
2 opendeferred goal
vm_compute
2 opendeferred goal
reflexivity
deferred goal
Local Opaque entry_pieces
rewrite <- Hfilter
apply filter_In
split ; exact Hl | reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The concrete model's native capability inventories are private from every memory piece of main, including object lives.
Explore proof 16 tactics
Initial goal
Local Transparent entry_pieces
assert Hcheck : forallbλsource ⇒ forallbλlv ⇒ match lv.1, ptr_capspan_ptrsource with PName_, _ ⇒ true _, Objb _, Rob ⇒ negbZ.eqbpiece_idlv.1 b _, _ ⇒ true end entry_pieces private_sourcesentry_world = true
2 openfocused goal
{unfold entry_pieces
2 opendeferred goal
vm_compute
2 opendeferred goal
reflexivity
deferred goal
Local Opaque entry_pieces
rewrite forallb_forall in Hcheck
apply List.Forall_forall
intros source Hin b Hcap
specialize Hchecksource Hin
rewrite forallb_forall in Hcheck
intros b′ l v [ <-| [ ] ] Hl Hmem
apply entry_lookup_member in Hl
apply list_elem_of_In in Hl
specialize Hcheckl, v Hl
destruct Hcap as Hcap | Hcap ; rewrite Hcap in Hcheck ; destruct l ; try contradiction ; cbn [ fst piece_id ] in Hcheck |- * ; apply Z.eqb_neq ; apply negb_true_iff ; exact Hcheck
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The initial names, codec and getopt observations all agree with the same physical native world.
Explore proof 14 tactics
Initial goal
split
2 openfocused goal
–intros k p t Hl
2 opendeferred goal
apply entry_ghost_lookup in Hl
2 opendeferred goal
cbn [ getopt_ps getopt_key codec_ps codec_key locale_categories List.app List.map ] in Hl
2 opendeferred goal
repeat destruct Hl as E | Hl ; try contradiction ; try discriminate E ; injection E as ← ← ← ; split ; cbn ; auto 30 | split ; reflexivity
deferred goal
–split
2 openfocused goal
+intros c Hl
2 opendeferred goal
apply entry_ghost_lookup in Hl
2 opendeferred goal
cbn [ getopt_ps getopt_key codec_ps codec_key locale_categories List.app List.map ] in Hl
2 opendeferred goal
repeat destruct Hl as E | Hl ; try contradiction ; try discriminate E ; injection E as ← ; reflexivity
deferred goal
+intros a i Hl
apply entry_ghost_lookup in Hl
cbn [ getopt_ps getopt_key codec_ps codec_key locale_categories List.app List.map ] in Hl
repeat destruct Hl as E | Hl ; try contradiction ; try discriminate E ; injection E as ← ← ; split ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
One composite world interpretation is inhabited jointly with the actual main resource bundle and heap agreement. This is a model entry witness, not native adequacy or cross-call restoration.
Explore proof 6 tactics
Initial goal
split
2 openfocused goal
–split ; exact entry_native |
2 opendeferred goal
split ; exact entry_private |
2 opendeferred goal
split ; intros b l v ; contradiction |
2 opendeferred goal
exact entry_current
deferred goal
–split ; exact entry_agrees | exact entry_keys_unique
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.