Commit 2c1c9dc6 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

lurette perso.4 Wed, 31 Oct 2001 17:54:12 +0100 by jahier

Parent-Version:      perso.3
Version-Log:

Cette fois ci, ca marche vraimet !!

Project-Description: Lurette
parent 5aa5231d
OCAMLMAKEFILE = ./OcamlMakefile
SOURCES = edge.c edge.h \
SOURCES = edge.c \
sut_stub.c sut_idl_stub.idl \
graph.mli graph.ml env.mli env.ml lurette.mli lurette.ml
RESULT = lurette
......
......@@ -122,25 +122,25 @@ and (parse_multparse_mult218,6493
and (parse_more_multsparse_more_mults222,6629
and (parse_simpleparse_simple230,7083
let (read_env_stateread_env_state243,7514
let (lookuplookup297,9593
let (lookup_memlookup_mem301,9683
let rec (evaleval309,9844
(eval_pre_formulaeval_pre_formula366,11707
(eval_pre_expreval_pre_expr389,12712
(formula_eps_to_stringformula_eps_to_string441,14559
(formula_to_stringformula_to_string446,14693
(expr_to_stringexpr_to_string459,15338
let (arc_info_to_stringarc_info_to_string471,16010
let rec (gen_listgen_list479,16248
let (env__tryenv__try487,16468
let (env__stepenv__step554,18854
let (gvgv569,19345
let (dump_nodes_listdump_nodes_list576,19552
type transtrans593,20160
let (dump_trans_listdump_trans_list595,20199
let (dump_graphdump_graph611,20786
let (generate_graphgenerate_graph619,21139
let (generate_env_graphgenerate_env_graph634,21669
let (lookuplookup287,9145
let (lookup_memlookup_mem291,9235
let rec (evaleval299,9396
(eval_pre_formulaeval_pre_formula356,11259
(eval_pre_expreval_pre_expr379,12264
(formula_eps_to_stringformula_eps_to_string431,14111
(formula_to_stringformula_to_string436,14245
(expr_to_stringexpr_to_string449,14890
let (arc_info_to_stringarc_info_to_string461,15562
let rec (gen_listgen_list469,15800
let (env__tryenv__try477,16020
let (env__stepenv__step544,18406
let (gvgv559,18897
let (dump_nodes_listdump_nodes_list566,19104
type transtrans583,19712
let (dump_trans_listdump_trans_list585,19751
let (dump_graphdump_graph601,20338
let (generate_graphgenerate_graph609,20691
let (generate_env_graphgenerate_env_graph624,21221
lurette.mli,31
Lurette1,0
......@@ -148,4 +148,4 @@ val mainmain2,1
lurette.ml,33
Lurette1,0
let (mainmain5,14
let (mainmain6,33
......@@ -200,8 +200,9 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
** Program state initialisation
*)
put "// Program state initialisation \n" ;
put ("void " ^ str ^ "_init() {\n" ^
" prg = " ^ mod_name ^ "_new_ctx(NULL); }\n") ;
put ("void " ^ str ^ "_init() \n{\n" ^
" prg = " ^ mod_name ^ "_new_ctx(NULL); \n") ;
put (" prg_copy = " ^ mod_name ^ "_new_ctx(NULL); }\n") ;
put "\n" ;
(*
......@@ -210,7 +211,7 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
put "// Output procedures (get the output values) \n" ;
List.iter
(fun (t, v) ->
put ("void " ^ mod_name ^ "_O_" ^ v ^ "(void *client_data, " ^ t ^ " " ^ v ^ "_toto) {\n" ^
put ("void " ^ mod_name ^ "_O_" ^ v ^ "(void *client_data, " ^ t ^ " " ^ v ^ "_toto) \n{\n" ^
" " ^ v ^ " = " ^ v ^ "_toto ; }\n\n")
)
vo ;
......@@ -224,7 +225,7 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
List.iter (fun (t, v) -> put (t ^ " " ^ v ^ ", ")) vi ;
List.iter (fun (t, v) -> put (t ^ " *" ^ v ^ "_ptr, ")) vo_pre ;
put (lo_t ^ " *" ^ lo_v ^ "_ptr) {\n");
put (lo_t ^ " *" ^ lo_v ^ "_ptr) \n{\n");
List.iter
(fun (t, v) -> put (" " ^ mod_name ^ "_I_" ^ v ^ "(prg, " ^ v ^ ");\n"))
......@@ -243,14 +244,14 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
List.iter (fun (t, v) -> put (t ^ " " ^ v ^ ", ")) vi ;
List.iter (fun (t, v) -> put (t ^ " *" ^ v ^ "_ptr, ")) vo_pre ;
put (lo_t ^ " *" ^ lo_v ^ "_ptr) {\n");
put (lo_t ^ " *" ^ lo_v ^ "_ptr) \n{\n");
put " prg_copy = prg ;\n" ;
put (" " ^ mod_name ^ "_copy_ctx(prg_copy, prg);\n") ;
put (" " ^ str ^ "_step(") ;
List.iter (fun (t, v) -> put (v ^ ", ")) vi ;
List.iter (fun (t, v) -> put (v ^ "_ptr, ")) vo_pre ;
put (lo_v ^ "_ptr); \n");
put " prg = prg_copy;\n" ;
put (" " ^ mod_name ^ "_copy_ctx(prg, prg_copy);\n") ;
put "}\n" ;
close_out oc
......@@ -280,13 +281,22 @@ let (generate_idl : module_name -> string -> typedef_alias -> input_vars -> outp
put ("void " ^ str ^ "_init(); \n") ;
put "\n" ;
(*
** Step
*)
put ("void " ^ str ^ "_step(\n") ;
List.iter (fun (t, v) -> put (" [in] " ^ (List.assoc t type_alias) ^ " \t" ^ v ^ ", \n")) vi ;
List.iter (fun (t, v) -> put (" [out] " ^ (List.assoc t type_alias) ^ " \t*" ^ v ^ "_ptr,\n")) vo_pre ;
put (" [out] " ^ (List.assoc lo_t type_alias) ^ " \t*" ^ lo_v ^ "_ptr\n); \n");
put "\n" ;
(*
** Try
*)
put ("void " ^ str ^ "_try(\n") ;
List.iter (fun (t, v) -> put (" [in] " ^ (List.assoc t type_alias) ^ " \t" ^ v ^ ", \n")) vi ;
List.iter (fun (t, v) -> put (" [out] " ^ (List.assoc t type_alias) ^ " \t*" ^ v ^ "_ptr,\n")) vo_pre ;
put (" [out] " ^ (List.assoc lo_t type_alias) ^ " \t*" ^ lo_v ^ "_ptr\n); \n");
......
......@@ -11,33 +11,41 @@ let (main : unit -> 'a) =
Sut_idl_stub.sut_init ();
print_string "step 0 -> ";
print_int (sut_step 0);
print_string "\n";
flush stdout ;
print_int (sut_step 0);
print_string "step 1 -> ";
print_int (sut_step 1);
print_string "\n";
flush stdout ;
print_int (sut_step 0);
print_string "step 1 -> ";
print_int (sut_step 1);
print_string "\n";
flush stdout ;
print_int (sut_step 1);
print_string "\n\n";
print_string "step 0 -> ";
print_int (sut_step 0);
print_string "\n";
flush stdout ;
print_int (sut_step 1);
print_string "\n\n";
print_string "try 1 -> ";
print_int (sut_try 1);
print_string "\n";
flush stdout ;
print_int (sut_step 0);
print_string "\n\n";
print_string "try 1 -> ";
print_int (sut_try 1);
print_string "\n";
flush stdout ;
print_string "step 1 -> ";
print_int (sut_step 1);
print_string "\n\n";
print_string "\n";
flush stdout ;
;;
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette perso 3)
(Parent-Version lurette perso 2)
(Project-Version lurette perso 4)
(Parent-Version lurette perso 3)
(Version-Log "
camlidl marche!!!
J'arrive a executer edge.c depuis caml.
Cette fois ci, ca marche vraimet !!
")
(New-Version-Log "")
(Checkin-Time "Wed, 31 Oct 2001 15:46:14 +0000")
(Checkin-Time "Wed, 31 Oct 2001 16:54:12 +0000")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -20,7 +19,7 @@ J'arrive a executer edge.c depuis caml.
;; Sources files
(lurette.mli (lurette/11_lurette.ml 1.1 644))
(lurette.ml (lurette/12_lurette.ml 1.3 644))
(lurette.ml (lurette/12_lurette.ml 1.4 644))
(graph.mli (lurette/13_graph.mli 1.2 644))
(graph.ml (lurette/14_graph.ml 1.2 644))
......@@ -29,11 +28,11 @@ J'arrive a executer edge.c depuis caml.
(env.ml (lurette/16_env.ml 1.4 644))
(interface/generate_lurette_interface.mli (lurette/23_generate_l 1.1 644))
(interface/generate_lurette_interface.ml (lurette/24_generate_l 1.3 644))
(interface/generate_lurette_interface.ml (lurette/24_generate_l 1.4 644))
;; Make files
(OcamlMakefile (lurette/17_OcamlMakef 1.2 644))
(Makefile (lurette/18_Makefile 1.2 644))
(Makefile (lurette/18_Makefile 1.3 644))
(interface/Makefile (lurette/25_Makefile 1.1 644))
......@@ -44,7 +43,7 @@ J'arrive a executer edge.c depuis caml.
;; Misc
(README (lurette/10_README 1.1 644))
(ID_EN_VRAC (lurette/0_ID_EN_VRAC 1.1 644))
(TAGS (lurette/21_TAGS 1.3 644))
(TAGS (lurette/21_TAGS 1.4 644))
(interface/TAGS (lurette/26_TAGS 1.1 644))
(test.aut (lurette/22_test.aut 1.1 644))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment