overturetool / overture

The Overture Tool
http://overturetool.org
GNU General Public License v3.0
49 stars 25 forks source link

Runtime predicate errors in forall/exists/iota/comprehensions mislocated #732

Closed nickbattle closed 4 years ago

nickbattle commented 4 years ago

If a value exception occurs while processing the predicate part of a forall, exists, iota or a comprehension expression, the location of the error is given as the location of the overall expression rather than the predicate. This is confusing! For example, passing {nil} to this function:

    f: set of [bool] -> bool
    f(s) ==
        exists e in set s &     <--- Debugger stops at this line
            e;              <--- Error really occurs here

It's not critical, but it would make debugging less confusing if this was fixed.

nickbattle commented 4 years ago

Fix now available in ncb/development.