Funcons-beta : Linking.cbs | PRETTY | PDF
Linking
[
Datatype links
Funcon initialise-linking
Funcon link
Funcon fresh-link
Funcon fresh-initialised-link Alias fresh-init-link
Funcon set-link
Funcon follow-if-link
]
Meta-variables
T <: values
Datatype
links ::= link(_:variables)
Funcon
initialise-linking(X:=>T) : =>T
~> initialise-storing(X)
initialise-linking(X)
ensures that the entities used by the funcons for
linking are properly initialised.
Funcon
fresh-link(T) : =>links
~> link(allocate-variable(T))
Funcon
fresh-initialised-link(T, V:T) : =>links
~> link(allocate-initialised-variable(T, V))
Alias
fresh-init-link = fresh-initialised-link
The value of a link can be set only once.
If V
is a link, follow-if-link(V)
computes the set value, and
otherwise it evaluates to V
.
Rule
follow-if-link(link(Var:variables)) ~> assigned(Var)
Rule
follow-if-link(V:~links) ~> V