nC_PROGRAMMING LANGUAGE

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.

PhaseResponsibility
Lexer and parserTokenization and syntactic structure
ASTIdentity of declarations, types, relationships and surfaces
Semantic analysisSymbol resolution and validation of types, arity and control flow
IRRepresentation of the analyzed program for lowering and transformations
MCT and backendMaterialization according to target layout, ISA and ABI
LinkingSymbol resolution, relocations and image dependencies
ExecutionVerification 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.

View source on GitHub ↗PDF manual ↓

Search nC