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
objectInnerFunctionVarMutation {
defouter= {
vari:BigInt=0definner1:BigInt= {
valx= inner2
x
}
definner2:BigInt= {
i +=1
i
}
valx= inner1
assert(i ==1)
}
}
generates a "choose satisfiability" VC that is always invalid (choose of false).
If we look at the trees after ImperativeCodeElimination, we have more insights:
defouter$25:Unit= {
vali$32=0definner1:BigInt= { // should take an `i` and return it alongside the resultvalx$30:BigInt= inner2 // `x$30` is a tuple, not a `BigInt`
x$30
}
definner2(i$33: BigInt): (BigInt, BigInt) = {
vali$35= i$33vali$36= i$35+1
(i$36, i$36)
}
valx$29= inner1
assert(i$32==1)
}
inner1 is lacking a transformation: we need to "thread" i (by taking it in parameter and returning it) and adapt the call to inner2 in consequence.
Note that swapping the order of inner1 and inner2 results in correct transformation, I think this is due to ImperativeCodeElimination not properly supporting LetRec (as written in this comment)
The text was updated successfully, but these errors were encountered:
The following snippet:
generates a "choose satisfiability" VC that is always invalid (
choose
offalse
).If we look at the trees after
ImperativeCodeElimination
, we have more insights:inner1
is lacking a transformation: we need to "thread"i
(by taking it in parameter and returning it) and adapt the call toinner2
in consequence.Note that swapping the order of
inner1
andinner2
results in correct transformation, I think this is due toImperativeCodeElimination
not properly supportingLetRec
(as written in this comment)The text was updated successfully, but these errors were encountered: