scala-subscript / subscript

9 stars 2 forks source link

Termination behaviour of `&`, `&&`, `|`, `||`, `/` #33

Open AndreVanDelft opened 8 years ago

AndreVanDelft commented 8 years ago

Normally n-ary nodes are deactivated when they have no children any more. This is done in line 451 of ContinuationHandler.scala:

if (node.children.isEmpty) insertDeactivation(node, null)

However, for operators &, &&, |, ||, / part of the children may be optional: activated after a break?, and no atomic actions have yet happened therein.

The deactivation test should only take the set of other nodes into account; when this test is matched the optionally activated children should be removed.

The code should have clear comments that explains what is being done.