The Canonical Framework for Understanding All SIL Projects
Version: 1.0
Created: 2025-11-27
Status: Definitive Reference
Purpose: Unified vocabulary and mental model for the entire SIL ecosystem
π― What This Document Does
This is the Rosetta Stone for SIL architecture. It:
- Defines canonical vocabulary (one term for each concept)
- Reveals the universal pattern (that ALL projects follow)
- Shows two architectural styles (and when to use each)
- Maps every existing project to the unified framework
- Provides decision frameworks for adding new components
Read this first before diving into individual project docs.
π‘ New to SIL terminology? Keep the Glossary open in another tab.
π§ Who Should Read This & When
You should read this document if:
- β You're new to SIL and want to understand the architecture
- β You're implementing a new component and need to know where it fits
- β You're confused about SIL terminology (Intent vs IR vs Execution)
- β You need to decide: Adapter or Microkernel architecture?
- β You want to understand how Pantheon, Morphogen, Prism, etc. relate
Read this BEFORE:
- Technical Charter (provides formal spec - this provides mental model)
- Individual project docs (Pantheon, Morphogen, etc.)
- Implementation guides
Read this AFTER:
../canonical/SIL_MANIFESTO.md(optional, 15 min - gives you context on "why")
Time Required: 30-45 minutes
π Related Documents Navigation
"I need something simpler first"
β Start with ../canonical/SIL_MANIFESTO.md (15 min) for the high-level vision
"I need the formal specification"
β After reading this, go to ../canonical/SIL_TECHNICAL_CHARTER.md (2 hours)
"I need to look up terminology"
β Keep ../canonical/SIL_GLOSSARY.md open while reading this
"I need design principles"
β Read ./DESIGN_PRINCIPLES.md (15 min) for evaluation criteria
"I need to see concrete implementation"
β See Pantheon's documentation for concrete 7-layer Cognitive OSI Stack implementation
"I need the complete reading guide"
β See ../READING_GUIDE.md for all documentation paths
"I'm looking for examples of how to use this"
β See Part 8 (Quick Reference Examples) and Part 10 (The Meta-Pattern) below
π― What You'll Learn
By the end of this document, you will:
- β Understand the Intent β IR β Execution pattern (and see it everywhere)
- β Know canonical vocabulary (Intent, IR, Execution, Domain, Adapter, Service, Kernel)
- β Recognize the two architectural styles (Adapter vs Microkernel)
- β Be able to map any project to the framework
- β Know how to decide where new components belong
π Part 1: Canonical Vocabulary
The Universal Terms (Use These)
| Term | Definition | Replaces/Clarifies |
|---|---|---|
| Intent | What the user wants to express (high-level, semantic) | "Declarative layer", "semantic layer", "input" |
| IR (Intermediate Representation) | The canonical semantic representation | "USIR", "Semantic IR", "graph representation" |
| Execution | How it runs on hardware | "Backend", "runtime", "lowering", "device execution" |
| Domain | A specific problem space (audio, analytics, UI, geometry) | "Vertical", "specialization", "domain-specific" |
| Adapter | Translator between domain language and IR | "Frontend", "dialect", "domain-specific compiler" |
| Primitive | Minimal, irreducible building block | "Core abstraction", "kernel operation" |
| Service | Pluggable policy implementation (userspace) | "Plugin", "module", "implementation" |
| Kernel | Minimal mechanism (NOT policy) | "Core", "TCB", "primitives layer" |
𧬠Part 2: The Universal Pattern
Every SIL system follows this 3-layer pattern:
βββββββββββββββββββββββββββββββββββββββββββββββ
β LAYER 1: INTENT β
β What the user wants to express β
β (Domain-specific languages, high-level) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β Translate to
ββββββββββββββββββββΌβββββββββββββββββββββββββββ
β LAYER 2: IR (Intermediate Representation) β
β Canonical semantic representation β
β (Universal graph, types, constraints) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β Lower to
ββββββββββββββββββββΌβββββββββββββββββββββββββββ
β LAYER 3: EXECUTION β
β How it runs on hardware β
β (CPU, GPU, MLIR, frameworks) β
βββββββββββββββββββββββββββββββββββββββββββββββ
This is THE pattern. Everything else is elaboration.
ποΈ Part 3: The Two Architectural Styles
SIL systems use one of two architectural patterns:
Style A: Adapter Architecture (Pantheon, RiffStack, SUP, TiaCAD)
Purpose: Cross-domain composition and universal representation
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DOMAIN ADAPTERS (Layer 1) β
β Multiple domain-specific frontends β
β ββββββββββ ββββββββββ ββββββββββ β
β β Audio β β UI β β Geo β β
β β DSL β β DSL β β DSL β β
β ββββββ¬ββββ βββββ¬βββββ βββββ¬βββββ β
βββββββββΌβββββββββββΌββββββββββββΌβββββββββββββββββββββ
β β β Emit IR
βββββββββ΄βββββββββββ΄ββββββββββββ΄βββββββββββββββββββββ
β UNIVERSAL IR (Layer 2) β
β Single canonical representation β
β (Enables cross-domain operations) β
ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β Lower to
ββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β EXECUTION BACKENDS (Layer 3) β
β Multiple execution targets β
β ββββββββββ ββββββββββ ββββββββββ β
β β MLIR β β WebAU β β React β β
β ββββββββββ ββββββββββ ββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Characteristics:
- β
Cross-domain composition (audio + UI + CAD)
- β
Multiple frontends β single IR β multiple backends
- β
Universal semantic graph
- β
Enables novel combinations
- β
Examples: Pantheon, Morphogen, SUP, TiaCAD, RiffStack
Style B: Microkernel Architecture (Prism, SEM)
Purpose: Competing policies with minimal trusted core
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SERVICE BUNDLES (Userspace - Layer 1+2) β
β Competing policy implementations β
β βββββββββββββββ βββββββββββββββ β
β β Service A β β Service B β β
β β (SetStack) β β (SEM) β β
β βββββββββββββββ€ βββββββββββββββ€ β
β β Parser β β Parser β β
β β Optimizer β β Optimizer β β
β β Scheduler β β Scheduler β β
β ββββββββ¬βββββββ ββββββββ¬βββββββ β
βββββββββββΌβββββββββββββββββββββΌβββββββββββββββββββββ
β β Use kernel API
βββββββββββ΄βββββββββββββββββββββ΄βββββββββββββββββββββ
β MICROKERNEL (Layer 3) β
β Minimal primitives (mechanism only) β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β Primitives: Operators, Buffers, Channels β β
β β Syscalls: op_create, buf_alloc, chan_sendβ β
β ββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Characteristics:
- β
Minimal trusted core (formal verification possible)
- β
Competing service implementations
- β
Users choose service at runtime
- β
Isolation and security
- β
Examples: Prism microkernel (SetStack vs SEM services)
πΊοΈ Part 4: Mapping All Projects
Pantheon (Universal Adapter Architecture)
| Layer | Component | Description |
|---|---|---|
| Intent | Domain Adapters | Morphogen DSL, TiaCAD YAML, SUP SCM, RiffStack Harmony |
| IR | Pantheon Semantic IR | Universal graph (nodes, edges, types, metadata) |
| Execution | Domain Backends | MLIR, CadQuery, React/Vue, WebAudio |
Pattern: Adapter Architecture (Style A)
Purpose: Cross-domain composition
Prism (Analytics Microkernel)
| Layer | Component | Description |
|---|---|---|
| Intent | Service Parsers | SetLang (SetStack), SQL (SEM) |
| IR | Service Optimizers | Cascades (SetStack), Mesh Scheduler (SEM) |
| Execution | Prism Microkernel | 3 primitives: operators, buffers, channels |
Pattern: Microkernel Architecture (Style B)
Purpose: Competing query execution strategies
RiffStack/Harmony (Audio Multi-Layer IR)
| Layer | Component | Description |
|---|---|---|
| Intent (IR 0) | Harmony DSL | Am9.lush.hold, +4:Dm9.smooth |
| IR (IR 1-2) | Event IR + Timbre IR | Notes/time + DSP graphs |
| Execution (IR 3) | Audio Engine | WebAudio, MLIR, GPU kernels |
Pattern: Adapter Architecture (Style A)
Purpose: Musical intent β sound
Note: Uses 4 sub-layers within the 3-layer pattern
SEM (Set Execution Mesh)
| Layer | Component | Description |
|---|---|---|
| Intent (L1-2) | Query Parser + Optimizer | SQL β Logical Plan |
| IR (L3) | Physical Plan Mesh | Strategy + Resource + Execution meshes |
| Execution (L4-5) | Device Kernels + Trace | GPU kernels, telemetry |
Pattern: Service implementation for Prism microkernel
Purpose: GPU-first query execution
Note: Uses 5 sub-layers within the 3-layer pattern
SUP (Semantic UI Platform)
| Layer | Component | Description |
|---|---|---|
| Intent | SCM (Semantic Component Model) | YAML UI definitions |
| IR | Semantic UI IR | Component graphs, token systems |
| Execution | Multi-Framework Compiler | React, Vue, Svelte, HTML |
Pattern: Adapter Architecture (Style A)
Purpose: Semantic UI β multiple frameworks
TiaCAD (Parametric CAD)
| Layer | Component | Description |
|---|---|---|
| Intent | YAML Geometry | Declarative constraints |
| IR | Constraint Graph | Geometry + relationships |
| Execution | CadQuery Backend | OpenCASCADE, STL export |
Pattern: Adapter Architecture (Style A)
Purpose: Declarative geometry
π Part 5: Universal Patterns Explained
Pattern 1: The 3-Layer Principle
Always exactly 3 conceptual layers:
1. Intent - What you want
2. IR - Universal representation
3. Execution - How it runs
Even when projects claim "4 layers", "5 layers", "8 layers":
- Those are subdivisions within the 3-layer pattern
- Example: SEM's "5 layers" = Intent (L1-2) + IR (L3) + Execution (L4-5)
- Example: RiffStack's "4 IRs" = Intent (IR0) + IR (IR1-2) + Execution (IR3)
The rule: If it compiles/interprets/transforms, it follows Intent β IR β Execution
Pattern 2: When to Use Each Architecture Style
| Use Adapter Architecture (A) When... | Use Microkernel Architecture (B) When... |
|---|---|
| β Need cross-domain composition | β Need competing implementations |
| β Multiple frontends β one IR | β Need formal verification (small TCB) |
| β Building a universal platform | β Need security isolation |
| β Enabling novel combinations | β Performance-critical core |
| Example: Pantheon, RiffStack, SUP | Example: Prism, OS kernels |
Pattern 3: IR Design Principles
Every IR must have:
- Nodes/Operators - Computational units
- Edges/Dataflow - How data moves
- Types - What data means (semantic types, not just int/float)
- Metadata - Provenance, annotations, domain info
- Validation - Type checking, constraint satisfaction
This applies to:
- Pantheon IR (universal graph)
- Prism operators (query execution)
- RiffStack Event IR (musical events)
- SEM Physical Plan (execution mesh)
π§ Part 6: Decision Framework
"Where does my new component go?"
Ask these questions in order:
Q1: Is it domain-specific or universal?
- Domain-specific β Create adapter (Style A)
- Universal β Extend Pantheon IR (Style A core)
Q2: Does it need competing implementations?
- Yes β Use microkernel pattern (Style B)
- No β Use adapter pattern (Style A)
Q3: Is it mechanism or policy?
- Mechanism β Belongs in kernel/core
- Policy β Belongs in service/adapter
Q4: What layer does it operate at?
- Intent β Parser, DSL, frontend
- IR β Graph operations, transformations
- Execution β Backend, runtime, lowering
π Part 7: Unified Terminology Map
Old Terms β New Canonical Terms
| You Might Say | Say This Instead | Why |
|---|---|---|
| "USIR" | IR or Pantheon IR | Simpler, clear context |
| "Semantic IR" | IR | All our IRs are semantic |
| "Frontend" | Adapter (Style A) or Parser (Style B) | More precise |
| "Backend" | Execution Target or Lowering | Clearer intent |
| "Layer 1, 2, 3..." | Intent, IR, Execution | Universal pattern |
| "Vertical" | Domain | Clearer meaning |
| "Stack" | Architecture or Pipeline | Avoids confusion |
π― Part 8: Quick Reference Examples
Example 1: "I want to add chemistry simulation"
Decision process:
1. Q1: Domain-specific β Create adapter
2. Q2: No competing implementations β Adapter pattern (A)
3. Q3: Mostly policy β Adapter
4. Q4: All three layers needed
Implementation:
Intent: ChemistryDSL (YAML molecules, reactions)
IR: Pantheon IR (molecule nodes, reaction edges)
Execution: Simulation backend (molecular dynamics engine)
Location: pantheon/adapters/chemistry/
Example 2: "I want to optimize database queries"
This is Prism! Already specified.
Pattern: Microkernel (B) - competing query execution strategies
Why: Multiple valid approaches (SetStack explainability vs SEM GPU-performance)
Example 3: "I want to generate music from natural language"
Decision process:
1. Q1: Domain-specific (music) β Use RiffStack
2. Q2: No competition β Adapter
3. Q4: Intent layer (NL β Harmony DSL)
Implementation:
Intent: NL Prompt β Harmony DSL adapter
"Create a jazzy chord progression"
β "Dm9.lush.smooth / +5.bright / ..."
IR: RiffStack Event IR
Execution: WebAudio / MLIR
Location: riffstack/adapters/nlp/ (new adapter for RiffStack)
π¬ Part 9: Advanced Concepts
Composability Across Domains
One of SIL's superpowers: Cross-domain operations via universal IR
Example:
# Pantheon enables this:
audio_waveform = morphogen.synthesize(freq=440)
cad_shape = tiacad.extrude_along_path(
path: audio_waveform.envelope()
)
ui_visualizer = sup.create_visualizer(
data: audio_waveform.fft()
)
How it works:
- Each domain emits Pantheon IR
- Pantheon IR is composable (all use same graph structure)
- Cross-domain edges are valid (audio signal β CAD path)
This is only possible with Adapter Architecture (Style A)
Microkernel Composition
Microkernels enable competing policies:
# User chooses execution strategy at runtime
prism --service=setstack query.sql # Explainability-first
prism --service=sem query.sql # GPU-first
# Or mix-and-match
prism --parser=setlang --scheduler=mesh query.sql
This is only possible with Microkernel Architecture (Style B)
π Part 10: The Meta-Pattern
Here's the deepest insight:
Everything is Intent β IR β Execution
Even meta-systems follow this:
| System | Intent | IR | Execution |
|---|---|---|---|
| Pantheon | Domain DSLs | Semantic Graph | MLIR/Frameworks |
| Prism | SQL/SetLang | Physical Plan | Kernel Operators |
| RiffStack | Harmony DSL | Event+Timbre IR | Audio Engine |
| SEM | Query | Physical Mesh | GPU Kernels |
| Compilers | Source Code | AST/IR | Machine Code |
| Databases | SQL | Query Plan | B-Trees/Storage |
| Graphics | Shader Code | SPIR-V | GPU |
| SIL | Research Vision | Specifications | Implementations |
The pattern is universal.
π Part 11: How to Use This Guide
For New Team Members
- Read this document first
- Understand: Intent β IR β Execution
- Learn the two architectural styles (A and B)
- See how your project maps to the framework
- Use canonical vocabulary
For Architects
- Use decision framework (Part 6) for new components
- Choose architectural style based on requirements
- Follow SIL design principles (Clarity, Simplicity, Composability, Correctness, Verifiability)
- Map your layers to: Intent β IR β Execution
For Implementers
- Identify which layer you're working in
- Use established patterns from similar projects
- Reference specific project docs for details
- Maintain vocabulary consistency
π Part 12: Related Documentation
Core SIL:
- SIL Design Principles - The 5 principles
- SIL Ecosystem Project Layout - All projects mapped
Concrete Implementations:
- Pantheon - Adapter architecture (USIR implementation)
- Prism - Microkernel architecture (semantic reasoning kernel)
- RiffStack - Domain-specific IR for audio/music
- Morphogen - Cross-domain computation engine
See individual project repositories for detailed architecture documentation.
β¨ Summary: The One-Page Takeaway
The Universal Pattern
Intent β IR β Execution (always)
The Two Architectural Styles
A) Adapter: Multiple Frontends β Universal IR β Multiple Backends
B) Microkernel: Services (policy) β Kernel API β Primitives (mechanism)
The Canonical Vocabulary
- Intent (not "input", "frontend", "declarative layer")
- IR (not "USIR", "semantic IR", "graph")
- Execution (not "backend", "runtime", "lowering")
- Domain (not "vertical", "specialization")
- Adapter (not "frontend", "dialect") - for Style A
- Service (not "plugin", "module") - for Style B
- Kernel (not "core", "primitives") - for Style B
The Decision Framework
- Domain-specific or universal?
- Need competing implementations?
- Mechanism or policy?
- Which layer? (Intent / IR / Execution)
The Design Principles (Always)
- Clarity - Can you see it?
- Simplicity - Minimal complexity?
- Composability - Can it combine?
- Correctness - Are invariants preserved?
- Verifiability - Can you prove it?
This is the unified framework. Everything else is implementation detail.
Document Version: 1.0
Last Updated: 2025-11-27
Status: Canonical Reference
Maintained By: SIL Core Team