SingleAssignmentStore |
A Dictionary of Key#Value tuples. Keys are numbers. Values are Oz structures which can be any of:
|
In addition, the interpreter MUST provide for the environment. Please
note that the syntax is now slightly modified: instead of ident(X) for
identifiers, we now make it ident(x), the variable now in lower
case. The difference between these two is that x is a literal, and
hence can be used as a feature of an Oz record. Please
see the function SubstituteIdentifiers
function in
Unify.oz to see how the environment uses the
variable name to look up the value.
Environment | A record. The features are the variables. The feature values are
the SAS keys. (see SubstituteIdentifiers source.) |
{BindValueToKeyInSAS Key Val} |
If Key is unbound (value is part of an equivalence set) bind Val to a key in the SAS. Should raise an exception alreadyAssigned(Key Val CurrentValue) if the key is bound. |
{BindRefToKeyInSAS Key RefKey} | If the key is unbound, then bind a reference to another key to a key in the SAS. |
{AddKeyToSAS} | Add a key to the single assignment store. This will return the key that you can associate with your identifier and later assign a value to. |
{RetrieveFromSAS Key} | Retrieve a value from the single assignment store. This will raise an exception if the key is missing from the SAS. For unbound keys, this will return equivalence(Key) -- this is guaranteed to be the same for two keys in the same equivalence set. |
{Unify Expression1 Expression2 Environment} |
Unify Expression1 and Expression2 given the mappings in Environment. Unification Error will raise an incompatibleTypes exception. |