Skip to content

Duplicate address

Cross-statement validation: each NewAt's address must be unique.

Implemented as a Forward dataflow analysis with a method-table impl for stmts.NewAt. The impl pulls each address arg via expect_const, builds a LocationAddress, and accumulates a seen-map on the interpreter. A second NewAt pinning the same address records a ValidationError.

Per-statement validation (const-foldability + range) is the precondition; when an arg is non-const, expect_const raises InterpreterError. The ValidationPass wrapper uses run_no_raise so any duplicates collected before that point are still reported.