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

Nested iterators were not expanded with --expand-iterators.

parent d7739c33
No related branches found
No related tags found
No related merge requests found
(** Time-stamp: <modified the 03/02/2009 (at 15:40) by Erwan Jahier> *)
(** Time-stamp: <modified the 03/02/2009 (at 16:41) by Erwan Jahier> *)
open Lxm
......@@ -330,7 +330,7 @@ and (translate_val_exp : Eff.id_solver -> SyntaxTreeCore.val_exp -> Eff.val_exp)
(CallByNameEff(
flagit (translate_by_name_op id_solver by_name_op) by_name_op.src,
List.map (translate_field id_solver) field_list))
| CallByPos(by_pos_op, Oper vel) ->
let vel_eff = List.map (translate_val_exp id_solver) vel in
let lxm = by_pos_op.src in
......
(** Time-stamp: <modified the 03/02/2009 (at 16:08) by Erwan Jahier> *)
(** Time-stamp: <modified the 03/02/2009 (at 16:23) by Erwan Jahier> *)
open Lxm
......@@ -72,6 +72,9 @@ let rec (inline_eq: Eff.local_env ->
fun node_env id_solver (eqs, locs) eq ->
let { src = lxm_eq ; it = (lhs, rhs) } = eq in
match rhs with
| CallByPosEff(
{src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "map"),sargs)}})},
OperEff args)
| CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.Map, sargs)}, OperEff args)
->
(* Given
......@@ -121,6 +124,16 @@ let rec (inline_eq: Eff.local_env ->
index_list
| CallByPosEff(
{src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "red"),sargs)}})},
OperEff args)
| CallByPosEff(
{src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "fill"),sargs)}})},
OperEff args)
| CallByPosEff(
{src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "fillred"),sargs)}})},
OperEff args)
| CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.Fill, sargs)}, OperEff args)
| CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.Red, sargs)}, OperEff args)
| CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.FillRed,sargs)}, OperEff args)
......@@ -211,6 +224,10 @@ let rec (inline_eq: Eff.local_env ->
in
(List.rev_append neqs eqs, List.append acc_vars locs)
| CallByPosEff(
{src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "diese"),_)}})},
OperEff args)
| CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.DIESE_n,_)}, OperEff args) ->
(* a diese is a particular kind of boolred:
#(A,...,an) = boolred(1,1,n)([a1,...,an])
......@@ -227,6 +244,9 @@ let rec (inline_eq: Eff.local_env ->
let eq = { src = lxm_eq ; it = (lhs, rhs) } in
inline_eq node_env id_solver (eqs, locs) eq
| CallByPosEff(
{src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "nor"),_)}})},
OperEff args)
| CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.NOR_n,_)}, OperEff args) ->
(* a nor is a particular kind of boolred too:
#(A,...,an) = boolred(0,0,n)([a1,...,an])
......@@ -243,6 +263,9 @@ let rec (inline_eq: Eff.local_env ->
let eq = { src = lxm_eq ; it = (lhs, rhs) } in
inline_eq node_env id_solver (eqs, locs) eq
| CallByPosEff({src=lxm_ve;it=CALL (
{it = {node_key_eff = (("Lustre", "boolred"),sargs)}})},
OperEff args)
| CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.BoolRed,sargs)}, OperEff args) ->
(* Given
- 3 integers i, j, k
......@@ -323,7 +346,6 @@ let rec (inline_eq: Eff.local_env ->
(eq::eq_cpt::eqs, cpt::locs)
(* All the other operators *)
| _ ->
(eq::eqs, locs)
......
(** Time-stamp: <modified the 11/12/2008 (at 15:34) by Erwan Jahier> *)
(** Time-stamp: <modified the 03/02/2009 (at 16:56) by Erwan Jahier> *)
open Predef
open Lxm
......@@ -209,15 +209,15 @@ let (make_node_exp_eff :
let (lti,lto) = op2profile op lxm sargs in
let i = ref 0 in
let is_polymorphic = ref false in
let to_var_info_eff nature (id, te) =
let to_var_info_eff nature (vid, te) =
let res =
if Eff.is_polymorphic te then is_polymorphic := true ;
{
var_name_eff = id;
var_name_eff = vid;
var_nature_eff = nature;
var_number_eff = !i;
var_type_eff = te;
var_clock_eff = id,BaseEff;
var_clock_eff = vid,BaseEff;
}
in
incr i;
......
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