Skip to content
Snippets Groups Projects
Commit 69fd404e authored by Pascal Raymond's avatar Pascal Raymond
Browse files

qq tests

parent 0f5e6dfe
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 66 deletions
...@@ -498,11 +498,11 @@ and (translate_val_exp : Eff.id_solver -> UnifyClock.subst -> ...@@ -498,11 +498,11 @@ and (translate_val_exp : Eff.id_solver -> UnifyClock.subst ->
s, vef s, vef
(* (*
OBSOLETE
Un peu ad hoc : Un peu ad hoc :
- on traite part, - on traite part,
- on peut sans doute faire plus propre ? - on peut sans doute faire plus propre ?
--> raise Not_found --> raise Not_found
*)
and translate_predef_macro id_solver lxm zemacro sargs (s,vel_eff) = and translate_predef_macro id_solver lxm zemacro sargs (s,vel_eff) =
(* ??? *) (* ??? *)
let vel_eff, type_ll = let vel_eff, type_ll =
...@@ -572,6 +572,7 @@ and translate_predef_macro id_solver lxm zemacro sargs (s,vel_eff) = ...@@ -572,6 +572,7 @@ and translate_predef_macro id_solver lxm zemacro sargs (s,vel_eff) =
let mk_by_pos_op by_pos_op_eff = let mk_by_pos_op by_pos_op_eff =
CallByPosEff(flagit by_pos_op_eff lxm, OperEff vel_eff) CallByPosEff(flagit by_pos_op_eff lxm, OperEff vel_eff)
in s, mk_by_pos_op (Eff.PREDEF_CALL(zemacro.it, sargs_eff)) in s, mk_by_pos_op (Eff.PREDEF_CALL(zemacro.it, sargs_eff))
*)
and translate_by_name_op id_solver op = and translate_by_name_op id_solver op =
match op.it with match op.it with
......
...@@ -36,6 +36,7 @@ let rec fill x n = if n > 0 then (x::(fill x (n-1))) else [] ...@@ -36,6 +36,7 @@ let rec fill x n = if n > 0 then (x::(fill x (n-1))) else []
(* ICI : je comprends rien à ce que ca fait ??? *) (* ICI : je comprends rien à ce que ca fait ??? *)
(* OBSOLETE
let condact_clock_profile id_solver lxm sargs s clks = let condact_clock_profile id_solver lxm sargs s clks =
let (_, lto) = PredefEvalType.condact_profile id_solver lxm sargs in let (_, lto) = PredefEvalType.condact_profile id_solver lxm sargs in
let clks = List.flatten clks in let clks = List.flatten clks in
...@@ -56,6 +57,7 @@ let boolred_clock_profile id_solver lxm sargs s clks = ...@@ -56,6 +57,7 @@ let boolred_clock_profile id_solver lxm sargs s clks =
let (_, lto) = PredefEvalType.boolred_profile id_solver lxm sargs in let (_, lto) = PredefEvalType.boolred_profile id_solver lxm sargs in
let clks = List.flatten clks in let clks = List.flatten clks in
fill (List.hd clks) (List.length lto), s fill (List.hd clks) (List.length lto), s
*)
(* This table contains the clock profile of predefined operators *) (* This table contains the clock profile of predefined operators *)
...@@ -79,10 +81,12 @@ let f ...@@ -79,10 +81,12 @@ let f
-> op_profile s -> op_profile s
| IF_n -> if_clock_profile lxm sargs s | IF_n -> if_clock_profile lxm sargs s
(*
| Red | Fill | FillRed -> fillred_clock_profile id_solver lxm sargs s | Red | Fill | FillRed -> fillred_clock_profile id_solver lxm sargs s
| Map -> map_clock_profile id_solver lxm sargs s | Map -> map_clock_profile id_solver lxm sargs s
| BoolRed -> boolred_clock_profile id_solver lxm sargs s | BoolRed -> boolred_clock_profile id_solver lxm sargs s
| CondAct -> condact_clock_profile id_solver lxm sargs s | CondAct -> condact_clock_profile id_solver lxm sargs s
*)
node main(c: bool; x,y:int) returns (o: int);
let
o = condact<<+,0>>(c,x,y);
tel
node main(x,y: bool^42) returns (o: bool^42);
let
o = map<<or, 42>>(x,y);
tel
node main(x: bool^42) returns (o: bool);
let
o = red<<or, 42>>(false,x);
tel
node main(x: bool^13) returns (o: bool);
let
o = boolred<<1,2,13>>(x);
tel
-- ok
node ma_macro<<const i : int>>(x: int) returns (y: int);
let
y = i + x;
tel
node main = ma_macro<<32>>;
-- KO, mais pas où il faudrait ...
node ma_macro<<const i : int>>(x: int) returns (y: int);
let
y = i + x;
tel
-- n.b. ko à l'utilisation uniquement
node main = ma_macro<<32.0>>;
-- KO
node ma_macro<<const i : int>>(x: int) returns (y: int);
let
y = i + x;
tel
--*** Bad static argument nature, a constant was expected
node main = ma_macro<<+>>;
-- DEVRAIT ETRE KO !
-- mais aucune verif dans la version du 30/07/12
node ma_macro<<const i : real>>(x: int) returns (y: int);
let
y = i + x;
tel
node main = ma_macro<<32>>;
...@@ -14,6 +14,9 @@ KO_LUS=$(shell find should_fail -name "*.lus" -print | LC_ALL=C sort -n) ...@@ -14,6 +14,9 @@ KO_LUS=$(shell find should_fail -name "*.lus" -print | LC_ALL=C sort -n)
ALL_LUS=$(OK_LUS) $(KO_LUS) ALL_LUS=$(OK_LUS) $(KO_LUS)
all:
echo $(ALL_LUS)
LIC=$(shell find should_work -name "*.lic" -print | LC_ALL=C sort -n) LIC=$(shell find should_work -name "*.lic" -print | LC_ALL=C sort -n)
...@@ -133,6 +136,7 @@ utest: utest_lic utest_ec utest_lv4 ...@@ -133,6 +136,7 @@ utest: utest_lic utest_ec utest_lv4
clean: clean:
rm -f *.c *.h *.ec
for d in ${ALL_LUS}; do \ for d in ${ALL_LUS}; do \
rm $$d.lic; \ rm $$d.lic; \
done done
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