Commit 74c46a98 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

lurette 0.59 Mon, 22 Apr 2002 14:40:46 +0200 by jahier

Parent-Version:      0.58
Version-Log:

Change the env parser so that :
1) lists can end with a semi-column
2) We can deal with dynamic weigths (for loops). The support
for handling them is not written yet tough.

Project-Description: Lurette
parent 03ffa20e
;; This file is automatically generated, editing may cause PRCS to do
;; REALLY bad things.
(Created-By-Prcs-Version 1 3 3)
(test/usager.env 473 1017843266 b/14_usager.env 1.6)
(test/usager.env 523 1019479246 b/14_usager.env 1.7)
(source/command_line_ima_exe.mli 989 1016127950 b/34_command_li 1.1)
(doc/ocamldoc.sty 1380 1008328137 b/12_ocamldoc.s 1.1)
(source/env_state.ml 9471 1017750312 51_env_state. 1.16)
......@@ -19,7 +19,7 @@
(make_lurette 1250 1019207707 27_make_luret 1.10)
(test/vrai_tram.lus 453 1007379917 b/6_vrai_tram. 1.1)
(lurette.dep.dot 49 1007651448 b/4_lurette.de 1.2)
(test/passerelle.env 952 1017843266 b/17_passerelle 1.5)
(test/passerelle.env 1105 1019479246 b/17_passerelle 1.6)
(doc/archi.fig 3693 1003928781 20_archi.fig 1.1)
(source/rnumsolver.ml 10783 1017837703 b/27_rnumsolver 1.6)
(ID_EN_VRAC 2184 1002196285 0_ID_EN_VRAC 1.1)
......@@ -29,7 +29,7 @@
(doc/automata_format 0 1007379917 b/3_automata_f 1.1)
(source/eval.ml 7749 1016803757 49_eval.ml 1.12)
(source/gen_stubs.ml 35799 1019207707 24_generate_l 1.22)
(source/parse_env.ml 16928 1017843266 41_parse_env. 1.15)
(source/parse_env.ml 18273 1019479246 41_parse_env. 1.16)
(interface/TAGS 1956 1007380262 26_TAGS 1.3)
(doc/ocamldoc.hva 313 1008328137 b/13_ocamldoc.h 1.1)
(source/sim2chro.ml 2680 1017929190 b/24_sim2chro.m 1.7)
......@@ -39,7 +39,7 @@
(test/Makefile_ima_exe 163 1019207707 b/35_Makefile_i 1.4)
(source/command_line.mli 1421 1017929190 b/21_command_li 1.6)
(source/wtree.mli 2340 1016011748 b/0_wtree.mli 1.7)
(test/porte.env 977 1017843266 b/16_porte.env 1.5)
(test/porte.env 1130 1019479246 b/16_porte.env 1.6)
(source/env_state.mli 5168 1017750312 50_env_state. 1.15)
(source/rnumsolver.mli 1764 1017335442 b/26_rnumsolver 1.3)
(source/ima_exe.mli 447 1016127950 b/31_ima_exe.ml 1.1)
......@@ -49,7 +49,7 @@
(OcamlMakefile 19151 1019207707 17_OcamlMakef 1.26)
(source/command_line_ima_exe.ml 2400 1016803757 b/33_command_li 1.2)
(test/ControleurPorte.rif.exp 4746 1016803757 b/29_Controleur 1.4)
(test/tram.env 1019 1017843266 b/15_tram.env 1.5)
(test/tram.env 1149 1019479246 b/15_tram.env 1.6)
(Makefile.lurette 1848 1019207707 b/38_Makefile.l 1.1)
(source/show_env.ml 2971 1017750312 43_show_env.m 1.4)
(source/gne.mli 1107 1016803757 b/36_gne.mli 1.1)
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 58)
(Parent-Version lurette 0 57)
(Project-Version lurette 0 59)
(Parent-Version lurette 0 58)
(Version-Log "
Clean up Makefiles for lurette and ima_exe.
Change the env parser so that :
1) lists can end with a semi-column
2) We can deal with dynamic weigths (for loops). The support
for handling them is not written yet tough.
Make sure that gen_stubs does not recompile the fake oracle
(always_true.lus) if it is not necessary.
")
(New-Version-Log "")
(Checkin-Time "Fri, 19 Apr 2002 11:15:07 +0200")
(Checkin-Time "Mon, 22 Apr 2002 14:40:46 +0200")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -50,7 +51,7 @@ Make sure that gen_stubs does not recompile the fake oracle
(source/rnumsolver.ml (lurette/b/27_rnumsolver 1.6 644))
(source/parse_env.mli (lurette/40_parse_env. 1.6 644))
(source/parse_env.ml (lurette/41_parse_env. 1.15 644))
(source/parse_env.ml (lurette/41_parse_env. 1.16 644))
(source/show_env.mli (lurette/42_show_env.m 1.5 644))
(source/show_env.ml (lurette/43_show_env.m 1.4 644))
......@@ -109,10 +110,10 @@ Make sure that gen_stubs does not recompile the fake oracle
;; Various files used for testing purposes
(test/usager.env (lurette/b/14_usager.env 1.6 644))
(test/tram.env (lurette/b/15_tram.env 1.5 644))
(test/porte.env (lurette/b/16_porte.env 1.5 644))
(test/passerelle.env (lurette/b/17_passerelle 1.5 644))
(test/usager.env (lurette/b/14_usager.env 1.7 644))
(test/tram.env (lurette/b/15_tram.env 1.6 644))
(test/porte.env (lurette/b/16_porte.env 1.6 644))
(test/passerelle.env (lurette/b/17_passerelle 1.6 644))
(test/ControleurPorte.h (lurette/b/18_Controleur 1.1 644))
(test/ControleurPorte.c (lurette/b/19_Controleur 1.1 644))
......
......@@ -92,16 +92,29 @@ and (parse_list_var_tail: (aut_token -> 'a) -> aut_token -> 'a list) =
and (parse_list_var_tail2: (aut_token -> 'a) -> aut_token -> 'a list) =
fun parse tok ->
(* This function is introduced to allow lists to be ended by a `;' *)
(* This function is introduced to allow lists to be ended by a `;'... *)
let tok_list = Stream.npeek 10 tok in
try
match tok with parser
| [< 'Genlex.Kwd ";"; _ = (parse_list_var_tail3 (parse)) >] -> []
| [< 'Genlex.Kwd "," >] -> []
| [< 'Genlex.Kwd "." >] -> []
| [< a = parse ; tail = (parse_list_var_tail (parse)) >]
-> a :: tail
with e ->
print_err_msg tok_list "parse_list_var_tail2";
raise e
and (parse_list_var_tail3: (aut_token -> 'a) -> aut_token -> 'a list) =
fun parse tok ->
(* This function is also introduced to allow lists to be ended by a `;'... *)
let tok_list = Stream.npeek 10 tok in
try
match tok with parser
| [< 'Genlex.Kwd "." >] -> []
| [< 'Genlex.Kwd "," >] -> []
with e ->
print_err_msg tok_list "parse_list_var_tail3";
raise e
(** Parsing pragmas *)
......@@ -292,7 +305,8 @@ and (parse_arc: vnt list -> aut_token -> read_arc) =
match tok with parser
[< 'Genlex.Ident "From"; 'Genlex.Int node_from ;
'Genlex.Ident "To"; 'Genlex.Int node_to ;
'Genlex.Ident "With"; arc_info = parse_arc_info vars >]
'Genlex.Ident "With"; arc_info = parse_arc_info vars
>]
-> Arc(node_from, arc_info, node_to)
with e ->
print_err_msg tok_list "parse_arc" ;
......@@ -302,11 +316,39 @@ and (parse_arc_info: vnt list -> aut_token -> arc_info) =
let tok_list = Stream.npeek 10 tok in
try
match tok with parser
[< 'Genlex.Int weigth ; 'Genlex.Ident ":"; expr = parse_formula_eps vars >]
[< weigth = (parse_weigth vars) ; 'Genlex.Ident ":";
expr = parse_formula_eps vars ; 'Genlex.Ident ":";
cpt_init = (parse_cpt_init vars)
>]
-> (weigth, expr)
with e ->
print_err_msg tok_list "parse_arc_info" ;
raise e
and (parse_weigth: vnt list -> aut_token -> int) =
fun vars tok ->
let tok_list = Stream.npeek 10 tok in
try
match tok with parser
[< 'Genlex.Int w >] -> w
| [< 'Genlex.Ident "dyn" >] -> -1
with e ->
print_err_msg tok_list "parse_weigth" ;
raise e
and (parse_cpt_init: vnt list -> aut_token -> 'a list) =
fun vars tok ->
let tok_list = Stream.npeek 10 tok in
try
match tok with parser
[< 'Genlex.Ident "no_loop" >] -> []
| [< 'Genlex.Ident "loop" ; 'Genlex.Int i>] -> []
| [< 'Genlex.Ident "loop_betwenn" ; 'Genlex.Int i ; 'Genlex.Int i>] -> []
| [< 'Genlex.Ident "loop_gauss" ; 'Genlex.Float i ; 'Genlex.Float i>] -> []
with e ->
print_err_msg tok_list "parse_cpt_init" ;
raise e
and (parse_formula_eps: vnt list -> aut_token -> formula_eps) =
fun vars tok ->
......
......@@ -14,19 +14,19 @@ start_node = 0,
arcs_nb = 0,
nodes_nb = 0,
arcs =
From 0 To 1 With 1: (! pass_rentree && ! pass_baissee );
From 1 To 2 With 1: eps;
From 2 To 3 With 1: eps;
From 3 To 2 With 1: (! pass_baissee && ! pass_rentree && ! baisser_pass && ! rentrer_pass);
From 2 To 4 With 1: eps;
From 4 To 5 With 1: eps;
From 5 To 6 With 1: eps;
From 6 To 5 With 1: (! pass_baissee && ! pass_rentree && baisser_pass);
From 5 To 7 With 1: eps;
From 7 To 1 With 1: (! pass_rentree && pass_baissee);
From 4 To 8 With 1: eps;
From 8 To 9 With 1: eps;
From 9 To 8 With 1: (! pass_baissee && ! pass_rentree && rentrer_pass);
From 8 To 10 With 1: eps;
From 10 To 1 With 1: (pass_rentree && ! pass_baissee)
From 0 To 1 With 1: (! pass_rentree && ! pass_baissee ) : no_loop;
From 1 To 2 With 1: eps : no_loop;
From 2 To 3 With 1: eps : no_loop;
From 3 To 2 With 1: (! pass_baissee && ! pass_rentree && ! baisser_pass && ! rentrer_pass) : no_loop;
From 2 To 4 With 1: eps : no_loop;
From 4 To 5 With 1: eps : no_loop;
From 5 To 6 With 1: eps : no_loop;
From 6 To 5 With 1: (! pass_baissee && ! pass_rentree && baisser_pass) : no_loop;
From 5 To 7 With 1: eps : no_loop;
From 7 To 1 With 1: (! pass_rentree && pass_baissee) : no_loop;
From 4 To 8 With 1: eps : no_loop;
From 8 To 9 With 1: eps : no_loop;
From 9 To 8 With 1: (! pass_baissee && ! pass_rentree && rentrer_pass) : no_loop;
From 8 To 10 With 1: eps : no_loop;
From 10 To 1 With 1: (pass_rentree && ! pass_baissee) : no_loop
.
......@@ -3,7 +3,7 @@ inputs = (baisser_pass,bool);
(rentrer_pass,bool);
(ouvrir_porte,bool);
(fermer_porte,bool);
(porte_et_pass_ok,bool),
(porte_et_pass_ok,bool);,
outputs = (porte_ouverte,bool);
(porte_fermee,bool),
......@@ -15,19 +15,19 @@ start_node = 0,
arcs_nb = 0,
nodes_nb = 0,
arcs =
From 0 To 1 With 1 : ! porte_fermee && ! porte_ouverte ;
From 1 To 2 With 1 : eps ;
From 2 To 3 With 1 : eps ;
From 3 To 2 With 1 : ! porte_ouverte && ! porte_fermee && ! ouvrir_porte && ! fermer_porte ;
From 2 To 4 With 1 : eps ;
From 4 To 5 With 1 : eps ;
From 5 To 6 With 1 : eps ;
From 6 To 5 With 1 : ! porte_ouverte && ! porte_fermee && ouvrir_porte ;
From 5 To 7 With 1 : eps ;
From 7 To 1 With 1 : ! porte_fermee && porte_ouverte ;
From 4 To 8 With 1 : eps ;
From 8 To 9 With 1 : eps ;
From 9 To 8 With 1 : ! porte_ouverte && ! porte_fermee && fermer_porte ;
From 8 To 10 With 1 : eps ;
From 10 To 1 With 1 : porte_fermee && ! porte_ouverte
From 0 To 1 With 1 : ! porte_fermee && ! porte_ouverte : no_loop;
From 1 To 2 With 1 : eps : no_loop;
From 2 To 3 With 1 : eps : no_loop;
From 3 To 2 With 1 : ! porte_ouverte && ! porte_fermee && ! ouvrir_porte && ! fermer_porte : no_loop;
From 2 To 4 With 1 : eps : no_loop;
From 4 To 5 With 1 : eps : no_loop;
From 5 To 6 With 1 : eps : no_loop;
From 6 To 5 With 1 : ! porte_ouverte && ! porte_fermee && ouvrir_porte : no_loop;
From 5 To 7 With 1 : eps : no_loop;
From 7 To 1 With 1 : ! porte_fermee && porte_ouverte : no_loop;
From 4 To 8 With 1 : eps : no_loop;
From 8 To 9 With 1 : eps : no_loop;
From 9 To 8 With 1 : ! porte_ouverte && ! porte_fermee && fermer_porte : no_loop;
From 8 To 10 With 1 : eps : no_loop;
From 10 To 1 With 1 : porte_fermee && ! porte_ouverte : no_loop
.
......@@ -15,17 +15,17 @@ start_node = 0,
arcs_nb = 0,
nodes_nb = 0,
arcs =
From 0 To 1 With 1:eps;
From 1 To 2 With 1:eps;
From 2 To 1 With 1:(en_marche && ! debut_ramassage && ! fin_ramassage);
From 1 To 3 With 1:eps;
From 3 To 4 With 1:(! fin_ramassage && debut_ramassage && ! en_marche);
From 4 To 5 With 1:eps;
From 5 To 4 With 1:(! fin_ramassage && ! debut_ramassage && ! en_marche);
From 4 To 6 With 1:eps;
From 6 To 7 With 1:(fin_ramassage && ! debut_ramassage && ! en_marche);
From 7 To 8 With 1:eps;
From 8 To 7 With 1:(! fin_ramassage && ! debut_ramassage && ! en_marche && ! porte_et_pass_ok);
From 7 To 9 With 1:eps;
From 9 To 0 With 1:(! fin_ramassage && ! debut_ramassage && en_marche && porte_et_pass_ok)
From 0 To 1 With 1:eps : no_loop;
From 1 To 2 With 1:eps : no_loop;
From 2 To 1 With 1:(en_marche && ! debut_ramassage && ! fin_ramassage) : no_loop;
From 1 To 3 With 1:eps : no_loop;
From 3 To 4 With 1:(! fin_ramassage && debut_ramassage && ! en_marche) : no_loop;
From 4 To 5 With 1:eps : no_loop;
From 5 To 4 With 1:(! fin_ramassage && ! debut_ramassage && ! en_marche) : no_loop;
From 4 To 6 With 1:eps : no_loop;
From 6 To 7 With 1:(fin_ramassage && ! debut_ramassage && ! en_marche) : no_loop;
From 7 To 8 With 1:eps : no_loop;
From 8 To 7 With 1:(! fin_ramassage && ! debut_ramassage && ! en_marche && ! porte_et_pass_ok) : no_loop;
From 7 To 9 With 1:eps : no_loop;
From 9 To 0 With 1:(! fin_ramassage && ! debut_ramassage && en_marche && porte_et_pass_ok) : no_loop
.
......@@ -10,9 +10,9 @@ start_node = 0,
arcs_nb = 0,
nodes_nb = 0,
arcs =
From 0 To 1 With 1: eps;
From 1 To 2 With 1: eps;
From 2 To 0 With 1: demande_porte || demande_pass;
From 1 To 3 With 1: eps ;
From 3 To 0 With 1: (! demande_porte) || (! demande_pass)
From 0 To 1 With 1: eps : no_loop;
From 1 To 2 With 1: eps : no_loop;
From 2 To 0 With 1: demande_porte || demande_pass : no_loop;
From 1 To 3 With 1: eps : no_loop;
From 3 To 0 With 1: (! demande_porte) || (! demande_pass) : no_loop
.
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