Home /Modules/impl/NORDSHRIFT.md

NORDSHRIFT.md

impl/nordshrift/NORDSHRIFT.md · 232 line(s) · markdown

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:

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:

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

  1. Identity before calculation.
  2. Quantity before formula.
  3. Unit/dimension before interpretation.
  4. Assumption before extrapolation.
  5. Relation before conclusion.
  6. Transformation before result.
  7. Provenance before trust.
  8. Comparison before ranking.
  9. Uncertainty before certainty claims.
  10. Validation before completion.
  11. Explicit dependency before hidden coupling.
  12. 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:

SectionPurpose
sheetmanifest and metadata
importcomposition
sourceWrapper™ source selection
targetoutput and target language
pipelineprocessing phases
rulesrule activation
effectseffect policy
derivederivation configuration
guardsfailure behavior
interoplanguage interoperability
profilenamed 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:

SubjectNative/source layerXML model/procedureNordshrift relationship
MathC/C++ coreshared contractfoundational
PhysicsC/C++ subject layershared contractdepends on Math
Chemistrynative subject layershared contractdomain model
EconomicsC/C++ subject layershared contractdepends on Math
FinanceC/C++ subject layershared contractquantitative domain
Inferencenative subject layershared contractevidence-sensitive
Data Analyticsnative/API layershared contractstatistical/data layer
AstrophysicsC/C++ numerical layermodel, procedure, observationdepends on Math and Physics
SociologyC/C++ statistical layermodel, procedure, observationdepends 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:

  1. the subject has a stable identity and declared dependencies;
  2. quantities have units or explicit dimensions;
  3. formulas have named inputs and outputs;
  4. assumptions are separate from observations;
  5. modeled, inferred, derived, and observed values remain distinct;
  6. XML describes models and procedures without becoming arbitrary executable code;
  7. native C/C++ provides deterministic implementations where the semantics are mature;
  8. SLeeLa source demonstrates the subject vocabulary;
  9. Nordshrift can carry the subject through Subject → Quantity → Unit → Assumption → Relation → Formula → Transformation → Result → ComparativeNorm → Evidence → Explanation → Validation;
  10. 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.