gobra
gobra copied to clipboard
Non-termination in small programs
The following was found by @HSMF
The following program causes Gobra to not terminate:
package main
func foo() {
goto end
end:
}
Perhaps more surprising, Gobra does not terminate even if we pass the flag --noVerify, which indicates that this problem arises at some other step in our infrastructure.
Another example:
requires x > 0.0
ensures res > 0.0
func newton(x float32, y float32) (res float32) {
return x/2 + y / 2 / x
}
another one:
func main() {
assert 1e2 > 0
}
another one:
package foo
func floatfn3(f float64) float64 {
return 0.0
}
It seems to me that a float literal causes the issue (probably in the type checker)