From 97dc56016bd0c7ddea4445c5ea5978220cc9e776 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 31 Oct 2026 02:56:49 -0300 Subject: clearer names in fol, merging restrictions as they sink --- test/unit/evaluators/FOL.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/unit/evaluators') diff --git a/test/unit/evaluators/FOL.ml b/test/unit/evaluators/FOL.ml index 93eb8e7..ce8a2cd 100644 --- a/test/unit/evaluators/FOL.ml +++ b/test/unit/evaluators/FOL.ml @@ -318,6 +318,10 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) = "a restriction reaches through a projection" [["name", Concepts.Value.String "Alaric"]] (bindings (run (F.Where (names, called "Alaric")) drain)); + check + (list (list (pair string Helpers.value))) + "restrictions that disagree hold nothing" [] + (bindings (run (F.Where (F.Where (employees, aged 42), aged 30)) drain)); check bool "a tuple agreeing with the binding is held" true (asking (F.Where (employees, aged 42)) @@ -339,7 +343,9 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) = F.instantiate root (F.Where (F.Base Kernel.Path.("stored" @/ this), called "Gunther")) in let pushed = - match plan with F.Project (F.Where (F.Where (F.Base _, _), _), _) -> true | _ -> false + match plan with + | F.Project (F.Where (F.Base _, binding), _) -> BatMap.String.cardinal binding = 2 + | _ -> false in let* result = F.execute plan in let* found = drain result in @@ -349,7 +355,7 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) = in check string "a restriction survives its encoding" (F.encode inner) (F.encode (Helpers.condition_as_failure (F.decode (F.encode inner)))); - check bool "the restriction moved below the stored projection" true pushed; + check bool "the restriction moved below the stored projection and joined its own" true pushed; check (list (list (pair string Helpers.value))) "and both restrictions held" -- cgit v1.2.3