GitXplorerGitXplorer
p

LambdaCert

public
6 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
138f258fb397e7733426dcb90e70ecbde9c6d161

Split Fail into Fail and Impossible.

pprogval committed 10 years ago
Unverified
d53505df4384b4226225fbd47012ce149324b36e

Add two tests.

pprogval committed 10 years ago
Unverified
19650b1fd39df4b3997fbadb4f3131438c139efb

.travis.yml: Use deps caching.

pprogval committed 10 years ago
Unverified
b3a2c2cb8d343b151351d1989c75c24dad5d72d6

Implement more parts of the interpreter.

pprogval committed 10 years ago
Unverified
68464cbbe3312c465c090cf8ca8b54124ca93b30

Implement the char-at operator and make numbers comparison follow https://github.com/brownplt/LambdaS5/pull/49

pprogval committed 10 years ago
Unverified
d949d890a80e069a996e1064df04753b68c51455

Prove some lemmata.

pprogval committed 10 years ago

README

The README file for this repository.

An attempt at writing certified stuff related to LambdaJS (LambdaJS interpreter and JS => LambdaJS compiler)

Usage

## Compiling

./get_deps.sh # Slow, you have to compile jscert (and thus Flocq and TLC)
cd LambdaS5
make

Running the interpreter:

The simplest example:

./build/run.byte file.ljs

You can also use stdin:

echo "(func (foo, bar) { bar })('first', 'second')" | ./build/eval.native stdin

You can execute multiple files. The last one has to be a LambdaJS code file, and all the previous ones have to be LambdaJS environment files. For instance:

./build/eval.native ~/js/LambdaS5/envs/es5.env file.ljs

The previous command can be very long (two minutes on my machine), because it has to evaluate the env file, which is rather big.

A faster way, if you have to run multiple files, is to evaluate it once, and dump it. Thus, you only have to load the dump on each run:

./build/eval.native ~/js/LambdaS5/envs/es5.env -save /tmp/store.dump
./build/eval.native -load /tmp/store.dump foo.ljs
./build/eval.native -load /tmp/store.dump bar.ljs

This dump uses Caml's Marshal module, with the Closure flag (because we want to dump TLC's LibStream's streams), so you should load the dump with the exact same version of eval.native as the one used to save it. (You would get a Marshal error otherwise.)

How it works

File hierarchy

Interpreter written mainly in Coq, in LambdaS5/coq/*.v

“Glue” files written in Caml, in LambdaS5/caml/*.ml. Also uses a modified version of the original LambdaJS lexer and parser, in LambdaS5/caml/ljs/.

Code structure

TODO