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
module option {type Option[a]= None | Some(a)}module none {importoption.*type State ={x: Option[int],y: Option[str],}
var state: State
action init ={
state' ={x: None,y: None,}}action step ={
state' = state
}}
The simulator runs on it without any issue:
$ quint run --main=none none.qnt
...
[ok] No violation found (300ms).
However, quint verify produces a hard-to-understand error:
$ quint verify --main=none none.qnt
error: internal error: while parsing in Apalache:
'Input was not a valid representation of the QuintIR: Conversion failed while building operator definition `init`: Name None with type (() => None(UNIT) | Some(Str)) constructed in scope where expected type is (() => None(UNIT) | Some(Int)).'
Please report an issue: https://github.com/informalsystems/quint/issues/new
When I introduce auxiliary pure val definitions for the two cases of None above, everything works. I suspect that the issue is caused by type inference for the two instances of None, which technically should be of the types Option[int] and Option[str].
The text was updated successfully, but these errors were encountered:
Thanks for the reporting! We never got to extensively test the polymorphic sum types in the integration with Apalache, seems like we are not setting a correct polymorphic type for None at translation.
Consider the following specification:
The simulator runs on it without any issue:
However,
quint verify
produces a hard-to-understand error:When I introduce auxiliary
pure val
definitions for the two cases ofNone
above, everything works. I suspect that the issue is caused by type inference for the two instances ofNone
, which technically should be of the typesOption[int]
andOption[str]
.The text was updated successfully, but these errors were encountered: