gobra icon indicating copy to clipboard operation
gobra copied to clipboard

Non-termination in small programs

Open jcp19 opened this issue 1 year ago • 2 comments

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.

jcp19 avatar Aug 26 '24 16:08 jcp19

Another example:

requires x > 0.0
ensures  res > 0.0
func newton(x float32, y float32) (res float32) {
	return x/2 + y / 2 / x
}

jcp19 avatar Oct 18 '24 14:10 jcp19

another one:

func main() {
	assert 1e2 > 0
}

gottschali avatar Oct 28 '24 10:10 gottschali

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)

ArquintL avatar Nov 26 '25 16:11 ArquintL