aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/kernel/SubstantialRelation.ml2
-rw-r--r--test/unit/evaluators/FOL.ml13
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/kernel/SubstantialRelation.ml b/lib/kernel/SubstantialRelation.ml
index 6592acb..077f255 100644
--- a/lib/kernel/SubstantialRelation.ml
+++ b/lib/kernel/SubstantialRelation.ml
@@ -172,7 +172,7 @@ module Make (S : Abstract.Storage.STORAGE) = struct
discovers it cannot iterate one -- see [Protocols.Enumerable]. The context is accepted and
unused here: this enumeration reads through its own cursor-lifetime transaction and needs
no name resolution, but cancellation should eventually be checked between tuples. *)
- method enumerate (_ : Protocols.Context.t) = enumerate storage relation
+ method enumerate = enumerate storage relation
method protocols : Protocols.Handle.protocol list =
[ Protocols.Relation.make self
diff --git a/test/unit/evaluators/FOL.ml b/test/unit/evaluators/FOL.ml
index 32f09f5..6bcbc41 100644
--- a/test/unit/evaluators/FOL.ml
+++ b/test/unit/evaluators/FOL.ml
@@ -15,6 +15,10 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
BatMap.String.empty
|> BatMap.String.add "name" (Concepts.Value.String "Alaric") }
+ let not_a_directory () =
+ Concepts.Condition.condition "not-a-directory"
+ "A handle was expected to carry the directory protocol and did not" Concepts.Condition.empty
+
let not_a_program () =
Concepts.Condition.condition "not-a-program"
"A handle was expected to carry the program protocol and did not" Concepts.Condition.empty
@@ -35,16 +39,17 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
[ Kernel.Prototype.Directory.of_properties
["employee", employee; "fol", Rnt.Evaluators.FOL.make ()] ]
in
- let context = Runtime.Context.over ~snapshot:(hash "snapshot") ~root () in
- let* found = Runtime.Context.resolve context "fol" in
+ let* directory =
+ Protocols.Directory.from root |> Option.to_result ~none:(not_a_directory ())
+ in
+ let* found = Protocols.Directory.find directory "fol" in
let* evaluator = Option.to_result ~none:(not_a_program ()) found in
let* interpreter =
Rnt.Evaluators.FOL.Program.from evaluator
|> Option.to_result ~none:(not_a_program ())
in
let* cursor =
- Rnt.Evaluators.FOL.Program.invoke interpreter
- ~program:(Rnt.Evaluators.FOL.Base "employee") context
+ Rnt.Evaluators.FOL.Program.invoke interpreter (Rnt.Evaluators.FOL.Base employee)
in
let* scan = Protocols.Cursor.require cursor in
let* tuples = Protocols.Cursor.drain scan () in