All Projects → brendanzab → Rust Nbe For Mltt

brendanzab / Rust Nbe For Mltt

Licence: mit
Normalization by evaluation for Martin-Löf Type Theory with dependent records

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rust Nbe For Mltt

Idris-HoTT
Homotopy Type Theory proofs in Idris
Stars: ✭ 19 (-73.61%)
Mutual labels:  type-theory
types-and-programming-languages
Exercises from Benjamin Pierce's "Types and Programming Languages" textbook + extras!
Stars: ✭ 92 (+27.78%)
Mutual labels:  type-theory
Plt
λΠ Programming Language Theory
Stars: ✭ 4,609 (+6301.39%)
Mutual labels:  type-theory
cicada
Cicada Language
Stars: ✭ 9 (-87.5%)
Mutual labels:  type-theory
MLPolyR
The MLPolyR programming language, revived
Stars: ✭ 21 (-70.83%)
Mutual labels:  type-theory
Write You A Haskell
Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
Stars: ✭ 3,064 (+4155.56%)
Mutual labels:  type-theory
cat
A categorical semantics library in Agda.
Stars: ✭ 16 (-77.78%)
Mutual labels:  type-theory
Mlang
Towards changing things and see if it proofs
Stars: ✭ 57 (-20.83%)
Mutual labels:  type-theory
Type-Theory
Lecture note on Lambda Calculus and Types for FLOLAC
Stars: ✭ 26 (-63.89%)
Mutual labels:  type-theory
Cubicaltt
Experimental implementation of Cubical Type Theory
Stars: ✭ 461 (+540.28%)
Mutual labels:  type-theory
path semantics
A research project in path semantics, a re-interpretation of functions for expressing mathematics
Stars: ✭ 136 (+88.89%)
Mutual labels:  type-theory
Isabelle-HoTT
An experimental implementation of homotopy type theory in the interactive proof assistant Isabelle
Stars: ✭ 30 (-58.33%)
Mutual labels:  type-theory
Datafun
Research on integrating datalog & lambda calculus via monotonicity types
Stars: ✭ 287 (+298.61%)
Mutual labels:  type-theory
tt-in-cubical
Type Theory in Type Theory using Cubical Agda
Stars: ✭ 12 (-83.33%)
Mutual labels:  type-theory
Pikelet
A friendly little systems language with first-class types. Very WIP! 🚧 🚧 🚧
Stars: ✭ 485 (+573.61%)
Mutual labels:  type-theory
TypeTopology
Logical manifestations of topological concepts, and other things. This version adopts the univalent point of view.
Stars: ✭ 132 (+83.33%)
Mutual labels:  type-theory
lplzoo
Fine-grain implementations of common lambda calculi in Haskell, tested with QuickCheck
Stars: ✭ 32 (-55.56%)
Mutual labels:  type-theory
Narc Rs
(WIP) Dependently-typed programming language with Agda style dependent pattern matching
Stars: ✭ 58 (-19.44%)
Mutual labels:  type-theory
Hott
Homotopy type theory
Stars: ✭ 946 (+1213.89%)
Mutual labels:  type-theory
Typedefs
Programming language agnostic type construction language based on polynomials.
Stars: ✭ 337 (+368.06%)
Mutual labels:  type-theory

rust-nbe-for-mltt

This originally started as a Rust port of Danny Gratzer's implementation of Normalization by Evaluation for Martin-Löf Type Theory, but it has a slightly different architecture and some additional language features. The algorithm for the insertion and unification of metavariables was partly taken from Andras Korvacs' Minimal TT Exampls and smalltt (although gluing is not yet implemented here). It will probably become the basis for a new front-end for Pikelet.

In traditional type checking and normalization that uses DeBruijn indices, you are required to shift variable indices whenever you open up binders. This is extremely expensive, and rules out future optimizations, like using visitors to reduce the number of intermediate allocations as the AST is traversed. This implementation avoids these problems by using a "semantic type checking" algorithm that uses DeBruijn indices for the core syntax, and DeBruijn levels in the syntax of the semantic domain.

Syntax Binding method Example
Concrete Nominal λz. (λy. y (λx. x)) (λx. z x)
Core Nameless (DeBruijn Indices) λ . (λ . 0 (λ . 0)) (λ . 1 0)
Domain Nameless (DeBruijn Levels) λ . (λ . 1 (λ . 2)) (λ . 0 1)

TODO

  • [x] Convert data types to Rust
  • [x] Port NbE and bidirectional type checking
  • [x] Add a parser for the concrete syntax
  • [x] Desugaring of concrete syntax to core syntax
  • [x] Resugaring of core syntax to concrete syntax
  • [ ] Pretty printing
    • [x] Basic pretty printing
    • [x] Preserve pretty names through type checking and normalization
    • [ ] Unfold metavariables when pretty printing values
    • [ ] Attempt to avoid unfolding variables when pretty printing values
  • [x] Add a REPL
  • [x] Add span information to ASTs to improve diagnostics
  • [ ] Pattern matching elaboration
    • [x] Simple cases
    • [ ] Nested cases
    • [ ] Multiple scrutinees
    • [ ] Lambda case
  • [x] Dependent record types
  • [x] Primitive operations
  • [ ] Unification
  • [x] Metavariable insertion
  • [ ] Integration tests
    • [ ] Parse (pass)
    • [ ] Parse (fail)
    • [x] Elaboration (pass)
    • [ ] Elaboration (fail)
    • [ ] Normalization tests
    • [x] Sample modules
  • [ ] Error recovery in:
    • [x] Lexer
    • [ ] Parser
    • [ ] Elaborator
    • [ ] Validator
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].