1
0
mirror of https://github.com/dhil/phd-dissertation synced 2026-03-12 18:48:25 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
cafa8b1ba2 Merge branch 'master' of github.com:dhil/phd-dissertation 2024-02-26 09:51:21 +01:00
2e61275a5b Fix typo; fix sentence structure.
This commit fixes a typo in the type signature of `init` (thanks to
Ramsay Carslaw for spotting it). This commit also structures the last
sentence of Section 2.7 to read slightly better.
2024-02-26 09:50:56 +01:00

View File

@@ -5446,7 +5446,7 @@ created by the operating system.
% %
\[ \[
\bl \bl
\init : (\Unit \to \alpha \eff \varepsilon) \to \alpha \eff \{\Co;\varepsilon\}\\ \init : (\UnitType \to \UnitType \eff \varepsilon) \to \UnitType \eff \{\Co;\varepsilon\}\\
\init~main \defas \init~main \defas
\bl \bl
\Let\;pid \revto \Do\;\UFork~\Unit\;\In\\ \Let\;pid \revto \Do\;\UFork~\Unit\;\In\\
@@ -5535,10 +5535,11 @@ $\Fork : \UnitType \opto \Bool$, by $\timesharee$, which handles the
more general operation $\UFork : \UnitType \opto \Int$. In practice, more general operation $\UFork : \UnitType \opto \Int$. In practice,
we may be unable to dispense of the old interface so easily, meaning we may be unable to dispense of the old interface so easily, meaning
we have to retain support for, say, legacy reasons. As we have seen we have to retain support for, say, legacy reasons. As we have seen
previously we can an operation in terms of another operation. Thus to previously we can interpret an operation in terms of another
retain support for $\Fork$ we simply have to insert a handler under operation. Thus to retain support for $\Fork$ we simply have to insert
$\timesharee$ which interprets $\Fork$ in terms of $\UFork$. The a handler under $\timesharee$ which interprets $\Fork$ in terms of
operation case of this handler would be akin to the following. $\UFork$. The operation case of this handler would be akin to the
following.
% %
\[ \[
\OpCase{\Fork}{\Unit}{resume} \mapsto \OpCase{\Fork}{\Unit}{resume} \mapsto
@@ -5552,7 +5553,7 @@ The interpretation of $\Fork$ inspects the process identifier returned
by the $\UFork$ to determine the role of the current process in the by the $\UFork$ to determine the role of the current process in the
parent-child relationship. If the identifier is nonzero, then the parent-child relationship. If the identifier is nonzero, then the
process is a parent, hence $\Fork$ should return $\True$ to its process is a parent, hence $\Fork$ should return $\True$ to its
caller. Otherwise it should return $\False$. This preserves the caller, and otherwise it should return $\False$, thus preserving the
functionality of the legacy code. functionality of the legacy code.
\section{Related work} \section{Related work}