Semantics of types for mutable state