<div dir="ltr"><span>It was chosen by taking a number of very large codebases, finding the max number, etc.</span><div><br><div>1. I just use it for finding infinite loops and bugpointing them, so we should remove it at some point.</div><div>2. The number is basically "what is the max number of loop connectedness of a program we will ever see".</div><div>For most normal programs, it's like "2".</div><div>For generated code, you can get to like 10.</div><div>It would be an impressive mess of code to get more than that.</div><div><br></div><div>We could make it 1000 for now if we want.</div><div><br></div><div>We could also directly compute the loop connectedness and assert if we go more than that, but it's mostly a waste of time :)</div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 30, 2016, 6:51 PM Davide Italiano <<a href="mailto:davide@freebsd.org" target="_blank">davide@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Dec 30, 2016 at 3:55 PM, Sean Silva <<a href="mailto:chisophugis@gmail.com" class="m_1016324470432200246gmail_msg" target="_blank">chisophugis@gmail.com</a>> wrote:<br class="m_1016324470432200246gmail_msg">
> Why 100? It seems weird to have an `assert` against a magic number like<br class="m_1016324470432200246gmail_msg">
> this; presumably the assert would fail if the magic number were 2 or<br class="m_1016324470432200246gmail_msg">
> something? What makes 100 "impossible"? It would be good to have this in a<br class="m_1016324470432200246gmail_msg">
> comment.<br class="m_1016324470432200246gmail_msg">
><br class="m_1016324470432200246gmail_msg">
<br class="m_1016324470432200246gmail_msg">
I think the number "100" is chosen kinda arbitrarily. Ideally we<br class="m_1016324470432200246gmail_msg">
shouldn't process every instruction more than an handful of times so<br class="m_1016324470432200246gmail_msg">
having an instruction processed 100 times isĀ  likely an indication for<br class="m_1016324470432200246gmail_msg">
bugs. I agree it could be explained in a comment (happy to change),<br class="m_1016324470432200246gmail_msg">
but I'd like Danny to comment further if 100 was chosen for a<br class="m_1016324470432200246gmail_msg">
particular reason.<br class="m_1016324470432200246gmail_msg">
<br class="m_1016324470432200246gmail_msg">
Thanks!<br class="m_1016324470432200246gmail_msg">
<br class="m_1016324470432200246gmail_msg">
--<br class="m_1016324470432200246gmail_msg">
Davide<br class="m_1016324470432200246gmail_msg">
<br class="m_1016324470432200246gmail_msg">
"There are no solved problems; there are only problems that are more<br class="m_1016324470432200246gmail_msg">
or less solved" -- Henri Poincare<br class="m_1016324470432200246gmail_msg">
</blockquote></div></div></div></div>