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
Viktor Kuncak (@vkuncak) suggested the following trick to implement a len() method that verifies with overflow checks enabled. They used it in Stainless:
Using saturating arithmetic works for implementing len with overflow checks, but it complicates other specifications that depend on it.
One way to avoid enabling overflow checks for the entire project is to write an increment function and mark it as trusted, even though it might feel a bit unsatisfactory.
Perhaps dynamically sized number types would help with this? I was planning on taking a swing on implementing and verifying these tomorrow.
Viktor Kuncak (@vkuncak) suggested the following trick to implement a
len()
method that verifies with overflow checks enabled. They used it in Stainless:The text was updated successfully, but these errors were encountered: