From 7bfb3f5400fdd67a27224bdbd75c1a5d156b1d8c Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Fri, 18 Sep 2026 00:01:37 -0300 Subject: substantial relation context removal and test fix --- test/unit/evaluators/FOL.ml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test') 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 -- cgit v1.2.3