All Projects → owo-lang → minitt-rs

owo-lang / minitt-rs

Licence: Apache-2.0 license
Dependently-typed lambda calculus, Mini-TT, extended and implemented in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to minitt-rs

Mlang
Towards changing things and see if it proofs
Stars: ✭ 57 (-43.56%)
Mutual labels:  type-theory
Kind
A modern proof language
Stars: ✭ 2,075 (+1954.46%)
Mutual labels:  type-theory
Redtt
"Between the darkness and the dawn, a red cube rises!": a proof assistant for cartesian cubical type theory
Stars: ✭ 175 (+73.27%)
Mutual labels:  type-theory
Rust Nbe For Mltt
Normalization by evaluation for Martin-Löf Type Theory with dependent records
Stars: ✭ 72 (-28.71%)
Mutual labels:  type-theory
Ttlite
A SuperCompiler for Martin-Löf's Type Theory
Stars: ✭ 94 (-6.93%)
Mutual labels:  type-theory
Proofs
A selection of formal proofs in Coq.
Stars: ✭ 135 (+33.66%)
Mutual labels:  type-theory
Pikelet
A friendly little systems language with first-class types. Very WIP! 🚧 🚧 🚧
Stars: ✭ 485 (+380.2%)
Mutual labels:  type-theory
reading-material
Reading schedule and our library of pdfs
Stars: ✭ 19 (-81.19%)
Mutual labels:  type-theory
Agda
Agda is a dependently typed programming language / interactive theorem prover.
Stars: ✭ 1,699 (+1582.18%)
Mutual labels:  type-theory
Lean
Homepage Theorem Proving in Lean FAQ
Stars: ✭ 2,006 (+1886.14%)
Mutual labels:  type-theory
Modules Papers
A collection of papers on modules.
Stars: ✭ 74 (-26.73%)
Mutual labels:  type-theory
Cooltt
😎TT
Stars: ✭ 85 (-15.84%)
Mutual labels:  type-theory
Ditto
A Super Kawaii Dependently Typed Programming Language
Stars: ✭ 154 (+52.48%)
Mutual labels:  type-theory
Narc Rs
(WIP) Dependently-typed programming language with Agda style dependent pattern matching
Stars: ✭ 58 (-42.57%)
Mutual labels:  type-theory
Sml Redprl
The People's Refinement Logic
Stars: ✭ 214 (+111.88%)
Mutual labels:  type-theory
Hott
Homotopy type theory
Stars: ✭ 946 (+836.63%)
Mutual labels:  type-theory
Foundational Knowledge For Programmers
List of resources about foundational knowledge for programmers (supposed to last a few decades)
Stars: ✭ 115 (+13.86%)
Mutual labels:  type-theory
gidti
Book: Gentle Introduction to Dependent Types with Idris
Stars: ✭ 70 (-30.69%)
Mutual labels:  type-theory
reed-thesis
My undergradate thesis on coinductive types in univalent type theory
Stars: ✭ 14 (-86.14%)
Mutual labels:  type-theory
Hott Uf Agda Lecture Notes
Lecture notes on univalent foundations of mathematics with Agda
Stars: ✭ 162 (+60.4%)
Mutual labels:  type-theory

minitt-rs

Crates.io Crates.io Crates.io docs.rs Actions Status dependency status

Rust implementation of Mini-TT, a simple dependently-typed lambda calculus. This implementation includes a type-checker (extended the origin), an AST pretty-printer and a command line tool which can be used as a file checker and an interactive REPL with completion and type inference. Built with stable Rust (version 1.39.0), 2018 edition. It can be used as a core language for complicated dependently-typed programming languages, or used for testing the correctness of translation algorithms.

I'm trying my best to use complete and meaningful naming to avoid confusion. I'm also doing a general clean-up of the Haskell implementation and comment the functions with their counterparts' names in the Haskell implementation so people don't get confused when they read the paper while reading this implementation.

Notice: the development of this POC language has been moved to another redesigned programming language, Voile. We have a new type theory, better surface syntax, better error messages, richer type-checker. Everything is (or will become) better in Voile.

A dependently-typed program in samples:

-- A 2 type and a 1 type
const bool = Sum { True | False };
const unit = Sum { TT };

-- By `function.minitt` of course I mean dependent functions :)
let return_type: bool -> Type = split
 { True => unit
 | False => 1
 };

-- Return things that are of different types.
let function: \Pi b: bool. return_type b = split
 { True => TT
 | False => 0
 };

We can have functions returning values of different types, while it's still statically-typed. Very flexible.

Install

The most recommended way of installation is to download the prebuilt binaries from GitHub Actions page. Here's how to find them.

You may also install from source:

$ cargo install minitt --bin minittc --all-features --force

Want to use minitt as a library? Add this to your Cargo.toml (if you don't even need a parser, you can remove the features completely):

minitt = { version = "0.4.2", features = ["parser"] }

Resources

Features

  • Everything that the Haskell implementation has
  • Parser as a cargo feature (using pest)
  • AST pretty-printer as a cargo feature
  • Improvements to the original implementation
    • Use BTreeMap for branch/case tree so we become flexible on case order
    • Use Vec for telescope/declaration instead of functional immutable list
  • New feature apart from trivial improvements
    • Infer type of a pair
    • Infer type of a constructor call
    • Infer type of a case-split
    • Module system (or even a very simple one)
    • (Typed-)Holes?
      • For completion / context lookup
      • For type-directed development
    • const declarations, where the type is inferred
    • Prefixing declarations with parameters, like let a (b: c): d = f b;
  • An executable for CLI usages (minittc) (using clap)
    • File checker
    • Completion script generation
      • Get the script: minittc completion zsh/bash/powershell/fish/elvish
    • REPL (a fancy one based on rustyline and a plain one based on stdio)
      • Load file
      • Infer (and normalize) type
      • Eval (and normalize) expressions (may panic if ill-typed)
      • Add single declaration
      • Show context/gamma
      • Help
      • Completion
        • Commands
        • Files
        • In-scope variables
    • Language server (?)
    • Publish?
      • By cargo install --path . --bin minittc --all-features
      • By [AppVeyor][av-url] (Just find the configuration fits you best and get the artifact)
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].