feat(phase161): Add Analyzer Box design and representative function selection
Phase 161 Task 2 & 3 completion:
**Task 2: Analyzer Box Design** (phase161_analyzer_box_design.md)
- Defined 3 core analyzer Boxes with clear responsibilities:
1. JsonParserBox: Low-level JSON parsing (reusable utility)
2. MirAnalyzerBox: Primary MIR v1 semantic analysis (14 methods)
3. JoinIrAnalyzerBox: JoinIR v0 compatibility layer
- Comprehensive API contracts for all methods:
- validateSchema(), summarize_function(), list_phis(), list_loops(), list_ifs()
- propagate_types(), reachability_analysis(), dump methods
- Design principles applied: 箱化, 境界作成, Fail-Fast, 遅延シングルトン
- 5-stage implementation roadmap (Phase 161-2 through 161-5)
- Key algorithms documented: PHI detection, loop detection, if detection, type propagation
**Task 3: Representative Function Selection** (phase161_representative_functions.md)
- Formally selected 5 representative functions covering all patterns:
1. if_simple: Basic if/else with PHI merge (⭐ Simple)
2. loop_simple: Loop with back edge and loop-carried PHI (⭐ Simple)
3. if_loop: Nested if inside loop with multiple PHI (⭐⭐ Medium)
4. loop_break: Loop with break statement and multiple exits (⭐⭐ Medium)
5. type_prop: Type propagation through loop arithmetic (⭐⭐ Medium)
- Each representative validates specific analyzer capabilities
- Selection criteria documented for future extensibility
- Validation strategy for Phase 161-2+ implementation
Representative test files will be created in local_tests/phase161/
(not committed due to .gitignore, but available for development)
Next: Phase 161 Task 4 - Implement basic MirAnalyzerBox on rep1_if_simple and rep2_loop_simple
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>