proof: close :'s compiling_word_id tracking, the last easily-closeable defining-words gap

Adds compiling_word_id :: nat option to vm_state, modelling vm->compiling_word
(include/vm.h:421). forth_colon_entry_half now sets it from latest_id on success
and forces it to None on the pinned-conflict failure path, matching the real C's
unconditional `vm->compiling_word = de;` before its own NULL check in
vm_enter_compile_mode (src/vm.c:232-264).

: is now closed through entry creation + compiling_word tracking, same point as
CREATE/VARIABLE/CONSTANT. Remaining gap for : is the same DF write (gap b,
vm_align+HERE capture) those three already closed but not yet composed in here.

All 52 theories verify clean (isabelle build -D proof/, ~48s).

Part of the pre-Artemis closeout pass (FABRIC-2.md 5.2). PROOFS included per
Captain Bob's 2026-08-14 instruction.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-08-15 06:03:10 -04:00
co-authored by Claude Sonnet 5
parent b9e8fdc3ae
commit ee3a2e57aa
3 changed files with 83 additions and 32 deletions
+7
View File
@@ -522,6 +522,13 @@ record vm_state =
`latest_id`'s convention, rather than as a raw pointer. *)
current_executing_word_id :: "nat option"
(* ── Compile-time state ───────────────────────────────────────────────
Models `vm->compiling_word` (include/vm.h:421, a DictEntry pointer),
the entry currently under construction by `:` until `;` clears it.
Word-id-indexed (`nat option`), matching `current_executing_word_id`
and `latest_id`'s convention, rather than a raw pointer. *)
compiling_word_id :: "nat option"
(* ── Execution state ──────────────────────────────────────────────────── *)
vm_mode :: vm_mode
vm_ip :: nat \<comment> \<open>instruction pointer (byte offset)\<close>