« home

Source code for various projects is available below.


CoreDet
Typmix
MEEL

CoreDet

Available here.

UW Academic License except where noted.


Typmix

Typmix is a framework for implementing type systems. Typmix is implemented as a modified version of the extensible compiler Xoc. A snapshot of the most recent source code is available below.

Not actively maintained. MIT License except where noted.

For documentation, see my master's thesis and also see the Xoc paper. Below is a quick example of the simply-typed lambda calculus expressed in Typmix, abridged from simple.zeta in the above source tarball:

  extensible grammar Simple {
    expr: "(" expr ")"
        | expr expr
        | "fun" var ":" type "." expr
        | var

    type: "(" type ")"
        | type "->" type

    var: /[a-z][A-Za-z0-9_]*/a
  }

  typerules {
    ~expr{\x::var}        :: term.vars[x]
    ~expr{fun \x:\T1. \e} :: `{\T1 -> \T2}  { e :: T2 }
    ~expr{\e1 \e2}        :: T2             { e1 :: {\T1 -> \T2} && e2 :: T1 }
  }
       


MEEL

MEEL, the Mailbox-driven Easy Event Language, is an extension to the C language that adds lightweight tasks and asynchronous message-passing via typed mailboxes. A runtime library layers a message-based interface on top of traditional I/O APIs such as epoll, enabling a simple, natural style of event-driven programming. See also EEL, tame, and tamer. A snapshot of the most recent source code is available below.

Not actively maintained. BSD License except where noted.

Unfortunately there is (currently) no documentation available other than the source code itself. Below is a quick example that demonstrates the power of MEEL's language extensions together with its runtime library:

  EVENT server(MAILBOX<int> workqueue) {
    VARS {
      int fd;
      MAILBOX<void> rd;
      MAILBOX<void> timer;
    }

    fd = opensocket();
    listen(fd, 10);

    rd = meel_add_read(fd);
    timer = meel_add_timer(100);

    for (;;) {
      WAIT(rd) {
        int x = getdata(fd);
        NOTIFY(workqueue, x);
      }
      OR_WAIT(timer) {
        printf("timer fired");
      }
    }
  }