Skip to content
Snippets Groups Projects
Commit 95d13330 authored by Pierre Loic Garoche's avatar Pierre Loic Garoche
Browse files

lustresf: change in model signature

parent 293f2afd
No related branches found
No related tags found
No related merge requests found
......@@ -249,17 +249,21 @@ let model =
let globals =
let int_typ = Corelang.mktyp Location.dummy_loc Lustre_types.Tydec_int in
List.map (fun k ->
Corelang.mkvar_decl
Location.dummy_loc
(k, (* name *)
int_typ, (* type *)
Corelang.dummy_clock_dec, (* clock *)
false, (* not a constant *)
None, (* no default value *)
None (* no parent known *)
),
(* Default value is zero *)
Corelang.mkexpr Location.dummy_loc (Lustre_types.Expr_const (Lustre_types.Const_int 0))
let vdecl =
Corelang.mkvar_decl
Location.dummy_loc
(k, (* name *)
int_typ, (* type *)
Corelang.dummy_clock_dec, (* clock *)
false, (* not a constant *)
None, (* no default value *)
None (* no parent known *)
) in
let init_val =
(* Default value is zero *)
Corelang.mkexpr Location.dummy_loc (Lustre_types.Expr_const (Lustre_types.Const_int 0))
in
{GlobalVarDef.variable = vdecl; init_val = init_val; }
)
["cent";
......
......@@ -64,7 +64,7 @@ let _ =
let module Model = (val model) in
let state_vars = Datatype.SF.states Model.model in
let global_vars =
List.map (fun (v,e) -> {Basetypes.GlobalVarDef.variable = v; init_val = e;})
(* List.map (fun (v,e) -> {Basetypes.GlobalVarDef.variable = v; init_val = e;})*)
(Datatype.SF.global_vars Model.model) in
let module T = CPS_lustre_generator.LustrePrinter (struct
......
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