Nordshrift — .sst transpiler driver and semantic layer
Nordshrift is the transpiler driver and semantic coordination layer for Sleela. It reads a .sst Scripting Sheet, validates its control sections, resolves Sleela Wrapper™ sources, and drives the selected target. Version 2.1-dev also gives the sheet a common semantic vocabulary for the Math, Physics, Economics, Chemistry, Financial, Astrophysics, Sociology, and other Subject Libraries.
Version 2.6-dev architecture
The sheet now accepts a unified object input layer covering the SLeeLa source architecture: Core, IO, System, Network, Application, Data, Science, Security, and Deployment. Specialized sections retain stronger domain-specific contracts where applicable.
.sst control surface
│
├── source / target / pipeline / rules / effects / derive / guards / interop
│
└── subject / quantities / units / assumptions / relations
│
▼
transformations / evidence / comparison
│
▼
explanation / validation / workplan
│
▼
Sleela front end → Java | Sleela | C
The normative semantic extension is /SST-2.0.model. The legacy 1.0 grammar remains in /SST.model.
Generic input-object model
input_object.h defines InputObjectCategory and InputObject. Each object has an identity and optional type, source, target, value, inputs, outputs, and named properties. The parser and validator enforce closed categories, known members, and bounded sizes.
The object layer is a validated data boundary. It does not imply network transmission, process execution, filesystem mutation, database access, email submission, or deployment. See INPUT-OBJECTS.md.
Common subject model
subject_model.h defines the implementation vocabulary:
SubjectQuantityAssumptionRelationTransformationComparativeNormEvidenceExplanationTodoEvidenceStatusWorkStatus
The implementation intentionally keeps these structures dependency-light so that they can be used by the Nordshrift driver without coupling the semantic layer to a particular subject library.
Canonical chain
Subject → Quantity → Unit → Assumption → Relation → Formula → Transformation → Result → ComparativeNorm → Evidence → Explanation → Validation
This chain is the principal bridge between declarative .sst sheets and executable subject libraries.
Evidence semantics
EvidenceStatus is explicitly epistemic:
ObservedSpecifiedDerivedModeledInferredAssumed
The implementation must not silently convert a modeled or inferred result into an observation.
Work-plan semantics
Todo provides an explicit plan with identity, subject, priority, dependencies, preconditions, action, expected result, validation, and WorkStatus.
WorkStatus values are:
Planned, Ready, Active, Blocked, Validating, Complete, Deferred.
Completion should be tied to a validation record rather than merely setting the status to Complete.
Domain ideals
- Identity before calculation.
- Quantity before formula.
- Unit/dimension before interpretation.
- Assumption before extrapolation.
- Relation before conclusion.
- Transformation before result.
- Provenance before trust.
- Comparison before ranking.
- Uncertainty before certainty claims.
- Validation before completion.
- Explicit dependency before hidden coupling.
- Computation remains distinguishable from observation.
Subject relationships
Math is foundational. Physics, Economics, Chemistry, Financial, Astrophysics, and Sociology may declare Math as a dependency. Domain dependencies must remain explicit. Other dependencies must be declared when they are genuinely required; semantic declarations must not imply empirical causation.
Existing .sst pipeline
The 1.0 control sections remain available and continue to describe the build process:
| Section | Purpose |
|---|---|
sheet | manifest and metadata |
import | composition |
source | Wrapper™ source selection |
target | output and target language |
pipeline | processing phases |
rules | rule activation |
effects | effect policy |
derive | derivation configuration |
guards | failure behavior |
interop | language interoperability |
profile | named configuration variants |
2.1-dev adds semantic sections without removing these build-control concepts.
Files
nordshrift/
NORDSHRIFT.md
README.md
INPUT-OBJECTS.md
diagnostics.h
sst_lexer.{h,cpp}
sheet_model.h
sst_parser.{h,cpp}
source_resolve.{h,cpp}
sleela_emit.{h,cpp}
object_compat.{h,cpp}
input_object.{h,cpp}
subject_model.h
subject_model.cpp
nordshrift.cpp
examples/
The build now compiles subject_model.cpp into the Nordshrift executable.
Subject Library coverage
Nordshrift now treats the expanded Subject Library set as one semantic family rather than unrelated APIs:
| Subject | Native/source layer | XML model/procedure | Nordshrift relationship |
|---|---|---|---|
| Math | C/C++ core | shared contract | foundational |
| Physics | C/C++ subject layer | shared contract | depends on Math |
| Chemistry | native subject layer | shared contract | domain model |
| Economics | C/C++ subject layer | shared contract | depends on Math |
| Finance | C/C++ subject layer | shared contract | quantitative domain |
| Inference | native subject layer | shared contract | evidence-sensitive |
| Data Analytics | native/API layer | shared contract | statistical/data layer |
| Astrophysics | C/C++ numerical layer | model, procedure, observation | depends on Math and Physics |
| Sociology | C/C++ statistical layer | model, procedure, observation | depends on Math |
A Subject Library addition is complete only when its executable mathematics, semantic declaration, evidence discipline, XML representation, SLeeLa example, and focused validation can be traced together.
Excellent implementation standard
For the Subject Library system, Excellent means:
- the subject has a stable identity and declared dependencies;
- quantities have units or explicit dimensions;
- formulas have named inputs and outputs;
- assumptions are separate from observations;
- modeled, inferred, derived, and observed values remain distinct;
- XML describes models and procedures without becoming arbitrary executable code;
- native C/C++ provides deterministic implementations where the semantics are mature;
- SLeeLa source demonstrates the subject vocabulary;
- Nordshrift can carry the subject through Subject → Quantity → Unit → Assumption → Relation → Formula → Transformation → Result → ComparativeNorm → Evidence → Explanation → Validation;
- validation and provenance are explicit.
The standard is a software/source-quality target. It does not turn a computed statistic into a causal claim, nor a model into an observation.
Nordshrift Complete application/service edition
Nordshrift Complete extends the 2.1-dev architecture from a semantic control language into a reusable application/service construction surface. Its canonical class catalog is NORDSHRIFT-COMPLETE.md.
The Complete edition uses the existing SLeeLa-Complete classes as its designer-facing vocabulary:
Project
-> Module
-> Classes / Interfaces / Types
-> Events / Dependencies / Capabilities
-> Platform / Backend / Adapter
-> Network / Security
-> Data / I/O / UI / Runtime
-> Memory / Reflection
-> Build / Test
This makes the same class model usable as the basis for applications and services. The .sst sheet remains the control surface and the Nordshrift triplet remains Java, Sleela, and C.
Complete module families
Nordshrift Complete explicitly covers reusable application/service foundations for Core / Runtime; API / Type Contracts; Platform; Network; Security; Data; Database; HTTP / Web; Server / Service; I/O; Synchronization; UI / Application; XML; Email; Media; Telephony / VoIP; Memory Management; Reflection; AI / Inference; Analytics; Regex / Text; Domain / Science; Terminal; Decompiler / Tooling; and Native Implementation.
The Complete edition is an authoring contract. A module becomes implementation-complete only after its native/platform implementation, tests, diagnostics, packaging, and deployment requirements are fulfilled.
2.6-dev compiler compatibility gate
Nordshrift 2.6-dev carries forward source readability, #sleela syntax-version compatibility, shared Sleela lexer/parser validation, shared target-neutral lowering, target-neutral semantic analysis, runtime artifact ABI validation, and cross-version compatibility fixtures. These gates are integrated into the test workflow. The 2.6-dev line does not claim native linking or deterministic production compiler completeness; see COMPILER.RESOLUTION.md.
/lib Library Collection — September 2026
The canonical SLeeLa library collection now covers the repository module inventory with 77 package families, 10039 SLeeLa source units, 90 module-facade symbols, and 10,129 total symbol records.
The compiler and Nordshrift use the same recursive /lib discovery path; the VM-facing loader contract is represented by lib/vm/SLVMModuleLoader.sleela. New package directories therefore enter compiler/Nordshrift visibility through the actual library tree rather than a second hard-coded registry.
The path-level manifest is lib/LIBRARY.SYMBOLS.md; the package summary is lib/LIBRARY.INDEX.md.
SLeeLa source-language compatibility — Syntax 3.1
Nordshrift's SLeeLa source input and output use the shared Sleelvac frontend contract. The current normative SLeeLa language edition is Syntax 3.1; the shared frontend accepts declared source syntax 1.0–3.1. Source version pragmas remain authoritative for each file, and constructs introduced in earlier editions remain subject to their historical minimum-version gates.
This does not change the version of the SST control-sheet language. NS-SST-0001, the Nordshrift product release, and SLeeLa source syntax are independent versioned contracts. Nordshrift must preserve source-version metadata when resolving or emitting SLeeLa and must not claim that a generated source file is 3.0 unless its constructs satisfy the 3.0 edition and all applicable feature gates. See SLEELA.syntax, SST-2.0.model, and markdown/COMPILER.md.