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

Add an option to control whether or not structured type should be expanded.

parent f8130603
No related branches found
No related tags found
No related merge requests found
(* Time-stamp: <modified the 15/01/2015 (at 13:43) by Erwan Jahier> *) (* Time-stamp: <modified the 27/02/2015 (at 09:50) by Erwan Jahier> *)
(*----------------------------------------------------------------------- (*-----------------------------------------------------------------------
** Copyright (C) - Verimag. ** Copyright (C) - Verimag.
*) *)
...@@ -42,12 +42,18 @@ let make argv = ...@@ -42,12 +42,18 @@ let make argv =
) )
in in
let soc = try Soc.SocMap.find sk soc_tbl with Not_found -> assert false in let soc = try Soc.SocMap.find sk soc_tbl with Not_found -> assert false in
let soc_outputs = (SocVar.expand_profile true false (snd soc.profile)) in let soc_inputs,soc_outputs = soc.profile in
let (vntl_i:Data.vntl) = (fst soc.profile) in let soc_inputs,soc_outputs = if opt.Lv6MainArgs.expand_io_type then
let (vntl_o:Data.vntl) = (snd soc.profile) in (SocVar.expand_profile true false (fst soc.profile)),
(* Lv6util.dump_entete oc; *) (SocVar.expand_profile true false (snd soc.profile))
(* RifIO.write_interface oc vntl_i vntl_o None None; *) else
(* RifIO.flush oc; *) soc_inputs,soc_outputs
in
let (vntl_i:Data.vntl) = soc_inputs in
let (vntl_o:Data.vntl) = soc_outputs in
(* Lv6util.dump_entete oc; *)
(* RifIO.write_interface oc vntl_i vntl_o None None; *)
(* RifIO.flush oc; *)
let (to_soc_subst : SocExecValue.ctx -> Soc.var list -> Data.subst list) = let (to_soc_subst : SocExecValue.ctx -> Soc.var list -> Data.subst list) =
fun ctx vl -> fun ctx vl ->
......
(* Time-stamp: <modified the 26/02/2015 (at 09:52) by Erwan Jahier> *) (* Time-stamp: <modified the 27/02/2015 (at 09:19) by Erwan Jahier> *)
(* (*
Le manager d'argument adapt de celui de lutin, plus joli Le manager d'argument adapt de celui de lutin, plus joli
N.B. solution un peu batarde : les options sont stockes, comme avant, dans Global, N.B. solution un peu batarde : les options sont stockes, comme avant, dans Global,
...@@ -30,6 +30,7 @@ type t = { ...@@ -30,6 +30,7 @@ type t = {
mutable expand_nodes : bool; mutable expand_nodes : bool;
mutable expand_node_call : string list; mutable expand_node_call : string list;
mutable expand_arrays : bool; mutable expand_arrays : bool;
mutable expand_io_type : bool;
mutable optim_ite : bool; mutable optim_ite : bool;
mutable gen_autotest : bool; mutable gen_autotest : bool;
mutable oc : Pervasives.out_channel; mutable oc : Pervasives.out_channel;
...@@ -91,6 +92,7 @@ let (make_opt : unit -> t) = ...@@ -91,6 +92,7 @@ let (make_opt : unit -> t) =
expand_nodes = false; expand_nodes = false;
expand_node_call = []; expand_node_call = [];
expand_arrays = false; expand_arrays = false;
expand_io_type = false;
optim_ite = false; optim_ite = false;
gen_autotest = false; gen_autotest = false;
(** the output channel *) (** the output channel *)
...@@ -284,6 +286,11 @@ let mkoptab (opt:t) : unit = ( ...@@ -284,6 +286,11 @@ let mkoptab (opt:t) : unit = (
(Arg.Unit (fun _ -> opt.expand_nodes <- true)) (Arg.Unit (fun _ -> opt.expand_nodes <- true))
["Expand all node calls in the main node."] ["Expand all node calls in the main node."]
; ;
mkopt opt
["-en"; "--expand-io-type"]
(Arg.Unit (fun _ -> opt.expand_io_type <- true))
["Expand structured types of the main node (impact the simulation only)."]
;
mkopt opt mkopt opt
["-enc"; "---expand-node-call"] ["-enc"; "---expand-node-call"]
~arg:" <string> " ~arg:" <string> "
......
...@@ -31,6 +31,7 @@ type t = { ...@@ -31,6 +31,7 @@ type t = {
mutable expand_nodes : bool; mutable expand_nodes : bool;
mutable expand_node_call : string list; mutable expand_node_call : string list;
mutable expand_arrays : bool; mutable expand_arrays : bool;
mutable expand_io_type : bool;
mutable optim_ite : bool; mutable optim_ite : bool;
mutable gen_autotest : bool; mutable gen_autotest : bool;
mutable oc : Pervasives.out_channel; mutable oc : Pervasives.out_channel;
......
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