Commit 662e3694 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

lurette 0.56 Wed, 03 Apr 2002 16:14:26 +0200 by jahier

Parent-Version:      0.55
Version-Log:

Change the env format sligthly again :
 - adds the arcs and node numbers.
 - allows lists to end by a ;
 - add xor's

Project-Description: Lurette
parent f570cc25
;; This file is automatically generated, editing may cause PRCS to do
;; REALLY bad things.
(Created-By-Prcs-Version 1 3 3)
(test/usager.env 446 1017156165 b/14_usager.env 1.5)
(test/usager.env 473 1017843266 b/14_usager.env 1.6)
(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 1149 1017335442 27_make_luret 1.8)
(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 925 1017156165 b/17_passerelle 1.4)
(test/passerelle.env 952 1017843266 b/17_passerelle 1.5)
(doc/archi.fig 3693 1003928781 20_archi.fig 1.1)
(source/rnumsolver.ml 10783 1017837703 b/27_rnumsolver 1.6)
(source/parse_env.mli 907 1016127950 40_parse_env. 1.6)
......@@ -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 35425 1017335442 24_generate_l 1.21)
(source/parse_env.ml 16114 1017837703 41_parse_env. 1.14)
(source/parse_env.ml 16928 1017843266 41_parse_env. 1.15)
(interface/TAGS 1956 1007380262 26_TAGS 1.3)
(source/sim2chro.ml 2663 1016803757 b/24_sim2chro.m 1.6)
(doc/Interface_draft 5232 1003928781 19_Interface_ 1.1)
......@@ -39,7 +39,7 @@
(test/Makefile_ima_exe 1625 1017750312 b/35_Makefile_i 1.3)
(source/command_line.mli 1384 1017396284 b/21_command_li 1.5)
(source/wtree.mli 2340 1016011748 b/0_wtree.mli 1.7)
(test/porte.env 950 1017156165 b/16_porte.env 1.4)
(test/porte.env 977 1017843266 b/16_porte.env 1.5)
(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 19265 1017396284 17_OcamlMakef 1.25)
(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 990 1017156165 b/15_tram.env 1.4)
(test/tram.env 1019 1017843266 b/15_tram.env 1.5)
(source/show_env.ml 2971 1017750312 43_show_env.m 1.4)
(source/gne.mli 1107 1016803757 b/36_gne.mli 1.1)
(doc/synthese 2556 1007379917 b/2_synthese 1.1)
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 55)
(Parent-Version lurette 0 54)
(Project-Version lurette 0 56)
(Parent-Version lurette 0 55)
(Version-Log "
Allow equalities between formula by translating [A = B] into
[Or(And(A,B), And(Not(A), Not(B)))].
Fix a bug where lurette had a bad behaviour whenever a toss
was performed on a domain which size was bigger than max_int
or max_float.
Fix a bug where lurette was not handling env with both boolean and
numerical as output vars. Also add a few comments in solver.ml along
the way.
Adds a local bool as an output of heater in order to test the fix
above.
Change the env format sligthly again :
- adds the arcs and node numbers.
- allows lists to end by a ;
- add xor's
")
(New-Version-Log "")
(Checkin-Time "Wed, 03 Apr 2002 14:41:43 +0200")
(Checkin-Time "Wed, 03 Apr 2002 16:14:26 +0200")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -58,7 +50,7 @@ above.
(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.14 644))
(source/parse_env.ml (lurette/41_parse_env. 1.15 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 +101,10 @@ above.
;; Various files used for testing purposes
(test/usager.env (lurette/b/14_usager.env 1.5 644))
(test/tram.env (lurette/b/15_tram.env 1.4 644))
(test/porte.env (lurette/b/16_porte.env 1.4 644))
(test/passerelle.env (lurette/b/17_passerelle 1.4 644))
(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/ControleurPorte.h (lurette/b/18_Controleur 1.1 644))
(test/ControleurPorte.c (lurette/b/19_Controleur 1.1 644))
......
......@@ -26,7 +26,7 @@ type read_automata = Automata of
(* Keywords of the automata format *)
let lexer = Genlex.make_lexer ["("; ")"; ","; ";"; ".";
"&&"; "||"; "!"; "true"; "false";
"&&"; "||"; "#"; "!"; "true"; "false";
"IfThenElseExpr";"IfThenElse";
"="; ">"; ">="; "<"; "<=";
"+"; "-"; "*"; "/"; "mod"; "%"]
......@@ -67,6 +67,7 @@ let rec
let tok_list = Stream.npeek 10 tok in
try
match tok with parser
| [< 'Genlex.Kwd ";"; 'Genlex.Kwd "," >] -> [] (* empty list *)
| [< 'Genlex.Kwd "," >] -> [] (* empty list *)
| [< 'Genlex.Kwd "." >] -> [] (* empty list *)
| [< 'Genlex.Kwd "%" >] -> [] (* empty list *)
......@@ -83,13 +84,25 @@ and (parse_list_var_tail: (aut_token -> 'a) -> aut_token -> 'a list) =
| [< 'Genlex.Kwd "," >] -> [] (* end of the list *)
| [< 'Genlex.Kwd "." >] -> [] (* end of the list *)
| [< 'Genlex.Kwd "%" >] -> [] (* end of the list *)
| [< 'Genlex.Kwd ";" ; a = parse ;
tail = (parse_list_var_tail (parse)) >]
-> a :: tail
| [< 'Genlex.Kwd ";" ; tail = (parse_list_var_tail2 (parse)) >]
-> tail
with e ->
print_err_msg tok_list "parse_list_var_tail";
raise e
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 `;' *)
let tok_list = Stream.npeek 10 tok in
try
match tok with parser
| [< '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
(** Parsing pragmas *)
......@@ -132,6 +145,10 @@ let rec (parse_automata: aut_token -> read_automata) =
'Genlex.Ident "pre"; 'Genlex.Kwd "="; lpre = parse_list_prevar ;
'Genlex.Ident "start_node"; 'Genlex.Kwd "="; 'Genlex.Int node_id ;
'Genlex.Kwd "," ;
'Genlex.Ident "arcs_nb"; 'Genlex.Kwd "="; 'Genlex.Int arcs_nb ;
'Genlex.Kwd "," ;
'Genlex.Ident "nodes_nb"; 'Genlex.Kwd "="; 'Genlex.Int nodes_nb ;
'Genlex.Kwd "," ;
'Genlex.Ident "arcs"; 'Genlex.Kwd "="; la = parse_list_arc
(List.append li (List.append lo (List.append ll lpre)))
>]
......@@ -380,7 +397,9 @@ and (parse_more_formula: formula -> vnt list -> aut_token -> formula) =
[< 'Genlex.Kwd "||"; pl = parse_pragma_list ;
f2 = parse_formula vars >] -> Or(f1, f2)
| [< 'Genlex.Kwd "&&"; pl = parse_pragma_list ;
f2 = parse_formula vars >] -> And(f1, f2)
f2 = parse_formula vars >] -> And(f1, f2)
| [< 'Genlex.Kwd "#"; pl = parse_pragma_list ;
f2 = parse_formula vars >] -> And(Or(f1, f2), Not(And(f1, f2))) (* xor *)
| [< 'Genlex.Kwd "="; pl = parse_pragma_list ;
f2 = parse_formula vars >] -> Or(And(f1, f2), And(Not(f1), Not(f2)))
| [< >] -> f1
......
......@@ -11,6 +11,8 @@ outputs =
locals = ,
pre = ,
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;
......
......@@ -12,6 +12,8 @@ locals = ,
pre = ,
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 ;
......
......@@ -3,15 +3,17 @@ inputs = (baisser_pass,bool);
(rentrer_pass,bool);
(ouvrir_porte,bool);
(fermer_porte,bool);
(porte_et_pass_ok,bool)
(porte_et_pass_ok,bool);
,
outputs = (en_marche,bool);
(debut_ramassage,bool);
(fin_ramassage,bool)
,
locals = ,
pre = ,
pre = ;,
start_node = 0,
arcs_nb = 0,
nodes_nb = 0,
arcs =
From 0 To 1 With 1:eps;
From 1 To 2 With 1:eps;
......
......@@ -7,6 +7,8 @@ outputs = (demande_pass,bool);(demande_porte,bool),
locals = ,
pre = ,
start_node = 0,
arcs_nb = 0,
nodes_nb = 0,
arcs =
From 0 To 1 With 1: eps;
From 1 To 2 With 1: eps;
......
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