The Programming Languages Zoo

A potpourri of programming languages

About the zoo

The Programming Languages Zoo is a collection of miniature programming languages which demonstrates various concepts and techniques used in programming language design and implementation. It is a good starting point for those who would like to implement their own programming language, or just learn how it is done.

The following features are demonstrated:

Installation

See the installation & compilation instructions.

The languages

The following languages are on display:

miniml_error
like miniml that can also abort execution
minihaskell
lazy, functional, integers, booleans, lists, recursion, statically typed
miniprolog
logic programming, Horn clauses, unification
levy
call-by-push value, statically typed
comm
A procedural language with integer arithmetic, local variables, conditional statements, while loops and print, compiled to simple machine code.
calc
integer arithmetic +, -, *, /
sub
eager, mutable records, statically typed, subtyping
boa
object-oriented, eager, first-class functions, dynamic types, extensible objects
lambda
untyped λ-calculus, several evaluation strategies
calc_var
integer arithmetic +, -, *, /, variables
miniml
eager, functional, recursive functions, statically typed, compiler, abstract machine
poly
lazy, functional, statically typed, parametric polymorphism, type inference

Usage

The languages are not really meant to be used. Rather, you should read and study the source code, which is decorated with ample comments. Also, each language lang has its own README.markdown and example.lang in the subdirectory src/lang.

Nevertheless, all the language are fully functioning miniature versions of real languages and can be executed. For each language lang you can:

  1. see what command-line options are available with

     ./lang.native --help
    
  2. run the toplevel with

     ./lang.native
    
  3. run files non-interactively with

     ./lang.native <file> <file> ...`
    
  4. load files and enter the toplevel

     ./lang.native -l <file> -l <file> ...`
    

Authors

License

The project is open source and released under the permissive MIT license.

Contributing

New contributions are very welcome. If you would like to contribute to the project, please contact us through the GitHub project page:

Before you contibute a new langauge, please read these guidelines for contributing.