r0ller/alice

dependent functor/d_key pair calculated as found for each functor as many times as it is found for different functors of the same node

r0ller opened this issue · 2 comments

To make it clear with an example: if IN1 is a dependency of LIST1 and LIST2 as well and it's found for both functors (once for LIST1 and once for LIST2) during the longest matching semantic rule calculation then it's cumulated and in is_longest_match_for_semantic_rules_found() shows up as having been found twice! Currently, a fix takes care of avoiding that for the functor being the argument of the first call of the recursive method find_dependencies_for_node() but that logic should be extended to all levels of recursion. Fixing that has the corollary that the algorithm to calculate the longest match needs to be adjusted as well.

Ignore the title, it's confusing...

Solved with commit 5aa3ff0.