diff --git a/src/compile.ml b/src/compile.ml index a03e36fbdfff7ff6c92b0cd5e1adc51e63f4bdce..b67fb5657ab5c88cb6232a423c0ea93927224a09 100644 --- a/src/compile.ml +++ b/src/compile.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 17/01/2013 (at 10:39) by Erwan Jahier> *) +(* Time-stamp: <modified the 18/01/2013 (at 15:59) by Erwan JAHIER> *) open Lxm diff --git a/src/l2lExpandArrays.ml b/src/l2lExpandArrays.ml index 7e48d1e6f323a6f0d42635054dbb4c9f8be4790e..675ecead2f475f6df80b40b026d72db7f76a3a4f 100644 --- a/src/l2lExpandArrays.ml +++ b/src/l2lExpandArrays.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 21/12/2012 (at 14:46) by Erwan Jahier> *) +(** Time-stamp: <modified the 18/01/2013 (at 15:47) by Erwan JAHIER> *) (* Replace structures and arrays by as many variables as necessary. Since structures can be recursive, it migth be a lot of new variables... @@ -49,7 +49,7 @@ type local_ctx = { *) let new_var str lctx type_eff clock_eff = let id = Ident.of_string (LicName.new_local_var str) in -(* let id = lctx.idgen str in (* XXX use which one ??? *) *) + (* let id = lctx.idgen str in (* XXX use which one ??? *) *) let var = { var_name_eff = id; @@ -60,7 +60,7 @@ let new_var str lctx type_eff clock_eff = var_clock_eff = id, clock_eff; } in - var + var (* for local use: polymorphic predef operators should not transformed; hence, whenever we reach a Any/AnyNum type, we raise that exception and skip the @@ -86,7 +86,7 @@ let clone_var node_env vi str type_eff = var_clock_eff = clk_id, snd vi.var_clock_eff; } in - (* Hashtbl.add node_env.lenv_vars id var; *) + (* Hashtbl.add node_env.lenv_vars id var; *) var @@ -186,34 +186,37 @@ let (expand_left : local_ctx -> left -> left list) = fun left -> match left with | LeftVarLic (vi,lxm) -> - let make_left lctx lxm vi prefix teff = - LeftVarLic (clone_var lctx vi prefix teff, lxm) - in - gen_var_trees (make_left lctx lxm vi) "" vi.var_type_eff + let make_left lctx lxm vi prefix teff = + LeftVarLic (clone_var lctx vi prefix teff, lxm) + in + gen_var_trees (make_left lctx lxm vi) "" vi.var_type_eff | LeftFieldLic (l,id,t) -> - (match var_trees_of_left l with - | S fl -> List.assoc id fl - | A _ | L _ -> assert false - ) + (match var_trees_of_left l with + | S fl -> List.assoc id fl + | A _ | L _ -> assert false + ) | LeftArrayLic (l,i,t) -> - (match var_trees_of_left l with - | A array -> List.nth array i - | S _ | L _ -> assert false - ) + (match var_trees_of_left l with + | A array -> List.nth array i + | S _ | L _ -> assert false + ) | LeftSliceLic (l,si,t) -> - (match var_trees_of_left l with - | A array -> - let index_list = index_list_of_slice_info si in - let l = List.map (fun i -> List.nth array i) index_list in - A l - | S _ | L _ -> assert false - ) + (match var_trees_of_left l with + | A array -> + let index_list = index_list_of_slice_info si in + let l = List.map (fun i -> List.nth array i) index_list in + A l + | S _ | L _ -> assert false + ) in let vt = try var_trees_of_left left - with _ -> assert false - (* should not occur: just a defense against nth and assoc *) + with + | Polymorphic -> assert false + | Not_found -> assert false + | Failure "nth" -> assert false + (* should not occur: just a defense against nth and assoc *) in - flatten_var_tree vt + flatten_var_tree vt diff --git a/src/l2lExpandNodes.ml b/src/l2lExpandNodes.ml index 93e39f59d3da8f8ca1355de8dabdbf52a0872b90..83ca5f7a6cecd03ea0bd5259ff079a9292906848 100644 --- a/src/l2lExpandNodes.ml +++ b/src/l2lExpandNodes.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 16/01/2013 (at 18:06) by Erwan Jahier> *) +(* Time-stamp: <modified the 18/01/2013 (at 15:36) by Erwan JAHIER> *) open Lxm @@ -49,7 +49,7 @@ let rec (get_node_body : local_ctx -> Lic.node_exp -> Lic.node_body option) = | MetaOpLic _ -> None (********************************************************************************) -type subst = (var_info * var_info) list +type subst = (Ident.t * var_info) list let rec (substitute : subst -> Lic.eq_info Lxm.srcflagged -> Lic.eq_info Lxm.srcflagged) = fun s { it = (lhs,ve) ; src = lxm } -> @@ -59,7 +59,7 @@ let rec (substitute : and subst_in_left s left = match left with - | LeftVarLic(v,lxm) -> (try LeftVarLic(List.assoc v s,lxm) with Not_found -> left) + | LeftVarLic(v,lxm) -> (try LeftVarLic(List.assoc v.var_name_eff s,lxm) with Not_found -> left) | LeftFieldLic(left,id,t) -> LeftFieldLic(subst_in_left s left,id,t) | LeftArrayLic(left,i, t) -> LeftArrayLic(subst_in_left s left,i, t) | LeftSliceLic(left,si,t) -> LeftSliceLic(subst_in_left s left,si,t) @@ -78,7 +78,7 @@ and (subst_in_val_exp : subst -> val_exp -> val_exp) = | VAR_REF id -> let id' = try - let var = snd(List.find (fun (v,_) -> v.var_name_eff = id) s) in + let var = List.assoc id s in var.var_name_eff with Not_found -> id in @@ -89,12 +89,12 @@ and (subst_in_val_exp : subst -> val_exp -> val_exp) = | ARRAY(vel) -> ARRAY(List.map (subst_in_val_exp s) vel) | WHEN(AstCore.Base) -> WHEN(AstCore.Base) | WHEN(AstCore.NamedClock {src=lxm;it=(cc,cv)}) -> - let var = snd(List.find (fun (v,_) -> v.var_name_eff = cv) s) in + let var = List.assoc cv s in let cv = var.var_name_eff in WHEN(AstCore.NamedClock {src=lxm;it=(cc,cv)}) | PREDEF_CALL _| CALL _ | PRE | ARROW | FBY | CURRENT | TUPLE | CONCAT | STRUCT_ACCESS _ | ARRAY_ACCES _ | ARRAY_SLICE _ | MERGE _ - (* | CONST _ *) + (* | CONST _ *) -> by_pos_op in CallByPosLic(Lxm.flagit by_pos_op lxm, OperLic vel) @@ -106,7 +106,7 @@ and (subst_in_val_exp : subst -> val_exp -> val_exp) = in newve -let mk_loc_subst = List.combine +let mk_loc_subst l1 l2 = List.combine (List.map (fun v -> v.var_name_eff) l1) l2 (********************************************************************************) (** The functions below accumulate @@ -125,17 +125,17 @@ let (mk_fresh_loc : local_ctx -> var_info -> var_info) = new_var (Ident.to_string v.var_name_eff) lctx v.var_type_eff v.var_clock_eff let (mk_input_subst: local_ctx -> Lxm.t -> var_info list -> - Lic.val_exp list -> acc -> subst * acc) = + Lic.val_exp list -> acc -> subst * acc) = fun lctx lxm vl vel acc -> assert(List.length vl = List.length vel); List.fold_left2 (fun (s,(a_acc,e_acc,v_acc)) v ve -> (* we create a new var for each node argument, which is a little - bit « bourrin » if ever ve is a simple ident... *) - let nv = mk_fresh_loc lctx v in - let neq = [LeftVarLic(nv,lxm)],ve in - let neq = flagit neq lxm in - (v,nv)::s,(a_acc, neq::e_acc, nv::v_acc) + bit « bourrin » if ever ve is a simple ident... *) + let nv = mk_fresh_loc lctx v in + let neq = [LeftVarLic(nv,lxm)],ve in + let neq = flagit neq lxm in + (v.var_name_eff,nv)::s,(a_acc, neq::e_acc, nv::v_acc) ) ([],acc) vl @@ -143,33 +143,33 @@ let (mk_input_subst: local_ctx -> Lxm.t -> var_info list -> (* create fresh vars if necessary *) let (mk_output_subst : local_ctx -> Lxm.t -> var_info list -> Lic.left list -> - acc -> subst * acc) = + acc -> subst * acc) = fun lctx lxm vl leftl acc -> assert(List.length vl = List.length leftl); List.fold_left2 (fun (s,acc) v left -> - match left with - | LeftVarLic(v2,lxm) -> (v,v2)::s, acc - | _ -> - let nv = mk_fresh_loc lctx v in - let nv_id = nv.var_name_eff in - let nve = { - ve_core = CallByPosLic({it=VAR_REF nv_id;src = lxm },OperLic []); - ve_typ = [nv.var_type_eff]; - ve_clk = [snd nv.var_clock_eff] - } - in - let neq = [left], nve in - let neq = flagit neq lxm in - (* for equations of the form - x.field = n(...); - we create - - a fresh var "_v" - - define the equation "x.field = _v;" - - create the substition n_output_par/_v - *) - let (aa,ae,av) = acc in - (v,nv)::s, (aa, neq::ae, nv::av) + match left with + | LeftVarLic(v2,lxm) -> (v.var_name_eff,v2)::s, acc + | _ -> + let nv = mk_fresh_loc lctx v in + let nv_id = nv.var_name_eff in + let nve = { + ve_core = CallByPosLic({it=VAR_REF nv_id;src = lxm },OperLic []); + ve_typ = [nv.var_type_eff]; + ve_clk = [snd nv.var_clock_eff] + } + in + let neq = [left], nve in + let neq = flagit neq lxm in + (* for equations of the form + x.field = n(...); + we create + - a fresh var "_v" + - define the equation "x.field = _v;" + - create the substition n_output_par/_v + *) + let (aa,ae,av) = acc in + (v.var_name_eff,nv)::s, (aa, neq::ae, nv::av) ) ([],acc) vl diff --git a/src/l2lRmPoly.ml b/src/l2lRmPoly.ml index d2b215482feb6c64e066644d7ab436b283ef0b96..159e0ec4f6de3d71025a78d1e91daa89b17f31af 100644 --- a/src/l2lRmPoly.ml +++ b/src/l2lRmPoly.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 20/12/2012 (at 11:01) by Erwan Jahier> *) +(* Time-stamp: <modified the 18/01/2013 (at 18:20) by Erwan JAHIER> *) (* Source 2 source transformation : @@ -65,120 +65,130 @@ let rec doit (inprg : LicPrg.t) : LicPrg.t = à la recherche d'appel de noeuds poly *) let do_assert a = Lxm.flagit (do_exp m a.it) a.src and do_eq eq = - Lxm.flagit ( - fst eq.it, - do_exp m (snd eq.it) - ) eq.src + Lxm.flagit (List.map (do_left m) (fst eq.it), + do_exp m (snd eq.it)) + eq.src in { asserts_eff = List.map do_assert nb.asserts_eff; eqs_eff = List.map do_eq nb.eqs_eff; } + + and do_left (m: Lic.type_matches) (l: Lic.left) : Lic.left = + let rec aux l = + match l with + | LeftVarLic (var_info, lxm) -> LeftVarLic(do_var_info m var_info, lxm) + | LeftFieldLic(left, id, t) -> LeftFieldLic(aux left, id, Lic.subst_matches m t) + | LeftArrayLic(left, int, t) -> LeftArrayLic(aux left, int, Lic.subst_matches m t) + | LeftSliceLic(left, si, t) -> LeftSliceLic(aux left, si, Lic.subst_matches m t) + in + aux l + + and do_var_info (m: Lic.type_matches) (vi:Lic.var_info) : Lic.var_info = + { vi with var_type_eff = Lic.subst_matches m vi.var_type_eff } + (* TRAITEMENT DES EXP : on passe en parametre un Lic.type_matches *) - and do_exp - (m: Lic.type_matches) - (e: Lic.val_exp) - : Lic.val_exp = - let typ' = Lic.apply_type_matches m e.ve_typ in - let core' = match e.ve_core with - | CallByPosLic (posop, OperLic ops) -> ( - let ops' = OperLic (List.map (do_exp m) ops) in - match posop.it with - | PREDEF_CALL (pop,sas) -> + and do_exp (m: Lic.type_matches) (e: Lic.val_exp) : Lic.val_exp = + let typ' = Lic.apply_type_matches m e.ve_typ in + let core' = match e.ve_core with + | CallByPosLic (posop, OperLic ops) -> ( + let ops' = OperLic (List.map (do_exp m) ops) in + match posop.it with + | PREDEF_CALL (pop,sas) -> (* 12/07 ICI version provisoise : les macros predef n'existe plus ! (ce sont des calls classiques) *) - assert (sas = []); - CallByPosLic (posop, ops') - | CALL nk -> - let ne = - match LicPrg.find_node inprg nk.it with - | Some n -> n - | None -> assert false - in - let nk' = if node_is_poly ne then ( - Verbose.exe ~flag:dbg (fun () -> - Printf.fprintf stderr "#DBG: CALL poly node %s\n" - (Lxm.details posop.src)); - let intypes = types_of_operands ops' in - let (inpars, _) = Lic.profile_of_node_exp ne in - let tmatches = UnifyType.is_matched inpars intypes in - {it=solve_poly tmatches nk.it ne; src=nk.src} - ) else nk in - let posop' = Lxm.flagit (CALL nk') posop.src in - CallByPosLic (posop', ops') - | x -> + assert (sas = []); + CallByPosLic (posop, ops') + | CALL nk -> + let ne = + match LicPrg.find_node inprg nk.it with + | Some n -> n + | None -> assert false + in + let nk' = if node_is_poly ne then ( + Verbose.exe ~flag:dbg (fun () -> + Printf.fprintf stderr "#DBG: CALL poly node %s\n" + (Lxm.details posop.src)); + let intypes = types_of_operands ops' in + let (inpars, _) = Lic.profile_of_node_exp ne in + let tmatches = UnifyType.is_matched inpars intypes in + {it=solve_poly tmatches nk.it ne; src=nk.src} + ) else nk in + let posop' = Lxm.flagit (CALL nk') posop.src in + CallByPosLic (posop', ops') + | x -> (* dans tout les autre cas, raf ? *) - CallByPosLic (posop, ops') - ) - | CallByNameLic (namop, idops) -> - let idops' = List.map (fun (id, ve) -> (id, (do_exp m) ve)) idops in - CallByNameLic (namop, idops') - in - { e with ve_core = core'; ve_typ = typ' } + CallByPosLic (posop, ops') + ) + | CallByNameLic (namop, idops) -> + let idops' = List.map (fun (id, ve) -> (id, (do_exp m) ve)) idops in + CallByNameLic (namop, idops') + in + { e with ve_core = core'; ve_typ = typ' } (* TRAITEMENT DES PARAMS STATIQUES *) - and do_static_arg - (m: Lic.type_matches) - (a: Lic.static_arg) - : Lic.static_arg = - match a with - | ConstStaticArgLic (id, cst) -> a - | TypeStaticArgLic (id, ty) -> a - | NodeStaticArgLic (id, nk) -> ( - match nk with - | (("Lustre",_),[]) -> a - | _ -> - let ne = - match LicPrg.find_node inprg nk with - | Some n -> n - | None -> assert false - in - let nk' = solve_poly m nk ne in - NodeStaticArgLic (id, nk') - ) + and do_static_arg + (m: Lic.type_matches) + (a: Lic.static_arg) + : Lic.static_arg = + match a with + | ConstStaticArgLic (id, cst) -> a + | TypeStaticArgLic (id, ty) -> a + | NodeStaticArgLic (id, nk) -> ( + match nk with + | (("Lustre",_),[]) -> a + | _ -> + let ne = + match LicPrg.find_node inprg nk with + | Some n -> n + | None -> assert false + in + let nk' = solve_poly m nk ne in + NodeStaticArgLic (id, nk') + ) (** Gros du boulot : soit un noeud poly, soit un profil attendu, fabrique s'il n'existe pas déjà , un noeud non poly adéquat ... *) - and solve_poly (tmatches: Lic.type_matches) (nk: Lic.node_key) (ne: Lic.node_exp) - : Lic.node_key = - Verbose.printf ~flag:dbg - "#DBG: L2lRmPoly.solve_poly nk='%s'\n# prof=%s'\n# matches='%s'\n" - (Lic.string_of_node_key nk) - (Lic.string_of_type_profile (Lic.profile_of_node_exp ne)) - (Lic.string_of_type_matches tmatches) - ; - let do_var vi = - let nt = Lic.subst_matches tmatches vi.var_type_eff in - assert(not (Lic.type_is_poly nt)); - { vi with var_type_eff = nt } - in + and solve_poly (tmatches: Lic.type_matches) (nk: Lic.node_key) (ne: Lic.node_exp) + : Lic.node_key = + Verbose.printf ~flag:dbg + "#DBG: L2lRmPoly.solve_poly nk='%s'\n# prof=%s'\n# matches='%s'\n" + (Lic.string_of_node_key nk) + (Lic.string_of_type_profile (Lic.profile_of_node_exp ne)) + (Lic.string_of_type_matches tmatches) + ; + let do_var vi = + let nt = Lic.subst_matches tmatches vi.var_type_eff in + assert(not (Lic.type_is_poly nt)); + { vi with var_type_eff = nt } + in (* nouvelle clé unique = ancienne + tmatches *) - let (nid, sargs) = nk in - let sargs' = sargs@(static_args_of_matches tmatches) in - let nk' = (nid, sargs') in - let def' = match ne.def_eff with - | ExternLic - | AbstractLic _ -> assert false - | MetaOpLic (bid, sas) -> MetaOpLic (bid, List.map (do_static_arg tmatches) sas) - | BodyLic nb -> BodyLic(do_body tmatches nb) - in - let ne' = { - node_key_eff = nk'; - inlist_eff = List.map do_var ne.inlist_eff; - outlist_eff = List.map do_var ne.outlist_eff; - loclist_eff = (match ne.loclist_eff with - | None -> None - | Some vl -> Some (List.map do_var vl) - ); - def_eff = def'; - has_mem_eff = ne.has_mem_eff; - is_safe_eff = ne.is_safe_eff; - lxm = ne.lxm; - } in - res := LicPrg.add_node nk' ne' !res; - nk' - in + let (nid, sargs) = nk in + let sargs' = sargs@(static_args_of_matches tmatches) in + let nk' = (nid, sargs') in + let def' = match ne.def_eff with + | ExternLic + | AbstractLic _ -> assert false + | MetaOpLic (bid, sas) -> MetaOpLic (bid, List.map (do_static_arg tmatches) sas) + | BodyLic nb -> BodyLic(do_body tmatches nb) + in + let ne' = { + node_key_eff = nk'; + inlist_eff = List.map do_var ne.inlist_eff; + outlist_eff = List.map do_var ne.outlist_eff; + loclist_eff = (match ne.loclist_eff with + | None -> None + | Some vl -> Some (List.map do_var vl) + ); + def_eff = def'; + has_mem_eff = ne.has_mem_eff; + is_safe_eff = ne.is_safe_eff; + lxm = ne.lxm; + } in + res := LicPrg.add_node nk' ne' !res; + nk' + in (*LET's GO *) - LicPrg.iter_nodes do_node inprg; - !res + LicPrg.iter_nodes do_node inprg; + !res diff --git a/test/lus2lic.log.ref b/test/lus2lic.log.ref index ec4c5ff1202ebf74c1c9f4679e6690754221cd8a..e44328d285c1b045a5fdcb27337e02145563309e 100644 --- a/test/lus2lic.log.ref +++ b/test/lus2lic.log.ref @@ -1,4 +1,4 @@ -Test Run By jahier on Fri Jan 18 11:06:23 2013 +Test Run By jahier on Fri Jan 18 18:21:57 2013 Native configuration is i686-pc-linux-gnu === lus2lic tests === @@ -1599,7 +1599,7 @@ spawn ./lus2lic -o /tmp/m.lic should_fail/semantics/m.lus *** syntax error XFAIL: Test bad programs (semantics): lus2lic {-o /tmp/m.lic should_fail/semantics/m.lus} -testcase ./lus2lic.tests/non-reg.exp completed in 140 seconds +testcase ./lus2lic.tests/non-reg.exp completed in 157 seconds Running ./lus2lic.tests/progression.exp ... spawn ./lus2lic -o /tmp/when_enum.out should_work/broken/when_enum.lus *** Error in file "/home/jahier/lus2lic/test/should_work/broken/when_enum.lus", line 10, col 12 to 15, token 'toto': @@ -1686,13 +1686,7 @@ FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/not_a_constant.ec should_work/ spawn ./lus2lic -o /tmp/ply02.out should_work/broken/ply02.lus PASS: ./lus2lic { -o /tmp/ply02.out should_work/broken/ply02.lus} spawn ./lus2lic -ec -o /tmp/ply02.ec should_work/broken/ply02.lus - -*** oops: lus2lic internal error - File "objlinux/l2lExpandArrays.ml", line 213, column 14 -*** when compiling lustre program should_work/broken/ply02.lus - -*** You migth want to sent a bug report to jahier@imag.fr -FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/ply02.ec should_work/broken/ply02.lus} +PASS: ./lus2lic {-ec -o /tmp/ply02.ec should_work/broken/ply02.lus} spawn ./lus2lic -o /tmp/bug3.out should_work/broken/bug3.lus *** Error in file "/home/jahier/lus2lic/test/should_work/broken/bug3.lus", line 10, col 3 to 3, token 'x': *** @@ -1756,13 +1750,7 @@ FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/pfs.ec should_work/broken/pfs. spawn ./lus2lic -o /tmp/bad_call03.out should_work/broken/bad_call03.lus PASS: ./lus2lic { -o /tmp/bad_call03.out should_work/broken/bad_call03.lus} spawn ./lus2lic -ec -o /tmp/bad_call03.ec should_work/broken/bad_call03.lus - -*** oops: lus2lic internal error - File "objlinux/l2lExpandArrays.ml", line 213, column 14 -*** when compiling lustre program should_work/broken/bad_call03.lus - -*** You migth want to sent a bug report to jahier@imag.fr -FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/bad_call03.ec should_work/broken/bad_call03.lus} +PASS: ./lus2lic {-ec -o /tmp/bad_call03.ec should_work/broken/bad_call03.lus} spawn ./lus2lic -o /tmp/packages.out should_work/broken/packages.lus *** Error in file "/home/jahier/lus2lic/test/should_work/broken/packages.lus", line 22, col 27 to 29, token 'int': *** syntax error @@ -2063,13 +2051,7 @@ FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/ts02.ec should_work/broken/ts0 spawn ./lus2lic -o /tmp/overload.out should_work/broken/overload.lus PASS: ./lus2lic { -o /tmp/overload.out should_work/broken/overload.lus} spawn ./lus2lic -ec -o /tmp/overload.ec should_work/broken/overload.lus - -*** oops: lus2lic internal error - File "objlinux/l2lExpandArrays.ml", line 213, column 14 -*** when compiling lustre program should_work/broken/overload.lus - -*** You migth want to sent a bug report to jahier@imag.fr -FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/overload.ec should_work/broken/overload.lus} +PASS: ./lus2lic {-ec -o /tmp/overload.ec should_work/broken/overload.lus} spawn ./lus2lic -o /tmp/main.out should_work/broken/main.lus PASS: ./lus2lic { -o /tmp/main.out should_work/broken/main.lus} spawn ./lus2lic -ec -o /tmp/main.ec should_work/broken/main.lus @@ -2153,13 +2135,13 @@ spawn ./lus2lic -o /tmp/activation1.lic should_fail/semantics/broken/activation1 XPASS: Test bad programs (semantics): lus2lic {-o /tmp/activation1.lic should_fail/semantics/broken/activation1.lus} spawn ./lus2lic -o /tmp/bug.lic should_fail/semantics/broken/bug.lus XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/semantics/broken/bug.lus} -testcase ./lus2lic.tests/progression.exp completed in 8 seconds +testcase ./lus2lic.tests/progression.exp completed in 7 seconds === lus2lic Summary === -# of expected passes 709 -# of unexpected failures 85 +# of expected passes 712 +# of unexpected failures 82 # of unexpected successes 8 # of expected failures 26 # of unresolved testcases 5 -runtest completed at Fri Jan 18 11:08:51 2013 +runtest completed at Fri Jan 18 18:24:41 2013 diff --git a/test/lus2lic.sum b/test/lus2lic.sum index 1acee4418fbebf3179a7bdf16cf7b7e46bbd8b8c..f65501394a9896f010b75a232ba430ab05129fa0 100644 --- a/test/lus2lic.sum +++ b/test/lus2lic.sum @@ -1,4 +1,4 @@ -Test Run By jahier on Fri Jan 18 11:06:23 2013 +Test Run By jahier on Fri Jan 18 18:21:57 2013 Native configuration is i686-pc-linux-gnu === lus2lic tests === @@ -759,7 +759,7 @@ FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/const3.ec should_work/broken/c FAIL: without any option: ./lus2lic { -o /tmp/not_a_constant.out should_work/broken/not_a_constant.lus} FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/not_a_constant.ec should_work/broken/not_a_constant.lus} PASS: ./lus2lic { -o /tmp/ply02.out should_work/broken/ply02.lus} -FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/ply02.ec should_work/broken/ply02.lus} +PASS: ./lus2lic {-ec -o /tmp/ply02.ec should_work/broken/ply02.lus} FAIL: without any option: ./lus2lic { -o /tmp/bug3.out should_work/broken/bug3.lus} FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/bug3.ec should_work/broken/bug3.lus} FAIL: without any option: ./lus2lic { -o /tmp/when_not.out should_work/broken/when_not.lus} @@ -771,7 +771,7 @@ FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/inonout.ec should_work/broken/ FAIL: without any option: ./lus2lic { -o /tmp/pfs.out should_work/broken/pfs.lus} FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/pfs.ec should_work/broken/pfs.lus} PASS: ./lus2lic { -o /tmp/bad_call03.out should_work/broken/bad_call03.lus} -FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/bad_call03.ec should_work/broken/bad_call03.lus} +PASS: ./lus2lic {-ec -o /tmp/bad_call03.ec should_work/broken/bad_call03.lus} FAIL: without any option: ./lus2lic { -o /tmp/packages.out should_work/broken/packages.lus} FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/packages.ec should_work/broken/packages.lus} PASS: ./lus2lic { -o /tmp/when_node.out should_work/broken/when_node.lus} @@ -821,7 +821,7 @@ FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/cond01.ec should_work/broken/c FAIL: without any option: ./lus2lic { -o /tmp/ts02.out should_work/broken/ts02.lus} FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/ts02.ec should_work/broken/ts02.lus} PASS: ./lus2lic { -o /tmp/overload.out should_work/broken/overload.lus} -FAIL: Generate ec code : ./lus2lic {-ec -o /tmp/overload.ec should_work/broken/overload.lus} +PASS: ./lus2lic {-ec -o /tmp/overload.ec should_work/broken/overload.lus} PASS: ./lus2lic { -o /tmp/main.out should_work/broken/main.lus} UNRESOLVED: Time out: ./lus2lic {-ec -o /tmp/main.ec should_work/broken/main.lus} FAIL: without any option: ./lus2lic { -o /tmp/m.out should_work/broken/m.lus} @@ -845,8 +845,8 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman === lus2lic Summary === -# of expected passes 709 -# of unexpected failures 85 +# of expected passes 712 +# of unexpected failures 82 # of unexpected successes 8 # of expected failures 26 # of unresolved testcases 5 diff --git a/test/lus2lic.time b/test/lus2lic.time index 682e47abb85a717e64c354009011197a1fdbb82b..db843ef029963be8951829a3d0a44e769c416c58 100644 --- a/test/lus2lic.time +++ b/test/lus2lic.time @@ -1,2 +1,2 @@ -testcase ./lus2lic.tests/non-reg.exp completed in 140 seconds -testcase ./lus2lic.tests/progression.exp completed in 8 seconds +testcase ./lus2lic.tests/non-reg.exp completed in 157 seconds +testcase ./lus2lic.tests/progression.exp completed in 7 seconds diff --git a/test/should_work/broken/overload.lus b/test/should_work/overload.lus similarity index 100% rename from test/should_work/broken/overload.lus rename to test/should_work/overload.lus diff --git a/todo.org b/todo.org index 3dd759d6ba9f77d88d671ebffa57f1b8f47fa545..3780f2092554a59b34ba1250513cf1ca61316356 100644 --- a/todo.org +++ b/todo.org @@ -83,23 +83,6 @@ cd src; ../objlinux/lus2lic -vl 2 --nonreg-test should_fail/type/parametric_node file:test/should_fail/type/parametric_node2.lus -** TODO internal error in l2lExpandArrays.ml with -esa - - State "TODO" from "" [2013-01-18 Fri 10:48] -./lus2lic -esa -o /tmp/ply02.ec should_work/broken/ply02.lus - - oops: lus2lic internal error -File "objlinux/l2lExpandArrays.ml", line 213, column 14 - when compiling lustre program file:test/should_work/broken/ply02.lus - -nb : le mode -en ne marche pas bas bien non plus... - -./lus2lic -en -o /tmp/ply02.ec should_work/broken/ply02.lus - Error in file "/home/jahier/lus2lic/test/should_work/broken/ply02.lus", line 8, col 2 to 2, token 'o': - Variable o is already defined. - - - - ** TODO mauvais numero de ligne lors d'erreur d'instanciation de parametres de noeud - State "TODO" from "" [2012-12-21 Fri 10:58] diff --git a/todo.org_archive b/todo.org_archive index 571fe56da185389c9b292e9266a0e1c2d3ee5568..864d593d0d7eca089fedd550fb738fea0a5fc449 100644 --- a/todo.org_archive +++ b/todo.org_archive @@ -152,6 +152,30 @@ n'étaient pas générés ? Quoiqu'il en soit, c'est interessant de tester tous les noeuds ce que ne font pas mes scripts tcl en l'état. +* TODO internal error in l2lExpandArrays.ml with -esa + - State "TODO" from "" [2013-01-18 Fri 10:48] + :PROPERTIES: + :ARCHIVE_TIME: 2013-01-18 Fri 18:01 + :ARCHIVE_FILE: ~/lus2lic/todo.org + :ARCHIVE_OLPATH: Regressions introduites par Pascal + :ARCHIVE_CATEGORY: lv6 + :ARCHIVE_TODO: TODO + :END: +./lus2lic -esa -o /tmp/ply02.ec should_work/broken/ply02.lus + + oops: lus2lic internal error +File "objlinux/l2lExpandArrays.ml", line 213, column 14 + when compiling lustre program file:test/should_work/broken/ply02.lus + +nb : le mode -en ne marche pas bas bien non plus... + + ./lus2lic -en -o /tmp/ply02.ec should_work/broken/ply02.lus + Error in file "/home/jahier/lus2lic/test/should_work/broken/ply02.lus", line 8, col 2 to 2, token 'o': + Variable o is already defined. + +ok : it was dut to a bug in l2lRmPoly.ml: var types were not susbtituted in "Lic.left". + +