proof/: add StarForth_Dictionary_Words.thy (HERE/ALIGN/ALLOT/,/C,/2,/PAD/LATEST)

Adds VM_MEMORY_SIZE and DICTIONARY_MEMORY_SIZE constants to StarForth_Base.thy
(previously only STACK_SIZE existed). SP@/SP! left unmodelled (oops-flagged
with explanation) -- the list-based data_stack model has no independent dsp
register distinct from list length, which is exactly what SP! manipulates.

Genuine findings recorded in comments, not fixed:
- LATEST has an identical body to HERE (both just push vm->here) rather than
  consulting vm->latest -- doesn't return what its own doc comment claims.
- ALIGN (via vm_align/vm_allot) bounds-checks here against
  DICTIONARY_MEMORY_SIZE (2MB), while ALLOT/,/C,/2, bound-check directly
  against VM_MEMORY_SIZE (5MB) instead -- two different ceilings for the
  same dictionary pointer.

Full suite (26 theory files) verifies with zero errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-08-13 18:12:54 -04:00
co-authored by Claude Sonnet 5
parent d0fcd2ed86
commit 92474c5219
3 changed files with 318 additions and 0 deletions
+1
View File
@@ -10,6 +10,7 @@ session "StarForth" = "HOL-Library" +
StarForth_Logical_Words
StarForth_Return_Stack_Words
StarForth_Memory_Words
StarForth_Dictionary_Words
StarForth_Mutex
StarForth_Transition
StarForth_Loop1_Heat