-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Federico Poli
committed
Jul 30, 2021
1 parent
8fdb8b2
commit 087df0a
Showing
16 changed files
with
132 additions
and
136 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
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
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 |
---|---|---|
@@ -1,26 +1,21 @@ | ||
// AmbiguousGhost.dfy | ||
|
||
function method F(x: int): () | ||
{ | ||
() | ||
} | ||
|
||
module M1 { | ||
class C1 { | ||
function method F(x: int): () | ||
{ | ||
() | ||
} | ||
|
||
function method a<T, U>(x: int): int | ||
{ | ||
x | ||
} | ||
function method a<T, U>(x: int): int | ||
{ | ||
x | ||
} | ||
|
||
method M<b, c>(d: int) | ||
{ | ||
var u; | ||
u := F(a<(b, ghost b), c>(d)); | ||
u := F(a<(b, (ghost b, ghost b)), c>(d)); | ||
u := F(a<(b, ((ghost b, b), ghost b)), c>(d)); | ||
} | ||
} | ||
method M<b, c>(d: int) | ||
{ | ||
var u; | ||
u := F(a<(b, ghost b), c>(d)); | ||
u := F(a<(b, (ghost b, ghost b)), c>(d)); | ||
u := F(a<(b, ((ghost b, b), ghost b)), c>(d)); | ||
} | ||
|
||
Dafny program verifier finished with 0 verified, 0 errors |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
// RUN: %dafny /compile:0 /dprint:- "%s" /env:0 > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
method Test1() | ||
{ | ||
var first := 0; | ||
var t := (ghost first:=123, 1:=234); // error | ||
} | ||
|
||
method Test2() | ||
{ | ||
var t := (1:=123, 2:=234); // error | ||
} | ||
|
||
method Test3() | ||
{ | ||
var t := (1:=123, 1:=234); // error | ||
} |
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,24 @@ | ||
// DisallowedGhost1.dfy | ||
|
||
method Test1() | ||
{ | ||
var first := 0; | ||
var t := (ghost first := 123, 1 := 234); | ||
} | ||
|
||
method Test2() | ||
{ | ||
var t := (1 := 123, 2 := 234); | ||
} | ||
|
||
method Test3() | ||
{ | ||
var t := (1 := 123, 1 := 234); | ||
} | ||
DisallowedGhost1.dfy(7,18): Error: the binding named 'first' does not correspond to any formal parameter | ||
DisallowedGhost1.dfy(7,11): Error: no actual argument passed for datatype constructor argument '0' | ||
DisallowedGhost1.dfy(12,20): Error: the binding named '2' does not correspond to any formal parameter | ||
DisallowedGhost1.dfy(12,11): Error: no actual argument passed for datatype constructor argument '0' | ||
DisallowedGhost1.dfy(17,20): Error: duplicate binding for parameter name '1' | ||
DisallowedGhost1.dfy(17,11): Error: no actual argument passed for datatype constructor argument '0' | ||
6 resolution/type errors detected in DisallowedGhost1.dfy |
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,7 @@ | ||
// RUN: %dafny /compile:0 /dprint:- "%s" /env:0 > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
method Test() | ||
{ | ||
var (ghost x) := 123; // syntax error | ||
} |
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,2 @@ | ||
DisallowedGhost2.dfy(6,7): Error: closeparen expected | ||
1 parse errors detected in DisallowedGhost2.dfy |