This commit is contained in:
2026-03-24 13:40:38 +00:00
parent 929dcde0c6
commit 546a4f219b
2 changed files with 0 additions and 67 deletions
-50
View File
@@ -1,53 +1,3 @@
# PR-4.1 — Define Canonical Stack Effect Table for Core ISA
### Briefing
The verifier must rely on a single canonical definition of stack effects for every opcode. This PR introduces the formal stack effect table for the new core ISA.
### Target
* Provide a single authoritative stack effect definition per opcode.
* Ensure verifier and tooling use the same source of truth.
### Work items
* Introduce a stack effect table or equivalent structure:
* Input slot count.
* Output slot count.
* Attach stack effect metadata to each opcode.
* Ensure the table is used by the verifier entry points.
* Document stack effects in code comments (English).
### Acceptance checklist
* [ ] Every opcode has a defined stack effect.
* [ ] Verifier uses the canonical table.
* [ ] No duplicated or ad-hoc stack effect logic remains.
* [ ] `cargo test` passes.
### Tests
* Add unit test ensuring all opcodes have stack effects defined.
### Junie instructions
**You MAY:**
* Introduce new metadata tables for opcodes.
* Refactor verifier code to use the canonical table.
**You MUST NOT:**
* Change opcode semantics.
* Introduce new instructions.
**If unclear:**
* Ask before assigning stack effects.
---
# PR-4.2 — Basic Stack Safety Verification (Underflow/Overflow)
### Briefing