Open anakreontas opened 8 years ago
Is this check in arfx too late? Will adding an invariant check "all entry labels should have a fact" to analyzeAndRewriteFwd be better? A similar invariant check can be added to analyazeAndRewriteBwd.
I don't know where it would be best to check runtime invariants. However if an invariant doesn't hold because of a programming error, like in my case, an informative error message would help.
Regards
On 12:11, Fri, 27 May 2016 Ning Wang, notifications@github.com wrote:
Is this check in arfx too late? Will adding an invariant check "all entry labels should have a fact" to analyzeAndRewriteFwd be better? A similar invariant check can be added to analyazeAndRewriteBwd.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haskell/hoopl/issues/32#issuecomment-222121116, or mute the thread https://github.com/notifications/unsubscribe/AJgbMjandrufnU2VFrVsAuyLRooYWsM5ks5qFtFcgaJpZM4Ij2Cf .
In line 274 of DataFlow, function arfx uses fromJust assuming that looking up a fact always produces a result. Would you please change the implementation into:
It was hard to spot where the error was raised. Including clues in the error message should help.
Regards