You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two separate issues with assertions and simulation:
Simulation should not halt after a failed assertion, at least simulation of subsequent assertions should continue (before hitting another solution declaration), maybe it should be an option from the user on how to behave when an assertion fails. One of the advantages of simulation is that you can find multiple/all problems in one go there is no reason to remove that.
The second problem is more challenging/research-oriented: tracking problems is more difficult now. With the old system, when an assertion failed we knew which node was associated with it. In the new system, if you use something like foldNodes you basically get a yes or no answer which makes it hard to track down the problem. We should find a way to attach more information to which part of an assertion failed.
The text was updated successfully, but these errors were encountered:
Re: 2, how does foldNodes get transformed? One way to make the assertion errors more helpful might be to have some special behavior when using foldNodes and foldEdges to unroll the folds, get back the expressions containing the offending nodes and edges and then return those. Something like this, maybe?
Given this nv file:
let nodes =2let edges = {0=1;}
letinitn=match n with|0n -> 0|1n -> 10lettransex= x +1letmergenxy=if x < y then x else y
let sol = solution { init = init; trans = trans; merge = merge }
assert (foldNodes (funuvacc -> acc && v =0) sol true)
Unroll the assert as:
assert true && sol[0n] = 0 && sol[1n] = 0
And then on failure, identify which conjuncts did not pass the test:
There are two separate issues with assertions and simulation:
Simulation should not halt after a failed assertion, at least simulation of subsequent assertions should continue (before hitting another solution declaration), maybe it should be an option from the user on how to behave when an assertion fails. One of the advantages of simulation is that you can find multiple/all problems in one go there is no reason to remove that.
The second problem is more challenging/research-oriented: tracking problems is more difficult now. With the old system, when an assertion failed we knew which node was associated with it. In the new system, if you use something like foldNodes you basically get a yes or no answer which makes it hard to track down the problem. We should find a way to attach more information to which part of an assertion failed.
The text was updated successfully, but these errors were encountered: