GithubHelp home page GithubHelp logo

drruisseau / study Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xieyuheng/study

0.0 1.0 0.0 1.37 MB

Study of language design and implementation.

License: GNU General Public License v3.0

Scala 99.28% Shell 0.72%

study's Introduction

Study

Study of language design and implementation.

The aim of this repository is to quickly make prototypes for language design ideas.

This repository contains a series of language implementations,
and some general supporting libraries (such as parsing and command line interface).

Remember,
an engineer solve problem,
an engineer does not want just a religion about how to solve a problem.
-- Gerry Sussman

Study of parsing techniques

  • partech
    A parser generator, with various parsing techniques.
    • Earley parser
      Its time complexity is O(n^3) in general for context free grammar.

Study of scope

Study of assignment

  • eopl/lang_explicit_refs
    • Explicit reference (address)
  • eopl/lang_implicit_refs
    • We need to distinguish denoted value from expressed value for mutable variable.
      This is also called call-by-value parameter passing.
  • eopl/lang_mutable_pairs
    • Lisp's cons, car and cdr, with set-car! and set-cdr!
  • eopl/lang_call_by_reference
    • Marking an variable ref when passing it to a function,
      will not create new ref and reuse the ref of the variable,
      thus make callee be able to set caller's variable.
  • eopl/lang_call_by_need
    • When an expression occurs as argument of an application,
      do not eval it, but make it into a thunk.
      and only eval it when needed (during variable lookup).
    • This is also called lazy-eval.

Study of lambda calculus with types

Study of type checking

Study of type inference

Study of normalization by evaluation (a.k.a. nbe)

  • nbe/lambda
    • The untyped lambda calculus.
  • nbe/syst
    • Kurt Gödel's system T.
    • Simply typed lambda calculus with natural number.
  • nbe/tartlet
    • "Checking Dependent Types with Normalization by Evaluation: A Tutorial",
      by David Thrane Christiansen (the original tutorial).
    • Since tartlet is little pie, recursion is also not an option here.
  • nbe/minitt
    • "A simple type-theoretic language: Mini-TT",
      by Thierry Coquand, Yoshiki Kinoshita, Bengt Nordström, Makoto Takeyama.
    • No termination check, thus when viewed as logic it is unsound.

Study of function composition and stack machine

References

  • "Parsing Techniques -- A Practical Guide"
    • by Dick Grune and Ceriel J.H. Jacobs.
  • "Essentials of Programming Languages" (a.k.a. EOPL)
    • by Daniel P. Friedman and Mitchell Wand.
  • "Lambda Calculus with Types"
    • by Henk Barendregt, Wil Dekkers and Richard Statman. 2010.
  • "Do-it-yourself Type Theory"
    • by Roland Backhouse, Paul Chisholm, Erik Saaman and Grant Malcolm, 1988.
  • "Computation and Reasoning -- A Type Theory for Computer Science"
    • by Zhaohui Luo, 1994.

Usage

  • Build: sbt stage
    • Then you can find executable files in ./target/universal/stage/bin/
  • Test: ./dev t
  • Example code at: example

Community

Contributions are welcome, see current TODO list for tasks.
(Please add yourself to the AUTHORS list if you made any contributions.)

License

study's People

Contributors

xieyuheng avatar

Watchers

 avatar

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.