Commit 45d9477d authored by erwan's avatar erwan
Browse files

Update: add some code in comment (unsuccessful tries)

parent ced75b3b
......@@ -33,7 +33,7 @@ clean:
dune clean
cd lib/polka; make clean
cd lib/lutin; make clean
rm lib/lutin/
rm -f lib/lutin/
.PHONY: test slink
test: # cpcomp
(name lurette)
(libraries lustre-v6 lutin)
; (libraries camlidl lustre-v6 lutin sasa)
;;; necessary to be able to use sasa because sasa use Dynlink
;;; but it fails because of lutin (well, because of camlidl to be precise)
; (link_flags (-linkall))
(* Time-stamp: <modified the 30/08/2019 (at 14:54) by Erwan Jahier> *)
(* Time-stamp: <modified the 19/09/2019 (at 16:21) by Erwan Jahier> *)
(* Mimick the behavior of 'rdbg -lurette', but without the dependency
on ocaml *)
......@@ -47,6 +47,12 @@ let other_args:string =
String.concat " " (List.rev !others)
let rec get_dot = function
| [] -> failwith "No dot file in found"
| x::t ->
if Filename.extension x = ".dot" then x else get_dot t
let (gen_reactive_program : string -> RdbgArg.reactive_program) =
fun str ->
let args = Str.split (Str.regexp "[ \t]+") str in
......@@ -61,10 +67,23 @@ let (gen_reactive_program : string -> RdbgArg.reactive_program) =
StdioRun.make str
Lv6Run.make (Array.of_list (args@["--expand-io-type"]))
Lv6Run.make (Array.of_list (args@["--expand-io-type"]))
| "ocaml" -> OcamlRun.make (List.nth args 1)
(* | "sasa" -> *)
(* Sasalib.SasaRun.make (Array.of_list (args@["-rif"])) *)
(* the following code compile (with adding sasa lib in the dune file)
But there is an issue in practice:
- Dynlink requires that the lurette binary is buildt with -linkall (otherwise
i cannot use stdlib in my cmxs for instance)
- But if I use -linkall, lurette fails to build because of lutin (or camlidl)
that requires libuid (undefined reference to `IID_IUnknown')
- sigh
| "sasa" ->
let dot = get_dot args in
let cmxs = (Filename.chop_extension dot) ^ ".cmxs" in
Dynlink.loadfile cmxs;
Sasa.SasaRun.make (Array.of_list (args@["-rif"]))
| _ -> StdioRun.make str
......@@ -4,12 +4,13 @@
(libraries polka num rdbg camlidl str unix ezdl gbddml gmp)
(c_names lutinUtils_stubs lutinUtils_c myuid)
(wrapped false)
(library_flags (-linkall))
(library_flags (-linkall))
; (install_c_headers myuid)
(modules LutinRun Auto2Lucky AutoGen Bddd CheckEnv CheckType CkIdentInfo
CkTypeEff CoAlgExp CoIdent CoTraceExp Constraint Draw Exp ExpEval
Expand ExprUtil FGen Formula_to_bdd GenOcamlGlue Glue Gne Guard
Lexeme LoopWeights Luc2alice Luc2c LucFGen Lucky LutErrors LutExe LutinUtils
LutLexer LutParser LutPredef LutProg Version MainArg Ne Parsers
LutLexer LutParser LutPredef LutProg Version MainArg Ne Parsers
Poly_draw Polyhedron Prevar Prog Reactive Rif Sol_nb Solver Store
Syntaxe SyntaxeDump Thickness Type Util Utils Value Var Verbose)
(synopsis "An API to call lutin from rdbg and ocaml.")
......@@ -12,7 +12,8 @@ authors: [
license: "CeCILL"
tags: ["clib:stdc" "clib:camlidl"]
homepage: ""
bug-reports: ""
dev-repo: ""
bug-reports: ""
depends: [
"ocaml" {>= "4.05"}
Markdown is supported
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