Skip to content

Comments

Added test-cases for isurp and isurp-old#156

Open
yonayetol wants to merge 3 commits intoiCog-Labs-Dev:genericfrom
yonayetol:generic
Open

Added test-cases for isurp and isurp-old#156
yonayetol wants to merge 3 commits intoiCog-Labs-Dev:genericfrom
yonayetol:generic

Conversation

@yonayetol
Copy link

This pull request adds new test cases to both test-isurp-old.metta and test-isurp.metta to verify the behavior of the isurp-old and isurp functions using n-ary format patterns and a dedicated n-ary dataset. The tests cover both normalized and non-normalized scenarios, as well as different parameter configurations.

Tests for n-ary format patterns:

  • Added import of the dataset_for_n_arry_format n-ary dataset in both test-isurp-old.metta and test-isurp.metta for use in new test cases. [1] [2]

  • Added multiple assertions to test-isurp-old.metta for the isurp-old function, testing conjunctive patterns with normalization enabled and disabled, using the n-ary dataset.

  • Added multiple assertions to test-isurp.metta for the isurp function, testing conjunctive patterns with normalization enabled and disabled, and a ratio parameter, using the n-ary dataset.

@yonayetol yonayetol changed the title Adding test-cases for isurp and isurp-old Added test-cases for isurp and isurp-old Feb 14, 2026
Copy link

@tezena tezena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to test , the chainner based surp components also. Including jsd .

- Introduced a new variable $topOfNewHead to capture the top element of $new_head.
- Replaced the previous emp_value computation with a conditional evaluation using eval.
- The new logic checks if $topOfNewHead is an expression and adjusts the emp_value calculation accordingly.
- Commented out the old emp_value logic for clarity and future reference.
@yonayetol yonayetol requested a review from tezena February 18, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants