Skip to content

Instantly share code, notes, and snippets.

@hwayne
Created May 3, 2019 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hwayne/5d5f34891e9e8f606e60f5352d8e142e to your computer and use it in GitHub Desktop.
Save hwayne/5d5f34891e9e8f606e60f5352d8e142e to your computer and use it in GitHub Desktop.
Language snippet
proc write(key: str, value: T) modifies store {
store[key] := value;
}
fun read(key: str) returns (out:T) {
out := store[key];
}
// ....
properties A
gen {
, store: empty()
, keys: gen(str) { props }
, vals: get(T) {}
}
{
prop "adding a diff key doesn't modify the old key" {
// ...
}
prop "writes are retrievable" {
// ...
}
prop "fuzz" {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment