How rkoeninger/shensharp works
Main Components
a) Core Components:
• Kλ (Core Language) Layer
• Shen Language Layer
• CLR Integration Layer
• Build/Make System
• Testing Infrastructure
b) Key Processing Flows:
• Compilation Pipeline
• Runtime Evaluation
• REPL Interface
┌─ User Interface Layer ─────┐
• REPL │
• API Integration Points │
• ┘
┌─ Shen Implementation ─────┐
• Runtime │
• Extension Methods │
• ┘
┌─ Kλ Implementation ───────┐
• Types │
• Evaluator │
• Builtins │
• ┘
Reader → Syntax → Compiler → F# AST → CLR Assembly
Key Relationships to Highlight
a) Compilation Process:
• How Kl.Make handles the build process
• Transformation from Kλ to F# to CLR
b) Runtime Flow:
• How evaluation happens through the Evaluator
• Demonstrate interaction between Builtins and Types
c) Testing Integration:
• How test suites connect to both Kλ and Shen layers
Component Details
Core Components:
• Types.fs (Value representation)
• Evaluator.fs (Expression interpretation)
• Builtins.fs (Primitive functions)
• Compiler.fs (Translation logic)
Support Components:
• Reader.fs (Parsing)
• Writer.fs (Output)
• Runtime.fs (Embedding support)
• ExtensionMethods.fs (C# integration)
Additional Elements
• Notes about optimization points
• Entry points for different use cases (REPL, embedded use)
• Configuration and build pipeline integration
Remember to include bidirectional relationships where appropriate, especially between the evaluation engine and the runtime system, and mark clear boundaries between compile-time and runtime components.
This architecture should emphasize the project's nature as both a language implementation and a CLR integration, showing how it bridges the gap between Shen's functional/logic paradigms and the CLR's object-oriented environment.