From d7a935e166e457efb934df1f670c846c1af2cd8c Mon Sep 17 00:00:00 2001
From: Erwan Jahier <jahier@imag.fr>
Date: Mon, 15 Sep 2008 18:18:48 +0200
Subject: [PATCH] Remove dead-code. Remove also SyntaxTreeDump as it was not
 really used.

---
 src/Makefile              |  21 +-
 src/TODO                  |  69 +++++++
 src/dead.grep             | 409 ++++++++++++++++++++++++++++++++++++++
 src/evalClock.ml          |  18 +-
 src/evalConst.ml          |   4 +-
 src/ident.ml              |  12 +-
 src/ident.mli             |   4 +-
 src/main.ml               |  25 +--
 src/symbolTab.ml          |  44 +---
 src/symbolTab.mli         |   3 +-
 src/test/Makefile         |   7 +-
 src/unifyType.ml          |   4 +-
 src/untested_line_counter |   1 +
 13 files changed, 514 insertions(+), 107 deletions(-)
 create mode 100644 src/dead.grep
 create mode 100644 src/untested_line_counter

diff --git a/src/Makefile b/src/Makefile
index 03967361..a7e74af2 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -24,8 +24,6 @@ SOURCES =  \
 	./parserUtils.ml \
 	./parser.mly \
 	./lexer.mll \
-	./syntaxTreeDump.mli \
-	./syntaxTreeDump.ml \
 	./syntaxTabUtils.mli \
 	./syntaxTabUtils.ml \
 	./expandPack.mli \
@@ -66,7 +64,24 @@ endif
 
 MLONLY_SOURCES=$(filter %.ml %.mll %.mly, $(SOURCES))
 
-
+##############################################################################"
+# searching for untested code
+test/ocamlprof.dump: pbc test
+prof: test/ocamlprof.dump
+	mkdir prof || rm prof/*
+	for d in ${SOURCES}; do \
+	   ocamlprof -f test/ocamlprof.dump $$d > prof/$$d ;\
+	done
+
+grep:
+	rm test/ocamlprof.dump
+	make clean
+	make prof
+	grep -n -e  "(\* 0 \*)" prof/*.ml | grep -v "assert false" > dead.grep
+	wc dead.grep > untested_line_counter
+	cat untested_line_counter
+
+##############################################################################"
 all: version.ml
 	make bc
 
diff --git a/src/TODO b/src/TODO
index 3a6b6501..3bde6ced 100644
--- a/src/TODO
+++ b/src/TODO
@@ -174,6 +174,75 @@ mais est-ce souhaitable ?)
 de non-regression, et faire  un grep de "(* 0 *)" pour  voir s'il y a
 du code mort ou bien des tests à rajouter.
         
+-> ecrire  des  tests  pour   exercer  les  fonctions  suivantes  (
+   faire "make grep" pour MAJ)
+
+ - Eff.clock_are_equals l.1 (1)
+ - Eff.subst_type (4)
+ - Eff.type_of_const (1)
+
+ - EvalClock.is_a_sub_clock (4)
+ - EvalClock.get_val_exp_eff (1)
+ - EvalClock.f_aux (1)
+ - EvalClock.eval_by_pos_clock (7)
+
+ - EvalConst.make_slice_const (1)
+ - EvalConst.make_array_const (1)
+ - EvalConst.make_struct_const (1)
+ - EvalConst.f (46)
+ - EvalConst.eval_array_size (3)
+ - EvalConst.eval_array_index (3)
+ - EvalConst.check_int (1)
+ - EvalConst.eval_array_slice (6)
+
+ - EvalType.f (2)
+ - EvalType.eval_by_pos_type (18)
+ - EvalType.eval_by_name_type (1)
+
+ - ExpandPack.doit (12)
+
+ - GetEff.typ (2)
+ - GetEff.type_check_equation (2)
+ - GetEff.check_static_arg (4)
+ - GetEff.translate_left_part (4)
+ - GetEff.translate_by_name_op (2)
+ - GetEff.get_const (1)
+ - GetEff.get_node (3)
+ - GetEff.translate_predef_static_args (1)
+ - GetEff.translate_iteror (1)
+ - GetEff.translate_by_pos_op (6)
+ - GetEff.assertion (2)
+
+ - Ident.idref_of_string (1)
+ - Ident.long_of_string (1)
+
+ - LazyCompiler.lookup_x_eff (1)
+ - LazyCompiler.lookup_type_eff (1)
+ - LazyCompiler.solve_x_idref (1)
+ - LazyCompiler.type_check_interface_do (1)
+ - LazyCompiler.const_check_interface_do (3)
+ - LazyCompiler.type_check_do (3)
+ - LazyCompiler.const_check_do (2)
+ - LazyCompiler.node_check_interface_do (6)
+ - LazyCompiler.node_check_do (6)
+
+ - LicDump (30)
+ - Lxm (4)
+ - Main (32)
+ - ParserUtils (3)
+ - Predef (47)
+ - PredefEvalConst (34)
+ - PredefEvalType (23)
+ - SolveIdent (3)
+ - Split (2)
+ - SymbolTab (20)
+ - SyntaxTab (12)
+ - SyntaxTree (7)
+ - SyntaxTreeDump (218)
+ - UnifyClock (1)
+ - UnifyType (37)
+ - UniqueOutput (10)
+
 
 *** moins facile
 ----------------
diff --git a/src/dead.grep b/src/dead.grep
new file mode 100644
index 00000000..e8d3ec95
--- /dev/null
+++ b/src/dead.grep
@@ -0,0 +1,409 @@
+prof/compile.ml:31:    if Verbose.get_level () > 2 then (* 0 *) SyntaxTab.dump syntax_tab;
+prof/compile.ml:38:          (* 0 *) let main_node_key = 
+prof/compile.ml:46:              (* 0 *) LazyCompiler.compile_all lzcomp
+prof/compile.ml:48:              (* 0 *) ignore(LazyCompiler.node_check lzcomp main_node_key 
+prof/compile.ml:50:                          | None -> (* 0 *) Lxm.dummy "" 
+prof/compile.ml:51:                          | Some pn  -> (* 0 *) Lxm.dummy (Ident.pack_name_to_string pn)))
+prof/eff.ml:424:    | On(cid1,_), On(cid2,_) -> (* 0 *) cid1 = cid2
+prof/eff.ml:437:  fun nkey -> (* 0 *) (nkey, [])
+prof/eff.ml:446:    | Enum_type_eff(l,el) ->  (* 0 *) Enum_type_eff(l,el)
+prof/eff.ml:463:    | Struct_const_eff (fl, teff) -> (* 0 *) teff
+prof/errors.ml:123:let warning lxm msg = (* 0 *) (
+prof/errors.ml:138:let print_internal_error fnme msg = (* 0 *) (
+prof/evalClock.ml:139:      | On(_,_), BaseEff -> (* 0 *) None
+prof/evalClock.ml:144:          with _ -> (* 0 *) is_a_sub_clock lxm s (id_sc,sc) (id_c,clk2) 
+prof/evalClock.ml:150:          (* 0 *) let s1,s2 = s in 
+prof/evalClock.ml:154:          (* 0 *) let s1,s2 = s in 
+prof/evalClock.ml:196:        | id, On(v, ClockVar _) -> (* 0 *) id, On(v, BaseEff)
+prof/evalClock.ml:206:      (* 0 *) print_string "*** No entry for '";
+prof/evalClock.ml:243:            (* 0 *) raise (Compile_error(lxm, "\n*** can't eval constant: "^msg))
+prof/evalClock.ml:266:              | [id, BaseEff] -> (* 0 *) [id, BaseEff],s
+prof/evalClock.ml:273:              | Base -> (* 0 *) BaseEff, BaseEff
+prof/evalClock.ml:293:                  (* 0 *) let msg = "\n*** clock error: '" ^ (ci2str (snd exp_clk)) ^ 
+prof/evalClock.ml:364:                  | ClockVar i -> (* 0 *) ci
+prof/evalConst.ml:26:let finish_me msg = (* 0 *) print_string ("\n\tXXX evalConst.ml:"^msg^" ->  finish me!\n")
+prof/evalConst.ml:29:  (* 0 *) raise (EvalConst_error(
+prof/evalConst.ml:45:    (* 0 *) let get_res (ix : int) = (* 0 *) Array.get ctab (slice.se_first + ix*slice.se_step) in
+prof/evalConst.ml:52:    (* 0 *) let expected_type = ref None in
+prof/evalConst.ml:54:      (* 0 *) match op with
+prof/evalConst.ml:55:        | [x] -> (* 0 *) (
+prof/evalConst.ml:59:                | None -> (* 0 *) expected_type := Some xtyp; x
+prof/evalConst.ml:60:                | Some t -> (* 0 *) (
+prof/evalConst.ml:61:                    if (t = xtyp) then (* 0 *) x else 
+prof/evalConst.ml:62:                      (* 0 *) raise (EvalConst_error(
+prof/evalConst.ml:70:            (* 0 *) raise (EvalConst_error("array of tuple not allowed"))
+prof/evalConst.ml:74:        | None -> (* 0 *) raise (EvalConst_error("empty array"))
+prof/evalConst.ml:75:        | Some t -> (* 0 *) Array_const_eff(res, t)
+prof/evalConst.ml:86:  (* 0 *) (
+prof/evalConst.ml:89:        Struct_type_eff (tnm, flst) -> (* 0 *) (
+prof/evalConst.ml:91:          let make_eff_field ((fn: Ident.t),((ft:Eff.type_),(fv:Eff.const option))) = (* 0 *) (
+prof/evalConst.ml:95:                  (lxm, v) -> (* 0 *) (
+prof/evalConst.ml:99:                      if (vt = ft) then (* 0 *) (fn, v) (*ok*)
+prof/evalConst.ml:100:                      else (* 0 *) raise (Compile_error(
+prof/evalConst.ml:109:            ) with Not_found -> (* 0 *) (
+prof/evalConst.ml:112:                  Some v -> (* 0 *) (fn, v) (* ok : v correcte par construction *)
+prof/evalConst.ml:114:                    (* 0 *) raise (EvalConst_error(
+prof/evalConst.ml:125:              = (* 0 *) raise(Compile_error(
+prof/evalConst.ml:137:      | _ -> (* 0 *) raise (EvalConst_error(
+prof/evalConst.ml:175:          | SyntaxTreeCore.CallByName ({it=nmop; src=lxm}, nmargs ) -> (* 0 *) (
+prof/evalConst.ml:178:                (* 0 *) raise (Compile_error(lxm, "\n*** can't eval constant: "^msg))
+prof/evalConst.ml:206:              | WITH_n(a0,a1,a2) -> (* 0 *) (
+prof/evalConst.ml:208:                      [ Bool_const_eff true] -> (* 0 *) rec_eval_const a1
+prof/evalConst.ml:209:                    | [ Bool_const_eff false] -> (* 0 *) rec_eval_const a2
+prof/evalConst.ml:210:                    | x -> (* 0 *) type_error_const x "bool"
+prof/evalConst.ml:213:              | TUPLE_n -> (* 0 *) ( List.flatten (List.map rec_eval_const args))
+prof/evalConst.ml:225:                                  (* 0 *) raise (EvalConst_error("array of tuple not allowed"))
+prof/evalConst.ml:227:                            EvalArray_error msg -> (* 0 *) raise(EvalConst_error msg)
+prof/evalConst.ml:229:                    | _ -> (* 0 *) raise(EvalConst_error
+prof/evalConst.ml:233:              | CONCAT_n -> (* 0 *) (
+prof/evalConst.ml:237:                         [Array_const_eff (v1, t1)]] -> (* 0 *) (
+prof/evalConst.ml:239:                            (* 0 *) [Array_const_eff (Array.append v0 v1, t0)]  
+prof/evalConst.ml:241:                            (* 0 *) raise(EvalConst_error(
+prof/evalConst.ml:249:                          (* 0 *) raise(EvalConst_error(
+prof/evalConst.ml:251:                      | _ -> (* 0 *) raise(EvalConst_error
+prof/evalConst.ml:255:              | ARRAY_n -> (* 0 *) (
+prof/evalConst.ml:262:                      | [Array_const_eff (elts, typelts)] -> (* 0 *) (
+prof/evalConst.ml:267:                          with EvalArray_error msg -> (* 0 *) raise(EvalConst_error msg)
+prof/evalConst.ml:269:                      |  _  -> (* 0 *) type_error_const effargs "some array"
+prof/evalConst.ml:271:              | ARRAY_SLICE_n sl -> (* 0 *) (
+prof/evalConst.ml:274:                      | [Array_const_eff (l, t)] -> (* 0 *) (l, t) 
+prof/evalConst.ml:275:                      | x -> (* 0 *) type_error_const x "some array"
+prof/evalConst.ml:284:                        EvalArray_error msg -> (* 0 *) raise(EvalConst_error msg)
+prof/evalConst.ml:288:                  (* 0 *) let ceff_list = List.flatten (List.map rec_eval_const args) in
+prof/evalConst.ml:290:                       | [Struct_const_eff (flst, typ)] -> (* 0 *) (
+prof/evalConst.ml:293:                             (* 0 *) raise (EvalConst_error
+prof/evalConst.ml:298:                       | [x] -> (* 0 *) type_error_const [x] "struct type"
+prof/evalConst.ml:299:                       | x -> (* 0 *) arity_error_const x "1"
+prof/evalConst.ml:302:              | CALL_n _ -> (* 0 *) not_evaluable_construct "node call"
+prof/evalConst.ml:303:              | MERGE_n _ -> (* 0 *) not_evaluable_construct "merge"
+prof/evalConst.ml:304:              | WHEN_n _ -> (* 0 *) not_evaluable_construct "when"
+prof/evalConst.ml:305:              | FBY_n -> (* 0 *) not_evaluable_construct "fby"
+prof/evalConst.ml:306:              | ARROW_n -> (* 0 *) not_evaluable_construct "->"
+prof/evalConst.ml:307:              | CURRENT_n -> (* 0 *) not_evaluable_construct "current"
+prof/evalConst.ml:308:              | PRE_n -> (* 0 *) not_evaluable_construct "pre"
+prof/evalConst.ml:317:                    (* 0 *) not_evaluable_construct (op2string op)
+prof/evalConst.ml:331:          = (* 0 *) (
+prof/evalConst.ml:334:                  (* 0 *) finish_me "anonymous struct"; 
+prof/evalConst.ml:337:              | STRUCT_n opid -> (* 0 *) (
+prof/evalConst.ml:341:                    (* 0 *) if 
+prof/evalConst.ml:344:                      (* 0 *) raise(EvalConst_error(
+prof/evalConst.ml:350:                      (* 0 *) let v = rec_eval_const pexp in
+prof/evalConst.ml:352:                          | [x] -> (* 0 *) Hashtbl.add arg_tab pid.it (pid.src, x)
+prof/evalConst.ml:354:                              (* 0 *) raise(
+prof/evalConst.ml:367:                      (* 0 *) raise(EvalConst_error(
+prof/evalConst.ml:398:            (* 0 *) raise(EvalArray_error(sprintf "bad array size %d" sz))
+prof/evalConst.ml:400:          (* 0 *) raise(EvalArray_error(sprintf  "bad array size, int expected but get %s"
+prof/evalConst.ml:403:          (* 0 *) raise(EvalArray_error(sprintf "bad array size, int expected, not a tuple"))
+prof/evalConst.ml:431:            (* 0 *) raise(EvalArray_error("The extern const " ^ (Ident.string_of_long id) ^ 
+prof/evalConst.ml:434:        | [x] -> (* 0 *) raise(EvalArray_error(sprintf 
+prof/evalConst.ml:438:        | _ -> (* 0 *) raise(EvalArray_error(
+prof/evalConst.ml:444:        (* 0 *) raise (Compile_error(lxm, "\n*** can't eval constant: "^msg))
+prof/evalConst.ml:448:    else (* 0 *) raise(EvalArray_error(
+prof/evalConst.ml:477:              | [x] -> (* 0 *) raise(EvalArray_error(
+prof/evalConst.ml:480:              | _ -> (* 0 *) raise(EvalArray_error(
+prof/evalConst.ml:483:        | None -> (* 25 *) if (first_ix <= last_ix) then (* 25 *) 1 else (* 0 *) -1
+prof/evalConst.ml:490:        (* 0 *) let msg = sprintf "bad array slice [%d..%d] step %d" first_ix last_ix step in
+prof/evalConst.ml:498:            (* 0 *) warning lxm (sprintf "last index out of slice [%d..%d step %d]" 
+prof/evalConst.ml:512:        (* 0 *) raise (Compile_error(lxm, "\n*** can't eval constant: "^msg))
+prof/evalType.ml:32:let finish_me msg = (* 0 *) print_string ("\n\tXXX evalType.ml:"^msg^" ->  finish me!\n")
+prof/evalType.ml:40:              (* 0 *) raise (Compile_error(lxm, "type error: "^msg))
+prof/evalType.ml:45:              (* 0 *) raise (Compile_error(lxm, "\n*** can't eval constant: "^msg))
+prof/evalType.ml:79:              (* 0 *) raise (EvalType_error(
+prof/evalType.ml:87:                 | UnifyType.Ko msg -> (* 0 *) raise (Compile_error(lxm, msg))
+prof/evalType.ml:100:      | Eff.CONCAT -> (* 0 *) (
+prof/evalType.ml:103:                (* 0 *) let teff = 
+prof/evalType.ml:105:                    | UnifyType.Equal -> (* 0 *) teff1
+prof/evalType.ml:106:                    | UnifyType.Unif subst -> (* 0 *) subst_type subst teff1
+prof/evalType.ml:107:                    | UnifyType.Ko msg -> (* 0 *) raise (Compile_error(lxm, msg))
+prof/evalType.ml:111:                (* 0 *) raise(EvalType_error(sprintf "arity error: 2 expected instead of %d" 
+prof/evalType.ml:120:                    (* 0 *) raise (EvalType_error
+prof/evalType.ml:125:              | [x] -> (* 0 *) type_error [x] "struct type"
+prof/evalType.ml:126:              | x -> (* 0 *) arity_error x "1"
+prof/evalType.ml:146:                       (* 0 *) raise(EvalType_error(
+prof/evalType.ml:160:               | Base -> (* 0 *) ()
+prof/evalType.ml:175:              | _ -> (* 0 *) raise(EvalType_error("arity error (1 arg expected)"))
+prof/evalType.ml:182:                  (* 0 *) raise(EvalType_error("type mismatch. "))
+prof/evalType.ml:183:              | _ -> (* 0 *) raise(EvalType_error("arity error (2 args expected)"))
+prof/evalType.ml:190:              | _ -> (* 0 *) raise(EvalType_error("arity error (1 arg expected)"))
+prof/evalType.ml:209:          (* 0 *) finish_me "anonymous struct not yet supported"; 
+prof/expandPack.ml:22:            (* 0 *) let msg = Printf.sprintf "bad pack instance: model %s undeclared"
+prof/expandPack.ml:46:                (* 0 *) let msg = Printf.sprintf
+prof/expandPack.ml:57:                            (* 0 *) Lxm.flagit (Named_type_exp idr) arg.src
+prof/expandPack.ml:59:                        | _ -> (* 0 *) instance_error ()
+prof/expandPack.ml:71:                            (* 0 *) ParserUtils.leafexp arg.src (IDENT_n idr) 
+prof/expandPack.ml:73:                        | _ -> (* 0 *) instance_error ()
+prof/expandPack.ml:87:                        | _ -> (* 0 *) instance_error () 
+prof/expandPack.ml:113:                          | None -> (* 0 *) acc
+prof/expandPack.ml:116:                                if List.mem p_flagged acc then (* 0 *) acc else (* 3 *) p_flagged::acc
+prof/expandPack.ml:129:                (* 0 *) raise(Compile_error 
+prof/expandPack.ml:152:                |  None -> (* 0 *) None
+prof/expandPack.ml:161:            ) with Invalid_argument _ -> (* 0 *) (
+prof/getEff.ml:29:              with EvalConst.EvalArray_error msg -> (* 0 *) raise(GetEffType_error msg)
+prof/getEff.ml:32:      (* 0 *) raise (Compile_error(texp.src, "can't eval type: "^msg))
+prof/getEff.ml:53:        (* 0 *) raise (Compile_error(lxm, 
+prof/getEff.ml:63:               (* 0 *) let msg = "type mismatch: \n***\t'" 
+prof/getEff.ml:115:            (* 0 *) let ceff = node_id_solver.id2const idref sa.src in
+prof/getEff.ml:119:            (* 0 *) let teff = node_id_solver.id2type idref sa.src in
+prof/getEff.ml:123:            (* 0 *) let sargs = [] in
+prof/getEff.ml:141:            (* 0 *) let neff = node node_id_solver ne in
+prof/getEff.ml:202:                    (* 0 *) raise (Compile_error(id.src, "bad field name in structure"))
+prof/getEff.ml:204:              | _  -> (* 0 *) raise (Compile_error(id.src, "a structure was expected"))
+prof/getEff.ml:215:              | _ -> (* 0 *) raise (Compile_error(vef.src, "an array was expected"))
+prof/getEff.ml:226:              | _ -> (* 0 *) raise (Compile_error(sif.src, "an array was expected"))
+prof/getEff.ml:246:    | STRUCT_anonymous_n -> (* 0 *) STRUCT_anonymous
+prof/getEff.ml:254:          | Some pn -> (* 0 *) STRUCT (pn, idref)
+prof/getEff.ml:267:    | StaticArgNode _ -> (* 0 *) raise (Compile_error(lxm, "a constant was expected"))
+prof/getEff.ml:276:    | StaticArgNode(CALL_n ne) -> (* 0 *) node id_solver ne
+prof/getEff.ml:283:    | StaticArgConst _ -> (* 0 *) raise (Compile_error(lxm, "a node was expected"))
+prof/getEff.ml:304:          (* 0 *) raise (Compile_error(lxm, "bad arguments number for array iterator"))
+prof/getEff.ml:357:      | CONCAT_n -> (* 0 *) Eff.CONCAT
+prof/getEff.ml:368:      | WHEN_n Base -> (* 0 *) Eff.WHEN Base
+prof/getEff.ml:373:                | Some _ -> (* 0 *) cc
+prof/getEff.ml:391:                  (* 0 *) raise (Compile_error(
+prof/getEff.ml:410:                  (* 0 *) raise (Compile_error(
+prof/getEff.ml:429:      | MERGE_n(id, idl) -> (* 0 *) Eff.MERGE(id, idl)
+prof/getEff.ml:449:             (* 0 *) let msg = "type mismatch: \n\tthe content of the assertion is of type " 
+prof/getEff.ml:467:              (* 0 *) let msg = "clock error: assert should be on the base clock, "^
+prof/ident.ml:105:    | _ -> (* 0 *) raise (Failure ("idref_of_string: \""^s^"\" not a proper ident")) 
+prof/ident.ml:111:        [i] -> (* 0 *) !dft_pack_name, i
+prof/ident.ml:113:      | _ -> (* 0 *) raise (Failure ("idref_of_string: \""^s^"\" not a proper ident")) 
+prof/ident.ml:130:    (* 0 *) match pack_of_idref idr with
+prof/ident.ml:131:        Some p -> (* 0 *) (p, name_of_idref idr)
+prof/ident.ml:132:      | None   -> (* 0 *) (!dft_pack_name, name_of_idref idr)
+prof/lazyCompiler.ml:10:let finish_me msg = (* 0 *) print_string ("\n\tXXX LazyCompiler:"^msg^" ->  finish me!\n")
+prof/lazyCompiler.ml:22:    | [] -> (* 0 *) "nostack" 
+prof/lazyCompiler.ml:158:          (* 0 *) print_string ("*** " ^ (Ident.string_of_long lid) ^ "???\n" ^ 
+prof/lazyCompiler.ml:196:      | Eff.Incorrect -> (* 0 *) raise (BadCheckRef_error)
+prof/lazyCompiler.ml:200:  lookup_x_eff "type ref "  (fun k -> (* 0 *) k)
+prof/lazyCompiler.ml:240:            (* 0 *) (raise (Compile_error(lxm,"unbounded " ^ x_label ^ " ident")))
+prof/lazyCompiler.ml:304:        (* 0 *) raise(Compile_error (
+prof/lazyCompiler.ml:324:              (* 0 *) raise(Compile_error (const_def.src, " constant values mismatch"))
+prof/lazyCompiler.ml:328:              (* 0 *) raise(Compile_error (
+prof/lazyCompiler.ml:345:              (* 0 *) raise(Compile_error (
+prof/lazyCompiler.ml:386:                                    (* 0 *) raise 
+prof/lazyCompiler.ml:394:                                (* 0 *) raise (Compile_error(field_def.src,
+prof/lazyCompiler.ml:410:          (* 0 *) if (root = type_name) then (* 0 *) recursion_error type_def.src stack else
+prof/lazyCompiler.ml:411:            (* 0 *) raise ( Recursion_error (root, ("type ref "^(Lxm.details lxm))::stack))
+prof/lazyCompiler.ml:456:                              (* 0 *) raise 
+prof/lazyCompiler.ml:464:                | _::_ -> (* 0 *) raise (Compile_error(const_def.src, 
+prof/lazyCompiler.ml:498:        (* 0 *) raise(Compile_error (node_def.src, msg_prefix ^ " ??? "))
+prof/lazyCompiler.ml:503:        (* 0 *) let msg = msg_prefix ^ "bad input profile. \n*** " ^ 
+prof/lazyCompiler.ml:513:        (* 0 *) let msg = msg_prefix ^ "bad output profile. \n*** " ^ 
+prof/lazyCompiler.ml:522:        (* 0 *) raise(Compile_error (node_def.src, msg_prefix ^ " node or function?"))
+prof/lazyCompiler.ml:526:        (* 0 *) raise(Compile_error (node_def.src, msg_prefix ^ "safe or unsafe?"))
+prof/lazyCompiler.ml:532:        (* 0 *) raise(Compile_error (node_def.src, msg_prefix ^ "abstract or not?"))
+prof/lazyCompiler.ml:623:                              (* 0 *) aux acc tail 
+prof/lazyCompiler.ml:632:                              (* 0 *) raise (
+prof/lazyCompiler.ml:736:                    (* 0 *) raise (Compile_error (lxm, "Can not alias 'nor' nor '#', sorry"))
+prof/lazyCompiler.ml:763:                    (* 0 *) raise (Compile_error (lxm, "can not alias this operator, sorry"))
+prof/lazyCompiler.ml:780:                      | UnifyType.Ko msg -> (* 0 *) raise(Compile_error(lxm, msg))
+prof/lazyCompiler.ml:783:                            | UnifyType.Ko msg -> (* 0 *) raise(Compile_error (lxm, msg))
+prof/lazyCompiler.ml:788:    let res = if !Global.one_op_per_equation then (* 797 *) Split.node res else (* 0 *) res in
+prof/licDump.ml:76:    | Extern_const_eff (s,t,vopt) -> (* 0 *) (long s) ^ (string_of_const_eff_opt vopt)
+prof/licDump.ml:77:    | Enum_const_eff   (s,t) -> (* 0 *) (long s)
+prof/licDump.ml:78:    | Struct_const_eff (fl, t) -> (* 0 *) (
+prof/licDump.ml:81:	    (* 0 *) (Ident.to_string id)^" = "^(string_of_const_eff veff)
+prof/licDump.ml:93:  | None -> (* 0 *) ""
+prof/licDump.ml:94:  | Some val_exp_eff -> (* 0 *) string_of_const_eff val_exp_eff
+prof/licDump.ml:100:  | External_type_eff i -> (* 0 *) long i
+prof/licDump.ml:118:  | Any -> (* 0 *) "a"
+prof/licDump.ml:119:  | Overload -> (* 0 *) "o"
+prof/licDump.ml:233:  | []  -> (* 0 *) ""
+prof/licDump.ml:234:  | [x] -> (* 0 *) string_of_type_eff x
+prof/licDump.ml:235:  | l   -> (* 0 *) String.concat " * " (List.map string_of_type_eff l)
+prof/licDump.ml:259:    | TypeStaticArgEff  (id, teff) -> (* 0 *) sprintf "%s" (string_of_type_eff teff)
+prof/licDump.ml:261:	(* 0 *) sprintf "%s" (string_of_node_key_rec opeff.node_key_eff)
+prof/licDump.ml:267:    | TypeStaticArgEff  (id, teff) -> (* 0 *) sprintf "%s" (string_of_type_eff teff)
+prof/licDump.ml:276:              | None -> (* 0 *) None
+prof/licDump.ml:288:  fun x -> (* 0 *) (string_of_type_eff x.var_type_eff) ^ 
+prof/licDump.ml:371:                | Some _ ->  (* 0 *) idref
+prof/licDump.ml:384:	    (* 0 *) (string_of_val_exp_eff ve1) ^ " | " ^ (string_of_val_exp_eff ve2)
+prof/licDump.ml:430:        (* 0 *) ("(" ^ str ^ ")")
+prof/licDump.ml:440:               | Some pn -> (* 0 *) Ident.string_of_idref idref
+prof/licDump.ml:445:	 | STRUCT_anonymous -> (* 0 *) "") ^
+prof/licDump.ml:456:  | SyntaxTreeCore.Base -> (* 0 *) "base"
+prof/licDump.ml:509:    | AbstractEff -> (* 0 *) []
+prof/licDump.ml:551:	 | AbstractEff -> (* 0 *) ""
+prof/licDump.ml:553:	     (* 671 *) ((match neff.loclist_eff with None -> (* 0 *) "" | Some [] -> (* 174 *) ""
+prof/licDump.ml:600:let node_error_string lxm nkey = (* 0 *) (
+prof/licDump.ml:607:let print_compile_node_error nkey lxm msg = (* 0 *) (
+prof/licDump.ml:613:let print_global_node_error lxm nkey msg = (* 0 *) (
+prof/lxm.ml:28:let cstart x = (* 0 *) (x._cstart)
+prof/lxm.ml:29:let cend x = (* 0 *) (x._cend)
+prof/lxm.ml:30:let file x = (* 0 *) x._file
+prof/lxm.ml:31:let pragma x = (* 0 *) x._pragma
+prof/main.ml:56:let print_version = function (x: unit) -> (* 0 *) (
+prof/main.ml:64:  ( "--version", Arg.Unit(fun x -> (* 0 *) print_version () ; exit 0),
+prof/main.ml:67:  ( "--output-file", Arg.String(fun x -> (* 0 *) Global.outfile := x), "<file>"
+prof/main.ml:69:  ( "-o", Arg.String(fun x -> (* 0 *) Global.outfile := x),
+prof/main.ml:72:  ( "--node", Arg.String(fun x -> (* 0 *) Global.main_node := x),
+prof/main.ml:75:  ( "-n", Arg.String(fun x -> (* 0 *) Global.main_node := x),
+prof/main.ml:83:      (function x -> (* 0 *) Global.compile_all_items := true),
+prof/main.ml:89:  ( "--verbose", Arg.Unit (fun vl -> (* 0 *) Verbose.set_level 1 ),
+prof/main.ml:92:  ( "-v", Arg.Unit (fun vl -> (* 0 *) Verbose.set_level 1 ),
+prof/main.ml:95:  ( "--verbose-level", Arg.Int(fun vl -> (* 0 *) Verbose.set_level vl ), "<int>"
+prof/main.ml:101:  ( "--keep-nested-calls", Arg.Unit (fun _ -> (* 0 *) Global.one_op_per_equation := false),
+prof/main.ml:106:  ("-h", Arg.Unit (fun _ -> (* 0 *) (Arg.usage arg_list usage_msg; exit 0)), "" );
+prof/main.ml:108:  ("--help", Arg.Unit (fun _ -> (* 0 *) (Arg.usage arg_list usage_msg; exit 0)),
+prof/main.ml:120:let test_lex ( lexbuf ) = (* 0 *) (
+prof/main.ml:123:        (* 0 *) match (Lexer.token_code !tk) with 
+prof/main.ml:125:              (* 0 *) printf "%s : %15s = \"%s\"\n"
+prof/main.ml:157:                  with _ -> (* 0 *) print_string ("*** '"^infile^"': bad file name.\n"); exit 1
+prof/main.ml:172:                (* 0 *) get_remaining_source_list (maybe_pack, compiled, tail)
+prof/main.ml:179:                        (* 0 *) print_string ("old-style (un-packaged) lustre files can " ^
+prof/main.ml:203:  if Sys.file_exists !Global.outfile then (* 0 *) Sys.remove !Global.outfile;
+prof/main.ml:213:  if (!Global.infiles = []) then (* 0 *) (
+prof/main.ml:221:        (* 0 *) Some (Ident.idref_of_string !Global.main_node)
+prof/main.ml:223:      if !Global.outfile <> "" then (* 0 *) Global.oc := open_out !Global.outfile;
+prof/main.ml:230:        (* 0 *) prerr_string (s^"\n");
+prof/main.ml:242:        (* 0 *) prerr_string (
+prof/main.ml:246:            (if List.length !Global.infiles > 1 then (* 0 *) "s " else (* 0 *) " ") ^
+prof/parserUtils.ml:132:let ternexp lxm op e1 e2 e3 = (* 0 *) CallByPos( {src = lxm ; it = op }, Oper [e1 ; e2; e3] )
+prof/parserUtils.ml:151:    (* 0 *) print_string  ("Parser.idref_of_lxm" ^(Lxm.str lxm));
+prof/parserUtils.ml:463:        (* 0 *) CallByPos(flagit (IDENT_n (Ident.idref_of_string(istr))) lxm,
+prof/predef.ml:67:  | REAL2INT_n -> (* 0 *) "real2int"
+prof/predef.ml:68:  | INT2REAL_n -> (* 0 *) "int2real"
+prof/predef.ml:89:  | IUMINUS_n -> (* 0 *) "-"
+prof/predef.ml:90:  | IMINUS_n -> (* 0 *) "-"
+prof/predef.ml:92:  | ISLASH_n -> (* 0 *) "/"
+prof/predef.ml:93:  | ITIMES_n -> (* 0 *) "*"
+prof/predef.ml:94:  | RUMINUS_n -> (* 0 *) "-"
+prof/predef.ml:95:  | RMINUS_n -> (* 0 *) "-"
+prof/predef.ml:96:  | RPLUS_n -> (* 0 *) "+"
+prof/predef.ml:97:  | RSLASH_n -> (* 0 *) "/"
+prof/predef.ml:98:  | RTIMES_n -> (* 0 *) "*"
+prof/predef.ml:113:  | DIESE_n -> (* 0 *) "diese"
+prof/predef.ml:120:  | IMINUS_n -> (* 0 *) "iminus"
+prof/predef.ml:122:  | ISLASH_n -> (* 0 *) "idiv"
+prof/predef.ml:123:  | ITIMES_n -> (* 0 *) "itimes"
+prof/predef.ml:124:  | RUMINUS_n -> (* 0 *) "ruminus"
+prof/predef.ml:125:  | RMINUS_n -> (* 0 *) "rminus"
+prof/predef.ml:126:  | RPLUS_n -> (* 0 *) "plus"
+prof/predef.ml:127:  | RSLASH_n -> (* 0 *) "rdiv"
+prof/predef.ml:128:  | RTIMES_n -> (* 0 *) "rtimes"
+prof/predef.ml:146:    | "true" -> (* 0 *) TRUE_n
+prof/predef.ml:147:    | "false" -> (* 0 *) FALSE_n
+prof/predef.ml:150:    | "real2int" -> (* 0 *) REAL2INT_n
+prof/predef.ml:151:    | "int2real" -> (* 0 *) INT2REAL_n
+prof/predef.ml:155:    | "xor" -> (* 0 *) XOR_n
+prof/predef.ml:156:    | "impl" -> (* 0 *) IMPL_n
+prof/predef.ml:158:    | "neq" -> (* 0 *) NEQ_n
+prof/predef.ml:159:    | "lt" -> (* 0 *) LT_n
+prof/predef.ml:161:    | "gt" -> (* 0 *) GT_n
+prof/predef.ml:162:    | "gte" -> (* 0 *) GTE_n
+prof/predef.ml:163:    | "div" -> (* 0 *) DIV_n
+prof/predef.ml:164:    | "mod" -> (* 0 *) MOD_n
+prof/predef.ml:168:    | "nor" -> (* 0 *) NOR_n
+prof/predef.ml:169:    | "#" -> (* 0 *) DIESE_n 
+prof/predef.ml:170:    | "diese" -> (* 0 *) DIESE_n
+prof/predef.ml:173:    | "uminus" -> (* 0 *) UMINUS_n
+prof/predef.ml:174:    | "minus" -> (* 0 *) MINUS_n
+prof/predef.ml:176:    | "slash" -> (* 0 *) SLASH_n
+prof/predef.ml:177:    | "times" -> (* 0 *) TIMES_n
+prof/predef.ml:181:    | "iminus" -> (* 0 *) IMINUS_n
+prof/predef.ml:183:    | "islash" -> (* 0 *) ISLASH_n
+prof/predef.ml:184:    | "itimes" -> (* 0 *) ITIMES_n
+prof/predef.ml:186:    | "ruminus" -> (* 0 *) RUMINUS_n
+prof/predef.ml:187:    | "rminus" -> (* 0 *) RMINUS_n
+prof/predef.ml:188:    | "rplus" -> (* 0 *) RPLUS_n
+prof/predef.ml:189:    | "rslash" -> (* 0 *) RSLASH_n
+prof/predef.ml:190:    | "rtimes" -> (* 0 *) RTIMES_n
+prof/predefEvalConst.ml:16:    (* 0 *) raise (EvalConst_error(
+prof/predefEvalConst.ml:17:             "type mismatch "^(if expect = "" then (* 0 *) "" else (* 0 *) (expect^" expected"))))
+prof/predefEvalConst.ml:22:    (* 0 *) raise (EvalConst_error(
+prof/predefEvalConst.ml:24:               (List.length v) (if List.length v>1 then (* 0 *) "s" else (* 0 *) "") expect))
+prof/predefEvalConst.ml:51:  fun op -> fun ll -> (* 0 *) match List.flatten ll with
+prof/predefEvalConst.ml:52:    | [Real_const_eff v0; Real_const_eff v1] -> (* 0 *) [Real_const_eff (op v0 v1)]
+prof/predefEvalConst.ml:61:  fun op -> fun ll -> (* 0 *) match List.flatten ll with
+prof/predefEvalConst.ml:62:    | [Int_const_eff v0] -> (* 0 *) [Int_const_eff (op v0)]
+prof/predefEvalConst.ml:66:  fun op -> fun ll -> (* 0 *) match List.flatten ll with
+prof/predefEvalConst.ml:67:    | [Real_const_eff v0] -> (* 0 *) [Real_const_eff (op v0)]
+prof/predefEvalConst.ml:82:      (* 0 *) raise (EvalConst_error(
+prof/predefEvalConst.ml:91:      (* 0 *) raise (EvalConst_error(
+prof/predefEvalConst.ml:100:  fun op -> fun ll -> (* 0 *) match List.flatten ll with
+prof/predefEvalConst.ml:101:    | [Real_const_eff v0] -> (* 0 *) [Int_const_eff (op v0)]
+prof/predefEvalConst.ml:105:  fun op -> fun ll -> (* 0 *) match List.flatten ll with
+prof/predefEvalConst.ml:106:    | [Int_const_eff v0] -> (* 0 *) [Real_const_eff (op v0)]
+prof/predefEvalConst.ml:137:      | REAL2INT_n -> (* 0 *) fi_evaluator int_of_float ll
+prof/predefEvalConst.ml:138:      | INT2REAL_n -> (* 0 *) if_evaluator float_of_int ll
+prof/predefEvalConst.ml:144:      | NEQ_n  -> (* 0 *) aab_evaluator (<>) ll 
+prof/predefEvalConst.ml:145:      | LT_n   -> (* 0 *) aab_evaluator (<) ll
+prof/predefEvalConst.ml:146:      | LTE_n  -> (* 0 *) aab_evaluator (<=) ll
+prof/predefEvalConst.ml:148:      | GTE_n  -> (* 0 *) aab_evaluator (>=) ll
+prof/predefEvalConst.ml:157:      | IUMINUS_n  -> (* 0 *) ii_evaluator (fun x -> (* 0 *) -x) ll
+prof/predefEvalConst.ml:158:      | IMINUS_n -> (* 0 *) iii_evaluator (-) ll
+prof/predefEvalConst.ml:159:      | IPLUS_n  -> (* 0 *) iii_evaluator (+) ll
+prof/predefEvalConst.ml:160:      | ISLASH_n -> (* 0 *) iii_evaluator (/) ll
+prof/predefEvalConst.ml:161:      | ITIMES_n -> (* 0 *) iii_evaluator ( * ) ll
+prof/predefEvalConst.ml:162:      | RUMINUS_n -> (* 0 *) ff_evaluator (fun x -> (* 0 *) -.x) ll
+prof/predefEvalConst.ml:163:      | RMINUS_n -> (* 0 *) fff_evaluator (-.) ll
+prof/predefEvalConst.ml:164:      | RPLUS_n  -> (* 0 *) fff_evaluator (+.) ll
+prof/predefEvalConst.ml:165:      | RSLASH_n -> (* 0 *) fff_evaluator (/.) ll
+prof/predefEvalConst.ml:166:      | RTIMES_n -> (* 0 *) fff_evaluator ( *.) ll
+prof/predefEvalConst.ml:167:      | NOR_n   -> (* 0 *) boolred_evaluator 0 ll
+prof/predefEvalConst.ml:173:      | BoolRed -> (* 0 *) boolred_evaluator 1 ll
+prof/predefEvalType.ml:19:    (* 0 *) let str_l = List.map LicDump.string_of_type_eff tel in
+prof/predefEvalType.ml:23:                  (if expect = "" then (* 0 *) "" 
+prof/predefEvalType.ml:24:                   else (* 0 *) (" whereas\n*** type '" ^expect^"' was expected")))))
+prof/predefEvalType.ml:30:                (if expect = "" then (* 0 *) "" 
+prof/predefEvalType.ml:32:                (if msg = "" then (* 0 *) "" else (* 1 *) ("\n*** " ^ msg)))))
+prof/predefEvalType.ml:36:    (* 0 *) raise (EvalType_error(
+prof/predefEvalType.ml:38:             (List.length v) (if List.length v>1 then (* 0 *) "s" else (* 0 *) "") expect))
+prof/predefEvalType.ml:125:        (* 0 *) match UnifyType.f [t1] [t2] with
+prof/predefEvalType.ml:126:          | Equal  -> (* 0 *) (lti,lto)
+prof/predefEvalType.ml:128:              (* 0 *) (List.map (fun (id,tid) -> (* 0 *) id, subst_type t tid) lti,
+prof/predefEvalType.ml:129:               List.map (fun (id,tid) -> (* 0 *) id, subst_type t tid) lto)
+prof/predefEvalType.ml:130:          | Ko(msg) -> (* 0 *) raise (Compile_error(lxm, msg))
+prof/predefEvalType.ml:169:          | _ -> (* 0 *) raise (Compile_error(lxm, "\n*** type error: 3 int were expected"))
+prof/predefEvalType.ml:187:        | REAL2INT_n       -> (* 0 *) ri_profile
+prof/predefEvalType.ml:188:        | INT2REAL_n       -> (* 0 *) ir_profile
+prof/predefEvalType.ml:192:        | RUMINUS_n        -> (* 0 *) rr_profile
+prof/predefEvalType.ml:196:        | RMINUS_n | RPLUS_n | RTIMES_n | RSLASH_n                 -> (* 0 *) rrr_profile
+prof/predefEvalType.ml:258:                    (* 0 *) (type_error (List.flatten [[Bool_type_eff]; t; e]) "bool*any*any")
+prof/predefEvalType.ml:259:              | x -> (* 0 *) (arity_error x "3")
+prof/predefEvalType.ml:266:                (* 93 *) acc | _ -> (* 0 *) (type_error [ceff] "bool")
+prof/predefEvalType.ml:277:                (* 0 *) arity_error [l] (string_of_int (List.length lti))
+prof/predefEvalType.ml:282:                      (* 0 *) type_error2 
+prof/predefEvalType.ml:287:                      (* 0 *) type_error2 
+prof/solveIdent.ml:77:	| Some op -> (* 0 *) Predef_n (op,[])
+prof/solveIdent.ml:111:  | EnumConst(id,te) -> (* 0 *) EnumConst(id,te)
+prof/solveIdent.ml:119:  | ArrayType(id,te,ve) -> (* 0 *) ArrayType(id,te, r_val_exp ve)
+prof/split.ml:37:  | CallByPosEff({ it = Eff.FBY }, _) -> (* 0 *) true
+prof/split.ml:39:  | CallByPosEff({ it = Eff.CURRENT }, _) -> (* 0 *) true
+prof/symbolTab.ml:36:    (* 0 *) raise (Compile_error(lxm, "unknown type (" ^ (Ident.to_string id)^")"))
+prof/symbolTab.ml:41:    (* 0 *) raise (Compile_error(lxm, "unknown type (" ^ (Ident.to_string id)^")"))
+prof/symbolTab.ml:61:      (* 0 *) raise (Global_error("Can not find node " ^ (Ident.to_string id)^
+prof/syntaxTab.ml:97:      (* 0 *) print_string ("*** Can not find package '" ^ 
+prof/syntaxTab.ml:100:	(fun pn pm -> (* 0 *) print_string ("\n***\t - '"^(Ident.pack_name_to_string pn)^ "'"))
+prof/syntaxTab.ml:111:    with Not_found -> (* 0 *) raise(Compile_error(lxm, ""))
+prof/syntaxTab.ml:313:	with Not_found -> (* 0 *) raise(Compile_error(lxm, "unknown package"))
+prof/syntaxTab.ml:378:  (* 0 *) print_string "*** not implemented.\n";
+prof/syntaxTab.ml:382:  (* 0 *) print_string "*** not implemented.\n";
+prof/syntaxTab.ml:386:  (* 0 *) print_string "*** not implemented.\n";
+prof/syntaxTab.ml:394:    (* 0 *) let p = Verbose.print_string ~level:3 in
+prof/syntaxTab.ml:400:	(fun pm -> (* 0 *) p (SyntaxTree.pack_or_model_to_string pm); p "\n\t\t") 
+prof/syntaxTab.ml:406:	(fun id _mi -> (* 0 *) p ((Ident.to_string id) ^ " "))
+prof/syntaxTab.ml:412:	(fun pn pi -> (* 0 *) p ((Ident.pack_name_to_string pn) ^ " ")) 
+prof/syntaxTab.ml:418:	(fun pn pm -> (* 0 *) p ((Ident.pack_name_to_string pn) ^ " ")) 
+prof/syntaxTree.ml:124:  | LeftVar sflg -> (* 0 *) sflg.src
+prof/syntaxTree.ml:125:  | LeftField (x, _) -> (* 0 *) lexeme_of_left_part x 
+prof/syntaxTree.ml:126:  | LeftArray (x, _) -> (* 0 *) lexeme_of_left_part x
+prof/syntaxTree.ml:127:  | LeftSlice (x, _) -> (* 0 *) lexeme_of_left_part x
+prof/syntaxTree.ml:133:    | NSPack  pi -> (* 0 *) Ident.pack_name_to_string pi.it.pa_name ^ " (pack) "
+prof/syntaxTree.ml:134:    | NSModel mi -> (* 0 *) Ident.pack_name_to_string mi.it.mo_name ^ " (model) "
+prof/unifyClock.ml:27:    (* 1749 *) if List.mem_assoc i s then (* 0 *) s else (* 1749 *) (i,c)::s
+prof/unifyType.ml:47:	      (* 1515 *) if l1 <> l2 then (* 0 *) Ko "\n*** incompatible structure" else
+prof/unifyType.ml:107:  | Ko(msg) -> (* 0 *) msg
+prof/unifyType.ml:108:  | Equal -> (* 0 *) "types are equals\n"
+prof/unifyType.ml:109:  | Unif t -> (* 0 *) "types are unifiable via " ^ (teff2str t) ^ "\n"
+prof/uniqueOutput.ml:64:    (* 0 *) let rec aux vds v acc = (* 0 *) match vds with
+prof/uniqueOutput.ml:65:      | VDS_def -> (* 0 *) acc
+prof/uniqueOutput.ml:66:      | VDS_undef -> (* 0 *) v::acc
+prof/uniqueOutput.ml:68:	  (* 0 *) List.fold_left (fun acc (id,vds) -> (* 0 *) aux vds (v^"."^(id2str id)) acc) acc fl
+prof/uniqueOutput.ml:69:      | VDS_array(a) -> (* 0 *) fst
+prof/uniqueOutput.ml:71:	     (fun (acc,i) vds -> (* 0 *) aux vds (v^"["^(int2str i) ^"]") acc, i+1) (acc,0) a)
+prof/uniqueOutput.ml:83:	  (* 0 *) let msg = "\n*** Variable " ^ v ^ " is defined twice." in 
+prof/uniqueOutput.ml:186:		(* 0 *) let msg = "\n*** Undefined variable(s): " ^ 
+prof/uniqueOutput.ml:201:		     (* 0 *) let msg = "\n*** Error; " ^(id2str v.var_name_eff) ^ 
+prof/uniqueOutput.ml:211:		     (* 0 *) let msg = "\n*** Undefined variable: " ^ (id2str v.var_name_eff)
+prof/verbose.ml:34:  (fun t -> (* 2824 *) if (!_level >= level) then (* 0 *) (print_string t; flush stdout) else (* 2824 *) ()) s
diff --git a/src/evalClock.ml b/src/evalClock.ml
index 0fc2c730..d247016b 100644
--- a/src/evalClock.ml
+++ b/src/evalClock.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 15/09/2008 (at 15:37) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 17:08) by Erwan Jahier> *)
  
   
 open Predef
@@ -165,21 +165,6 @@ let (get_clock_profile : Eff.node_exp -> clock_profile) =
 let ci2str = LicDump.string_of_clock2
 
 
-let cpt_var_name = ref 0
-
-let (make_dummy_var: string -> Ident.t) =
-  fun str ->    
-    Ident.of_string (str ^  (string_of_int !cpt_var_name))
-
-let (make_dummy_clock: string -> Ident.clk) =
-  fun str ->
-    Ident.idref_of_string "True",
-    Ident.of_string (str ^  (string_of_int !cpt_var_name))
-
-(*   On(make_dummy_var "const",ClockVar (get_var_type ())) *)
-
-let concat_subst (s11,s12) (s21,s22) = (s11 @ s21, s12@s22) 
-
 (******************************************************************************)
 (* We tabulate the result of the Eff.val_exp clock ckecking. Note,
    that there is no clash in that table because all var_exp_eff are
@@ -226,6 +211,7 @@ let (get_val_exp_eff : Eff.val_exp -> Eff.id_clock list) =
 
 (******************************************************************************)
 (** Now we can go on and define [f].  *)
+let cpt_var_name = ref 0
 
 let rec (f : Eff.id_solver -> subst -> Eff.val_exp -> Eff.id_clock list * subst) =
   fun id_solver s ve ->
diff --git a/src/evalConst.ml b/src/evalConst.ml
index a3c02b04..3b790689 100644
--- a/src/evalConst.ml
+++ b/src/evalConst.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 04/09/2008 (at 14:22) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 17:14) by Erwan Jahier> *)
 
 
 open Printf 
@@ -142,8 +142,6 @@ let make_struct_const
   )
 
 
-let l2ll l = if l = [] then [] else [l]
-
 (*----------------------------------------------------
         Evaluation récursive des expressions constantes
 ------------------------------------------------------
diff --git a/src/ident.ml b/src/ident.ml
index 95487313..a5b2ebdc 100644
--- a/src/ident.ml
+++ b/src/ident.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 15/09/2008 (at 15:29) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 17:25) by Erwan Jahier> *)
 
 (* J'ai appele ca symbol (mais ca remplace le ident) :
 c'est juste une couche qui garantit l'unicite en memoire
@@ -71,10 +71,6 @@ let (string_of_long : long -> string) =
 let (long_to_string : long -> string) = 
   string_of_long
 
-let (short_string_of_long : long -> string) =
-  fun l -> (of_string (of_long l))
-
-
 let (make_long : pack_name -> t -> long) =
   fun pn id -> (pn,id)
 
@@ -84,12 +80,6 @@ let (set_dft_pack_name : pack_name -> unit) =
   fun pn -> 
     dft_pack_name := pn
 
-let (to_pack_name : t -> pack_name) =
-  fun x -> x
-
-
-
-
 
 
 (*  -> syntaxeTree.ml ? *)
diff --git a/src/ident.mli b/src/ident.mli
index 4c6454a4..974466ca 100644
--- a/src/ident.mli
+++ b/src/ident.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 15/09/2008 (at 15:28) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 17:55) by Erwan Jahier> *)
 
 
 type t
@@ -10,11 +10,9 @@ val of_string : string -> t
 
 val of_long : long -> t
 val pack_name_of_string : string -> pack_name
-val to_pack_name : t -> pack_name
 val pack_name_to_string : pack_name -> string
 val pack_of_long : long -> pack_name
 
-val short_string_of_long : long -> string
 val string_of_long : long -> string
 val long_to_string : long -> string
 val long_of_string : string -> long
diff --git a/src/main.ml b/src/main.ml
index 565e7bc0..542e9625 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 28/08/2008 (at 10:28) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 18:07) by Erwan Jahier> *)
 
 (** Here follows a description of the different modules used by this lus2lic compiler.
 
@@ -12,7 +12,6 @@
 which results into a parse tree containing raw source expressions.
 
    syntaxTree.ml  -> should rather be called rawSyntaxTab.ml ?
-   syntaxTreedump.ml
 
 (2) Then, we perform reference checking at module level + model expansion.
 
@@ -136,25 +135,6 @@ let lus_load lexbuf = (
     (Parser.sxLusFile Lexer.lexer lexbuf)
 ) 
 
-(* Dump d'un packbody *)
-let dump_body (pkg: SyntaxTree.packbody) = (
-  let os = Format.formatter_of_out_channel stdout in
-    SyntaxTreeDump.packbody os pkg      
-)
-
-(* Dump d'un name-space, pack ou modele ...  *)
-let dump_ns (ns: SyntaxTree.pack_or_model) = (
-  let os = Format.formatter_of_out_channel stdout in
-    match ns with
-        NSPack pf -> (
-          (* Verbose.printf (lazy ("DUMP PACKDEF\n")); *)
-          SyntaxTreeDump.packinfo os pf
-        ) 
-      | NSModel mf -> (
-          (* Verbose.printf (lazy ("DUMP MODDEF\n")); *)
-          SyntaxTreeDump.modelinfo os mf
-        ) 
-)
 
   (*
     Lance le parser et renvoie la liste name-spaces d'entrée.   
@@ -227,7 +207,8 @@ let main = (
   (* Compile.init_appli () ; *)
   parse_args ();
   if !Global.run_unit_test then (
-    UnifyType.unit_test ()
+    UnifyType.unit_test ();
+    exit 0
   );
   if (!Global.infiles = []) then (
     Arg.usage arg_list usage_msg ;
diff --git a/src/symbolTab.ml b/src/symbolTab.ml
index bd529f69..76973ac0 100644
--- a/src/symbolTab.ml
+++ b/src/symbolTab.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 21/08/2008 (at 15:46) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 18:09) by Erwan Jahier> *)
 
 (*
 Sous-module pour SyntaxTab 
@@ -108,45 +108,3 @@ let iter_nodes  this f = Hashtbl.iter f this.st_nodes
 (* let iter_consts2 this f = Hashtbl.iter f this.st_consts *)
 
 
-(* useful for debug *)
-let (dump : t -> unit) =
-  fun x ->
-    let const_info_dump = function 
-      | pn, Imported(l,_) -> print_string (Ident.long_to_string l)
-      | pn, Local(x) -> (match x.it with
-		       | ExternalConst (id,texp,vopt) -> print_string "extern"
-		       | EnumConst (id,texp) -> print_string "enum"
-		       | DefinedConst (id,texp,vexp) -> 
-			   SyntaxTreeDump.dump_val_exp Format.std_formatter vexp;
-			   Format.print_flush ()
-		    )
-    in
-    let type_info_dump =  function 
-      | pn, Imported(l,params) -> print_string (Ident.long_to_string l)
-      | pn, Local ti -> 
-	  match ti.it with
-	    | ExternalType id -> print_string ("extern type ")
-	    | AliasedType(id,texp)  -> 
-		print_string "an alias on ";
-		SyntaxTreeDump.dump_type_exp Format.std_formatter texp;
-		Format.print_flush ()
-	    | EnumType (id,_)  -> print_string ("an enum " ^ (Ident.to_string id))
-	    | StructType   si  -> print_string ("a structure " )
-	    | ArrayType(id,_,_)  -> print_string ("an array " ^ (Ident.to_string id))
-    in
-    let node_info_dump =  function 
-      | Imported(l,params) -> print_string ((Ident.long_to_string l) ^ " (extern)")
-      | Local ni -> print_string ((Ident.to_string ni.it.name) ^ " (local)")
-    in
-    let htbl_dump label i2s tbl =
-      print_string label;
-      Hashtbl.iter 
-	(fun id info -> 
-	   print_string ("\n  - " ^ Ident.to_string id ^" -> ");
-	   i2s info)
-	tbl
-    in
-      htbl_dump "\nconstants: " const_info_dump x.st_consts;
-      htbl_dump "\ntypes: " type_info_dump x.st_types;
-      htbl_dump "\nnodes: " node_info_dump x.st_nodes
-
diff --git a/src/symbolTab.mli b/src/symbolTab.mli
index f18129cc..d3b184ad 100644
--- a/src/symbolTab.mli
+++ b/src/symbolTab.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 21/08/2008 (at 15:45) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 18:09) by Erwan Jahier> *)
 
 (**********************************************************
 Sous-module pour SyntaxTab 
@@ -27,7 +27,6 @@ type 'a elt =
 type t
 
 val create : unit -> t
-val dump : t -> unit
 
 (* Manip de SymbolTab.t *)
 
diff --git a/src/test/Makefile b/src/test/Makefile
index 78eb1ad3..32ca6e2d 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -38,12 +38,15 @@ xxx:
 	done
 
 unit:
-	$(LC0) -unit -h
+	$(LC0) -unit
+
+help:
+	$(LC0) -help
 
 toto:	
 	$(LC2) toto.lus -o toto.lic | $(filter_line)
 
-test: unit
+test: unit help
 	echo "Non-regression tests" > test_ok.res
 	echo "Those tests are supposed to generate errors" > test_ko.res
 	for d in ${OK_LUS}; do \
diff --git a/src/unifyType.ml b/src/unifyType.ml
index 1c05dd75..51785ad8 100644
--- a/src/unifyType.ml
+++ b/src/unifyType.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 28/08/2008 (at 17:26) by Erwan Jahier> *)
+(** Time-stamp: <modified the 15/09/2008 (at 18:14) by Erwan Jahier> *)
 
 open Eff
 
@@ -156,7 +156,7 @@ let unit_test () =
   Random.self_init ();
   for i = 1 to 1000 do
     let (tl1, tl2) = gen_unifiable_typeff_of_size (1+ Random.int 10) in
-      print_string (
+      Verbose.print_string ~level:3 (
 	" ==> try UnifyType.proposition1 with lists " ^ 
 	  (LicDump.type_eff_list_to_string tl1) ^ " and " ^ 
 	  (LicDump.type_eff_list_to_string tl2) ^ "\n");
diff --git a/src/untested_line_counter b/src/untested_line_counter
new file mode 100644
index 00000000..0c50dfe6
--- /dev/null
+++ b/src/untested_line_counter
@@ -0,0 +1 @@
+  409  4185 32814 dead.grep
-- 
GitLab