Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-termination in small programs #783

Open
jcp19 opened this issue Aug 26, 2024 · 2 comments
Open

Non-termination in small programs #783

jcp19 opened this issue Aug 26, 2024 · 2 comments

Comments

@jcp19
Copy link
Contributor

jcp19 commented Aug 26, 2024

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
Copy link
Contributor Author

jcp19 commented Oct 18, 2024

Another example:

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

@gottschali
Copy link

another one:

func main() {
	assert 1e2 > 0
}

@jcp19 jcp19 changed the title Non-termination in small program with a goto Non-termination in small programs Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants