Merged
Conversation
Add complete formal academic documentation covering: Proofs and Metatheory: - Type system soundness (progress/preservation theorems) - Quantitative type theory (linearity proofs, semiring laws) - Algebraic effects formal semantics (handlers, row polymorphism) - Ownership/borrowing verification (memory safety proofs) - Row polymorphism (unification, coherence) - Dependent types and refinement types (normalization, SMT) - Coherence and parametricity (free theorems) - Type inference algorithm specification Formal Verification: - Operational semantics (small-step, evaluation contexts) - Denotational semantics (domain theory, logical relations) - Axiomatic semantics (Hoare logic, separation logic) Mathematical Foundations: - Categorical semantics (LCCCs, graded comonads, Freyd categories) - Logic foundations (Curry-Howard, linear logic correspondence) - Complexity and decidability analysis White Papers: - Language design rationale and related work comparison Mechanized Proofs (stubs): - Coq formalization structure - Lean 4 formalization structure - Agda formalization structure All documents include: - Complete formal definitions and inference rules - Detailed proof sketches and theorem statements - Implementation dependencies marked with [IMPL-DEP] tags - References to academic literature - Connections to the existing codebase (lib/ast.ml, etc.)
This commit establishes the foundation for implementing AffineScript: Design Documents: - DECISIONS.md: Key design decisions for runtime, effects, WASM, SMT, etc. - ROADMAP.md: Phased implementation plan (9 phases, version milestones) Compiler Infrastructure (OCaml stubs): - lib/symbol.ml: Symbol table for name resolution - lib/resolve.ml: Name resolution pass - lib/types.ml: Internal type representation - lib/unify.ml: Type/row/effect unification - lib/typecheck.ml: Bidirectional type checker - lib/quantity.ml: QTT quantity checking - lib/borrow.ml: Borrow checker Runtime (Rust): - runtime/Cargo.toml: Crate configuration - runtime/src/lib.rs: Entry point - runtime/src/alloc.rs: Memory allocator - runtime/src/effects.rs: Effect handling (evidence-passing) - runtime/src/panic.rs: Panic handling - runtime/src/ffi.rs: Foreign function interface - runtime/src/gc.rs: Optional garbage collector Tooling (Rust): - tools/affinescript-lsp/: Language server protocol implementation - tools/affine-pkg/: Package manager (Cargo-inspired) - tools/affine-doc/: Documentation generator All stubs contain comprehensive TODOs for future implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.