Quantcast
Channel: Dafny: An Automatic Program Verifier for Functional Correctness
Viewing all articles
Browse latest Browse all 1106

Closed Unassigned: Can't update ghost fields with new update notation [104]

$
0
0
The new notation for updating fields (the dot-parenthesis notation) can't be used to update ghost fields of non-ghost variables. The old, deprecated notation (brackets) still supports updating such ghost fields. It would be useful if we could update ghost fields using the new notation as well.

datatype PartRealPartGhost = PartRealPartGhost(x:int, ghost y:int)

method UpdateField()
{
var v := PartRealPartGhost(3, 4);
ghost var g := 5;
v := v[y := g];
v := v.(y := g);
}



Viewing all articles
Browse latest Browse all 1106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>