How to reduce temporal update boilerplate for state-rich models?

Completing other answers, I wrote some months ago a post about how to model stateful models in our so called “reified event” style.

If you use the novel, built-in-temporal features of Alloy 6, I would advise against this style and would favor the reified event cited hereabove. The latter has all advantages of Daniel’s, while it doesn’t suffer from the tricky part, which is you don’t know how many atoms you may need in traces (you may miss some traces due to a bad scope specification for the event signature).

I’m using this, but I write it as follows to avoid bad surprises with the possible application of the prime symbol over a compound expression:

let unchanged[x] { (x)' = (x) }
2 Likes