mstar.graph.loop_indices#

Classes

NestedLoopIndices(loop_name_order, ...)

A snapshot of where execution is across nested loops at a given moment.

class mstar.graph.loop_indices.NestedLoopIndices(loop_name_order, loop_indices, wg_fwd_pass_idx)[source]#

Bases: object

A snapshot of where execution is across nested loops at a given moment.

Used by the conductor’s stop-loop ordering to decide whether a freshly- received stop request is “newer” than a previously-applied one — so we don’t double-stop the same loop when re-ordering messages.

Parameters:
label_context_gt(other, target_loop_name=None)[source]#

Whether self’s iter indices are strictly greater than other’s, in the path leading up to (but not including) target_loop_name.

Example: if we’re stopping the loop target_loop_name but don’t want to double-stop it, we can keep the last time it was stopped and only re-stop it again when new_time.label_context_gt(prev, target) == True.

Parameters:
Return type:

bool

loop_indices: dict[str, int]#
loop_name_order: list[str]#
max(other)[source]#
Parameters:

other (NestedLoopIndices | None)

Return type:

NestedLoopIndices

wg_fwd_pass_idx: int#