top | item 46050530

(no title)

taliesinb | 3 months ago

Hello! Yes I am curious, how does one deal with cycles in the code hash graph? Mutually recursive functions for example?

discuss

order

aryairani|3 months ago

There's an algorithm for it. The thing that actually gets assigned a hash IS a mutually recursive cycle of functions. Most cycles are size 1 in practice, but some are 2+ like in your question, and that's also fine.

littlestymaar|3 months ago

Does that algorithm detects arbitrary subgraphs with a cyclic component, or just regular cycles? (Not that it would matter in practice, I don't think many people write convoluted mutually recursive mess because it would be a maintenance nightmare, just curious on the algorithmic side of things).

taliesinb|3 months ago

If you could link to where this is implemented I'd be very grateful!