How soupuppy/eits works
EITS is a command-line REPL for a small HoTT/type-theory engine. A user enters commands through the REPL loop; command dispatch and built-in handlers provide definition, evaluation, type, context, and reset operations, while the engine parses expressions and maintains semantic context. The README also documents multiline editing and history. The graph preserves lexer, parser, syntax, runtime, and semantic stages; some links are documented or inferred because their implementation excerpts were not provided.
Main entry points: parser.cpp Parser · main.cpp REPL loop · command_dispatch.cpp Command dispatch · runtime.cpp Runtime
Components 21
REPL interface
- REPL loop
eits-repl/src/main.cpp - Line editor
eits-repl/src/editor/editor.cpp - Command history
eits-repl/src/history/history.cpp
Commands and state
- Command dispatch
eits-repl/src/repl/command_dispatch.cpp - Command registry
eits-repl/src/registry/registry.cpp - Built-in handlers
eits-repl/src/registry/builtin - Multiline editor
eits-repl/src/editor/editor.cpp
Language front end
- Parser
eits-hott/src/core/parser/parser.cpp - Lexer
eits-hott/src/core/parser/lexer/lexer.cpp - Token strategies
eits-hott/src/core/parser/lexer/stratagy_manager.cpp - Character scanner
eits-hott/include/HoTT/core/parser/lexer/scanner.h - Tokens
eits-hott/include/HoTT/core/parser/lexer/token.h
Type theory kernel
- Runtime
eits-hott/src/core/runtime/runtime.cpp - Expression syntax
eits-hott/src/core/syntax/expression - Term forms
eits-hott/include/HoTT/core/syntax/expression/term.h - Type forms
eits-hott/src/core/syntax/expression/type - Semantic context
eits-hott/src/core/runtime/context.cpp - Type checking
eits-hott/src/core/semantics/typecheck.cpp - Evaluation and reduction
eits-hott/src/core/semantics - Expression display
eits-hott/src/internal/display/display.h
Other components
- REPL user
Connections 23
- REPL user → REPL loop: enters commands
- REPL loop → Line editor: reads lines
eits-repl/src/main.cpp - REPL loop → Command history: gets prompt ID
eits-repl/src/main.cpp - REPL loop → Command dispatch: dispatches input
eits-repl/src/main.cpp - Command dispatch → Command registry: looks up command
eits-repl/src/repl/command_dispatch.cpp - Command registry → Built-in handlers: registers handlers
- Command dispatch → Multiline editor: launches edit
eits-repl/src/repl/command_dispatch.cpp - Command dispatch → Command history: records commands
- Built-in handlers → Runtime: runs engine commands
- Runtime → Semantic context: maintains context
- Runtime → Parser: parses expressions
- Parser → Lexer: requests tokens
eits-hott/src/core/parser/parser.cpp - Lexer → Token strategies: resolves lexemes
eits-hott/src/core/parser/lexer/stratagy_manager.cpp - Token strategies → Character scanner: scans characters
eits-hott/src/core/parser/lexer/stratagy_manager.cpp - Lexer → Tokens: produces tokens
- Parser → Tokens: consumes tokens
eits-hott/src/core/parser/parser.cpp - Parser → Expression syntax: constructs expressions
eits-hott/src/core/parser/parser.cpp - Expression syntax → Term forms: contains term variants
- Expression syntax → Type forms: contains type variants
- Parser → Type checking: checks annotations
eits-hott/src/core/parser/parser.cpp - Type checking → Semantic context: looks up bindings
- Runtime → Evaluation and reduction: evaluates terms
- Built-in handlers → Expression display: shows results