Self-Hosting Status — MIRR Documentation
Description: MIRR: A hardware rule language for safety-critical systems. Compile temporal specs into synthesizable hardware logic.

Skip to content

# MIRR Self-Hosting Compiler Status

> Status: In Progress Last updated: 2026-03-20 (Campaign D)

## Executive Summary

The `compiler_mirr/` directory contains the MIRR-in-MIRR implementation for self-hosting. The project uses an incremental porting strategy, preserving original implementations as `.bak` files while building minimal, parseable primitives to unblock the bootstrap process.

This page tracks the current porting work for the hosted MIRR-in-MIRR compiler path. For the achieved stage-1 milestone, see docs/self_hosting_milestone.md.

## Module Status

Module | Status | Porting % | Notes
--- | --- | --- | ---
`lexer.mirr` | In Progress | 45% | Two-char ops and digit detection ported; identifier classification partial
`parser.mirr` | In Progress | 70% | Core state machine implemented; expression parsing functional
`semantic.mirr` | In Progress | 60% | Multi-pass structure in place; validation logic basic
`emitter.mirr` | In Progress | 55% | State machine emission; output generation functional
`temporal_lowering.mirr` | In Progress | 40% | Guard compilation structure in place; reflex lowering partial
`main.mirr` | In Progress | 80% | Entry point and orchestration logic implemented
`test_main.mirr` | In Progress | 75% | Test runner framework implemented
`PORTING_STEPS.md` | Complete | 100% | Migration plan documented
`README.md` | Complete | 100% | Documentation complete

## Overall Progress

Estimated total porting: ~58%

## Blockers

1. Pattern expansion — Not yet ported to MIRR
2. S-expression conversion — Not yet ported to MIRR
3. Width inference — Not yet ported to MIRR
4. SAT simplification — Not yet ported to MIRR
5. MAPE-K integration — Not yet ported to MIRR

## Next Steps

1. Complete lexer identifier classification
2. Port pattern expansion module
3. Port S-expression conversion
4. Integrate width inference
5. Run full bootstrap test suite