On 15/06/2018 04:37, Luke Hutchison wrote:
:

This code represents a preorder DFS. The resulting order is *not* a
topological sort ordering. This can lead to an ancestral layer being listed
in the final ordering before a descendant layer. For example, consider
these four layer -> parent relationships:

     A -> [ B, C ]
     B -> [ D ]
     C -> [ D ]
     D -> [ ]

The ordering code as given in ModuleLayer will produce the order [ A, B, D,
C ], causing the layers D and C to be out of order.
Multi parent configurations is a somewhat niche area but it is specified to be DFS. If there someone in spec that has lead to you to assume the above is incorrect? I'm just wondering if there is wording that need to be improved or fixed somewhere.

-Alan

Reply via email to