aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-31 02:56:49 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-31 02:56:49 -0300
commit97dc56016bd0c7ddea4445c5ea5978220cc9e776 (patch)
treea551c25abdbd110347b4cba5942028a7f46200cb /test
parentb42d12cfc0b663085bd5ae9e5e2d491e727e731e (diff)
downloadRNT-97dc56016bd0c7ddea4445c5ea5978220cc9e776.tar.gz
RNT-97dc56016bd0c7ddea4445c5ea5978220cc9e776.zip
clearer names in fol, merging restrictions as they sink
Diffstat (limited to 'test')
-rw-r--r--test/unit/evaluators/FOL.ml10
1 files changed, 8 insertions, 2 deletions
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"