Contracts between levels
nC exposes several ways to express a program within one semantic model. Ordinary source, the foundational root, machine code and primitives have distinct responsibilities. An operation must retain the information required as it crosses these levels.
tools/ncc/nc/src/ contains the native compiler written in nC. crates/ contains the retained Rust implementation and development tools. runtime/nc/ contains runtime bodies and providers. Build tools and contracts under bootstrap/ connect inputs and generations.
| Phase | Responsibility |
|---|---|
| Lexer and parser | Tokenization and syntactic structure |
| AST | Identity of declarations, types, relationships and surfaces |
| Semantic analysis | Symbol resolution and validation of types, arity and control flow |
| IR | Representation of the analyzed program for lowering and transformations |
| MCT and backend | Materialization according to target layout, ISA and ABI |
| Linking | Symbol resolution, relocations and image dependencies |
| Execution | Verification of results and observable effects |
This is a responsibility map. Some surfaces have their own entry points and validation paths. A change must identify the affected route and the information it preserves.
Design documentation specifies the contract. Version evidence records results for particular inputs, compiler artifacts and environments. Both must be traceable to implementation and fixtures.