All Projects → lazear → types-and-programming-languages

lazear / types-and-programming-languages

Licence: MIT License
Exercises from Benjamin Pierce's "Types and Programming Languages" textbook + extras!

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to types-and-programming-languages

Type-Theory
Lecture note on Lambda Calculus and Types for FLOLAC
Stars: ✭ 26 (-71.74%)
Mutual labels:  lambda-calculus, type-theory
Write You A Haskell
Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
Stars: ✭ 3,064 (+3230.43%)
Mutual labels:  lambda-calculus, type-theory
Kind
A modern proof language
Stars: ✭ 2,075 (+2155.43%)
Mutual labels:  lambda-calculus, type-theory
lplzoo
Fine-grain implementations of common lambda calculi in Haskell, tested with QuickCheck
Stars: ✭ 32 (-65.22%)
Mutual labels:  lambda-calculus, type-theory
gidti
Book: Gentle Introduction to Dependent Types with Idris
Stars: ✭ 70 (-23.91%)
Mutual labels:  lambda-calculus, type-theory
lambda
Macro Lambda Calculus
Stars: ✭ 38 (-58.7%)
Mutual labels:  lambda-calculus
lambda
lambda calculus interpreter
Stars: ✭ 23 (-75%)
Mutual labels:  lambda-calculus
system-F
Formalization of the polymorphic lambda calculus and its parametricity theorem
Stars: ✭ 20 (-78.26%)
Mutual labels:  lambda-calculus
TypeTopology
Logical manifestations of topological concepts, and other things. This version adopts the univalent point of view.
Stars: ✭ 132 (+43.48%)
Mutual labels:  type-theory
lambda-fibonacci
Implementation of the Fibonacci sequence in JS using pure Lambda Calculus
Stars: ✭ 18 (-80.43%)
Mutual labels:  lambda-calculus
variant
Variant types in TypeScript
Stars: ✭ 147 (+59.78%)
Mutual labels:  type-theory
tt-in-cubical
Type Theory in Type Theory using Cubical Agda
Stars: ✭ 12 (-86.96%)
Mutual labels:  type-theory
Isabelle-HoTT
An experimental implementation of homotopy type theory in the interactive proof assistant Isabelle
Stars: ✭ 30 (-67.39%)
Mutual labels:  type-theory
Idris-HoTT
Homotopy Type Theory proofs in Idris
Stars: ✭ 19 (-79.35%)
Mutual labels:  type-theory
MLPolyR
The MLPolyR programming language, revived
Stars: ✭ 21 (-77.17%)
Mutual labels:  type-theory
meta-cedille
Minimalistic dependent type theory with syntactic metaprogramming
Stars: ✭ 40 (-56.52%)
Mutual labels:  lambda-calculus
vanilla-lang
An implementation of a predicative polymorphic language with bidirectional type inference and algebraic data types
Stars: ✭ 73 (-20.65%)
Mutual labels:  lambda-calculus
Krivine-Machine
Abstract krivine machine implementing call-by-name semantics. In OCaml.
Stars: ✭ 34 (-63.04%)
Mutual labels:  lambda-calculus
path semantics
A research project in path semantics, a re-interpretation of functions for expressing mathematics
Stars: ✭ 136 (+47.83%)
Mutual labels:  type-theory
cicada
Cicada Language
Stars: ✭ 9 (-90.22%)
Mutual labels:  type-theory

types-and-programming-languages

Several Rust implementations of exercises from Benjamin Pierce's "Types and Programming Languages" are organized into different folders, as described below:

  • arith is an implementation of the untyped lambda calculus extended with simple numeric operations

  • lambda is an implementation of the untyped lambda calculus as presented in chapter 5, 6, and 7.

  • typedarith is the arith project extended with simple types: Nat and Bool

  • stlc is an implementation of the simply typed lambda calculus, as discussed in chapters 9 and 10 of TAPL. This simply typed calculus has the types, Unit, Nat, Bool, T -> T (arrow), and Record types.

  • recon contains several implementations of Hindley-Milner based type reconstruction from the untyped lambda calculus to System F, with let-polymorphism. Both Algorithm W (the more common) and Algorithm J (the more efficient) are presented. For Alg. W, both a naive equality constraint solver, and a faster union-find (with path compression) solver are provided. Algorithm J makes use shared mutable references to promote type sharing instead.

  • system_f contains a parser, typechecker, and evaluator for the simply typed lambda calculus with parametric polymorphism (System F). The implementation of System F is the most complete so far, and I've tried to write a parser, typechecker and diagnostic system that can given meaningful messages

  • system_fw contains a parser for a high-level, Standard ML like source language that is desugared into an HIR, and then System F-omega. This extends system_f with type operators and higher-kinded types. This is where most of the ongoing work is located, as I'd like to make this the basis of a toy (but powerful, and useable) programming language. Ideally we will have some form of bidirectional type inference. Work on this has accidentally turned into a full fledged SML compiler, so it's likely that I will roll back the work on the system_fw project to just type checking

  • bidir is is an implementation of the bidirectional typechecker from 'Complete and Easy Bidirectional Typechecking', extended with booleans, product, and sum types. I make no claims on the correctness of the implementation for the extended features not present in the paper.

  • dependent is WIP, implementing a simple, dependently typed lambda calculus as discussed in ATAPL.

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].