USL Architecture¶
Overview of the USL compiler architecture.
Components¶
USL Compiler
├── Lexer - Tokenization
├── Parser - AST construction
├── Semantic - Symbol resolution
├── Type Checker - Type inference
├── Verifier - Formal verification
├── IR Generator - Intermediate representation
└── Codegen - Target code generation
Compilation Pipeline¶
graph LR
A[Source] --> B[Lexer]
B --> C[Parser]
C --> D[AST]
D --> E[Semantic]
E --> F[Type Checker]
F --> G[Verifier]
G --> H[IR]
H --> I[Codegen]
I --> J[Target Code] Key Design Decisions¶
- Layered architecture enforced at compile time
- Effect system tracks side effects
- SMT solver for formal verification
- Multi-target code generation
Modules¶
lexer/- Lexical analysisparser/- Syntax analysissemantic/- Semantic analysistypes/- Type systemproof/- Verificationir/- Intermediate representationcodegen/- Code generation