Link Search Menu Expand Document
\( % cbs-katex.sty % \newcommand{\STYLE}[2]{\htmlClass{cbs-#1}{#2}} \newcommand{\DECL}[3]{\htmlId{#1:#2}{#3}} \newcommand{\REF}[3]{\href{###1:#2}{#3}} \newcommand{\HYPER}[5]{\href{#1/#2/index.html###3:#4}{#5}} % \SHADE{MATH} can be defined to produce a shaded background to highlight % inline MATH in running text: \newcommand{\SHADE}[1]{#1} % \KEY{TEXT}, \STRING{TEXT}, \ATOM{TEXT}, \LEX{TEXT} can be used in math mode: \newcommand{\KEY}[1]{\textsf{\textit{\STYLE{Key}{#1}}}} \newcommand{\STRING}[1]{\textsf{``\texttt{#1}''}} \newcommand{\ATOM}[1]{\textsf{`\texttt{#1}'}} \newcommand{\LEX}[1]{\textsf{\STYLE{Key}{`}\texttt{#1}\STYLE{Key}{'}}} % The following commands produce ASCII characters that are treated specially by LaTeX: \newcommand{\HASH}{\char`\#} \newcommand{\DOLLAR}{\char`\$} \newcommand{\PERCENT}{\char`\%} \newcommand{\AMPERSAND}{\char`\&} \newcommand{\APOSTROPHE}{\char`\'} \newcommand{\BACKSLASH}{\char`\\} \newcommand{\CARET}{\char`\^} \newcommand{\UNDERSCORE}{\char`\_} \newcommand{\GRAVE}{\char`\`} \newcommand{\LEFTBRACE}{\char`\{} \newcommand{\RIGHTBRACE}{\char`\}} \newcommand{\TILDE}{\textasciitilde} % {\char`\~} % \NAME{name} highlights the name; % \NAMEDECL{name} declares Name.name as the target of links to name; % \NAMEREF{name} links name to the target Name.name in the current file; % \NAMEHYPER{url}{file}{name} links name to Name.name at url/file/file.pdf. % Similarly for \VAR{partvariable}, \SYN{syntaxname}, \SEM{semanticsName}, % and \SECT{sectionnumber} % The kerns in \SUB and \VAR avoid overlaps with primes: \newcommand{\SUB}[1]{_{\kern-2mu\STYLE{PartVariable}{\textsf{#1}}}} % PLAIN \newcommand{\VAR}[1]{\STYLE{PartVariable}{\textsf{\textit{#1}\kern2mu}}} \newcommand{\NAME}[1]{\STYLE{Name}{\textsf{#1}}} \newcommand{\SYN}[1]{\STYLE{SyntaxName}{\textsf{#1}}} \newcommand{\SEM}[1]{\STYLE{SemanticsName}{\textsf{#1}}} \newcommand{\SECT}[1]{\STYLE{SectionNumber}{\textsf{#1}}} % DECL \newcommand{\VARDECL}[1]{\DECL{PartVariable}{#1}{\VAR{#1}}} \newcommand{\NAMEDECL}[1]{\DECL{Name}{#1}{\NAME{#1}}} \newcommand{\SYNDECL}[1]{\DECL{SyntaxName}{#1}{\SYN{#1}}} \newcommand{\SEMDECL}[1]{\DECL{SemanticsName}{#1}{\SEM{#1}}} \newcommand{\SECTDECL}[1]{\DECL{SectionNumber}{#1}{\textsf{#1}}} % REF \newcommand{\VARREF}[1]{\REF{PartVariable}{#1}{\VAR{#1}}} \newcommand{\NAMEREF}[1]{\REF{Name}{#1}{\NAME{#1}}} \newcommand{\SYNREF}[1]{\REF{SyntaxName}{#1}{\SYN{#1}}} \newcommand{\SEMREF}[1]{\REF{SemanticsName}{#1}{\SEM{#1}}} \newcommand{\SECTREF}[1]{\REF{SectionNumber}{#1}{\SECT{#1}}} % HYPER \newcommand{\VARHYPER}[3]{\HYPER{#1}{#2}{PartVariable}{#3}{\VAR{#3}}} \newcommand{\NAMEHYPER}[3]{\HYPER{#1}{#2}{Name}{#3}{\NAME{#3}}} \newcommand{\SYNHYPER}[3]{\HYPER{#1}{#2}{SyntaxName}{#3}{\SYN{#3}}} \newcommand{\SEMHYPER}[3]{\HYPER{#1}{#2}{SemanticsName}{#3}{\SEM{#3}}} \newcommand{\SECTHYPER}[3]{\HYPER{#1}{#2}{SectionNumber}{#3}{\SECT{#3}}} % \LEFTPHRASE MATH \RIGHTPHRASE produces [[ MATH ]] with proper brackets: \newcommand{\LEFTPHRASE}{\llbracket} \newcommand{\RIGHTPHRASE}{\rrbracket} % \LEFTGROUP MATH \RIGHTGROUP produces ( MATH ) where the parentheses are % highlighted the same as keywords: \newcommand{\LEFTGROUP}{\STYLE{Key}{(}} \newcommand{\RIGHTGROUP}{\STYLE{Key}{)}} % MATH\PLUS produces a superscript + % MATH\STAR produces a superscript * % MATH\QUERY produces a superscript ? \newcommand{\PLUS}{{}^{\texttt{+}}} \newcommand{\STAR}{{}^{\texttt{*}}} \newcommand{\QUERY}{{}^{\texttt{?}}} % \RULE{& PREMISE \\ & ...}{& FORMULA ... \\ & ...} produces an inference rule % with separately aligned premises and conclusion % PREMISE % ... % ----------- % FORMULA ... % ... \newcommand{\RULE}[2] {\frac{\begin{aligned}#1\end{aligned}}{\begin{aligned}#2\end{aligned}}} % \AXIOM{& FORMULA ... \\ & ...} produces an aligned formula % % FORMULA ... % ... \newcommand{\AXIOM}[1]{\begin{aligned}#1\end{aligned}} % \TO TYPE produces => TYPE \newcommand{\TO}{\mathop{\Rightarrow}} % TERM \TRANS TERM produces TERM ---> TERM \newcommand{\TRANS}{\longrightarrow} % TERM \xrightarrow{LABEL} TERM puts the label above the long arrow % \)

Funcons-beta : Binding.cbs | PLAIN | PDF

OUTLINE

Binding

\[\begin{align*} [ \ \KEY{Type} \quad & \NAMEREF{environments} \\ \KEY{Alias} \quad & \NAMEREF{envs} \\ \KEY{Datatype} \quad & \NAMEREF{identifiers} \\ \KEY{Alias} \quad & \NAMEREF{ids} \\ \KEY{Funcon} \quad & \NAMEREF{identifier-tagged} \\ \KEY{Alias} \quad & \NAMEREF{id-tagged} \\ \KEY{Funcon} \quad & \NAMEREF{fresh-identifier} \\ \KEY{Entity} \quad & \NAMEREF{environment} \\ \KEY{Alias} \quad & \NAMEREF{env} \\ \KEY{Funcon} \quad & \NAMEREF{initialise-binding} \\ \KEY{Funcon} \quad & \NAMEREF{bind-value} \\ \KEY{Alias} \quad & \NAMEREF{bind} \\ \KEY{Funcon} \quad & \NAMEREF{unbind} \\ \KEY{Funcon} \quad & \NAMEREF{bound-directly} \\ \KEY{Funcon} \quad & \NAMEREF{bound-value} \\ \KEY{Alias} \quad & \NAMEREF{bound} \\ \KEY{Funcon} \quad & \NAMEREF{closed} \\ \KEY{Funcon} \quad & \NAMEREF{scope} \\ \KEY{Funcon} \quad & \NAMEREF{accumulate} \\ \KEY{Funcon} \quad & \NAMEREF{collateral} \\ \KEY{Funcon} \quad & \NAMEREF{bind-recursively} \\ \KEY{Funcon} \quad & \NAMEREF{recursive} \ ] \end{align*}\] \[\begin{align*} \KEY{Meta-variables} \quad & \VAR{T} <: \NAMEHYPER{../../../Values}{Value-Types}{values} \end{align*}\]

Environments

\[\begin{align*} \KEY{Type} \quad & \NAMEDECL{environments} \leadsto \NAMEHYPER{../../../Values/Composite}{Maps}{maps} ( \NAMEREF{identifiers}, \NAMEHYPER{../../../Values}{Value-Types}{values}\QUERY ) \\ \KEY{Alias} \quad & \NAMEDECL{envs} = \NAMEREF{environments} \end{align*}\]

An environment represents bindings of identifiers to values. Mapping an identifier to \(\SHADE{( \ )}\) represents that its binding is hidden.

Circularity in environments (due to recursive bindings) is represented using bindings to cut-points called \(\SHADE{\NAMEHYPER{../.}{Linking}{links}}\). Funcons are provided for making declarations recursive and for referring to bound values without explicit mention of links, so their existence can generally be ignored.

\[\begin{align*} \KEY{Datatype} \quad \NAMEDECL{identifiers} \ ::= \ & \{ \_ : \NAMEHYPER{../../../Values/Composite}{Strings}{strings} \} \mid \NAMEDECL{identifier-tagged}( \_ : \NAMEREF{identifiers}, \_ : \NAMEHYPER{../../../Values}{Value-Types}{values}) \end{align*}\] \[\begin{align*} \KEY{Alias} \quad & \NAMEDECL{ids} = \NAMEREF{identifiers} \\ \KEY{Alias} \quad & \NAMEDECL{id-tagged} = \NAMEREF{identifier-tagged} \end{align*}\]

An identifier is either a string of characters, or an identifier tagged with some value (e.g., with the identifier of a namespace).

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{fresh-identifier} : \TO \NAMEREF{identifiers} \end{align*}\]

\(\SHADE{\NAMEREF{fresh-identifier}}\) computes an identifier distinct from all previously computed identifiers.

\[\begin{align*} \KEY{Rule} \quad & \NAMEREF{fresh-identifier} \leadsto \NAMEREF{identifier-tagged} ( \STRING{generated}, \NAMEHYPER{../.}{Generating}{fresh-atom} ) \end{align*}\]

Current bindings

\[\begin{align*} \KEY{Entity} \quad & \NAMEDECL{environment}(\_ : \NAMEREF{environments}) \vdash \_ \TRANS \_ \end{align*}\] \[\begin{align*} \KEY{Alias} \quad & \NAMEDECL{env} = \NAMEREF{environment} \end{align*}\]

The environment entity allows a computation to refer to the current bindings of identifiers to values.

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{initialise-binding}( \VAR{X} : \TO \VAR{T}) : \TO \VAR{T} \\&\quad \leadsto \NAMEHYPER{../.}{Linking}{initialise-linking} ( \NAMEHYPER{../.}{Generating}{initialise-generating} ( \NAMEREF{closed} ( \VAR{X} ) ) ) \end{align*}\]

\(\SHADE{\NAMEREF{initialise-binding} ( \VAR{X} )}\) ensures that \(\SHADE{\VAR{X}}\) does not depend on non-local bindings. It also ensures that the linking entity (used to represent potentially cyclic bindings) and the generating entity (for creating fresh identifiers) are initialised.

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{bind-value}( \VAR{I} : \NAMEREF{identifiers}, \VAR{V} : \NAMEHYPER{../../../Values}{Value-Types}{values}) : \TO \NAMEREF{environments} \\&\quad \leadsto \{ \VAR{I} \mapsto \VAR{V} \} \\ \KEY{Alias} \quad & \NAMEDECL{bind} = \NAMEREF{bind-value} \end{align*}\]

\(\SHADE{\NAMEREF{bind-value} ( \VAR{I}, \VAR{X} )}\) computes the environment that binds only \(\SHADE{\VAR{I}}\) to the value computed by \(\SHADE{\VAR{X}}\).

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{unbind}( \VAR{I} : \NAMEREF{identifiers}) : \TO \NAMEREF{environments} \\&\quad \leadsto \{ \VAR{I} \mapsto ( \ ) \} \end{align*}\]

\(\SHADE{\NAMEREF{unbind} ( \VAR{I} )}\) computes the environment that hides the binding of \(\SHADE{\VAR{I}}\).

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{bound-directly}( \_ : \NAMEREF{identifiers}) : \TO \NAMEHYPER{../../../Values}{Value-Types}{values} \end{align*}\]

\(\SHADE{\NAMEREF{bound-directly} ( \VAR{I} )}\) returns the value to which \(\SHADE{\VAR{I}}\) is currently bound, if any, and otherwise fails.

\(\SHADE{\NAMEREF{bound-directly} ( \VAR{I} )}\) does not follow links. It is used only in connection with recursively-bound values when references are not encapsulated in abstractions.

\[\begin{align*} \KEY{Rule} \quad & \RULE{ & \NAMEHYPER{../../../Values/Composite}{Maps}{lookup} ( \VAR{$\rho$}, \VAR{I} ) \leadsto ( \VAR{V} : \NAMEHYPER{../../../Values}{Value-Types}{values} ) }{ & \NAMEREF{environment} ( \VAR{$\rho$} ) \vdash \NAMEREF{bound-directly} ( \VAR{I} : \NAMEREF{identifiers} ) \TRANS \VAR{V} } \\ \KEY{Rule} \quad & \RULE{ & \NAMEHYPER{../../../Values/Composite}{Maps}{lookup} ( \VAR{$\rho$}, \VAR{I} ) \leadsto ( \ ) }{ & \NAMEREF{environment} ( \VAR{$\rho$} ) \vdash \NAMEREF{bound-directly} ( \VAR{I} : \NAMEREF{identifiers} ) \TRANS \NAMEHYPER{../../Abnormal}{Failing}{fail} } \end{align*}\] \[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{bound-value}( \VAR{I} : \NAMEREF{identifiers}) : \TO \NAMEHYPER{../../../Values}{Value-Types}{values} \\&\quad \leadsto \NAMEHYPER{../.}{Linking}{follow-if-link} ( \NAMEREF{bound-directly} ( \VAR{I} ) ) \\ \KEY{Alias} \quad & \NAMEDECL{bound} = \NAMEREF{bound-value} \end{align*}\]

\(\SHADE{\NAMEREF{bound-value} ( \VAR{I} )}\) inspects the value to which \(\SHADE{\VAR{I}}\) is currently bound, if any, and otherwise fails. If the value is a link, \(\SHADE{\NAMEREF{bound-value} ( \VAR{I} )}\) returns the value obtained by following the link, if any, and otherwise fails. If the inspected value is not a link, \(\SHADE{\NAMEREF{bound-value} ( \VAR{I} )}\) returns it.

\(\SHADE{\NAMEREF{bound-value} ( \VAR{I} )}\) is used for references to non-recursive bindings and to recursively-bound values when references are encapsulated in abstractions.

Scope

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{closed}( \VAR{X} : \TO \VAR{T}) : \TO \VAR{T} \end{align*}\]

\(\SHADE{\NAMEREF{closed} ( \VAR{X} )}\) ensures that \(\SHADE{\VAR{X}}\) does not depend on non-local bindings.

\[\begin{align*} \KEY{Rule} \quad & \RULE{ & \NAMEREF{environment} ( \NAMEHYPER{../../../Values/Composite}{Maps}{map} ( \ ) ) \vdash \VAR{X} \TRANS \VAR{X}' }{ & \NAMEREF{environment} ( \_ ) \vdash \NAMEREF{closed} ( \VAR{X} ) \TRANS \NAMEREF{closed} ( \VAR{X}' ) } \\ \KEY{Rule} \quad & \NAMEREF{closed} ( \VAR{V} : \VAR{T} ) \leadsto \VAR{V} \end{align*}\] \[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{scope}( \_ : \NAMEREF{environments}, \_ : \TO \VAR{T}) : \TO \VAR{T} \end{align*}\]

\(\SHADE{\NAMEREF{scope} ( \VAR{D}, \VAR{X} )}\) executes \(\SHADE{\VAR{D}}\) with the current bindings, to compute an environment \(\SHADE{\VAR{$\rho$}}\) representing local bindings. It then executes \(\SHADE{\VAR{X}}\) to compute the result, with the current bindings extended by \(\SHADE{\VAR{$\rho$}}\), which may shadow or hide previous bindings.

\(\SHADE{\NAMEREF{closed} ( \NAMEREF{scope} ( \VAR{$\rho$}, \VAR{X} ) )}\) ensures that \(\SHADE{\VAR{X}}\) can reference only the bindings provided by \(\SHADE{\VAR{$\rho$}}\).

\[\begin{align*} \KEY{Rule} \quad & \RULE{ & \NAMEREF{environment} ( \NAMEHYPER{../../../Values/Composite}{Maps}{map-override} ( \VAR{$\rho$}\SUB{1}, \VAR{$\rho$}\SUB{0} ) ) \vdash \VAR{X} \TRANS \VAR{X}' }{ & \NAMEREF{environment} ( \VAR{$\rho$}\SUB{0} ) \vdash \NAMEREF{scope} ( \VAR{$\rho$}\SUB{1} : \NAMEREF{environments}, \VAR{X} ) \TRANS \NAMEREF{scope} ( \VAR{$\rho$}\SUB{1}, \VAR{X}' ) } \\ \KEY{Rule} \quad & \NAMEREF{scope} ( \_ : \NAMEREF{environments}, \VAR{V} : \VAR{T} ) \leadsto \VAR{V} \end{align*}\] \[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{accumulate}( \_ : ( \TO \NAMEREF{environments} )\STAR) : \TO \NAMEREF{environments} \end{align*}\]

\(\SHADE{\NAMEREF{accumulate} ( \VAR{D}\SUB{1}, \VAR{D}\SUB{2} )}\) executes \(\SHADE{\VAR{D}\SUB{1}}\) with the current bindings, to compute an environment \(\SHADE{\VAR{$\rho$}\SUB{1}}\) representing some local bindings. It then executes \(\SHADE{\VAR{D}\SUB{2}}\) to compute an environment \(\SHADE{\VAR{$\rho$}\SUB{2}}\) representing further local bindings, with the current bindings extended by \(\SHADE{\VAR{$\rho$}\SUB{1}}\), which may shadow or hide previous current bindings. The result is \(\SHADE{\VAR{$\rho$}\SUB{1}}\) extended by \(\SHADE{\VAR{$\rho$}\SUB{2}}\), which may shadow or hide the bindings of \(\SHADE{\VAR{$\rho$}\SUB{1}}\).

\(\SHADE{\NAMEREF{accumulate} ( \_, \_ )}\) is associative, with \(\SHADE{\NAMEHYPER{../../../Values/Composite}{Maps}{map} ( \ )}\) as unit, and extends to any number of arguments.

\[\begin{align*} \KEY{Rule} \quad & \RULE{ & \VAR{D}\SUB{1} \TRANS \VAR{D}\SUB{1}' }{ & \NAMEREF{accumulate} ( \VAR{D}\SUB{1}, \VAR{D}\SUB{2} ) \TRANS \NAMEREF{accumulate} ( \VAR{D}\SUB{1}', \VAR{D}\SUB{2} ) } \\ \KEY{Rule} \quad & \NAMEREF{accumulate} ( \VAR{$\rho$}\SUB{1} : \NAMEREF{environments}, \VAR{D}\SUB{2} ) \leadsto \NAMEREF{scope} ( \VAR{$\rho$}\SUB{1}, \NAMEHYPER{../../../Values/Composite}{Maps}{map-override} ( \VAR{D}\SUB{2}, \VAR{$\rho$}\SUB{1} ) ) \\ \KEY{Rule} \quad & \NAMEREF{accumulate} ( \ ) \leadsto \NAMEHYPER{../../../Values/Composite}{Maps}{map} ( \ ) \\ \KEY{Rule} \quad & \NAMEREF{accumulate} ( \VAR{D}\SUB{1} ) \leadsto \VAR{D}\SUB{1} \\ \KEY{Rule} \quad & \NAMEREF{accumulate} ( \VAR{D}\SUB{1}, \VAR{D}\SUB{2}, \VAR{D}\PLUS ) \leadsto \NAMEREF{accumulate} ( \VAR{D}\SUB{1}, \NAMEREF{accumulate} ( \VAR{D}\SUB{2}, \VAR{D}\PLUS ) ) \end{align*}\] \[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{collateral}( \VAR{$\rho$}\STAR : \NAMEREF{environments}\STAR) : \TO \NAMEREF{environments} \\&\quad \leadsto \NAMEHYPER{../../Abnormal}{Failing}{checked} \ \NAMEHYPER{../../../Values/Composite}{Maps}{map-unite} ( \VAR{$\rho$}\STAR ) \end{align*}\]

\(\SHADE{\NAMEREF{collateral} ( \VAR{D}\SUB{1}, \cdots )}\) pre-evaluates its arguments with the current bindings, and unites the resulting maps, which fails if the domains are not pairwise disjoint.

\(\SHADE{\NAMEREF{collateral} ( \VAR{D}\SUB{1}, \VAR{D}\SUB{2} )}\) is associative and commutative with \(\SHADE{\NAMEHYPER{../../../Values/Composite}{Maps}{map} ( \ )}\) as unit, and extends to any number of arguments.

Recurse

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{bind-recursively}( \VAR{I} : \NAMEREF{identifiers}, \VAR{E} : \TO \NAMEHYPER{../../../Values}{Value-Types}{values}) : \TO \NAMEREF{environments} \\&\quad \leadsto \NAMEREF{recursive} ( \{ \VAR{I} \}, \NAMEREF{bind-value} ( \VAR{I}, \VAR{E} ) ) \end{align*}\]

\(\SHADE{\NAMEREF{bind-recursively} ( \VAR{I}, \VAR{E} )}\) binds \(\SHADE{\VAR{I}}\) to a link that refers to the value of \(\SHADE{\VAR{E}}\), representing a recursive binding of \(\SHADE{\VAR{I}}\) to the value of \(\SHADE{\VAR{E}}\). Since \(\SHADE{\NAMEREF{bound-value} ( \VAR{I} )}\) follows links, it should not be executed during the evaluation of \(\SHADE{\VAR{E}}\).

\[\begin{align*} \KEY{Funcon} \quad & \NAMEDECL{recursive}( \VAR{SI} : \NAMEHYPER{../../../Values/Composite}{Sets}{sets} ( \NAMEREF{identifiers} ), \VAR{D} : \TO \NAMEREF{environments}) : \TO \NAMEREF{environments} \\&\quad \leadsto \NAMEREF{re-close} ( \NAMEREF{bind-to-forward-links} ( \VAR{SI} ), \VAR{D} ) \end{align*}\]

\(\SHADE{\NAMEREF{recursive} ( \VAR{SI}, \VAR{D} )}\) executes \(\SHADE{\VAR{D}}\) with potential recursion on the bindings of the identifiers in the set \(\SHADE{\VAR{SI}}\) (which need not be the same as the set of identifiers bound by \(\SHADE{\VAR{D}}\)).

\[\begin{align*} \KEY{Auxiliary Funcon} \quad & \NAMEDECL{re-close}( \VAR{M} : \NAMEHYPER{../../../Values/Composite}{Maps}{maps} ( \NAMEREF{identifiers}, \NAMEHYPER{../.}{Linking}{links} ), \VAR{D} : \TO \NAMEREF{environments}) : \TO \NAMEREF{environments} \\&\quad \leadsto \NAMEREF{accumulate} ( \NAMEREF{scope} ( \VAR{M}, \VAR{D} ), \NAMEHYPER{../.}{Flowing}{sequential} ( \NAMEREF{set-forward-links} ( \VAR{M} ), \NAMEHYPER{../../../Values/Composite}{Maps}{map} ( \ ) ) ) \end{align*}\]

\(\SHADE{\NAMEREF{re-close} ( \VAR{M}, \VAR{D} )}\) first executes \(\SHADE{\VAR{D}}\) in the scope \(\SHADE{\VAR{M}}\), which maps identifiers to freshly allocated links. This computes an environment \(\SHADE{\VAR{$\rho$}}\) where the bound values may contain links, or implicit references to links in abstraction values. It then sets the link for each identifier in the domain of \(\SHADE{\VAR{M}}\) to refer to its bound value in \(\SHADE{\VAR{$\rho$}}\), and returns \(\SHADE{\VAR{$\rho$}}\) as the result.

\[\begin{align*} \KEY{Auxiliary Funcon} \quad & \NAMEDECL{bind-to-forward-links}( \VAR{SI} : \NAMEHYPER{../../../Values/Composite}{Sets}{sets} ( \NAMEREF{identifiers} )) : \TO \NAMEHYPER{../../../Values/Composite}{Maps}{maps} ( \NAMEREF{identifiers}, \NAMEHYPER{../.}{Linking}{links} ) \\&\quad \leadsto \NAMEHYPER{../../../Values/Composite}{Maps}{map-unite} ( \\&\quad\quad\quad\quad \NAMEHYPER{../.}{Giving}{interleave-map} ( \\&\quad\quad\quad\quad\quad \NAMEREF{bind-value} ( \NAMEHYPER{../.}{Giving}{given}, \NAMEHYPER{../.}{Linking}{fresh-link} ( \NAMEHYPER{../../../Values}{Value-Types}{values} ) ), \\&\quad\quad\quad\quad\quad \NAMEHYPER{../../../Values/Composite}{Sets}{set-elements} ( \VAR{SI} ) ) ) \end{align*}\]

\(\SHADE{\NAMEREF{bind-to-forward-links} ( \VAR{SI} )}\) binds each identifier in the set \(\SHADE{\VAR{SI}}\) to a freshly allocated link.

\[\begin{align*} \KEY{Auxiliary Funcon} \quad & \NAMEDECL{set-forward-links}( \VAR{M} : \NAMEHYPER{../../../Values/Composite}{Maps}{maps} ( \NAMEREF{identifiers}, \NAMEHYPER{../.}{Linking}{links} )) : \TO \NAMEHYPER{../../../Values/Primitive}{Null}{null-type} \\&\quad \leadsto \NAMEHYPER{../.}{Flowing}{effect} ( \\&\quad\quad\quad\quad \NAMEHYPER{../.}{Giving}{interleave-map} ( \\&\quad\quad\quad\quad\quad \NAMEHYPER{../.}{Linking}{set-link} ( \NAMEHYPER{../../../Values/Composite}{Maps}{map-lookup} ( \VAR{M}, \NAMEHYPER{../.}{Giving}{given} ), \NAMEREF{bound-value} ( \NAMEHYPER{../.}{Giving}{given} ) ), \\&\quad\quad\quad\quad\quad \NAMEHYPER{../../../Values/Composite}{Sets}{set-elements} ( \NAMEHYPER{../../../Values/Composite}{Maps}{map-domain} ( \VAR{M} ) ) ) ) \end{align*}\]

For each identifier \(\SHADE{\VAR{I}}\) in the domain of \(\SHADE{\VAR{M}}\), \(\SHADE{\NAMEREF{set-forward-links} ( \VAR{M} )}\) sets the link to which \(\SHADE{\VAR{I}}\) is mapped by \(\SHADE{\VAR{M}}\) to the current bound value of \(\SHADE{\VAR{I}}\).