<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
alizainx/intelligence-systems-skills/translation-validation-self-hosting
──Details
PublishedOctober 21, 2026 at 02:29 PM
Content Hashsha256:5b41ccc004b89fc5...
Git SHA5d098c90c1e6
──Files
Files (1 file, 2.0 KB)
SKILL.md2.0 KBactive
SKILL.md · 26 lines · 2.0 KB

version: "1.0.0" name: translation-validation-self-hosting id: ISS-080 token_budget: 700 chain_with: [dataflow-alias-loop-optimizations, z3-angr-symbolic-concolic-execution, linux-from-scratch-bootstrap] description: "Alive2 SMT translation validation, differential compiler fuzzing (Csmith/YARPGen), Diverse Double-Compiling (DDC), and 3-stage self-hosting bootstrap."


translation-validation-self-hosting (ISS-080)

1. First-Principles Invariant

  • Wheeler Diverse Double-Compiling & 3-Stage Fixed-Point Law: A self-hosting compiler is verified iff Stage 2 (compiled by Stage 1) and Stage 3 (compiled by Stage 2) produce bit-for-bit identical (SHA-256(Stage2) == SHA-256(Stage3)) binaries, and compiling the source through an independent bootstrap compiler reproduces the identical Stage-3 hash.

2. Fast-Pass Low-Token Protocol (Web & Coding Agents)

  • Verify individual IR optimization rewrites $(S \to T)$ by encoding source and target semantics in SMT bitvector + poison logic (Z3) and proving that $T$ refines $S$ ($\text{defined}(S) \implies \text{defined}(T) \land \text{val}(S) = \text{val}(T)$).

3. Zero-Bug & Zero-Vulnerability Guards

  1. Eliminate non-determinism in the compiler (never iterate over pointer-hashed sets/maps when emitting symbol tables, register numbers, or basic block IDs; use deterministic insertion-order IndexMaps).
  2. Zero out all padding bytes in emitted AST/IR/object file structures (memset(&hdr, 0, sizeof(hdr))) so uninitialized stack padding cannot break Stage-2/Stage-3 binary equality.
  3. Run differential testing across randomized valid programs: compare exit code, stdout, and memory checksums across -O0, -O1, -O2, and -O3.
  4. Shrink failing compiler test cases automatically via syntax-aware delta debugging (creduce/llvm-reduce).
  5. Gate every compiler PR on sha256sum stage2/compiler == sha256sum stage3/compiler.

4. Verification Gate

  • python3 -c 'import hashlib; ...' && gcc -std=c11 -O2 -Wall -Wextra -Werror
All versions