|
|
@ -36,6 +36,7 @@ open Types
|
|
|
|
open Signature
|
|
|
|
open Signature
|
|
|
|
open C
|
|
|
|
open C
|
|
|
|
open Cgen
|
|
|
|
open Cgen
|
|
|
|
|
|
|
|
open Async
|
|
|
|
open Compiler_utils
|
|
|
|
open Compiler_utils
|
|
|
|
|
|
|
|
|
|
|
|
(** {1 Main C function generation} *)
|
|
|
|
(** {1 Main C function generation} *)
|
|
|
@ -405,6 +406,12 @@ let mk_main name p =
|
|
|
|
(defs, nvar_l @ var_l, res @ res_l, nstep_l @ step_l)
|
|
|
|
(defs, nvar_l @ var_l, res @ res_l, nstep_l @ step_l)
|
|
|
|
with Not_found -> ([],var_l,res_l,step_l) in
|
|
|
|
with Not_found -> ([],var_l,res_l,step_l) in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let res_l = List.fold_left
|
|
|
|
|
|
|
|
(fun res cd -> (async_reset cd) @ res)
|
|
|
|
|
|
|
|
res_l
|
|
|
|
|
|
|
|
classes
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
|
|
|
|
[("_main.c", Csource (defs @ [main_skel var_l res_l step_l]));
|
|
|
|
[("_main.c", Csource (defs @ [main_skel var_l res_l step_l]));
|
|
|
|
("_main.h", Cheader ([name], []))];
|
|
|
|
("_main.h", Cheader ([name], []))];
|
|
|
|
) else
|
|
|
|
) else
|
|
|
|