trueagi-io / hyperon-experimental

OpenCog Hyperon experimental version
https://wiki.opencog.org/w/Hyperon
MIT License
122 stars 43 forks source link

Cleanup variable handling logic in minimal MeTTa interpreter #695

Closed vsbogd closed 1 month ago

vsbogd commented 1 month ago

Extended list of variables only in operations which make stack deeper: chain, function and collapse. Cleaned up variables in a single place. Added an operation which applies and cleans up Bindings at once. Constructed finished frames using the same Stack::finished method.

This PR improves minimal MeTTa test performance on 20% and fixes issues in logic.