Browse files

Update of the README

  • Loading branch information...
thomasblanc committed Nov 18, 2013
1 parent 981ac46 commit 099d5489b555a86cf61d6b8786131fc7f72e5322
Showing with 29 additions and 7 deletions.
  1. +29 −7
@@ -8,11 +8,12 @@
To use, run the following (assuming you have a functionning opam and the default repository):
-opam repo add cmtrep
-opam update
-opam switch 4.01.0+cmt
-eval `opam config env`
-opam install typerex
+$ opam repo add cmtrep
+$ opam update
+$ export OCAMLPARAM='bin-annot=1,_'
+$ opam switch 4.01.0+cmt
+$ eval `opam config env`
+$ opam install typerex
Just type "ocp-build build" in the main directory and it should compile.
@@ -25,11 +26,11 @@ Directories:
* src: the sources
- common: some common functors and types
- data: the data representation used in the analysis
- - driver: the final program
+ - driver: the final programs
- hgraph: the hgraph definition and fixpoint searching
- lambda: the creation of lambda-code from .cmt and .ml files. (see bytecomp/lambda.mli in your OCaml compiler)
- tlambda: the lambda to tlambda translation
- - tlambda-analysis: the tlambda hgraph creation, and the analysis performed on it
+ - analysis: the tlambda hgraph creation, and the analysis performed on it
The Tlambda:
@@ -43,9 +44,30 @@ The main differences with Lambda:
- && and || have been replaced by if statements
- Arguments (for apply, for, if, primitives) are evaluated before the calls and passed to it as identifiers.
- Primitives cannot raise exceptions
+- Identifiers contain the modulename they are defined in.
The function provided in Mk_tlambda should make a valid tlambda represantation out of a compiler-libs Lambda.lambda tree.
+Using the analyser:
+As of today, the best way to analyse your code with our tool is to use the bigraphc and analyser compilation tools:
+bigraphc produces .cmb files (the intermediate bigraphs used by our analysis).
+Note that the cmi files should be placed in the same directory as of the .ml, no stdlib finding is provided.
+Note also that pervasives isn't automatically opened, you can change this by specifying -open Pervasives before the files you want to be compiled.
+$ bigraphc -open Pervasives
+Should produce two files pervasives.cmb and my_test_file.cmb, assuming you have a pervasives.cmi in the directory (and that no syntax or typing error occured during your compilation).
+You can also directly pass .cmt files to bigraphc. This can allow you to avoid the -open option and select some compilation options that would have been otherwise unavailable (bigraphc uses as of right now the default options).
+Once you have the .cmb files, you can launch the analyser simply by calling it on the files in the order you want them to be executed:
+$ analyzer pervasives.cmb my_test_file.cmb
Have fun!
* "let x = let y = 1 in y" becomes "let y = 1 in let x = y"

0 comments on commit 099d548

Please sign in to comment.