Skip to content
Snippets Groups Projects
Commit 17724545 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Fix a bug in the -lv4 mode where constant coming from enum types were printed twice.

parent cb891dc4
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,8 @@ let rec (type_to_string : t -> string) = ...@@ -48,7 +48,8 @@ let rec (type_to_string : t -> string) =
| Int -> "int" | Int -> "int"
| Real-> "real" | Real-> "real"
| Extern s -> s ^ "(*extern*)" | Extern s -> s ^ "(*extern*)"
| Enum (s, sl) -> "enum " ^ s ^ " {" ^ (String.concat ", " sl) ^ "}" (* | Enum (s, sl) -> "enum " ^ s ^ " {" ^ (String.concat ", " sl) ^ "}" *)
| Enum (s, sl) -> s
| Struct (sid,_) -> sid ^ "(*struct*)" | Struct (sid,_) -> sid ^ "(*struct*)"
| Array (ty, sz) -> Printf.sprintf "%s^%d" (type_to_string ty) sz | Array (ty, sz) -> Printf.sprintf "%s^%d" (type_to_string ty) sz
| Alpha nb -> | Alpha nb ->
......
(* Time-stamp: <modified the 12/04/2013 (at 08:46) by Erwan Jahier> *) (* Time-stamp: <modified the 24/04/2013 (at 10:43) by Erwan Jahier> *)
(* J'ai appele ca symbol (mais ca remplace le ident) : (* J'ai appele ca symbol (mais ca remplace le ident) :
c'est juste une couche qui garantit l'unicite en memoire c'est juste une couche qui garantit l'unicite en memoire
...@@ -135,9 +135,9 @@ let (long_of_string : string -> long) = ...@@ -135,9 +135,9 @@ let (long_of_string : string -> long) =
let string_of_idref i = ( let string_of_idref i = (
match i.id_pack with match i.id_pack with
Some p -> Some p ->
if Lv6MainArgs.global_opt.Lv6MainArgs.no_prefix then i.id_id else
if Lv6MainArgs.global_opt.Lv6MainArgs.ec then p^"__"^i.id_id else if Lv6MainArgs.global_opt.Lv6MainArgs.ec then p^"__"^i.id_id else
if Lv6MainArgs.global_opt.Lv6MainArgs.lv4 then (p^"__"^i.id_id) else if Lv6MainArgs.global_opt.Lv6MainArgs.lv4 then (p^"__"^i.id_id) else
if Lv6MainArgs.global_opt.Lv6MainArgs.no_prefix then i.id_id else
(p^"::"^i.id_id) (p^"::"^i.id_id)
| None -> i.id_id | None -> i.id_id
) )
......
...@@ -121,7 +121,7 @@ let to_file (opt: Lv6MainArgs.t) (this:t) (main_node: Ident.idref option) = ...@@ -121,7 +121,7 @@ let to_file (opt: Lv6MainArgs.t) (this:t) (main_node: Ident.idref option) =
*) *)
ItemKeyMap.iter ItemKeyMap.iter
(fun tn te -> (fun tn te ->
if (not Lv6MainArgs.global_opt.Lv6MainArgs.ec || Lic.is_extern_type te) then if (not Lv6MainArgs.global_opt.Lv6MainArgs.lv4 || Lic.is_extern_type te) then
output_string opt.Lv6MainArgs.oc (LicDump.type_decl tn te) output_string opt.Lv6MainArgs.oc (LicDump.type_decl tn te)
) )
this.types; this.types;
......
(* Time-stamp: <modified the 23/04/2013 (at 16:41) by Erwan Jahier> *) (* Time-stamp: <modified the 24/04/2013 (at 12:02) by Erwan Jahier> *)
open Verbose open Verbose
open AstV6 open AstV6
...@@ -73,6 +73,7 @@ let (gen_autotest_files : LicPrg.t -> Ident.idref option -> Lv6MainArgs.t -> uni ...@@ -73,6 +73,7 @@ let (gen_autotest_files : LicPrg.t -> Ident.idref option -> Lv6MainArgs.t -> uni
let oracle_file_name = ("_"^name^"_oracle.lus") in let oracle_file_name = ("_"^name^"_oracle.lus") in
let oc = open_out oracle_file_name in let oc = open_out oracle_file_name in
let invars,outvars=soc.Soc.profile in
let locals = List.map (fun (n,t) -> n^"_bis",t) outvars in let locals = List.map (fun (n,t) -> n^"_bis",t) outvars in
let invars_str = List.map (fun (n,t) -> n^":"^(Data.type_to_string t)) invars in let invars_str = List.map (fun (n,t) -> n^":"^(Data.type_to_string t)) invars in
let outvars_str = List.map (fun (n,t) -> n^":"^(Data.type_to_string t)) outvars in let outvars_str = List.map (fun (n,t) -> n^":"^(Data.type_to_string t)) outvars in
...@@ -89,8 +90,9 @@ let (gen_autotest_files : LicPrg.t -> Ident.idref option -> Lv6MainArgs.t -> uni ...@@ -89,8 +90,9 @@ let (gen_autotest_files : LicPrg.t -> Ident.idref option -> Lv6MainArgs.t -> uni
let outvars_name = List.map fst outvars in let outvars_name = List.map fst outvars in
let prg = prg^" ("^(String.concat "," locals_name)^") = "^name in let prg = prg^" ("^(String.concat "," locals_name)^") = "^name in
let prg = prg^"("^(String.concat "," invars_name)^");\n "^ok^" = (" in let prg = prg^"("^(String.concat "," invars_name)^");\n "^ok^" = (" in
let prg = prg^(String.concat " and\n \t\t " (List.map2 (fun x y -> x^"="^y) let prg = try prg^(String.concat " and\n \t\t " (List.map2 (fun x y -> x^"="^y)
outvars_name locals_name)) ^ ");\ntel;\n" outvars_name locals_name)) ^ ");\ntel;\n"
with _ -> assert false
in in
Lv6util.dump_entete oc; Lv6util.dump_entete oc;
output_string oc prg; output_string oc prg;
......
(* Time-stamp: <modified the 15/04/2013 (at 15:54) by Erwan Jahier> *) (* Time-stamp: <modified the 24/04/2013 (at 11:31) by Erwan Jahier> *)
open Soc open Soc
open Data open Data
...@@ -230,7 +230,7 @@ let rec (expand_subst: Data.subst -> Data.subst list) = ...@@ -230,7 +230,7 @@ let rec (expand_subst: Data.subst -> Data.subst list) =
type sl = Data.subst list type sl = Data.subst list
(* Reconstruct the flattenned data *) (* Reconstruct the flattenned data *)
let (unexpand : sl -> Soc.var list -> sl) = let (unexpand_profile : sl -> Soc.var list -> sl) =
fun sl vl -> fun sl vl ->
let rec (aux : sl -> sl -> Soc.var list -> sl * sl)= let rec (aux : sl -> sl -> Soc.var list -> sl * sl)=
fun sl_done sl_todo vl -> fun sl_done sl_todo vl ->
...@@ -280,7 +280,7 @@ let (unexpand : sl -> Soc.var list -> sl) = ...@@ -280,7 +280,7 @@ let (unexpand : sl -> Soc.var list -> sl) =
(* [add_data_subst vtnl data_s s] add the data_s to s; *) (* [add_data_subst vtnl data_s s] add the data_s to s; *)
let (add_data_subst : var list -> Data.subst list -> SocExecValue.substs -> SocExecValue.substs) = let (add_data_subst : var list -> Data.subst list -> SocExecValue.substs -> SocExecValue.substs) =
fun vntl_i s ctx_s -> fun vntl_i s ctx_s ->
let s = unexpand s vntl_i in let s = unexpand_profile s vntl_i in
List.fold_left (fun acc (id,v) -> sadd acc [id] v) ctx_s s List.fold_left (fun acc (id,v) -> sadd acc [id] v) ctx_s s
let (read_soc_input : var list -> Data.vntl -> out_channel -> substs -> substs) = let (read_soc_input : var list -> Data.vntl -> out_channel -> substs -> substs) =
......
(* Time-stamp: <modified the 12/04/2013 (at 08:50) by Erwan Jahier> *) (* Time-stamp: <modified the 24/04/2013 (at 14:19) by Erwan Jahier> *)
(* The entry point for lus2lic -exec *) (* The entry point for lus2lic -exec *)
val f : Lv6MainArgs.t -> Soc.tbl -> Soc.key -> unit val f : Lv6MainArgs.t -> Soc.tbl -> Soc.key -> unit
...@@ -11,3 +11,5 @@ val do_step_dbg : Soc.tbl -> Soc.t -> Event.ctx -> SocExecValue.ctx -> ...@@ -11,3 +11,5 @@ val do_step_dbg : Soc.tbl -> Soc.t -> Event.ctx -> SocExecValue.ctx ->
(* Expand struct and arrays when communicating with the outside world *) (* Expand struct and arrays when communicating with the outside world *)
val expand_profile : Soc.var list -> Soc.var list val expand_profile : Soc.var list -> Soc.var list
val unexpand_profile : Data.subst list -> Soc.var list -> Data.subst list
val expand_subst: Data.subst -> Data.subst list
Test Run By jahier on Tue Apr 23 16:03:56 2013 Test Run By jahier on Wed Apr 24 15:04:13 2013
Native configuration is i686-pc-linux-gnu Native configuration is i686-pc-linux-gnu
=== lus2lic tests === === lus2lic tests ===
...@@ -21,26 +21,22 @@ PASS: ./lus2lic {-o /tmp/ck5.lic should_work/ck5.lus} ...@@ -21,26 +21,22 @@ PASS: ./lus2lic {-o /tmp/ck5.lic should_work/ck5.lus}
PASS: ./lus2lic {-ec -o /tmp/ck5.ec should_work/ck5.lus} PASS: ./lus2lic {-ec -o /tmp/ck5.ec should_work/ck5.lus}
PASS: ./ec2c {-o /tmp/ck5.c /tmp/ck5.ec} PASS: ./ec2c {-o /tmp/ck5.c /tmp/ck5.ec}
PASS: ../utils/test_lus2lic_no_node should_work/ck5.lus PASS: ../utils/test_lus2lic_no_node should_work/ck5.lus
PASS: ./lus2lic {-o /tmp/fby.lic should_work/fby.lus}
PASS: ./lus2lic {-ec -o /tmp/fby.ec should_work/fby.lus}
PASS: ./ec2c {-o /tmp/fby.c /tmp/fby.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/fby.lus
PASS: ./lus2lic {-o /tmp/assertion.lic should_work/assertion.lus} PASS: ./lus2lic {-o /tmp/assertion.lic should_work/assertion.lus}
PASS: ./lus2lic {-ec -o /tmp/assertion.ec should_work/assertion.lus} PASS: ./lus2lic {-ec -o /tmp/assertion.ec should_work/assertion.lus}
PASS: ./ec2c {-o /tmp/assertion.c /tmp/assertion.ec} PASS: ./ec2c {-o /tmp/assertion.c /tmp/assertion.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/assertion.lus PASS: ../utils/test_lus2lic_no_node should_work/assertion.lus
PASS: ./lus2lic {-o /tmp/normal.lic should_work/normal.lus} PASS: ./lus2lic {-o /tmp/normal.lic should_work/normal.lus}
PASS: ./lus2lic {-ec -o /tmp/normal.ec should_work/normal.lus} PASS: ./lus2lic {-ec -o /tmp/normal.ec should_work/normal.lus}
PASS: ./ec2c {-o /tmp/normal.c /tmp/normal.ec} PASS: ./ec2c {-o /tmp/normal.c /tmp/normal.ec}
UNRESOLVED: Time out: ../utils/test_lus2lic_no_node should_work/normal.lus PASS: ../utils/test_lus2lic_no_node should_work/normal.lus
PASS: ./lus2lic {-o /tmp/nodeparam.lic should_work/nodeparam.lus} PASS: ./lus2lic {-o /tmp/nodeparam.lic should_work/nodeparam.lus}
PASS: ./lus2lic {-ec -o /tmp/nodeparam.ec should_work/nodeparam.lus} PASS: ./lus2lic {-ec -o /tmp/nodeparam.ec should_work/nodeparam.lus}
PASS: ./ec2c {-o /tmp/nodeparam.c /tmp/nodeparam.ec} PASS: ./ec2c {-o /tmp/nodeparam.c /tmp/nodeparam.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/nodeparam.lus PASS: ../utils/test_lus2lic_no_node should_work/nodeparam.lus
PASS: ./lus2lic {-o /tmp/enum0.lic should_work/enum0.lus} PASS: ./lus2lic {-o /tmp/enum0.lic should_work/enum0.lus}
PASS: ./lus2lic {-ec -o /tmp/enum0.ec should_work/enum0.lus} PASS: ./lus2lic {-ec -o /tmp/enum0.ec should_work/enum0.lus}
PASS: ./ec2c {-o /tmp/enum0.c /tmp/enum0.ec} PASS: ./ec2c {-o /tmp/enum0.c /tmp/enum0.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/enum0.lus PASS: ../utils/test_lus2lic_no_node should_work/enum0.lus
PASS: ./lus2lic {-o /tmp/ck6.lic should_work/ck6.lus} PASS: ./lus2lic {-o /tmp/ck6.lic should_work/ck6.lus}
PASS: ./lus2lic {-ec -o /tmp/ck6.ec should_work/ck6.lus} PASS: ./lus2lic {-ec -o /tmp/ck6.ec should_work/ck6.lus}
PASS: ./ec2c {-o /tmp/ck6.c /tmp/ck6.ec} PASS: ./ec2c {-o /tmp/ck6.c /tmp/ck6.ec}
...@@ -48,7 +44,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou ...@@ -48,7 +44,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou
PASS: ./lus2lic {-o /tmp/Gyroscope2.lic should_work/Gyroscope2.lus} PASS: ./lus2lic {-o /tmp/Gyroscope2.lic should_work/Gyroscope2.lus}
PASS: ./lus2lic {-ec -o /tmp/Gyroscope2.ec should_work/Gyroscope2.lus} PASS: ./lus2lic {-ec -o /tmp/Gyroscope2.ec should_work/Gyroscope2.lus}
PASS: ./ec2c {-o /tmp/Gyroscope2.c /tmp/Gyroscope2.ec} PASS: ./ec2c {-o /tmp/Gyroscope2.c /tmp/Gyroscope2.ec}
UNRESOLVED: Time out: ../utils/test_lus2lic_no_node should_work/Gyroscope2.lus PASS: ../utils/test_lus2lic_no_node should_work/Gyroscope2.lus
PASS: ./lus2lic {-o /tmp/mouse2.lic should_work/mouse2.lus} PASS: ./lus2lic {-o /tmp/mouse2.lic should_work/mouse2.lus}
PASS: ./lus2lic {-ec -o /tmp/mouse2.ec should_work/mouse2.lus} PASS: ./lus2lic {-ec -o /tmp/mouse2.ec should_work/mouse2.lus}
PASS: ./ec2c {-o /tmp/mouse2.c /tmp/mouse2.ec} PASS: ./ec2c {-o /tmp/mouse2.c /tmp/mouse2.ec}
...@@ -278,7 +274,7 @@ PASS: ../utils/test_lus2lic_no_node should_work/model2.lus ...@@ -278,7 +274,7 @@ PASS: ../utils/test_lus2lic_no_node should_work/model2.lus
PASS: ./lus2lic {-o /tmp/alarme.lic should_work/alarme.lus} PASS: ./lus2lic {-o /tmp/alarme.lic should_work/alarme.lus}
PASS: ./lus2lic {-ec -o /tmp/alarme.ec should_work/alarme.lus} PASS: ./lus2lic {-ec -o /tmp/alarme.ec should_work/alarme.lus}
PASS: ./ec2c {-o /tmp/alarme.c /tmp/alarme.ec} PASS: ./ec2c {-o /tmp/alarme.c /tmp/alarme.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/alarme.lus PASS: ../utils/test_lus2lic_no_node should_work/alarme.lus
PASS: ./lus2lic {-o /tmp/onlyroll2.lic should_work/onlyroll2.lus} PASS: ./lus2lic {-o /tmp/onlyroll2.lic should_work/onlyroll2.lus}
PASS: ./lus2lic {-ec -o /tmp/onlyroll2.ec should_work/onlyroll2.lus} PASS: ./lus2lic {-ec -o /tmp/onlyroll2.ec should_work/onlyroll2.lus}
PASS: ./ec2c {-o /tmp/onlyroll2.c /tmp/onlyroll2.ec} PASS: ./ec2c {-o /tmp/onlyroll2.c /tmp/onlyroll2.ec}
...@@ -346,7 +342,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou ...@@ -346,7 +342,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou
PASS: ./lus2lic {-o /tmp/call07.lic should_work/call07.lus} PASS: ./lus2lic {-o /tmp/call07.lic should_work/call07.lus}
PASS: ./lus2lic {-ec -o /tmp/call07.ec should_work/call07.lus} PASS: ./lus2lic {-ec -o /tmp/call07.ec should_work/call07.lus}
PASS: ./ec2c {-o /tmp/call07.c /tmp/call07.ec} PASS: ./ec2c {-o /tmp/call07.c /tmp/call07.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/call07.lus PASS: ../utils/test_lus2lic_no_node should_work/call07.lus
PASS: ./lus2lic {-o /tmp/shift_ludic.lic should_work/shift_ludic.lus} PASS: ./lus2lic {-o /tmp/shift_ludic.lic should_work/shift_ludic.lus}
PASS: ./lus2lic {-ec -o /tmp/shift_ludic.ec should_work/shift_ludic.lus} PASS: ./lus2lic {-ec -o /tmp/shift_ludic.ec should_work/shift_ludic.lus}
PASS: ./ec2c {-o /tmp/shift_ludic.c /tmp/shift_ludic.ec} PASS: ./ec2c {-o /tmp/shift_ludic.c /tmp/shift_ludic.ec}
...@@ -378,7 +374,7 @@ PASS: ../utils/test_lus2lic_no_node should_work/morel5.lus ...@@ -378,7 +374,7 @@ PASS: ../utils/test_lus2lic_no_node should_work/morel5.lus
PASS: ./lus2lic {-o /tmp/bred.lic should_work/bred.lus} PASS: ./lus2lic {-o /tmp/bred.lic should_work/bred.lus}
PASS: ./lus2lic {-ec -o /tmp/bred.ec should_work/bred.lus} PASS: ./lus2lic {-ec -o /tmp/bred.ec should_work/bred.lus}
PASS: ./ec2c {-o /tmp/bred.c /tmp/bred.ec} PASS: ./ec2c {-o /tmp/bred.c /tmp/bred.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/bred.lus PASS: ../utils/test_lus2lic_no_node should_work/bred.lus
PASS: ./lus2lic {-o /tmp/tri.lic should_work/tri.lus} PASS: ./lus2lic {-o /tmp/tri.lic should_work/tri.lus}
PASS: ./lus2lic {-ec -o /tmp/tri.ec should_work/tri.lus} PASS: ./lus2lic {-ec -o /tmp/tri.ec should_work/tri.lus}
PASS: ./ec2c {-o /tmp/tri.c /tmp/tri.ec} PASS: ./ec2c {-o /tmp/tri.c /tmp/tri.ec}
...@@ -576,7 +572,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou ...@@ -576,7 +572,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou
PASS: ./lus2lic {-o /tmp/o2l_feux_compl.lic should_work/o2l_feux_compl.lus} PASS: ./lus2lic {-o /tmp/o2l_feux_compl.lic should_work/o2l_feux_compl.lus}
PASS: ./lus2lic {-ec -o /tmp/o2l_feux_compl.ec should_work/o2l_feux_compl.lus} PASS: ./lus2lic {-ec -o /tmp/o2l_feux_compl.ec should_work/o2l_feux_compl.lus}
PASS: ./ec2c {-o /tmp/o2l_feux_compl.c /tmp/o2l_feux_compl.ec} PASS: ./ec2c {-o /tmp/o2l_feux_compl.c /tmp/o2l_feux_compl.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/o2l_feux_compl.lus PASS: ../utils/test_lus2lic_no_node should_work/o2l_feux_compl.lus
PASS: ./lus2lic {-o /tmp/model.lic should_work/model.lus} PASS: ./lus2lic {-o /tmp/model.lic should_work/model.lus}
PASS: ./lus2lic {-ec -o /tmp/model.ec should_work/model.lus} PASS: ./lus2lic {-ec -o /tmp/model.ec should_work/model.lus}
PASS: ./ec2c {-o /tmp/model.c /tmp/model.ec} PASS: ./ec2c {-o /tmp/model.c /tmp/model.ec}
...@@ -608,7 +604,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou ...@@ -608,7 +604,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou
PASS: ./lus2lic {-o /tmp/exclusion.lic should_work/exclusion.lus} PASS: ./lus2lic {-o /tmp/exclusion.lic should_work/exclusion.lus}
PASS: ./lus2lic {-ec -o /tmp/exclusion.ec should_work/exclusion.lus} PASS: ./lus2lic {-ec -o /tmp/exclusion.ec should_work/exclusion.lus}
PASS: ./ec2c {-o /tmp/exclusion.c /tmp/exclusion.ec} PASS: ./ec2c {-o /tmp/exclusion.c /tmp/exclusion.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/exclusion.lus PASS: ../utils/test_lus2lic_no_node should_work/exclusion.lus
PASS: ./lus2lic {-o /tmp/ply01.lic should_work/ply01.lus} PASS: ./lus2lic {-o /tmp/ply01.lic should_work/ply01.lus}
PASS: ./lus2lic {-ec -o /tmp/ply01.ec should_work/ply01.lus} PASS: ./lus2lic {-ec -o /tmp/ply01.ec should_work/ply01.lus}
PASS: ./ec2c {-o /tmp/ply01.c /tmp/ply01.ec} PASS: ./ec2c {-o /tmp/ply01.c /tmp/ply01.ec}
...@@ -737,6 +733,10 @@ PASS: ./lus2lic {-o /tmp/Gyroscope.lic should_work/Gyroscope.lus} ...@@ -737,6 +733,10 @@ PASS: ./lus2lic {-o /tmp/Gyroscope.lic should_work/Gyroscope.lus}
PASS: ./lus2lic {-ec -o /tmp/Gyroscope.ec should_work/Gyroscope.lus} PASS: ./lus2lic {-ec -o /tmp/Gyroscope.ec should_work/Gyroscope.lus}
PASS: ./ec2c {-o /tmp/Gyroscope.c /tmp/Gyroscope.ec} PASS: ./ec2c {-o /tmp/Gyroscope.c /tmp/Gyroscope.ec}
PASS: ../utils/test_lus2lic_no_node should_work/Gyroscope.lus PASS: ../utils/test_lus2lic_no_node should_work/Gyroscope.lus
PASS: ./lus2lic {-o /tmp/followed_by.lic should_work/followed_by.lus}
PASS: ./lus2lic {-ec -o /tmp/followed_by.ec should_work/followed_by.lus}
PASS: ./ec2c {-o /tmp/followed_by.c /tmp/followed_by.ec}
PASS: ../utils/test_lus2lic_no_node should_work/followed_by.lus
PASS: ./lus2lic {-o /tmp/asservi.lic should_work/asservi.lus} PASS: ./lus2lic {-o /tmp/asservi.lic should_work/asservi.lus}
PASS: ./lus2lic {-ec -o /tmp/asservi.ec should_work/asservi.lus} PASS: ./lus2lic {-ec -o /tmp/asservi.ec should_work/asservi.lus}
PASS: ./ec2c {-o /tmp/asservi.c /tmp/asservi.ec} PASS: ./ec2c {-o /tmp/asservi.c /tmp/asservi.ec}
...@@ -776,7 +776,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou ...@@ -776,7 +776,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou
PASS: ./lus2lic {-o /tmp/drapfab.lic should_work/drapfab.lus} PASS: ./lus2lic {-o /tmp/drapfab.lic should_work/drapfab.lus}
PASS: ./lus2lic {-ec -o /tmp/drapfab.ec should_work/drapfab.lus} PASS: ./lus2lic {-ec -o /tmp/drapfab.ec should_work/drapfab.lus}
PASS: ./ec2c {-o /tmp/drapfab.c /tmp/drapfab.ec} PASS: ./ec2c {-o /tmp/drapfab.c /tmp/drapfab.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/drapfab.lus PASS: ../utils/test_lus2lic_no_node should_work/drapfab.lus
PASS: ./lus2lic {-o /tmp/pre_x.lic should_work/pre_x.lus} PASS: ./lus2lic {-o /tmp/pre_x.lic should_work/pre_x.lus}
PASS: ./lus2lic {-ec -o /tmp/pre_x.ec should_work/pre_x.lus} PASS: ./lus2lic {-ec -o /tmp/pre_x.ec should_work/pre_x.lus}
PASS: ./ec2c {-o /tmp/pre_x.c /tmp/pre_x.ec} PASS: ./ec2c {-o /tmp/pre_x.c /tmp/pre_x.ec}
...@@ -800,7 +800,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou ...@@ -800,7 +800,7 @@ FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node shou
PASS: ./lus2lic {-o /tmp/hanane.lic should_work/hanane.lus} PASS: ./lus2lic {-o /tmp/hanane.lic should_work/hanane.lus}
PASS: ./lus2lic {-ec -o /tmp/hanane.ec should_work/hanane.lus} PASS: ./lus2lic {-ec -o /tmp/hanane.ec should_work/hanane.lus}
PASS: ./ec2c {-o /tmp/hanane.c /tmp/hanane.ec} PASS: ./ec2c {-o /tmp/hanane.c /tmp/hanane.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/hanane.lus PASS: ../utils/test_lus2lic_no_node should_work/hanane.lus
PASS: ./lus2lic {-o /tmp/lustre.lic should_work/lustre.lus} PASS: ./lus2lic {-o /tmp/lustre.lic should_work/lustre.lus}
PASS: ./lus2lic {-ec -o /tmp/lustre.ec should_work/lustre.lus} PASS: ./lus2lic {-ec -o /tmp/lustre.ec should_work/lustre.lus}
PASS: ./ec2c {-o /tmp/lustre.c /tmp/lustre.ec} PASS: ./ec2c {-o /tmp/lustre.c /tmp/lustre.ec}
...@@ -892,7 +892,7 @@ PASS: ../utils/test_lus2lic_no_node should_work/arrays.lus ...@@ -892,7 +892,7 @@ PASS: ../utils/test_lus2lic_no_node should_work/arrays.lus
PASS: ./lus2lic {-o /tmp/eq1.lic should_work/eq1.lus} PASS: ./lus2lic {-o /tmp/eq1.lic should_work/eq1.lus}
PASS: ./lus2lic {-ec -o /tmp/eq1.ec should_work/eq1.lus} PASS: ./lus2lic {-ec -o /tmp/eq1.ec should_work/eq1.lus}
PASS: ./ec2c {-o /tmp/eq1.c /tmp/eq1.ec} PASS: ./ec2c {-o /tmp/eq1.c /tmp/eq1.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/eq1.lus PASS: ../utils/test_lus2lic_no_node should_work/eq1.lus
PASS: ./lus2lic {-o /tmp/nc3.lic should_work/nc3.lus} PASS: ./lus2lic {-o /tmp/nc3.lic should_work/nc3.lus}
PASS: ./lus2lic {-ec -o /tmp/nc3.ec should_work/nc3.lus} PASS: ./lus2lic {-ec -o /tmp/nc3.ec should_work/nc3.lus}
PASS: ./ec2c {-o /tmp/nc3.c /tmp/nc3.ec} PASS: ./ec2c {-o /tmp/nc3.c /tmp/nc3.ec}
...@@ -1045,8 +1045,7 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman ...@@ -1045,8 +1045,7 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman
=== lus2lic Summary === === lus2lic Summary ===
# of expected passes 871 # of expected passes 885
# of unexpected failures 112 # of unexpected failures 100
# of unexpected successes 11 # of unexpected successes 11
# of expected failures 37 # of expected failures 37
# of unresolved testcases 2
...@@ -2,7 +2,7 @@ type color1 = enum { blue, white, black }; ...@@ -2,7 +2,7 @@ type color1 = enum { blue, white, black };
type color2 = enum { green, orange, yellow }; type color2 = enum { green, orange, yellow };
node t(x: color1) returns (y: color2); node enum0(x: color1) returns (y: color2);
let let
y = if x = blue then green else if x = white then orange else yellow; y = if x = blue then green else if x = white then orange else yellow;
tel tel
\ No newline at end of file
File moved
...@@ -11,4 +11,4 @@ let ...@@ -11,4 +11,4 @@ let
tel tel
node h = f<< g<<42>> >>; node nodeparam = f<< g<<42>> >>;
...@@ -89,15 +89,44 @@ in particular, are nodes using extern nodes generated properly? ...@@ -89,15 +89,44 @@ in particular, are nodes using extern nodes generated properly?
- State "TODO" from "" [2013-01-11 Fri 11:15] - State "TODO" from "" [2013-01-11 Fri 11:15]
* Aesthetes issues ** TODO Fix a bug occurring using -en and -esa together.
- State "TODO" from "" [2013-04-24 Wed 09:22]
#+begin_src sh
./lus2lic _assertion_oracle.lus -n assertion_oracle -en -esa
*** Error in file "/home/jahier/lus2lic/test/_assertion_oracle.lus", line 38, col 3 to 7, token 'v02_1':
***
*** Variable _0v02_1_1 is already defined.
#+end_src
-> on verra ca quand les autres test passeront ; je ferai alors une passe
complete qur le nommage des variables fraiches.
** TODO Nommage des variables fraiches : Reprendre LicVarName.ml ** TODO Nommage des variables fraiches : Reprendre LicVarName.ml
- State "TODO" from "" [2013-01-16 Wed 18:03] - State "TODO" from "" [2013-01-16 Wed 18:03]
car c'est completement n'importe quoi (j'ai réussit a faire des clashs car c'est completement n'importe quoi (j'ai réussit a faire des clashs
entre les var inventées dans split et dans expandnodes !!) entre les var inventées dans split et dans ExpandNodes !!)
Pascal a introduit un mecanisme qui shunte LicName -> en discuter avec lui. Pascal a introduit un mecanisme qui shunte LicName -> en discuter avec lui.
** TODO au sujet des tests de non-regression
- State "TODO" from "" [2013-04-23 Tue 17:31]
Actuellement, test_lus2lic_no_node, je compare lus2lic -ec + ecexe et lus2lic -exec.
Ca serait bien de faire la meme chose en passant par lus2lic -lv4 +
lus2ec voir.
** TODO Le test de noeuds qui ont des types enum ne fonctionne pas
- State "TODO" from "" [2013-04-24 Wed 10:12]
../utils/test_lus2lic_no_node should_work/enum0.lus
en fait, l'option --gen-auto-test traduit les types enums en entier ; du coup
l'appel depuis l'oracle au noeud à tester est mal typé...
* Divers * Divers
** TODO lic2c : le jour ou on genere du code C, y'a peut-etre des trucs a recuperer ** TODO lic2c : le jour ou on genere du code C, y'a peut-etre des trucs a recuperer
......
...@@ -10,7 +10,10 @@ env=_"$node"_env.lut ...@@ -10,7 +10,10 @@ env=_"$node"_env.lut
set -x verbose #echo on set -x verbose #echo on
./lus2lic $lustre_file -n $node --gen-autotest || exit 2 ./lus2lic $lustre_file -n $node --gen-autotest || exit 2
./lus2lic $lustre_file -n $node -lv4 -en --no-prefix >> $_oracle || exit 2 cat $lustre_file >> $_oracle
#./lus2lic $lustre_file -n $node -lv4 -en --no-prefix >> $_oracle || exit 2
./lus2lic $_oracle -n $oracle -ec -o $oracle.ec || exit 2 ./lus2lic $_oracle -n $oracle -ec -o $oracle.ec || exit 2
./lurettetop -rp "sut:v6:$lustre_file:$node" -rp "env:lutin:$env" -rp "oracle:ec:$oracle.ec:$oracle" -go -l 10 -ns2c --stop-on-oracle-error || exit 2 ./lurettetop -rp "sut:v6:$lustre_file:$node" -rp "env:lutin:$env" -rp "oracle:ec:$oracle.ec:$oracle" -go -l 10 -ns2c --stop-on-oracle-error || exit 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment