Coder Social home page Coder Social logo

owo-lang / minitt-rs Goto Github PK

View Code? Open in Web Editor NEW
113.0 10.0 2.0 344 KB

Dependently-typed lambda calculus, Mini-TT, extended and implemented in Rust

License: Apache License 2.0

Rust 99.00% HTML 0.91% Shell 0.09%
type-theory dependent-types programming-language

minitt-rs's People

Contributors

anqurvanillapy avatar ice1000 avatar oraluben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minitt-rs's Issues

Infer type of constructor call as a "minimum sum"

Currently:

=> :load samples\sum-split\maybe.minitt
=> :gamma
Current Gamma:
maybe: Π _: U. U
the: Π t: U. Π _: t. t
unwrap: Π t: U. Π mt: (maybe t). ((unwrap_type t) mt)
unwrap_type: Π t: U. Π _: (maybe t). U
=> :type unwrap (Just 1)
Cannot infer type of: `Just 1`.
At unknown location.
=> :type unwrap (Just 0)
Cannot infer type of: `Just 0`.
At unknown location.

Try apply `id` to `id`

This reveals another problem with the type check algorithm in the paper.

My implementation can not check

let id_on_id: (A: type_t, A) -> A =
  id((A: type_t, A) -> A)(id)

Due to checkI can not infer type of type_t (the universe).

This can be solved by universe in universe, but the logic will be unsound.

Try the `elimBool` of the paper.

Can you try the elimBool of the paper in your implementation ?
I can not check it in my implementation.
I doubt the type check algorithm has a bug.

Merge two sums

Syntax:

let bool: Type = Sum { True } ++ Sum { False };

Things to consider:

  • How do we merge recursive types?

Support "otherwise" in split

Expected syntax:

let threee: U = sum { One | Two | Three };
let three: U = sum { Two | Three };

let three_f (a: U) (m: three): 1 = split { Two => 0 | Three => 0 };
let threee_f (a: U) (m: threee): 1 = split { One => 0 | e => (three_f a) e };

Backend framework

This might be:

  • Some general interface of compiling minitt code into some other PLs
  • Intermediate representation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.