Skip to content

Refactor references and distribution

Alexey Protsenko requested to merge issue71 into main

#69 (closed) Previously distribution was calculated in the node constructor. It is a wrong design as the tree would be transformed multiple times and there is no reason to recalculate distribution on each step. We need distribution only on the last transformation when we insert Motion nodes. So, this refactoring makes tuple distribution optional and moves distribution logic to a separate function 'set_distribution()'.

#71 (closed) BREAKING CHANGE: move from branch-based references in the tuple to the array-based. Also add a logical ID to all relational nodes and keep it in all its child tuples.

Now, our reference coordination system in a tuple looks like:

  • parent relational node logical ID (we don't know actual position in the nodes list, so use "secondary index")
  • target - i.e. a position of the reffered node in the relational node's children list
  • posirtion in the reffered relational child node output tuple
Edited by Alexey Protsenko

Merge request reports