I'd like to be able to add a post condition to an explicit operation that refers to the result returned by that operation. I believe there used to be a keyword for doing this (such as res) in overture, but this option doesn't seem to exist for CML? It would be nice to have this available in CML. Here is a simple example:
state
counts : seq of nat := [0,0]
operations
getCounts:nat==>nat
getCounts(n) == (return counts(n))
pre n in set inds counts
post "result" = counts(n)
I'd like to be able to add a post condition to an explicit operation that refers to the result returned by that operation. I believe there used to be a keyword for doing this (such as res) in overture, but this option doesn't seem to exist for CML? It would be nice to have this available in CML. Here is a simple example: