Functions to read and write variables.
These used to be part of the dynamic semantics, which was since then extended and generalized to no longer use these functions. However, these functions are still used by ATC, and so for now we keep them here. We may remove them altogether in the future, after changing ATC to no longer used them.