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

Dafny crash in Translator.FuelSetting.GetFunctionFuel #1

Closed
jaylorch opened this issue Jun 23, 2016 · 3 comments
Closed

Dafny crash in Translator.FuelSetting.GetFunctionFuel #1

jaylorch opened this issue Jun 23, 2016 · 3 comments
Assignees

Comments

@jaylorch
Copy link
Collaborator

jaylorch commented Jun 23, 2016

Dafny crashes in Translator.FuelSetting.GetFunctionFuel when verifying the code below:

datatype T = T(n:int)

function ToInt(t:T) : int
    ensures ToInt(t) == int(t.n);
{
    int(t.n)
}

method Test()
{
    assert exists p:int :: exists t:T :: ToInt(t) > 0;
}
@qunyanm qunyanm self-assigned this Jun 24, 2016
@qunyanm
Copy link
Collaborator

qunyanm commented Jun 24, 2016

Fixed

@qunyanm qunyanm closed this as completed Jun 24, 2016
@cpitclaudel
Copy link
Member

Neat :) First fixed issue on Github 👍 🎉 ! Btw @qunyanm, a neat feature of github is that if you write "Fixes #1" or "Closes #1" in the commit message, it automatically closes the corresponding ticket with a link to the commit (see cpitclaudel/company-coq#124 for an example)

@qunyanm
Copy link
Collaborator

qunyanm commented Jun 24, 2016

Oh, I didn't know the feature. It will be handy. Thanks for letting me know.

@parno parno assigned qunyanm and unassigned qunyanm Nov 18, 2016
camrein added a commit that referenced this issue Apr 8, 2021
prvshah51 added a commit that referenced this issue Nov 15, 2021
Adding test file for issue 1111
kylona pushed a commit to kylona/dafny that referenced this issue Dec 13, 2021
Add /generateTestBoogie in DafnyTestGeneration
keyboardDrummer pushed a commit that referenced this issue Mar 30, 2022
…example extraction (#1751)

Until now, the counterexample extraction tool would return a placeholder symbol (`?#0`, `?#1`, etc.) if the solver did not specify a concrete value for some variable of basic type. The test generation module contains code that substitutes concrete values for these placeholder symbols. This PR proposes to move this code to counterexample extraction stage, which would make counterexamples more readable. 

Here is a simple example. Consider this failing assertion:
```Dafny
method test(c:char) {
    assert c == 'c';
}
```

Previously, the counterexample extraction tool would return `c:char = ?#0`. Now it will return `c:char = '!'`.
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

3 participants