-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adapts type-checker to correctly consider the fact that we are implicitly treating a call to an actual pure function as being ghost * adds a ghost erasure testcase * Update src/main/scala/viper/gobra/frontend/info/implementation/typing/ghost/separation/GhostAssignability.scala Co-authored-by: João Pereira <[email protected]> * implements CR suggestions by Joao --------- Co-authored-by: João Pereira <[email protected]>
- Loading branch information
Showing
6 changed files
with
153 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
package issue0008611 | ||
|
||
//:: ExpectedOutput(type_error) | ||
func test() bool { | ||
ghost var x = 42 | ||
ghost var y = 0 | ||
return isEqual(x, y) | ||
} | ||
|
||
decreases | ||
pure func isEqual(x, y int) bool { | ||
return x == y | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
package issue0008612 | ||
|
||
func test() (res bool) { | ||
ghost var x = 42 | ||
ghost var y = 0 | ||
tmp := isEqual(x, y) | ||
//:: ExpectedOutput(type_error) | ||
res = tmp | ||
return | ||
} | ||
|
||
decreases | ||
pure func isEqual(x, y int) bool { | ||
return x == y | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
package issue0008613 | ||
|
||
func test() (ghost res bool) { | ||
ghost var x = 42 | ||
ghost var y = 0 | ||
tmp := isEqual(x, y) | ||
res = tmp | ||
//:: ExpectedOutput(assert_error:assertion_error) | ||
assert false | ||
return | ||
} | ||
|
||
decreases | ||
pure func isEqual(x, y int) bool { | ||
return x == y | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters