pr4.1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user