aboutsummaryrefslogtreecommitdiffstats
path: root/tools/driver/main.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/driver/main.ml16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/driver/main.ml b/tools/driver/main.ml
index 662032c..d22baf0 100644
--- a/tools/driver/main.ml
+++ b/tools/driver/main.ml
@@ -1,5 +1,5 @@
(* Boots a BEAM node on a directory of .beam images (Karuta's runtime
- plus compiled modules), lets their rnt_init/0 register programs, and
+ plus compiled modules), lets their rnt-init closures register programs, and
reads them back through the kernel.
dune exec ./tools/driver/main.exe -- <image directory> *)
@@ -20,8 +20,8 @@ let mount_fol root =
let* _ = Kernel.Path.update root Kernel.Path.this "system" None (Some system) in
Ok ()
-(* {Module, Function, Beam, #{Attribute => <<"string">>}} as term_to_binary. *)
-let image directory module_ function_ heading =
+(* {Module, Beam, #{Attribute => <<"string">>}} as term_to_binary. *)
+let image directory module_ heading =
let beam =
In_channel.with_open_bin (Filename.concat directory (module_ ^ ".beam")) In_channel.input_all
in
@@ -31,8 +31,8 @@ let image directory module_ function_ heading =
Buffer.add_int32_be buffer (Int32.of_int (String.length s));
Buffer.add_string buffer s
in
- List.iter (Buffer.add_uint8 buffer) [131; 104; 4];
- List.iter binary [module_; function_; beam];
+ List.iter (Buffer.add_uint8 buffer) [131; 104; 3];
+ List.iter binary [module_; beam];
Buffer.add_uint8 buffer 116;
Buffer.add_int32_be buffer (Int32.of_int (List.length heading));
List.iter (fun name -> binary name; binary "string") heading;
@@ -53,7 +53,7 @@ let print title relation =
let run directory root =
let* () = mount_fol root in
- (* Boots erl on the images; the handshake runs every rnt_init/0. *)
+ (* Boots erl on the images; the handshake runs every rnt-init. *)
let* () = Beam.register root [directory] in
let* listing = Kernel.Path.lookup root program in
let* names =
@@ -74,14 +74,14 @@ let run directory root =
(* 2. A beam program that itself issues a FOL plan back to RNT. *)
let* titles =
Kernel.Program.load root ~evaluator:"karuta:beam"
- ~source:(image directory "librarian" "titles" ["title"])
+ ~source:(image directory "librarian" ["title"])
in
let* relation =
Protocols.Handle.releasing titles (fun () ->
let* executable = Protocols.Executable.require titles in
Protocols.Executable.invoke executable [] ~within:root )
in
- print "librarian:titles (BEAM -> RNT fol -> BEAM main):" relation
+ print "librarian's query (BEAM -> RNT fol -> BEAM main):" relation
let () =
Sys.set_signal Sys.sigpipe Sys.Signal_ignore;