Commit 8a60f91
Claude/ephapax linear types e00 zs (#5)
* feat: Initial Ephapax language implementation
Ephapax is a linear type system for safe memory management
targeting WebAssembly.
This commit includes:
Core Implementation:
- ephapax-syntax: AST definitions with linear type annotations
- ephapax-typing: Linear type checker with region support
- ephapax-wasm: WASM code generator with bump allocation
- ephapax-runtime: no_std WASM runtime with region management
Formal Semantics (Coq):
- Syntax.v: Core type and expression definitions
- Typing.v: Linear typing rules with context tracking
- Semantics.v: Operational semantics and safety theorems
Documentation:
- Language specification (spec/SPEC.md)
- Comprehensive wiki documentation
- ROADMAP.md with detailed development plan
- CONTRIBUTING.adoc guide
Infrastructure:
- Cargo workspace with 4 crates
- CI/CD workflow for Rust and Coq
- EUPL-1.2 license
Key features:
- Linear types prevent use-after-free and memory leaks
- Region-based memory management for bulk deallocation
- Second-class borrows for temporary access
- Formal proofs in Coq for type safety
* feat(frontend): Add lexer and parser for Ephapax language
Implements Phase 2 (Language Frontend) of the Ephapax roadmap:
- ephapax-lexer: High-performance lexer using logos
- Tokenizes all Ephapax syntax (keywords, operators, literals)
- Support for nested block comments {- -}
- String escape sequence handling
- Comprehensive error recovery
- 20+ unit tests
- ephapax-parser: Parser combinator implementation using chumsky
- Complete expression parsing (let, fn, if, region, case, etc.)
- Type parsing (base types, String@region, functions, products, sums)
- Declaration parsing (fn, type)
- Rich error reporting with ariadne
- 19 unit tests + doc tests
All tests pass successfully.
* feat(backend): Add interpreter, REPL, CLI, and standard library
- Complete ephapax-typing with full expression type checking
(pair, sum types, case, let, string operations)
- Add ephapax-interp tree-walking interpreter for debugging
- Create ephapax-repl with interactive REPL and commands
(:help, :type, :load, :tokens, :reset, :verbose)
- Build ephapax-cli with subcommands (run, check, compile, repl)
- Add ephapax-stdlib with prelude, I/O, string, math modules
- Add compile_module function to ephapax-wasm
* chore: Add library folder structure for common and specific libraries
Set up directory structure for Ephapax libraries:
- library/common/ for shared language implementations
- library/specific/ for Ephapax-specific code
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5578136 commit 8a60f91
12 files changed
Lines changed: 1887 additions & 1 deletion
File tree
- library
- common
- specific
- src
- ephapax-cli
- src
- ephapax-interp
- src
- ephapax-repl
- src
- ephapax-stdlib
- src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Whitespace-only changes.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments