-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hello! Currently I'm having issues verifying code with Optional types. For example, for code containing cycles I get following error:
Loop invariant issubtype(typeof(a), int()) might not hold on entry. (<no position>)
Here is the example of code:
a = int(0) # type : Optional[int]
a = None # type : Optional[int]
d_4_i_ = int(0) # type : int
while (d_4_i_) < (len(arr)):
Invariant(Acc(list_pred(arr)))
Invariant(((0) <= (d_4_i_)) and ((d_4_i_) <= (len(arr))))
if (((arr)[d_4_i_]) < (0)) and (((a) is None) or (((arr)[d_4_i_]) >= (a))):
a = ((arr)[d_4_i_])
d_4_i_ = (d_4_i_) + (1)
Could you kindly help me with this problem?
Metadata
Metadata
Assignees
Labels
No labels