Commits

Yit Phang Khoo committed f904a1a

Functorize As2 using the Menhir parser generator.

  • Participants
  • Parent commits b7f4302

Comments (0)

Files changed (53)

 	# bump stack size to 4GiB
 	OCAMLBUILD_DARWIN_FLAGS := -lflag -cclib -lflag -Wl,-stack_size,0x100000000
 endif
-OCAMLBUILD_FLAGS = -j 0 -tags "warn_error_A,debug" -pkg num $(OCAMLBUILD_DARWIN_FLAGS)
+OCAMLBUILD_FLAGS = -j 0 -tags "warn_error_A,debug" -pkg num -use-menhir $(OCAMLBUILD_DARWIN_FLAGS)
 OCAMLBUILD_DOCDIR = Documents/API
 OCAMLBUILD_PRODUCTDIR = _product
 OUNIT_FLAGS = -verbose

File Source/Adapton/PolySA.ml

     ['a thunk], so custom hash and equality functions should be provided for most types.
 *)
 
+module type S = sig
+    type 'a thunk
+    val is_self_adjusting : bool
+    val is_lazy : bool
+    val id : 'a thunk -> int
+    val hash : 'a thunk -> int
+    val equal : 'a thunk -> 'a thunk -> bool
+    val refresh : unit -> unit
+    val force : 'a thunk -> 'a
+    val const : ?hash:(int -> 'a -> int) -> ?equal:('a -> 'a -> bool) -> 'a -> 'a thunk
+    val update_const : 'a thunk -> 'a -> unit
+    val thunk : ?hash:(int -> 'a -> int) -> ?equal:('a -> 'a -> bool) -> (unit -> 'a) -> 'a thunk
+    val update_thunk : 'a thunk -> (unit -> 'a) -> unit
+    val memo :
+        ?inp_hash:(int -> 'inp -> int) -> ?inp_equal:('inp -> 'inp -> bool)
+        -> ?hash:(int -> 'a -> int) -> ?equal:('a -> 'a -> bool)
+        -> ('memo -> 'inp -> 'a) -> ('inp -> 'a thunk as 'memo)
+    val memo2 :
+        ?inp1_hash:(int -> 'inp1 -> int) -> ?inp1_equal:('inp1 -> 'inp1 -> bool)
+        -> ?inp2_hash:(int -> 'inp2 -> int) -> ?inp2_equal:('inp2 -> 'inp2 -> bool)
+        -> ?hash:(int -> 'a -> int) -> ?equal:('a -> 'a -> bool)
+        -> ('memo -> 'inp1 -> 'inp2 -> 'a) -> ('inp1 -> 'inp2 -> 'a thunk as 'memo)
+    val memo3 :
+        ?inp1_hash:(int -> 'inp1 -> int) -> ?inp1_equal:('inp1 -> 'inp1 -> bool)
+        -> ?inp2_hash:(int -> 'inp2 -> int) -> ?inp2_equal:('inp2 -> 'inp2 -> bool)
+        -> ?inp3_hash:(int -> 'inp3 -> int) -> ?inp3_equal:('inp3 -> 'inp3 -> bool)
+        -> ?hash:(int -> 'a -> int) -> ?equal:('a -> 'a -> bool)
+        -> ('memo -> 'inp1 -> 'inp2 -> 'inp3 -> 'a) -> ('inp1 -> 'inp2 -> 'inp3 -> 'a thunk as 'memo)
+    val memo4 :
+        ?inp1_hash:(int -> 'inp1 -> int) -> ?inp1_equal:('inp1 -> 'inp1 -> bool)
+        -> ?inp2_hash:(int -> 'inp2 -> int) -> ?inp2_equal:('inp2 -> 'inp2 -> bool)
+        -> ?inp3_hash:(int -> 'inp3 -> int) -> ?inp3_equal:('inp3 -> 'inp3 -> bool)
+        -> ?inp4_hash:(int -> 'inp4 -> int) -> ?inp4_equal:('inp4 -> 'inp4 -> bool)
+        -> ?hash:(int -> 'a -> int) -> ?equal:('a -> 'a -> bool)
+        -> ('memo -> 'inp1 -> 'inp2 -> 'inp3 -> 'inp4 -> 'a) -> ('inp1 -> 'inp2 -> 'inp3 -> 'inp4 -> 'a thunk as 'memo)
+    val tweak_gc : unit -> unit
+end
+
 module Make (M : Signatures.SAType) = struct
     type 'a thunk = 'a M.thunk * (module Signatures.SAType.S with type sa = M.sa and type data = 'a and type t = 'a M.thunk)
 

File Source/As2/As2Adapton.ml

- module A = Adapton.PolySA.Make(Adapton.LazySABidi)
-(* module A = Adapton.PolySA.Make(Adapton.EagerSATotalOrder) *)
-(* module A = Adapton.PolySA.Make(Adapton.NonSAEager) *)
-
-include A

File Source/As2/Ast.ml

 
-module A = As2Adapton
+module type S = sig
+  module A : Adapton.PolySA.S
 
-module Ast = struct
+  type col = int
+  type row = int
+  type sht = int
+
+  (** -- commands -- **)
+
+  type cmd =
+    | C_help | C_exit
+    | C_nav of nav_cmd
+    | C_mut of mut_cmd
+    | C_seq of cmd * cmd
+    | C_print
+    | C_repeat of formula' * cmd
+
+  and scramble_flags =
+    | Sf_sparse
+    | Sf_dense
+    | Sf_one
+
+  and mut_cmd =
+    | C_set of formula'
+    | C_scramble of scramble_flags
+
+  and nav_cmd =
+    | C_next of nav_thing
+    | C_prev of nav_thing
+    | C_goto of coord
+
+  and nav_thing = Nav_row | Nav_col | Nav_sht
+
+  (** - - Coordinates, Regions - - **)
+
+  and local_coord = col * row
+  and absolute_coord = sht * local_coord
+  and pos = absolute_coord
+      (* pos is nice short-hand; pos is a "cononical form" for
+         coordinates within the interpreter. *)
+  and coord =
+    | Lcl of local_coord
+    | Abs of absolute_coord
+
+  and local_region = local_coord * local_coord
+  and absolute_region = sht * local_region
+  and region =
+    | R_lcl of local_region
+    | R_abs of absolute_region
+
+  (** - - Formulas - - **)
+
+  and formula =
+    | F_func of func * region
+    | F_binop of binop * formula' * formula'
+    | F_const of const
+    | F_coord of coord
+    | F_paren of formula'
+
+  and formula' = formula A.thunk
+
+  and binop =
+    | Bop_add
+    | Bop_sub
+    | Bop_div
+    | Bop_mul
+
+  and func =
+    | Fn_sum
+    | Fn_max
+    | Fn_min
+
+  and const =
+    | Num   of Num.num (* ocaml standard library; arbitrary-precision numbers. *)
+    | Fail
+    | Undef
+
+  val absolute : sht -> coord -> pos
+  val frm_equal : formula -> formula -> bool
+  val frm_hash : int -> formula -> int
+  val memo_frm : formula -> formula'
+
+  module Pretty : sig
+    val string_of_const : const -> string
+    val pp_cmd : cmd -> unit
+    val pp_nav_cmd : nav_cmd -> unit
+    val pp_nav_thing : nav_thing -> unit
+    val pp_local_coord : local_coord -> unit
+    val pp_pos : pos -> unit
+    val pp_coord : coord -> unit
+    val pp_local_region : local_region -> unit
+    val pp_region : region -> unit
+    val pp_mut_cmd : mut_cmd -> unit
+    val pp_formula : formula -> unit
+    val pp_formula' : formula' -> unit
+    val pp_binop : binop -> unit
+    val pp_func : func -> unit
+  end
+end
+
+module Make (SA : Adapton.Signatures.SAType) : S with module A = Adapton.PolySA.Make (SA) = struct
+  module A = Adapton.PolySA.Make (SA)
 
   type col = int
   type row = int
       A.memo ~inp_equal:frm_equal ~inp_hash:frm_hash begin 
         fun f frm -> frm end
     in f
+
+  module Pretty = struct
+
+    let string_of_const = function
+      | Num n -> Num.approx_num_exp 10 n
+      | Fail  -> "#fail"
+      | Undef -> "#undef"
+
+    let ps = print_string
+
+    let rec pp_cmd = function
+      | C_help -> ps "help"
+      | C_exit -> ps "exit"
+      | C_nav c -> pp_nav_cmd c
+      | C_mut c -> pp_mut_cmd c
+      | C_print -> ps "print"
+      | C_seq (c1, c2) -> pp_cmd c1 ; ps "; " ; pp_cmd c2
+      | C_repeat (f, c) ->
+          ps "repeat " ;
+          pp_formula' f ; ps " do " ;
+          pp_cmd c ;
+          ps " done"
+
+    (** - - Navigation / Focus - - **)
+
+    and pp_nav_cmd = function
+      | C_next nt -> ps "next " ; pp_nav_thing nt
+      | C_prev nt -> ps "prev " ; pp_nav_thing nt
+      | C_goto c -> ps "goto " ; pp_coord c
+
+    and pp_nav_thing = function
+      | Nav_row -> ps "row"
+      | Nav_col -> ps "col"
+      | Nav_sht -> ps "sheet"
+
+    (** - - Coordinates, Regions - - **)
+
+    and pp_local_coord = fun (col,row) ->
+      ps (String.make 1 (Char.chr ((Char.code 'A') + col - 1))) ;
+      (* ps "[" ; ps (string_of_int col) ; ps "]" ; *)
+      ps (string_of_int row)
+
+    and pp_pos (s,lc) = pp_coord (Abs(s,lc))
+    and pp_coord = function
+      | Lcl lc -> pp_local_coord lc
+      | Abs (s,lc) ->
+          ps "sheet" ; ps (string_of_int s) ; ps "!" ;
+          pp_local_coord lc
+
+    and pp_local_region = fun (lc1,lc2) ->
+      pp_local_coord lc1 ; ps ":" ;
+      pp_local_coord lc2
+
+    and pp_region = function
+    | R_lcl lr -> pp_local_region lr
+    | R_abs (s,lr) ->  ps (string_of_int s) ; pp_local_region lr
+
+    (** - - Formulas - - **)
+
+    and pp_mut_cmd = function
+      | C_set f -> ps "=" ; pp_formula' f ; ps "."
+      | C_scramble Sf_sparse -> ps "scramble"
+      | C_scramble Sf_dense  -> ps "scrambled"
+      | C_scramble Sf_one    -> ps "scramble1"
+
+    and pp_formula = function
+      | F_func (f,r) -> pp_func f ; ps "(" ; pp_region r ; ps ")"
+      | F_binop (b,f1,f2) as f ->
+          if !Global.print_ast_db
+          then
+            ps ("##"^(string_of_int (frm_hash 0 f))^"[")
+          else ()
+          ;
+          pp_formula' f1 ; ps " " ;
+          pp_binop b ; ps " " ; pp_formula' f2 ;
+          if !Global.print_ast_db then ps "]" else ()
+      | F_const c -> ps (string_of_const c)
+      | F_coord c -> pp_coord c
+      | F_paren f -> ps "(" ; pp_formula' f ; ps ")"
+
+    and pp_formula' f =
+      if !Global.print_ast_db then
+        ps ("#"^(string_of_int ( A.id f ) )^"[")
+      else
+        ()
+      ;
+      pp_formula ( A.force f ) ;
+      if !Global.print_ast_db then ps "]" else ()
+
+    and pp_binop = function
+      | Bop_add -> ps "+"
+      | Bop_sub -> ps "-"
+      | Bop_div -> ps "/"
+      | Bop_mul -> ps "*"
+
+    and pp_func = function
+      | Fn_sum -> ps "SUM"
+      | Fn_max -> ps "MAX"
+      | Fn_min -> ps "MIN"
+  end
 end
-include Ast
-
-module Pretty = struct
-
-  let string_of_const = function
-    | Num n -> Num.approx_num_exp 10 n
-    | Fail  -> "#fail"
-    | Undef -> "#undef"
-
-  let ps = print_string
-
-  let rec pp_cmd = function
-    | C_help -> ps "help"
-    | C_exit -> ps "exit"
-    | C_nav c -> pp_nav_cmd c
-    | C_mut c -> pp_mut_cmd c
-    | C_print -> ps "print"
-    | C_seq (c1, c2) -> pp_cmd c1 ; ps "; " ; pp_cmd c2
-    | C_repeat (f, c) -> 
-        ps "repeat " ; 
-        pp_formula' f ; ps " do " ; 
-        pp_cmd c ; 
-        ps " done"
-
-  (** - - Navigation / Focus - - **)
-
-  and pp_nav_cmd = function
-    | C_next nt -> ps "next " ; pp_nav_thing nt
-    | C_prev nt -> ps "prev " ; pp_nav_thing nt
-    | C_goto c -> ps "goto " ; pp_coord c
-
-  and pp_nav_thing = function
-    | Nav_row -> ps "row"
-    | Nav_col -> ps "col"
-    | Nav_sht -> ps "sheet"
-
-  (** - - Coordinates, Regions - - **)
-
-  and pp_local_coord = fun (col,row) ->
-    ps (String.make 1 (Char.chr ((Char.code 'A') + col - 1))) ;
-    (* ps "[" ; ps (string_of_int col) ; ps "]" ; *)
-    ps (string_of_int row)
-
-  and pp_pos (s,lc) = pp_coord (Abs(s,lc))
-  and pp_coord = function
-    | Lcl lc -> pp_local_coord lc
-    | Abs (s,lc) ->
-        ps "sheet" ; ps (string_of_int s) ; ps "!" ;
-        pp_local_coord lc
-
-  and pp_local_region = fun (lc1,lc2) ->
-    pp_local_coord lc1 ; ps ":" ;
-    pp_local_coord lc2
-
-  and pp_region = function
-  | R_lcl lr -> pp_local_region lr
-  | R_abs (s,lr) ->  ps (string_of_int s) ; pp_local_region lr
-
-  (** - - Formulas - - **)
-
-  and pp_mut_cmd = function
-    | C_set f -> ps "=" ; pp_formula' f ; ps "."
-    | C_scramble Sf_sparse -> ps "scramble"
-    | C_scramble Sf_dense  -> ps "scrambled"
-    | C_scramble Sf_one    -> ps "scramble1"
-
-  and pp_formula = function
-    | F_func (f,r) -> pp_func f ; ps "(" ; pp_region r ; ps ")"
-    | F_binop (b,f1,f2) as f -> 
-        if !Global.print_ast_db 
-        then          
-          ps ("##"^(string_of_int (frm_hash 0 f))^"[")
-        else () 
-        ;
-        pp_formula' f1 ; ps " " ;
-        pp_binop b ; ps " " ; pp_formula' f2 ; 
-        if !Global.print_ast_db then ps "]" else () 
-    | F_const c -> ps (string_of_const c)
-    | F_coord c -> pp_coord c
-    | F_paren f -> ps "(" ; pp_formula' f ; ps ")"
-
-  and pp_formula' f = 
-    if !Global.print_ast_db then 
-      ps ("#"^(string_of_int ( A.id f ) )^"[")
-    else
-      () 
-    ;
-    pp_formula ( A.force f ) ;
-    if !Global.print_ast_db then ps "]" else () 
-
-  and pp_binop = function
-    | Bop_add -> ps "+"
-    | Bop_sub -> ps "-"
-    | Bop_div -> ps "/"
-    | Bop_mul -> ps "*"
-
-  and pp_func = function
-    | Fn_sum -> ps "SUM"
-    | Fn_max -> ps "MAX"
-    | Fn_min -> ps "MIN"
-end

File Source/As2/Interp.ml

    -- lazy lists -- are these needed / relevant here?
 *)
 
-module type INTERP = sig
+module type INTERP = functor (Ast : Ast.S) -> sig
   type cell
   type db
   type cur
   val scramble_one   : cur -> unit
 end
 
-module Interp : INTERP = struct
+module Make : INTERP = functor (Ast : Ast.S) -> struct
   open Ast
 
   exception NYI
     ; cur
 
 end
-
-include Interp

File Source/As2/Lexer.mll

 {
   open Lexing
-  open Parser
 
   let incr_linenum lexbuf =
     let pos = lexbuf.Lexing.lex_curr_p in
           Lexing.pos_lnum = pos.Lexing.pos_lnum + 1;
           Lexing.pos_bol = pos.Lexing.pos_cnum;
       }
+
+  module Make (Ast : Ast.S) (Parser : module type of Parser.Make (Ast)) = struct
+    open Parser
 }
 
 let letter = ['a'-'z' 'A'-'Z']
                 nested_comment (level-1) lexbuf }
   | eol { incr_linenum lexbuf ; nested_comment level lexbuf }
   | _   { nested_comment level lexbuf }
+
+{
+  end
+}

File Source/As2/Main.ml

-exception Error of exn * (int * int * string)
-exception Internal_error
+module Make (SA : Adapton.Signatures.SAType) = struct
+  module Ast = Ast.Make (SA)
+  module Parser = Parser.Make (Ast)
+  module Interp = Interp.Make (Ast)
+  module Lexer = Lexer.Make (Ast) (Parser)
 
-let ps = print_string
+  exception Error of exn * (int * int * string)
+  exception Internal_error
 
-let help () =
-  ps "=========================================================================\n" ;
-  ps "AS2 HELP:                                                                \n" ;
-  ps "-------------------------------------------------------------------------\n" ;
-  ps "Commands:                                                                \n" ;
-  ps " 'help'            -- this help                                          \n" ;
-  ps " 'exit'            -- use excel instead                                  \n" ;
-  ps "                                                                         \n" ;
-  ps " = frm .           -- set formula of current cell to frm                 \n" ;
-  ps "                      Note: start with equals; terminate with a dot.     \n" ;
-  ps "                                                                         \n" ;
-  ps " 'goto' coord      -- goto a specific (sheet), row and column            \n" ;
-  ps " 'next' nav-thing  -- next col/row/sheet                                 \n" ;
-  ps " 'prev' nav-thing  -- prev col/row/sheet                                 \n" ;
-  ps "                                                                         \n" ;
-  ps "-------------------------------------------------------------------------\n" ;
-  ps "Formula & Coordinate Syntax                                              \n" ;
-  ps "                                                                         \n" ;
-  ps " Nav. thing   nav-thing ::= 'row' | 'col' | 'sheet'                      \n" ;
-  ps "                                                                         \n" ;
-  ps " Formulae     frm       ::= func ( reg )                                 \n" ;
-  ps "                         | frm binop frm | num | coord | ( frm )         \n" ;
-  ps "                                                                         \n" ;
-  ps " Functions    func      ::= 'sum' | 'max' | 'min'                        \n" ;
-  ps " Binops       binop     ::= + | - | / | *                                \n" ;
-  ps " Regions      reg       ::= lr | 'sheet' num ! lr                        \n" ;
-  ps " Coordinates  coord     ::= lc | 'sheet' num ! lc                        \n" ;
-  ps " Local coord  lc        ::= letters num                                  \n" ;
-  ps " Local region lr        ::= lc : lc                                      \n" ;
-  ps "-------------------------------------------------------------------------\n" ;
-  ps " All keywords, above in quotes, are also valid in all caps               \n" ;
-  ps "-------------------------------------------------------------------------\n" ;
-  ()
+  let ps = print_string
 
-let parse_channel : string -> in_channel -> Ast.cmd =
-  fun filename channel ->
-    let lexbuf = Lexing.from_channel channel in
-    let pos = lexbuf.Lexing.lex_curr_p in
-    let _ =
-      lexbuf.Lexing.lex_curr_p <-
-        { pos with
-            Lexing.pos_fname = filename ;
-            Lexing.pos_lnum = 1 ;
-        }
+  let help () =
+    ps "=========================================================================\n" ;
+    ps "AS2 HELP:                                                                \n" ;
+    ps "-------------------------------------------------------------------------\n" ;
+    ps "Commands:                                                                \n" ;
+    ps " 'help'            -- this help                                          \n" ;
+    ps " 'exit'            -- use excel instead                                  \n" ;
+    ps "                                                                         \n" ;
+    ps " = frm .           -- set formula of current cell to frm                 \n" ;
+    ps "                      Note: start with equals; terminate with a dot.     \n" ;
+    ps "                                                                         \n" ;
+    ps " 'goto' coord      -- goto a specific (sheet), row and column            \n" ;
+    ps " 'next' nav-thing  -- next col/row/sheet                                 \n" ;
+    ps " 'prev' nav-thing  -- prev col/row/sheet                                 \n" ;
+    ps "                                                                         \n" ;
+    ps "-------------------------------------------------------------------------\n" ;
+    ps "Formula & Coordinate Syntax                                              \n" ;
+    ps "                                                                         \n" ;
+    ps " Nav. thing   nav-thing ::= 'row' | 'col' | 'sheet'                      \n" ;
+    ps "                                                                         \n" ;
+    ps " Formulae     frm       ::= func ( reg )                                 \n" ;
+    ps "                         | frm binop frm | num | coord | ( frm )         \n" ;
+    ps "                                                                         \n" ;
+    ps " Functions    func      ::= 'sum' | 'max' | 'min'                        \n" ;
+    ps " Binops       binop     ::= + | - | / | *                                \n" ;
+    ps " Regions      reg       ::= lr | 'sheet' num ! lr                        \n" ;
+    ps " Coordinates  coord     ::= lc | 'sheet' num ! lc                        \n" ;
+    ps " Local coord  lc        ::= letters num                                  \n" ;
+    ps " Local region lr        ::= lc : lc                                      \n" ;
+    ps "-------------------------------------------------------------------------\n" ;
+    ps " All keywords, above in quotes, are also valid in all caps               \n" ;
+    ps "-------------------------------------------------------------------------\n" ;
+    ()
+
+  let parse_channel : string -> in_channel -> Ast.cmd =
+    fun filename channel ->
+      let lexbuf = Lexing.from_channel channel in
+      let pos = lexbuf.Lexing.lex_curr_p in
+      let _ =
+        lexbuf.Lexing.lex_curr_p <-
+          { pos with
+              Lexing.pos_fname = filename ;
+              Lexing.pos_lnum = 1 ;
+          }
+      in
+      let _ = Global.set_lexbuf lexbuf in
+      let ast : Ast.cmd =
+        try Parser.cmd Lexer.token lexbuf
+        with
+          | exn -> begin
+              let curr = lexbuf.Lexing.lex_curr_p in
+              let line = curr.Lexing.pos_lnum in
+              let cnum = curr.Lexing.pos_cnum - curr.Lexing.pos_bol in
+              let tok = Lexing.lexeme lexbuf in
+              raise (Error (exn, (line, cnum, tok)))
+            end
+      in
+      ast
+
+  let parse_string : string -> Ast.cmd =
+    fun input ->
+      let lexbuf = Lexing.from_string input in
+      let pos = lexbuf.Lexing.lex_curr_p in
+      let _ =
+        lexbuf.Lexing.lex_curr_p <-
+          { pos with
+              Lexing.pos_fname = "<string>" ;
+              Lexing.pos_lnum = 1 ;
+          }
+      in
+      let _ = Global.set_lexbuf lexbuf in
+      let ast : Ast.cmd =
+        try Parser.cmd Lexer.token lexbuf
+        with
+          | exn -> begin
+              let curr = lexbuf.Lexing.lex_curr_p in
+              let line = curr.Lexing.pos_lnum in
+              let cnum = curr.Lexing.pos_cnum - curr.Lexing.pos_bol in
+              let tok = Lexing.lexeme lexbuf in
+              raise (Error (exn, (line, cnum, tok)))
+            end
+      in
+      ast
+
+  let measure f =
+    let module S = Adapton.Statistics in
+    let x, m = S.measure f
     in
-    let _ = Global.set_lexbuf lexbuf in
-    let ast : Ast.cmd =
-      try Parser.cmd Lexer.token lexbuf
-      with
-        | exn -> begin
-            let curr = lexbuf.Lexing.lex_curr_p in
-            let line = curr.Lexing.pos_lnum in
-            let cnum = curr.Lexing.pos_cnum - curr.Lexing.pos_bol in
-            let tok = Lexing.lexeme lexbuf in
-            raise (Error (exn, (line, cnum, tok)))
-          end
-    in
-    ast
+    begin Printf.printf "time=%f, heap=%d, stack=%d, upd=%d, eval=%d, dirty=%d, clean=%d\n"
+        m.S.time' m.S.heap' m.S.stack'
+        m.S.update' m.S.evaluate' m.S.dirty' m.S.clean'
+      ;
+      ( x , m )
+    end
 
-let parse_string : string -> Ast.cmd =
-  fun input ->
-    let lexbuf = Lexing.from_string input in
-    let pos = lexbuf.Lexing.lex_curr_p in
-    let _ =
-      lexbuf.Lexing.lex_curr_p <-
-        { pos with
-            Lexing.pos_fname = "<string>" ;
-            Lexing.pos_lnum = 1 ;
-        }
-    in
-    let _ = Global.set_lexbuf lexbuf in
-    let ast : Ast.cmd =
-      try Parser.cmd Lexer.token lexbuf
-      with
-        | exn -> begin
-            let curr = lexbuf.Lexing.lex_curr_p in
-            let line = curr.Lexing.pos_lnum in
-            let cnum = curr.Lexing.pos_cnum - curr.Lexing.pos_bol in
-            let tok = Lexing.lexeme lexbuf in
-            raise (Error (exn, (line, cnum, tok)))
-          end
-    in
-    ast
- 
-let measure f = 
-  let module S = Adapton.Statistics in
-  let x, m = S.measure f
-  in
-  begin Printf.printf "time=%f, heap=%d, stack=%d, upd=%d, eval=%d, dirty=%d, clean=%d\n"
-      m.S.time' m.S.heap' m.S.stack' 
-      m.S.update' m.S.evaluate' m.S.dirty' m.S.clean' 
-    ;
-    ( x , m )
+  let rec eval_cmd' cmd' cur =
+    match cmd' with
+      | None -> ps "Oops! Try 'help' for reference information.\n" ; cur
+      | Some cmd -> eval_cmd cmd cur
+
+  and eval_cmd cmd cur = begin match cmd with
+    | Ast.C_print ->
+        (* Important: refresh signals to TotalOrder implementation that
+           we want to start re-evaluation now; return to "at the
+           beginning of time".  This is a no-op otherwise. *)
+        if Ast.A.is_self_adjusting then
+          Ast.A.refresh ()
+        else () ;
+        let (sht,_) = Interp.get_pos cur in
+        ps "================================================\n" ;
+        Interp.print_region (sht,((1,1),(10,10))) (Interp.get_db cur) stdout ;
+        ps "================================================\n" ;
+        flush stdout ;
+        cur
+    | Ast.C_seq(c1,c2) ->
+        let cur = eval_cmd c1 cur in
+        eval_cmd c2 cur
+    | Ast.C_repeat(f,c) -> begin
+        try
+          let cnt = Ast.A.force (Interp.eval cur (Ast.A.force f)) in
+          let n = match cnt with
+            | Ast.Num n -> Num.int_of_num n
+            | _ -> invalid_arg "repeat"
+          in
+          let rec loop i cur =
+            if i <= 0 then cur
+            else
+              loop (i - 1) ( eval_cmd c cur )
+          in
+          loop n cur
+        with
+          | _ -> ps "repeat: Oops!\n" ; cur
+      end
+    | Ast.C_help -> help () ; cur
+    | Ast.C_exit -> exit (1)
+    | (Ast.C_nav nc) as cmd ->
+        ps "read: navigation command: `" ; Ast.Pretty.pp_cmd cmd ; ps "'\n" ;
+        (Interp.move nc cur)
+
+    | (Ast.C_mut mc) as cmd ->
+        ps "read: mutation command: `" ; Ast.Pretty.pp_cmd cmd ; ps "'\n" ;
+        let cur = Interp.write mc cur in
+        (* ps ">> " ; ps (Ast.Pretty.string_of_const (Interp.get_val cur)) ; ps "\n" ; *)
+        cur
   end
 
-let rec eval_cmd' cmd' cur =
-  match cmd' with
-    | None -> ps "Oops! Try 'help' for reference information.\n" ; cur
-    | Some cmd -> eval_cmd cmd cur
-        
-and eval_cmd cmd cur = begin match cmd with
-  | Ast.C_print -> 
-      (* Important: refresh signals to TotalOrder implementation that
-         we want to start re-evaluation now; return to "at the
-         beginning of time".  This is a no-op otherwise. *)
-      if Ast.A.is_self_adjusting then
-        Ast.A.refresh () 
-      else () ; 
-      let (sht,_) = Interp.get_pos cur in
-      ps "================================================\n" ;
-      Interp.print_region (sht,((1,1),(10,10))) (Interp.get_db cur) stdout ;
-      ps "================================================\n" ;
-      flush stdout ;
-      cur        
-  | Ast.C_seq(c1,c2) -> 
-      let cur = eval_cmd c1 cur in
-      eval_cmd c2 cur
-  | Ast.C_repeat(f,c) -> begin
+  let repl_handler cmd' cur () =
+    ( eval_cmd' cmd' cur )
+
+  (* REPL = Read-Eval-Print Loop *)
+  let rec repl cur =
+    Printf.printf "= " ;
+    Ast.Pretty.pp_formula (Interp.get_frm cur) ;
+    Printf.printf "\n"
+    ;
+    Ast.Pretty.pp_pos (Interp.get_pos cur)
+    ;
+    Printf.printf "> %!" ;
+    let cmd' =
       try
-        let cnt = Ast.A.force (Interp.eval cur (Ast.A.force f)) in
-        let n = match cnt with
-          | Ast.Num n -> Num.int_of_num n
-          | _ -> invalid_arg "repeat"
-        in
-        let rec loop i cur =
-          if i <= 0 then cur
-          else
-            loop (i - 1) ( eval_cmd c cur )
-        in
-        loop n cur
+        Some ( parse_channel "<stdin>" stdin )
       with
-        | _ -> ps "repeat: Oops!\n" ; cur
-    end      
-  | Ast.C_help -> help () ; cur
-  | Ast.C_exit -> exit (1)      
-  | (Ast.C_nav nc) as cmd ->
-      ps "read: navigation command: `" ; Ast.Pretty.pp_cmd cmd ; ps "'\n" ;
-      (Interp.move nc cur)
+        | Error (_, (line, col, token)) ->
+            ( Printf.eprintf "line %d, character %d: syntax error at %s\n%!"
+                (* filename *) line col
+                ( if token = "\n"
+                  then "newline"
+                  else Printf.sprintf "`%s'" token ) ;
+              None
+            )
+    in
+    let cur, _ = measure (repl_handler cmd' cur) in
+    (repl cur) (* repl is a tail-recursive loop. *)
 
-  | (Ast.C_mut mc) as cmd ->
-      ps "read: mutation command: `" ; Ast.Pretty.pp_cmd cmd ; ps "'\n" ;
-      let cur = Interp.write mc cur in
-      (* ps ">> " ; ps (Ast.Pretty.string_of_const (Interp.get_val cur)) ; ps "\n" ; *)
-      cur
+  let test test_flags n cur =
+    let sht_to_demand = n in
+    let num_changes = ! Global.num_changes in
+    let module S = Adapton.Statistics in
+    let cmd =
+      match test_flags with
+        | `No_switch ->
+            parse_string
+            (Printf.sprintf "scrambled; goto %d!a1 ; print ; repeat %d do scramble1 ; print done ."
+               sht_to_demand
+               num_changes)
+
+        | `Switch ->
+            parse_string
+              (Printf.sprintf "scrambled; goto %d!a1 ; print ; repeat %d do scramble1 ; goto %d!a1 ; print ; goto %d!a1 ; print done ."
+                 sht_to_demand
+                 num_changes
+                 (sht_to_demand / 2)
+                 sht_to_demand
+              )
+    in
+    let _, m = measure (fun _ -> eval_cmd cmd cur) in
+    let out = open_out_gen [Open_append] 0 (!Global.stats_out) in
+    output_string out (Printf.sprintf "%d, %d, %f, %d, %d, %d, %d, %d, %d\n"
+                         sht_to_demand
+                         num_changes
+                         m.S.time' m.S.heap' m.S.stack'
+                         m.S.update' m.S.evaluate' m.S.dirty' m.S.clean') ;
+    flush out ;
+    close_out out ;
+    ()
+
+  let run () =
+    let db_init  = Interp.empty (!Global.num_sheets,10,10) in
+    let cur_init = Interp.cursor (1,(1,1)) db_init in
+    match ! Global.func with
+      | Global.F_repl -> repl cur_init
+      | Global.F_stats_test (n, test_flags) -> test test_flags n cur_init
 end
-  
-let repl_handler cmd' cur () = 
-  ( eval_cmd' cmd' cur )
 
-(* REPL = Read-Eval-Print Loop *)
-let rec repl cur =
-  Printf.printf "= " ;
-  Ast.Pretty.pp_formula (Interp.get_frm cur) ;
-  Printf.printf "\n"
-  ;
-  Ast.Pretty.pp_pos (Interp.get_pos cur)
-  ;
-  Printf.printf "> %!" ;
-  let cmd' =        
-    try
-      Some ( parse_channel "<stdin>" stdin )
-    with
-      | Error (_, (line, col, token)) ->
-          ( Printf.eprintf "line %d, character %d: syntax error at %s\n%!"
-              (* filename *) line col
-              ( if token = "\n"
-                then "newline"
-                else Printf.sprintf "`%s'" token ) ;
-            None
-          )
-  in
-  let cur, _ = measure (repl_handler cmd' cur) in
-  (repl cur) (* repl is a tail-recursive loop. *)
+module type S = sig
+  val run : unit -> unit
+end
 
-let test test_flags n cur =
-  let sht_to_demand = n in
-  let num_changes = ! Global.num_changes in
-  let module S = Adapton.Statistics in
-  let cmd =
-    match test_flags with
-      | `No_switch ->
-          parse_string 
-          (Printf.sprintf "scrambled; goto %d!a1 ; print ; repeat %d do scramble1 ; print done ."
-             sht_to_demand
-             num_changes)
-
-      | `Switch ->
-          parse_string 
-            (Printf.sprintf "scrambled; goto %d!a1 ; print ; repeat %d do scramble1 ; goto %d!a1 ; print ; goto %d!a1 ; print done ."
-               sht_to_demand
-               num_changes
-               (sht_to_demand / 2)
-               sht_to_demand
-            )
-  in
-  let _, m = measure (fun _ -> eval_cmd cmd cur) in
-  let out = open_out_gen [Open_append] 0 (!Global.stats_out) in
-  output_string out (Printf.sprintf "%d, %d, %f, %d, %d, %d, %d, %d, %d\n"
-                       sht_to_demand
-                       num_changes
-                       m.S.time' m.S.heap' m.S.stack' 
-                       m.S.update' m.S.evaluate' m.S.dirty' m.S.clean') ;
-  flush out ;
-  close_out out ;
-  ()
+let as2_list = List.map begin fun ( name, sa ) ->
+    ( name, (module Make ((val sa : Adapton.Signatures.SAType)) : S) )
+end Adapton.All.sa_list
 
 let run () =
-  let _ = Arg.parse Global.args
+  let as2 = ref (snd (List.hd as2_list)) in
+  let args = Global.args @ [
+    ( "--adapton-module", Arg.Symbol ( fst (List.split as2_list), fun s -> as2 := List.assoc s as2_list ),
+      " use specific Adapton module (default: " ^ (fst (List.hd as2_list)) ^ ")" )
+  ] in
+  let _ = Arg.parse args
     (fun filename -> invalid_arg "No input files.." )
     "usage: runas2 [options]"
-  in  
-  let db_init  = Interp.empty (!Global.num_sheets,10,10) in
-  let cur_init = Interp.cursor (1,(1,1)) db_init in
-  match ! Global.func with
-    | Global.F_repl -> repl cur_init
-    | Global.F_stats_test (n, test_flags) -> test test_flags n cur_init
+  in
+  let module As2 = (val (!as2)) in
+  As2.run ()
 
 
 (* Not in use: FILE processing *)
 (*     if !Global.print_passes then *)
 (*       Printf.eprintf "done.\n%!" *)
 (*     else () *)
-
-
-

File Source/As2/Parser.mly

+%parameter < Ast : Ast.S >
+
 %{
 
 open Printf

File Test/AS2TestEagerSATotalOrder.mllib

-AS2TestEagerSATotalOrder

File Test/AS2TestEagerSATotalOrder.mlpack

-AS2TestEagerSATotalOrder/As2Adapton
-AS2TestEagerSATotalOrder/Ast
-AS2TestEagerSATotalOrder/Global
-AS2TestEagerSATotalOrder/Interp
-AS2TestEagerSATotalOrder/Lexer
-AS2TestEagerSATotalOrder/Main
-AS2TestEagerSATotalOrder/Parser

File Test/AS2TestEagerSATotalOrder/As2Adapton.ml

-(* module A = Adapton.PolySA.Make(Adapton.LazySABidi) *)
-module A = Adapton.PolySA.Make(Adapton.EagerSATotalOrder)
-(* module A = Adapton.PolySA.Make(Adapton.NonSAEager) *)
-
-include A

File Test/AS2TestEagerSATotalOrder/Ast.ml

-../../Source/As2/Ast.ml

File Test/AS2TestEagerSATotalOrder/Global.ml

-../../Source/As2/Global.ml

File Test/AS2TestEagerSATotalOrder/Interp.ml

-../../Source/As2/Interp.ml

File Test/AS2TestEagerSATotalOrder/Lexer.mll

-../../Source/As2/Lexer.mll

File Test/AS2TestEagerSATotalOrder/Main.ml

-../../Source/As2/Main.ml

File Test/AS2TestEagerSATotalOrder/Parser.mly

-../../Source/As2/Parser.mly

File Test/AS2TestEagerSATotalOrder/_tags

-<*.cm*>: for-pack(AS2TestEagerSATotalOrder)

File Test/AS2TestLazySABidi.mllib

-AS2TestLazySABidi

File Test/AS2TestLazySABidi.mlpack

-AS2TestLazySABidi/As2Adapton
-AS2TestLazySABidi/Ast
-AS2TestLazySABidi/Global
-AS2TestLazySABidi/Interp
-AS2TestLazySABidi/Lexer
-AS2TestLazySABidi/Main
-AS2TestLazySABidi/Parser

File Test/AS2TestLazySABidi/As2Adapton.ml

- module A = Adapton.PolySA.Make(Adapton.LazySABidi)
-(* module A = Adapton.PolySA.Make(Adapton.EagerSATotalOrder) *)
-(* module A = Adapton.PolySA.Make(Adapton.NonSAEager) *)
-
-include A

File Test/AS2TestLazySABidi/Ast.ml

-../../Source/As2/Ast.ml

File Test/AS2TestLazySABidi/Global.ml

-../../Source/As2/Global.ml

File Test/AS2TestLazySABidi/Interp.ml

-../../Source/As2/Interp.ml

File Test/AS2TestLazySABidi/Lexer.mll

-../../Source/As2/Lexer.mll

File Test/AS2TestLazySABidi/Main.ml

-../../Source/As2/Main.ml

File Test/AS2TestLazySABidi/Parser.mly

-../../Source/As2/Parser.mly

File Test/AS2TestLazySABidi/_tags

-<*.cm*>: for-pack(AS2TestLazySABidi)

File Test/AS2TestNonSAEager.mllib

-AS2TestNonSAEager

File Test/AS2TestNonSAEager.mlpack

-AS2TestNonSAEager/As2Adapton
-AS2TestNonSAEager/Ast
-AS2TestNonSAEager/Global
-AS2TestNonSAEager/Interp
-AS2TestNonSAEager/Lexer
-AS2TestNonSAEager/Main
-AS2TestNonSAEager/Parser

File Test/AS2TestNonSAEager/As2Adapton.ml

-(* module A = Adapton.PolySA.Make(Adapton.LazySABidi) *)
-(* module A = Adapton.PolySA.Make(Adapton.EagerSATotalOrder) *)
- module A = Adapton.PolySA.Make(Adapton.NonSAEager)
-
-include A

File Test/AS2TestNonSAEager/Ast.ml

-../../Source/As2/Ast.ml

File Test/AS2TestNonSAEager/Global.ml

-../../Source/As2/Global.ml

File Test/AS2TestNonSAEager/Interp.ml

-../../Source/As2/Interp.ml

File Test/AS2TestNonSAEager/Lexer.mll

-../../Source/As2/Lexer.mll

File Test/AS2TestNonSAEager/Main.ml

-../../Source/As2/Main.ml

File Test/AS2TestNonSAEager/Parser.mly

-../../Source/As2/Parser.mly

File Test/AS2TestNonSAEager/_tags

-<*.cm*>: for-pack(AS2TestNonSAEager)

File Test/runas2test-results-1156-2013.11.14/runas2tests.sh

     for samp in 1 2 3 4 5 6 7 8; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test $sht"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-1156-2013.11.14/runas2tests.sh~

     for samp in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test $sht"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-1320-2013.11.14/TITLE

File contents unchanged.

File Test/runas2test-results-1320-2013.11.14/runas2tests.sh

     for samp in 1 2 3 4 5 6 7 8 ; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test 15 --num-changes $num_changes"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-1320-2013.11.14/runas2tests.sh~

     for samp in 1 2 3 4 5 6 7 8 ; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test 15 --num-changes $num_changes"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-#    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+#    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-1425-2013.11.03/runas2tests.sh

     for samp in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test $sht"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-1758-2013.11.03/runas2tests.sh

     for samp in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test 10 --num-changes $num_changes"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-#    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+#    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-1807-2013.11.02/runas2tests.sh

     for samp in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test $sht"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-1903-2013.11.03/TITLE

File contents unchanged.

File Test/runas2test-results-1903-2013.11.03/runas2tests.sh

     for samp in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test 15 --num-changes $num_changes"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-#    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+#    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2test-results-2032-2013.11.02/runas2tests.sh

     for samp in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32; do
     echo "sheet depth=$sht/20; same number=$samp"
     args="--Random.self_init --stats-test $sht"
-    $BIN/runas2testlazysabidi.native $args --stats-out runas2testlazysabidi.csv  
-    $BIN/runas2testnonsaeager.native $args --stats-out runas2testnonsaeager.csv 
-    $BIN/runas2testeagersatotalorder.native $args --stats-out runas2testeagersatotalorder.csv
+    $BIN/runas2.native --adapton-module LazySABidi $args --stats-out runas2testlazysabidi.csv
+    $BIN/runas2.native --adapton-module NonSAEager $args --stats-out runas2testnonsaeager.csv
+    $BIN/runas2.native --adapton-module EagerSATotalOrder $args --stats-out runas2testeagersatotalorder.csv
     done   
 done

File Test/runas2testeagersatotalorder.ml

-let _ = AS2TestEagerSATotalOrder.Main.run ()

File Test/runas2testlazysabidi.ml

-let _ = AS2TestLazySABidi.Main.run ()

File Test/runas2testnonsaeager.ml

-let _ = AS2TestNonSAEager.Main.run ()
-<**/*.cm*> or <**/*.top> or <**/*.mli> or <**/*.native>: rectypes, package(unix)
+<**/*.cm*> or <**/*.top> or <**/*.mli> or <**/*.native>: package(unix)