From c7ecd499057219f0c9f1971ff1f01da8c3eb15ff Mon Sep 17 00:00:00 2001
From: Erwan Jahier <jahier@imag.fr>
Date: Mon, 8 Apr 2013 13:07:15 +0200
Subject: [PATCH] The -exec mode now supports the fby arrow statement natively
 (not via a "->/pre" s2s translation).

---
 src/ast2lic.ml      |  12 +--
 src/lic2soc.ml      |  32 ++++----
 src/soc.ml          |   4 +-
 src/socExecValue.ml |  23 ++----
 src/socPredef.ml    | 183 ++++++++++++++------------------------------
 src/socPredef.mli   |   4 +-
 test/lus2lic.sum    |   2 +-
 test/lus2lic.time   |   2 +-
 todo.org            |  11 ---
 todo.org_archive    |  38 +++++++++
 10 files changed, 123 insertions(+), 188 deletions(-)

diff --git a/src/ast2lic.ml b/src/ast2lic.ml
index 8cff8145..3880e125 100644
--- a/src/ast2lic.ml
+++ b/src/ast2lic.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 05/04/2013 (at 13:25) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/04/2013 (at 11:59) by Erwan Jahier> *)
 
 
 open Lxm
@@ -463,15 +463,7 @@ and (translate_val_exp : IdSolver.t -> UnifyClock.subst -> AstCore.val_exp
                   | PRE_n -> s, mk_by_pos_op Lic.PRE
 
                   | ARROW_n -> s, mk_by_pos_op Lic.ARROW
-                  | FBY_n -> (* XXX temporary crutch: translate "e1 fby e2" into "e2 -> pre(e2)" *)
-(*                     s, mk_by_pos_op Lic.FBY *)
-                    (match vel_eff with
-                      | [e1;e2] -> 
-                        let ve_pre = CallByPosLic(flagit Lic.PRE lxm, [e2]) in
-                        let ve_pre = { e2 with ve_core=ve_pre } in
-                        s,CallByPosLic(flagit Lic.ARROW lxm, [e1;ve_pre]) 
-                      | _ -> assert false
-                    )
+                  | FBY_n ->   s, mk_by_pos_op Lic.FBY
                   | CONCAT_n -> s, mk_by_pos_op Lic.CONCAT
                   | TUPLE_n -> s, mk_by_pos_op Lic.TUPLE
                   | ARRAY_n -> s, CallByPosLic(flagit Lic.ARRAY lxm, vel_eff)
diff --git a/src/lic2soc.ml b/src/lic2soc.ml
index 1330f001..f99fad6e 100644
--- a/src/lic2soc.ml
+++ b/src/lic2soc.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 08/04/2013 (at 10:30) by Erwan Jahier> *)
+(** Time-stamp: <modified the 08/04/2013 (at 13:31) by Erwan Jahier> *)
  
 open Lxm
 open Lic
@@ -9,8 +9,8 @@ type action = ActionsDeps.action
 
 (* Raised when a soc that haven't been translated yet is used in
    another soc during the translation *)
-exception Undef_soc of Soc.key * Lxm.t * Lic.by_pos_op * Soc.var_type list
-exception Undef_merge_soc of Soc.key * Lxm.t * val_exp * (const srcflagged * val_exp) list
+exception Undef_soc of Soc.key * Lxm.t * Lic.by_pos_op * Soc.var_type list * Soc.var_expr option 
+exception Undef_merge_soc of  Soc.key * Lxm.t * val_exp * (const srcflagged * val_exp) list
 
 (*********************************************************************************)
 (** Informations liées au contexte de traduction. *)
@@ -51,8 +51,6 @@ let rec lic_to_soc_type: (Lic.type_ -> Soc.var_type) =
   | Lic.TypeVar Lic.Any -> Soc.Alpha 0
   | Lic.TypeVar Lic.AnyNum -> Soc.Alpha 1
 
-
-
 (*********************************************************************************)
 (** Renomme une variable définie par l'utilisateur.
 
@@ -158,6 +156,7 @@ let rec get_leaf: (LicPrg.t -> Lic.val_exp -> Soc.var_expr list option) =
             Some (List.flatten (List.map del_some var_values))
           )
           | Lic.ARRAY_SLICE si -> (
+            (* XXX is it a good idea to explode slices? *)
             let id = match val_exp_list with 
               | [{Lic.ve_core=Lic.CallByPosLic({it=Lic.VAR_REF id},[])}] -> id
               | _ -> assert false
@@ -400,7 +399,7 @@ let (make_instance :
       | [] -> (
         match soc.Soc.have_mem with
           | None -> ctx, None
-          | Some _ -> (* pre/fby*)
+          | Some (_,_) -> (* pre/fby *)
             let ctx, m = create_instance_from_soc ctx soc in
             ctx, Some(m)
       )
@@ -503,6 +502,10 @@ let rec (actions_of_expression_acc: Lxm.t -> Soc.tbl ->
                   let res_type = get_exp_type lpl in
                   let full_profile = args_types @ res_type in
                   let sk = make_soc_key_of_node_exp (("",id),[]) full_profile in
+                  let fby_init_opt = 
+                    let init = val_exp_to_filter ctx.prg (List.hd val_exp_list) in
+                    if by_pos_op_flg.it = Lic.FBY then Some init else None
+                  in
                   try Soc.SocMap.find sk soc_tbl 
                   with Not_found ->
                     Verbose.exe ~flag:dbg (fun () ->
@@ -514,7 +517,7 @@ let rec (actions_of_expression_acc: Lxm.t -> Soc.tbl ->
                                        (String.concat "\n\t" klstr)^"\n");
                       flush stdout;
                     );
-                    raise (Undef_soc (sk, lxm, by_pos_op_flg.it, args_types))
+                    raise (Undef_soc (sk, lxm, by_pos_op_flg.it, args_types,fby_init_opt))
                 in
                 make_e2a_elt lxm clk lpl acc val_exp_list soc
               )
@@ -617,15 +620,11 @@ let (actions_of_equation: Lxm.t -> Soc.tbl -> ctx -> Lic.eq_info ->
     let ctx, actions, _, instances, deps =
       actions_of_expression lxm soc_tbl ctx clk left_loc right_part
     in
-(*     let final_action = clk_l, inputs, left_loc, Soc.Identity in *)
-(*     let deps = add deps final_action actions in *)
       ctx, actions, instances, deps
  
 (*********************************************************************************)
 open Soc
 
-(*********************************************************************************)
-
 let rec f: (LicPrg.t -> Lic.node_key -> Soc.key * Soc.tbl) = 
   fun prog mnk ->
     let rec (process_node : Lic.node_key -> Soc.tbl -> Soc.key * Soc.tbl) =
@@ -661,12 +660,12 @@ let rec f: (LicPrg.t -> Lic.node_key -> Soc.key * Soc.tbl) =
             with
               (* Il manque une dépendance, on essaie de la
                  traduire puis de retraduire le noeud courant. *)
-              | Undef_soc (sk,lxm,Lic.CALL { it = nk2 }, types) ->
+              | Undef_soc (sk,lxm,Lic.CALL { it = nk2 }, types,_) ->
                 let soc_tbl = snd (process_node nk2 soc_tbl) in
                 snd (process_node nk soc_tbl)
 
-              | Undef_soc (sk,lxm,pos_op, types) -> (
-                let soc = SocPredef.soc_interface_of_pos_op lxm pos_op types in
+              | Undef_soc (sk,lxm,pos_op, types, fby_init_opt) -> (
+                let soc = SocPredef.soc_interface_of_pos_op lxm pos_op types fby_init_opt in
                 if sk<>soc.key then (
                   print_string ("Soc key mismatch :\n\t" ^
                                    (SocUtils.string_of_soc_key sk) ^ "\n<>\n\t" ^
@@ -871,10 +870,5 @@ let rec f: (LicPrg.t -> Lic.node_key -> Soc.key * Soc.tbl) =
           | MetaOpLic                   -> soc_of_metaop node.Lic.node_key_eff soc_tbl
           | BodyLic b                   -> soc_of_body b soc_tbl
           | ExternLic                   -> soc_of_extern node soc_tbl
-
     in
     process_node mnk SocMap.empty
-   
-
-
-    
diff --git a/src/soc.ml b/src/soc.ml
index bb110dba..589d38d4 100644
--- a/src/soc.ml
+++ b/src/soc.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 08/04/2013 (at 10:30) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/04/2013 (at 13:25) by Erwan Jahier> *)
 
 (** Synchronous Object Component *)
 
@@ -21,7 +21,7 @@ type var = ident * var_type
 type key = 
     ident * 
     var_type list *  (* I/O type list *)
-    (int * int * int) option (* to deal with slices (useful?) *)
+    (int * int * int) option (* to deal with slices (unused FTTB) *)
 
 type instance = ident * key
 
diff --git a/src/socExecValue.ml b/src/socExecValue.ml
index 0516cea3..82dd6130 100644
--- a/src/socExecValue.ml
+++ b/src/socExecValue.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 05/04/2013 (at 11:39) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/04/2013 (at 13:24) by Erwan Jahier> *)
 
 let dbg = Some(Verbose.get_flag "exec")
 
@@ -37,7 +37,6 @@ type ctx = {
 }
 
 (**************************************************************************)
-
 let rec (get_top_var_type : Soc.var_expr -> Soc.var_type) =
   fun ve -> 
     match ve with
@@ -103,8 +102,6 @@ let rec (get_top_id : Soc.var_expr -> ident) =
   | Var(id,_) | Const(id,_) -> id
   | Field(ve, _, _) | Index(ve,_,_) -> get_top_id ve
 
-
-
 (* exported *)
 let (sadd_partial : substs  -> var_expr -> path -> t -> substs) =
   fun ct ve x v ->
@@ -153,10 +150,7 @@ let (sadd : substs -> path -> t -> substs) =
     in
     aux ct (List.rev x,v)
 
-
 (**************************************************************************)
-
-
 (* let filter_top_subst s = *)
 (*   List.fold_left *)
 (*     (fun acc (idl,v) ->  *)
@@ -224,7 +218,6 @@ let (dump_substs : substs -> unit) =
   fun s -> 
     dump_subst_list (substs_to_list s)
 
-
 (* XXX use a Rif reader *)
 let rec (read_enum : ident list -> ident) = 
   fun idl -> 
@@ -237,7 +230,6 @@ let rec pos_in_list i x l =
     | e::l -> if e=x then i else pos_in_list (i+1) x l
     | [] -> assert false (* should not occur *)
 
-
 let (read_value : var -> t) =
   fun (_,t) -> 
     match t with
@@ -260,7 +252,6 @@ let (read_value : var -> t) =
 (*       print_string msg; flush stdout; *)
 (*       assert false *)
 
-
 let (get_val : ident -> ctx -> t) =
   fun id ctx -> 
     let rec find ct p =
@@ -296,7 +287,9 @@ let rec (get_value : ctx -> var_expr -> t) =
       | Const(id_in,Int)  -> I (int_of_string id_in)
       | Const(id_in,Real) -> F (float_of_string id_in)
       | Const(id,Enum(_,idl)) -> E(id, pos_in_list 0 id idl)
-      | Const(id,_) -> assert false  (* finish me! *)
+      | Const(id,Array(_vt,i)) -> get_val id ctx
+      | Const(id,Struct _) -> get_val id ctx
+      | Const(id,Alpha _) -> assert false (* todo *)
       | Field(ve,fn,t) -> 
         let s = get_value ctx ve in
         (match s with
@@ -336,8 +329,6 @@ let rec (get_value : ctx -> var_expr -> t) =
 (*       print_string msg; flush stdout; *)
 (*       assert false *)
 
-
-
 (* exported *)
 let (substitute_args_and_params : var_expr list -> var list -> ctx -> substs) =
   fun args params ctx -> 
@@ -358,8 +349,6 @@ let (substitute_params_and_args : var list -> var_expr list -> ctx -> substs) =
     in
     s
 
-
-
 let empty_ctx: ctx = {
   cpath = [];
   s     = Node [];
@@ -372,9 +361,9 @@ let rec (create_ctx : Soc.tbl -> Soc.t -> ctx) =
       fun soc cpath mem ->
         let mem =
           match soc.have_mem with
-            | Some(vt, Some(value)) ->
+            | Some(vt, Some(dft_value)) ->
               let name = (SocPredef.get_mem_name soc.key vt)::cpath in
-              let value = get_value empty_ctx value in
+              let value = get_value empty_ctx dft_value in
               sadd mem name value
             | Some(vt, None) ->
               let name = (SocPredef.get_mem_name soc.key vt)::cpath in
diff --git a/src/socPredef.ml b/src/socPredef.ml
index da8095cb..07541162 100644
--- a/src/socPredef.ml
+++ b/src/socPredef.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 08/04/2013 (at 10:43) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/04/2013 (at 11:56) by Erwan Jahier> *)
 
 (** Synchronous Object Code for Predefined operators. *)
 
@@ -76,6 +76,37 @@ let (get_mem_name : Soc.key -> var_type -> string) =
       | _ ->  "mem_"^k
 
 
+let of_fby_soc_key : Soc.var_expr -> Soc.key -> Soc.t = 
+  fun init sk -> 
+    let _,tl,_ = sk in
+    let t = List.hd tl in
+    let pre_mem:var = (get_mem_name sk t, t) in
+    let prof = soc_profile_of_types tl in
+    let v2,vout = match prof with ([_;v2],[vout]) -> v2,vout | _ -> assert false in
+    {
+      key      = sk;
+      profile  = prof;
+      instances = [];
+      have_mem = Some (t, Some(init)); (* so that pre_mem exist *)
+      step  = [
+        {
+          name    = "get";
+          lxm     = Lxm.dummy "predef soc";
+          idx_ins  = [];
+          idx_outs = [0];
+          impl    = Gaol([pre_mem],[Call([Var(vout)], Assign, [Var(pre_mem)])]);
+        };
+        {
+          name    = "set";  
+          lxm     = Lxm.dummy "predef soc";
+          idx_ins  = [1];
+          idx_outs = [];
+          impl    = Gaol([pre_mem],[Call([Var(pre_mem)], Assign, [Var(v2)])]);
+        };
+      ];
+      precedences = ["set", ["get"]];
+    }
+    
 (* exported *)
 let of_soc_key : Soc.key -> Soc.t = 
   fun sk -> 
@@ -184,7 +215,6 @@ let of_soc_key : Soc.key -> Soc.t =
           precedences   = [];
           have_mem = None;
         }
-      | "Lustre::fby"  -> assert false
       | "Lustre::if"  ->  {
         key      = sk;
         profile  = (sp tl);
@@ -216,7 +246,7 @@ let of_soc_key : Soc.key -> Soc.t =
               lxm      = Lxm.dummy "nor soc";
               idx_ins  = [0];
               idx_outs = [0];
-              impl     = Boolred(0,0, size);
+              impl     = Boolred(0, 0, size);
             }
           ];
           Soc.have_mem    = None;
@@ -326,10 +356,8 @@ let make_slice_soc: Lic.slice_info -> Soc.var_type -> Soc.t =
         ];
         precedences   = [];
         have_mem = None;
-(*         init      = None; *)
       } 
 
-
 let (make_merge_soc: Soc.key -> Soc.t) = 
   fun sk -> 
     let (id, tl, _) = sk in
@@ -404,7 +432,6 @@ let make_array_concat_soc: int -> int -> Soc.var_type -> Soc.t =
         have_mem = None;
       } 
 
-
 let make_hat_soc: int -> Soc.var_type -> Soc.t = 
   fun i t -> 
     let array_type = 
@@ -429,8 +456,6 @@ let make_hat_soc: int -> Soc.var_type -> Soc.t =
         have_mem = None;
       } 
 
-
-
 let output_type_of_op op tl =
   match op with
     | "Lustre::eq"
@@ -447,154 +472,62 @@ let output_type_of_op op tl =
     | "Lustre::if" -> List.hd (List.tl tl)
     | _ -> List.hd tl
 
-
 let (soc_interface_of_pos_op: 
-       Lxm.t -> Lic.by_pos_op -> Soc.var_type list -> Soc.t) =
-  fun lxm op types ->
-    match (op, types) with
-      | Lic.PREDEF_CALL ({Lxm.it=("Lustre","if"),[]}), _   -> 
+       Lxm.t -> Lic.by_pos_op -> Soc.var_type list -> Soc.var_expr option -> Soc.t) =
+  fun lxm op types fby_init_opt ->
+    match (op, types,fby_init_opt) with
+      | Lic.PREDEF_CALL ({Lxm.it=("Lustre","if"),[]}),_ ,_  -> 
         let concrete_type = List.nth types 1 in 
         let soc = of_soc_key ("Lustre::if", types@[concrete_type], None) in
         instanciate_soc soc concrete_type
-      | Lic.PREDEF_CALL {Lxm.it=(op,sargs)}, _ -> 
+      | Lic.PREDEF_CALL {Lxm.it=(op,sargs)}, _, _ -> 
         assert (sargs=[]);
         let soc_name = Ident.string_of_long op in
         let out_type = output_type_of_op soc_name types in
         let soc = of_soc_key (soc_name, types@[out_type], None) in
         soc 
-      | Lic.FBY, _ -> 
+      | Lic.FBY, _, Some init -> 
         let concrete_type = List.nth types 0 in 
-        let soc = of_soc_key (("Lustre::fby"), types@[concrete_type], None) in
+        let soc = of_fby_soc_key init (("Lustre::fby"), types@[concrete_type], None) in
         instanciate_soc soc concrete_type
-      | Lic.PRE, _ ->
+      | Lic.FBY, _, None -> assert false (* should ot occur *)
+      | Lic.PRE, _, _ ->
         let concrete_type = List.nth types 0 in 
         let soc = of_soc_key (("Lustre::pre"), types@[concrete_type], None) in
         instanciate_soc soc concrete_type
-      | Lic.CURRENT, _ ->
+      | Lic.CURRENT, _, _ ->
         let concrete_type = List.nth types 0 in 
         let soc = of_soc_key (("Lustre::current"), types@[concrete_type], None) in
         instanciate_soc soc concrete_type
-      | Lic.ARROW, _ ->
+      | Lic.ARROW, _, _ ->
         let concrete_type = List.nth types 0 in 
         let soc = of_soc_key (("Lustre::arrow"), types@[concrete_type], None) in
         let soc = instanciate_soc soc concrete_type in
         soc
-      | Lic.HAT i,_ -> 
+      | Lic.HAT i,_, _ -> 
         let elt_type = List.nth types 0 in
         (make_hat_soc i elt_type)
 
-      | Lic.ARRAY, _ ->  
+      | Lic.ARRAY, _, _ ->  
         let elt_type = List.nth types 0 in
         let i = (List.length types) in 
         (make_array_soc i elt_type)
 
-      | Lic.CONCAT ,  [Array (t1, s1); Array (t2, s2)]->  
+      | Lic.CONCAT, [Array (t1, s1); Array (t2, s2)], _->  
         assert (t1=t2);
         (make_array_concat_soc s1 s2 t1)
-      | Lic.CONCAT ,  _ ->  assert false
-
-      | Lic.CALL _,_ ->  assert false (* XXX todo *)
-      | Lic.CONST _ ,  _ ->  assert false
+      | Lic.CONCAT ,  _, _ ->  assert false
 
+      | Lic.CALL _,_,_ ->  assert false 
+      | Lic.CONST _ ,  _,_ ->  assert false
 
       (* Those are not soc *)
-      | Lic.ARRAY_SLICE sinfo,_  -> assert false
-
-      | Lic.VAR_REF _, _ -> assert false
-      | Lic.CONST_REF _, _ -> assert false
-      | Lic.STRUCT_ACCESS _, _ -> assert false
-      | Lic.WHEN _, _ -> assert false
-      | Lic.TUPLE, _ -> assert false
-      | Lic.ARRAY_ACCES _, _ -> assert false
-        
+      | Lic.ARRAY_SLICE sinfo,_,_  -> assert false
+
+      | Lic.VAR_REF _, _,_ -> assert false
+      | Lic.CONST_REF _, _,_ -> assert false
+      | Lic.STRUCT_ACCESS _, _,_ -> assert false
+      | Lic.WHEN _, _,_ -> assert false
+      | Lic.TUPLE, _,_ -> assert false
+      | Lic.ARRAY_ACCES _, _,_ -> assert false
 
-(* 
-21/02/2013 : ai-je vraiment besoin de ca maintenant que les metaop ont été encapsulé
-   dans des noeuds ? bon, je garde quelque temps en commentaire au cas ou...
-      | Lic.Fill(node,size), _ 
-      | Lic.FillRed(node,size), _ 
-      | Lic.Red(node,size), _ -> 
-        let soc = _key node with
-          | Undef name -> Undef name
-             (* Given 
-                - a node n of type 
-                tau * tau_1 * ... * tau_n -> tau * teta_1 * ... * teta_l
-                - a integer c
-                
-                the red expression has the profile: 
-                tau * tau_1^c * ... * tau_n^c  -> tau * teta_1^c * ... * teta_l^c
-             *)
-          | Some  c -> 
-            let arrayse l = 
-              let exp (id,t) = 
-                match t with 
-                  | Soc.Alpha _  -> assert false 
-                  | t -> id, Soc.Array(t,size)
-              in
-              match l with 
-                | [] -> assert false 
-                | (id,t)::tail ->(id, t):: (List.map exp tail)
-            in
-            Some  { 
-                     (* XXX la clef devrait contenir le node et la taille ? 
-		                  
-		                  Les socosants iterateurs ne meritent ils pas un traitement
-		                  specifique ?
-		                  Ce que je veux, c'est 
-		                  - y mettre toute l'information necessaire pour pouvoir generer 
-		                  la boucle for qui va bien,
-		                  - garder une forme synthetique qui permette de faire des 
-		                  analyses et de la vérification
-
-	                  *)
-              key = ("fillred" ^ node ^ (string_of_int size), [], None);
-              profile  = 
-                (arrayse (fst c.profile), arrayse (snd c.profile));
-              instances = c.instances;
-              step  = c.step; 
-                     (* XXX non ! le probleme, c'est que cette methode step 
-		                  doit être fabriquée à partir de la methode step 
-		                  du noeud itéré, et que je n'ai rien pour exprimer 
-		                  ce genre de truc pour l'instant.
-	                  *)
-              precedences  = [];
-              init = c.init; (* XXX non ! *)
-            } 
-        )
-      | Lic.Map(node,size), _ -> 
-        let soc  = _key node with
-          | Undef name -> Undef name
-          | Some  c -> 
-                 (* Given 
-                    - a node n of type: tau_1 * ... * tau_n -> teta_1 * ... * teta_l
-                    - an integer c
-                    
-                    The profile of map is: 
-                    tau_1^c * ... * tau_n^c -> teta_1^c * ... * teta_l^c
-                 *)
-            let arrayse l = 
-              let exp (id,t) = 
-                match t with 
-                  | Soc.Alpha _  -> assert false 
-                  | t -> id, Soc.Array(t,size)
-              in
-              (List.map exp l)
-            in
-            Some  { 
-              key = ("map" ^ node ^ (string_of_int size), [], None);
-              profile  = 
-                (arrayse (fst c.profile), arrayse (snd c.profile));
-              instances = c.instances;
-              step  = c.step; (* XXX non ! *)
-              precedences   = [];
-              init      = c.init;
-            } 
-        )
-      | Lic.BoolRed(i,j,k), _  -> Errors.finish_me lxm ; assert false
-
-      (* Cas particulier du boolred *)
-      | Lic.DIESE, _-> Errors.finish_me lxm ; assert false
-      | Lic.NOR ,_-> Errors.finish_me lxm ; assert false
-
-
- *)
diff --git a/src/socPredef.mli b/src/socPredef.mli
index 1bbd9e94..cff5cd17 100644
--- a/src/socPredef.mli
+++ b/src/socPredef.mli
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 03/04/2013 (at 17:54) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/04/2013 (at 11:48) by Erwan Jahier> *)
 
 (** Synchronous Object Code for Predefined operators. *)
 
@@ -11,7 +11,7 @@ val of_soc_key : Soc.key -> Soc.t
     Le type des opérandes permet de traiter les opérateurs surchargés. 
 *)
 val soc_interface_of_pos_op: 
-    Lxm.t -> Lic.by_pos_op -> Soc.var_type list -> Soc.t
+    Lxm.t -> Lic.by_pos_op -> Soc.var_type list -> Soc.var_expr option -> Soc.t
 
 val get_mem_name : Soc.key -> Soc.var_type -> string
 
diff --git a/test/lus2lic.sum b/test/lus2lic.sum
index 209a5951..e3dec3af 100644
--- a/test/lus2lic.sum
+++ b/test/lus2lic.sum
@@ -1,4 +1,4 @@
-Test Run By jahier on Fri Apr  5 17:15:01 2013
+Test Run By jahier on Mon Apr  8 12:00:19 2013
 Native configuration is i686-pc-linux-gnu
 
 		=== lus2lic tests ===
diff --git a/test/lus2lic.time b/test/lus2lic.time
index 152bda03..72603aab 100644
--- a/test/lus2lic.time
+++ b/test/lus2lic.time
@@ -1,2 +1,2 @@
-testcase ./lus2lic.tests/non-reg.exp completed in 66 seconds
+testcase ./lus2lic.tests/non-reg.exp completed in 25 seconds
 testcase ./lus2lic.tests/progression.exp completed in 0 seconds
diff --git a/todo.org b/todo.org
index 11061f4f..98afb72c 100644
--- a/todo.org
+++ b/todo.org
@@ -31,17 +31,6 @@ que de lancer luciole
 ** TODO Écrire un test qui mette en jeu exhaustivement tous les operateurs
    - State "TODO"       from ""           [2013-03-19 Tue 10:38]
 
-
-** TODO Traiter la fleche plus proprement.
-   - State "TODO"       from ""           [2013-04-02 Tue 08:33]
-
-En fait il me suffirait de m'inspirer de ce que j'ai fait dans le condact
-avec la variable "first_instant" !!!
-
-** TODO Translate the fby properly into a soc 
-   - State "TODO"       from ""           [2013-04-04 Thu 17:10]
-vs "-> pre" as it is done actually in file:~/lus2lic/src/ast2lic.ml::468
-
 ** TODO slice
    - State "TODO"       from ""           [2013-04-05 Fri 11:18]
 ** TODO fonctions externes 
diff --git a/todo.org_archive b/todo.org_archive
index 9d90f772..373bf31d 100644
--- a/todo.org_archive
+++ b/todo.org_archive
@@ -596,6 +596,44 @@ XXX essayer de virer le constructeur Oper qui n'a pas l'air de servir à grand c
   :END:
 
 
+* TODO Traiter la fleche plus proprement.
+   - State "TODO"       from ""           [2013-04-02 Tue 08:33]
+  :PROPERTIES:
+  :ARCHIVE_TIME: 2013-04-08 Mon 13:07
+  :ARCHIVE_FILE: ~/lus2lic/todo.org
+  :ARCHIVE_OLPATH: lus2lic -exec
+  :ARCHIVE_CATEGORY: lv6
+  :ARCHIVE_TODO: TODO
+  :END:
+
+En fait il me suffirait de m'inspirer de ce que j'ai fait dans le condact
+avec la variable "first_instant" !!!
+
+* TODO Translate the fby properly into a soc 
+   - State "TODO"       from ""           [2013-04-04 Thu 17:10]
+  :PROPERTIES:
+  :ARCHIVE_TIME: 2013-04-08 Mon 13:07
+  :ARCHIVE_FILE: ~/lus2lic/todo.org
+  :ARCHIVE_OLPATH: lus2lic -exec
+  :ARCHIVE_CATEGORY: lv6
+  :ARCHIVE_TODO: TODO
+  :END:
+vs "-> pre" as it is done actually in file:~/lus2lic/src/ast2lic.ml::468
+
+* TODO slice
+  - State "TODO"       from ""           [2013-04-05 Fri 11:18]
+  :PROPERTIES:
+  :ARCHIVE_TIME: 2013-04-08 Mon 13:27
+  :ARCHIVE_FILE: ~/lus2lic/todo.org
+  :ARCHIVE_OLPATH: lus2lic -exec
+  :ARCHIVE_CATEGORY: lv6
+  :ARCHIVE_TODO: TODO
+  :END:
+
+
+
+
+
 
 
 
-- 
GitLab