Commit 189430ac authored by Erwan Jahier's avatar Erwan Jahier
Browse files

lurette 0.43 Wed, 13 Mar 2002 10:57:11 +0100 by jahier

Parent-Version:      0.42
Version-Log:

Checks that nodes in .env files are contiguous as the code suppose they are.

Also cleanup a little bit the code in env.ml as (I was reinventing map ...)

Project-Description: Lurette
parent 46927269
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 42)
(Parent-Version lurette 0 41)
(Version-Log "
Make sure that n formula are drawn when even numeric failure occurs.
To do that, I recursively call draw_n_p_formula until the required
number of outputs have been generated.
Also fix a bug where my code was not handling cases where several
formulas corresponding to the same origin and target nodes (Lutin
probably won't generate such arcs explicitely, but it does
implicitely via epsilon transitions). The fix consist in adding
formula in wtree types instead of maintaining a table of formula
indexed by node list pairs. The env_state.formula_table is thus no
longer needed.
(Project-Version lurette 0 43)
(Parent-Version lurette 0 42)
(Version-Log "
Checks that nodes in .env files are contiguous as the code suppose they are.
Also cleanup a little bit the code in env.ml as (I was reinventing map ...)
")
(New-Version-Log "")
(Checkin-Time "Wed, 13 Mar 2002 10:29:08 +0100")
(Checkin-Time "Wed, 13 Mar 2002 10:57:11 +0100")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -38,7 +27,7 @@ longer needed.
(source/graph.ml (lurette/14_graph.ml 1.5 644))
(source/env.mli (lurette/15_env.mli 1.9 644))
(source/env.ml (lurette/16_env.ml 1.18 644))
(source/env.ml (lurette/16_env.ml 1.19 644))
(source/util.ml (lurette/35_util.ml 1.14 644))
......@@ -117,7 +106,7 @@ longer needed.
(test/tram_simple.h (lurette/b/25_tram_simpl 1.1 644))
(test/heater_int.rif.exp (lurette/b/28_heater_int 1.1 644))
(test/ControleurPorte.rif.exp (lurette/b/29_Controleur 1.2 644))
(test/ControleurPorte.rif.exp (lurette/b/29_Controleur 1.3 644))
(test/heater_float.rif.exp (lurette/b/30_heater_flo 1.2 644))
......
......@@ -76,59 +76,47 @@ let (read_env_state_one_file : string -> node) =
env_state.graph
(node_from+node_nb)
arc_info
(node_to+node_nb))
(node_to+node_nb));
in
List.iter (add_arc) list_arcs ;
(* Sets the [node_to_file_name] field of [env_state]. *)
List.iter
(fun node ->
if Hashtbl.mem env_state.node_to_file_name node
then ()
else Hashtbl.add env_state.node_to_file_name node file
)
(Graph.get_all_nodes env_state.graph);
(* Sets the [var_names] and [pre_var_names] fields of [env_state]. *)
Hashtbl.add env_state.var_names file (list_in, list_out, list_loc) ;
List.iter
(fun vn -> env_state.pre_var_names <- (vn::env_state.pre_var_names))
list_pre_vn;
(init_node + node_nb)
(* Checks that there is no hole in the node numbers (which
would mean that the node number is not equal to the biggest node) *)
let new_node_nb = (List.length (Graph.get_all_nodes env_state.graph)) in
if (for_all
(fun arc ->
match arc with
Parse_env.Arc(node_from, arc_info, node_to) ->
( node_from >= new_node_nb ) || (node_to >= new_node_nb)
)
list_arcs)
then failwith "*** Bad env format. Node numbers should be contiguous.\n";
(* Sets the [node_to_file_name] field of [env_state]. *)
List.iter
(fun node ->
if Hashtbl.mem env_state.node_to_file_name node
then ()
else Hashtbl.add env_state.node_to_file_name node file
)
(Graph.get_all_nodes env_state.graph);
(* Sets the [var_names] and [pre_var_names] fields of [env_state]. *)
Hashtbl.add env_state.var_names file (list_in, list_out, list_loc) ;
List.iter
(fun vn -> env_state.pre_var_names <- (vn::env_state.pre_var_names))
list_pre_vn;
(init_node + node_nb)
let (read_env_state_list : string list -> node list) =
fun files ->
(** Calls [read_env_state_one_file] on a list of files. *)
let nodes =
List.fold_left
(fun nl0 file ->
let n = read_env_state_one_file file in
(n::nl0)
)
[]
files
in
(List.rev nodes)
(* Exported *)
let (read_env_state : string list list -> unit) =
fun files_ll ->
(** Calls [read_env_state_one_file] on a list of list of files. *)
let nodes =
List.fold_left
(fun nll0 files ->
let nl = read_env_state_list files in
(nl::nll0)
)
[]
files_ll
in
(* Sets the [current_nodes], and [wtree_table] fields
of [env_state]. *)
let nodes = map (map (read_env_state_one_file)) files_ll in
env_state.current_nodes <- nodes ;
env_state.wtree_table <- (Wtree.build_wtree_table env_state.graph)
......
......@@ -18,202 +18,202 @@ porte_et_pass_ok:bool
rentrer_pass:bool
@#
#step 1
f f t f t t t t t #outs
f f t t t t f f t #outs
#step 2
t f t t f f t f f #outs f t f f f
f t t f f f t f f #outs f t f f f
#step 3
t f t f t f t t f #outs t f f f f
f f t t t f t t f #outs f t f f f
#step 4
f t f f t f t f f #outs f t f f f
t t f f f f t f t #outs f t f f f
#step 5
f f t t f f f f f #outs f t f f f
f t f t f f t f f #outs f f t f f
#step 6
f t f t f f t t f #outs f t f f f
t f t f f f t t f #outs f f f f f
#step 7
f f f t f f t f f #outs f t f t f
f t f t f f t t f #outs f t f f f
#step 8
t f t t f f t t f #outs f t f f f
t f f t f f f t f #outs f t f t f
#step 9
f f t t t f f t t #outs f f t t f
f t f f t t t t f #outs f f t t f
#step 10
t t t t f f t f f #outs f f f t t
t t f f f f t t f #outs t f f t f
#step 11
t t f t f f f t t #outs f f f f f
t t f f t f f f f #outs f t f t f
#step 12
t t f f f f t f f #outs f t f t f
t f t f f f t f f #outs f t f f f
#step 13
f t f f t f t f f #outs f t f f f
t f t f f f f t f #outs f t f f f
#step 14
f f t t f f t t f #outs f t f f t
t f t f t f f t f #outs f t f t f
#step 15
f t f f t f t t f #outs f t f f f
f t f t f t t t f #outs f t f t f
#step 16
t f t f f f t t f #outs f t f f f
f f f f t t t t f #outs f t f f f
#step 17
t f t t f f t t f #outs f t f f f
t f t t f t t t f #outs f t f f f
#step 18
t t f f f f t f f #outs f t f f f
t t f t t f f t f #outs t f f f f
#step 19
f t f t f f t t f #outs f f t f f
f t t t t f f t f #outs f f f f f
#step 20
f t f f t t f t f #outs f t f f f
f t f t t f t t f #outs f f f f f
#step 21
t f f t f f t t f #outs f t f f f
f f t t f f t f t #outs f t f f f
#step 22
f f f t f f f t f #outs f t f f f
f t f t t f t f f #outs f t f f f
#step 23
f t f t f f t t t #outs f t f f f
f t f t f f f f f #outs f t f f t
#step 24
t t t f t f f f f #outs f f t t f
f f t t f f t f f #outs f t f f f
#step 25
f f t t t f f f f #outs f f f f t
f f t t f f t t f #outs f t f f f
#step 26
f t f t f f f f f #outs f f f f f
f f t t f f t t f #outs f t f f f
#step 27
f t t f f t f t f #outs f f f f f
f t f f t f t f f #outs f t f f f
#step 28
t f t t f t t t f #outs t f f t f
t t t f t f t f f #outs f t f f t
#step 29
f t t f t f f f f #outs f t f f f
t f t f t f t t f #outs f t f f t
#step 30
f f f f f f t t f #outs f t f f f
t t f f f t t f f #outs f t f f t
#step 31
t t f t t f t f f #outs f t f f f
t f t f f f f f f #outs f t f f f
#step 32
f t f t f f t t f #outs f t f f f
f t f t f f f f t #outs f t f f f
#step 33
f f f t t t f f f #outs f t f t f
f f t t t f t t f #outs f t f f f
#step 34
t t f t f f t t f #outs t f f f f
f f f t t t t t f #outs f t f t t
#step 35
t t t t t t t f f #outs f t t t f
f f t t f t t f f #outs t f f t f
#step 36
f f t t f f t f f #outs t f f f f
t t t t t f t t t #outs f t f f f
#step 37
f t t t t f f t f #outs f t f f f
t f f t f f t f f #outs f f t t t
#step 38
t f t t f f t f t #outs f t f t f
f f t f t f f t t #outs f f f f f
#step 39
f t f f f f f f f #outs f t f f f
f t t f f f t t f #outs f t f t t
#step 40
t t f f f f f f f #outs f t f f f
f f f t t f t f t #outs f t f t f
#step 41
t f f t f f t t f #outs f t f f f
f t t t t t f f f #outs f t f f f
#step 42
f t f t f f f f f #outs f t f f f
t f f t f f t t f #outs f t f f f
#step 43
f t f t t f t t f #outs f t f f f
t f t f f f t t f #outs f t f f f
#step 44
f f t t f f t f f #outs f t f t t
t t f t f f t t t #outs f t f f f
#step 45
f f t f f f t f f #outs f t f f f
f f t t f t t f f #outs f t f t f
#step 46
f t f f f f f t f #outs f t f f f
f f f f f f t t f #outs t f f f f
#step 47
f t f f f f t t f #outs f t f t f
f t f f t f f t f #outs f t f t f
#step 48
f f t t f t f t f #outs f t f t f
f t t f f t t f f #outs f t f t f
#step 49
f f t t f f t t f #outs f t f f f
t t f f t f t f f #outs t f f f f
#step 50
f f t t t f t f f #outs f t f f f
f f t f f f f f t #outs f t t f f
#step 51
t t f t t f t t f #outs f t f f t
t t t t t f t f f #outs f t f f f
#step 52
t f f f t f f f f #outs t f f f f
f f t t t f f f t #outs f t f f f
#step 53
t f t t t f f t t #outs f t f f f
f t t t f f t t t #outs f t f f f
#step 54
t t t f f f t t t #outs f t f f f
t f t f f t f t t #outs f t f f f
#step 55
t f t f f f f t t #outs f f t t f
f f t t t f t t f #outs f t f f f
#step 56
t f f t t f t f f #outs f f f t f
f f t f f f f f f #outs f t f f f
#step 57
t f t t f t f t f #outs f f f f f
f f t t t f t f f #outs f t f f f
#step 58
t t f f f f t t f #outs t f f f f
t t f f f f t t f #outs f t f f f
#step 59
t t t t t f f f f #outs f t f f f
t f t f f f f f f #outs f t f f f
#step 60
t t t t f f t f f #outs f t f f f
t t f t t f f f f #outs f t f f f
#step 61
f f f t t f f f f #outs f f t f f
f t f t t f t f f #outs f t f f f
#step 62
f f t f t f f f f #outs f t f f f
t f t f f t f t t #outs f t f f t
#step 63
t f t t f f f t f #outs f t f f f
f t t f t f t t t #outs t f t t t
#step 64
t f f f t f t f f #outs f t f f f
f t t f f t t t f #outs f t f t t
#step 65
f f t t t f f f t #outs f t f f f
t f t t f t t t f #outs t f f t f
#step 66
f t f t f f f t t #outs f t f f f
f t f t t f t t f #outs f t f f f
#step 67
f t t t t f t f t #outs f t f t f
f f t t f f t t t #outs f t f f f
#step 68
t t f t t f t t f #outs f t f f t
f f t t t t f t f #outs f t f f f
#step 69
t f t t f t f t f #outs f f t t t
f f f f t t f f f #outs f t f f t
#step 70
f t t t t f f t f #outs t f f t f
t f t f t f t f f #outs f t f f t
#step 71
t f f t f f t f f #outs f f f t f
f f t t t f t t f #outs t f f f f
#step 72
t f t t t t f f f #outs f t f f f
t f f f f f f t f #outs f t f f f
#step 73
f f f t t f f f t #outs t f f f f
f f t f f t f t f #outs f t f f f
#step 74
t f f t t t f t f #outs f f f f t
t t t f t f f t t #outs t f f f f
#step 75
t t t t t f t f t #outs t f f t f
t t f f f f f t f #outs f f f f t
#step 76
f t t t t f f f f #outs f f f f t
f f t f f f f t f #outs f f f f f
#step 77
f f t f t f t f f #outs f f f f t
f f f t t f t f f #outs f f f f f
#step 78
f f t t t t t f f #outs f f f f t
f t t t f f t f f #outs f t f f f
#step 79
f t f t f f f t t #outs f f f f f
t t t t f f t t t #outs f t f f f
#step 80
t f t f f t t t f #outs f f f t f
f f t t t t t f f #outs f f t t f
#step 81
f t t t t f t t f #outs t t t t f
f t f f t f t t t #outs t f f f f
#step 82
t t t t t f t t f #outs f t f f f
f t t f f f t t f #outs f t f t t
#step 83
t t f t f t t t f #outs f t f f f
f t t f f f f f f #outs f t f t f
#step 84
t f f t f f t t t #outs f t f f f
t t f t f f t f f #outs f t f f f
#step 85
t f f f t f f t f #outs f t f f f
t f f t f f t t f #outs f t f f f
#step 86
t f f f f f f t t #outs f t f f f
f t t t t f t f f #outs f t f f f
#step 87
f f t t t f f f f #outs f t f f f
f t t t f f f t f #outs f t f f f
#step 88
t t t t f t t f f #outs f t f f f
t f t t t f t f f #outs f t f f f
#step 89
f f t t t f t t f #outs t f t f f
t t t t t f t t f #outs f t f f f
#step 90
f t t t t t t t f #outs f t f t f
f f f f f t t f f #outs f t f f f
#step 91
f f f t f t t t f #outs t f f t f
f f t f f t f f t #outs f t f f f
#step 92
f f t f f f f t f #outs f t f t f
f f t t f f t t t #outs f t f f f
#step 93
t f t f t f t t f #outs f t f t f
t t t f t f t f f #outs f t f f f
#step 94
t f t t f f f f t #outs f t f t f
t f f t f f t t f #outs t f f f f
#step 95
t t t t f f f t f #outs f t f f f
f t t t t t t f f #outs f t f f f
#step 96
t f f f f t t t f #outs f f t t f
f t f f f f t t f #outs f t f f f
#step 97
t t t t t f t t f #outs t f f t f
t t t t f f t t f #outs f t f f f
#step 98
f t f t f f t f f #outs f t f f f
f f t t f f t t f #outs f f t t f
#step 99
t t f t t f f t f #outs f t f f f
f t f f t f t f f #outs f t f t f
#step 100
f f f t t f f t f #outs f f t t f
f t f f f f f t f #outs f t f f f
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment