diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-18 00:01:37 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-18 00:01:37 -0300 |
| commit | 7bfb3f5400fdd67a27224bdbd75c1a5d156b1d8c (patch) | |
| tree | b80504bc3bb8eed83534a20ec1b6f244b29a655b | |
| parent | 1d4125dd8ccbe272a190c155a4215daf1f362f10 (diff) | |
| download | RNT-7bfb3f5400fdd67a27224bdbd75c1a5d156b1d8c.tar.gz RNT-7bfb3f5400fdd67a27224bdbd75c1a5d156b1d8c.zip | |
substantial relation context removal and test fix
| -rw-r--r-- | lib/kernel/SubstantialRelation.ml | 2 | ||||
| -rw-r--r-- | test/unit/evaluators/FOL.ml | 13 |
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 |
