From ac807742298584b495cbd67671b565c27e7323be Mon Sep 17 00:00:00 2001 From: Vitaly Bogdanov Date: Fri, 8 Nov 2024 19:11:16 +0300 Subject: [PATCH] Uncomment test, remove legacy comments and pragmas --- lib/src/atom/matcher.rs | 1 - lib/src/metta/runner/stdlib_minimal.metta | 2 +- lib/src/metta/runner/stdlib_minimal.rs | 2 -- python/tests/scripts/b5_types_prelim.metta | 8 +++----- python/tests/scripts/d2_higherfunc.metta | 6 ++++-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/src/atom/matcher.rs b/lib/src/atom/matcher.rs index 041ab35bf..102bcf58c 100644 --- a/lib/src/atom/matcher.rs +++ b/lib/src/atom/matcher.rs @@ -211,7 +211,6 @@ impl Bindings { self.bindings.remove(from_binding_id); } - #[allow(dead_code)] //TODO: MINIMAL only silence the warning until interpreter2 replaces interpreter pub(crate) fn len(&self) -> usize { self.binding_by_var.len() } diff --git a/lib/src/metta/runner/stdlib_minimal.metta b/lib/src/metta/runner/stdlib_minimal.metta index d73540549..b91adc1de 100644 --- a/lib/src/metta/runner/stdlib_minimal.metta +++ b/lib/src/metta/runner/stdlib_minimal.metta @@ -492,7 +492,7 @@ (= (nop) ()) (= (nop $x) ()) -; TODO: MINIMAL added for compatibility, remove after migration +; TODO: can be replaced by Empty atom and removed, kept for compatibility (@doc empty (@desc "Cuts evaluation of the non-deterministic branch and removes it from the result") (@params ()) diff --git a/lib/src/metta/runner/stdlib_minimal.rs b/lib/src/metta/runner/stdlib_minimal.rs index 2d45750ed..9411caa85 100644 --- a/lib/src/metta/runner/stdlib_minimal.rs +++ b/lib/src/metta/runner/stdlib_minimal.rs @@ -1391,8 +1391,6 @@ fn atom_to_string(atom: &Atom) -> String { } #[derive(Clone, Debug)] pub struct GetTypeOp { - // TODO: MINIMAL this is temporary compatibility fix to be removed after - // migration to the minimal MeTTa space: DynSpace, } diff --git a/python/tests/scripts/b5_types_prelim.metta b/python/tests/scripts/b5_types_prelim.metta index b98d7e5ea..275894a34 100644 --- a/python/tests/scripts/b5_types_prelim.metta +++ b/python/tests/scripts/b5_types_prelim.metta @@ -81,12 +81,10 @@ (Cons (S Z) (Cons Z Nil)) ((Cons (S Z) (Cons Z Nil)))) -; TODO: MINIMAL This test has different behavior in old and new versions of the -; interpreter versions. Uncomment it after migration to the minimal MeTTa. ; This list is badly typed, because S and Z are not the same type -;!(assertEqualToResult -; (Cons S (Cons Z Nil)) -; ((Error (Cons Z Nil) BadType))) +!(assertEqualToResult + (Cons S (Cons Z Nil)) + ((Error (Cons Z Nil) BadType))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/python/tests/scripts/d2_higherfunc.metta b/python/tests/scripts/d2_higherfunc.metta index 25f42be1f..40df91294 100644 --- a/python/tests/scripts/d2_higherfunc.metta +++ b/python/tests/scripts/d2_higherfunc.metta @@ -169,8 +169,10 @@ (get-type (fmap (curry-a + 2) (Left "5"))) ()) ; TODO: Two examples below are type-checked successfully because, (UntypedC "5") -; can return result which has an appropriate type. Uncomment when old_interpreter -; feature is removed. +; can return result which has an appropriate type. But type returned contains +; variable, for instance ($F#3287 Number). There is no function to compare such +; atom easily with pattern yet. Uncomment after equivalent-atom operation is +; introduced. ;!(assertEqualToResult ; (get-type (fmap (curry-a + 2) (UntypedC "5"))) ; ())