trueagi-io / metta-wam

A Hyperon MeTTa Interpreter/Transpilier that targets the Warren Abstract Machine
7 stars 9 forks source link

Correct the Unify Function Implementation #73

Closed TeamSPoon closed 23 hours ago

TeamSPoon commented 4 weeks ago

The current implementation of the unify function is not behaving as intended and needs to be corrected. Specifically, the unify function should behave more like a match function, ensuring that the first two arguments are not incorrectly unified.

Task

  1. Rewrite the unify Function:

    • Modify the unify function to behave more like a match function rather than incorrectly unifying the first two arguments.
    • Ensure the logic properly reflects the intended behavior for matching rather than unification.
  2. Verify Correctness:

    • Test the rewritten function thoroughly to ensure it behaves as expected in various scenarios.
    • Ensure that the first two arguments are not being incorrectly unified.
  3. Document the Changes:

    • Update any relevant documentation or comments in the code to reflect the changes made to the unify function.
    • Include examples or test cases in the documentation to demonstrate the correct behavior of the function.

Acceptance Criteria