bhick
This commit is contained in:
@@ -147,6 +147,29 @@ Core Transition Rules
|
||||
& m
|
||||
}
|
||||
|
||||
#. Again, building on the previous rules, this rule makes the machine consider
|
||||
unapplied supercombinators to be in WHNF
|
||||
|
||||
.. math::
|
||||
\gmrule
|
||||
{ \mathtt{Unwind} : \nillist
|
||||
& a_0 : \ldots : a_n : \nillist
|
||||
& \langle i, s \rangle : d
|
||||
& h
|
||||
\begin{bmatrix}
|
||||
a_0 : \mathtt{NGlobal} \; k \; c
|
||||
\end{bmatrix}
|
||||
& m
|
||||
}
|
||||
{ i
|
||||
& a_n : s
|
||||
& d
|
||||
& h
|
||||
& m \\
|
||||
\SetCell[c=2]{c}
|
||||
\text{when $n < k$}
|
||||
}
|
||||
|
||||
#. If an application is on top of the stack, :code:`Unwind` continues unwinding
|
||||
|
||||
.. math::
|
||||
@@ -340,28 +363,47 @@ Core Transition Rules
|
||||
& m
|
||||
}
|
||||
|
||||
#. Consider unapplied functions to be in WHNF
|
||||
#. Pack a constructor if there are sufficient arguments
|
||||
|
||||
.. math::
|
||||
\gmrule
|
||||
{ \mathtt{Unwind} : \nillist
|
||||
& a_0 : \ldots : a_n : \nillist
|
||||
& \langle i, s \rangle : d
|
||||
{ \mathtt{Pack} \; t \; n : i
|
||||
& a_1 : \ldots : a_n : s
|
||||
& d
|
||||
& h
|
||||
\begin{bmatrix}
|
||||
a_0 : \mathtt{NGlobal} \; k \; c
|
||||
\end{bmatrix}
|
||||
& m
|
||||
}
|
||||
{ i
|
||||
& a_n : s
|
||||
& a : s
|
||||
& d
|
||||
& h
|
||||
& m \\
|
||||
\SetCell[c=2]{c}
|
||||
\text{when $n < k$}
|
||||
\begin{bmatrix}
|
||||
a : \mathtt{NConstr} \; t \; [a_1,\ldots,a_n]
|
||||
\end{bmatrix}
|
||||
& m
|
||||
}
|
||||
|
||||
#. Evaluate a case
|
||||
|
||||
.. math::
|
||||
\gmrule
|
||||
{ \mathtt{CaseJump} \begin{bmatrix} t \to c \end{bmatrix} : i
|
||||
& a : s
|
||||
& d
|
||||
& h
|
||||
\begin{bmatrix}
|
||||
a : \mathtt{NConstr} \; t \; v
|
||||
\end{bmatrix}
|
||||
& m
|
||||
}
|
||||
{ c \concat i
|
||||
& d
|
||||
& h
|
||||
& m
|
||||
}
|
||||
|
||||
|
||||
|
||||
***************
|
||||
Extension Rules
|
||||
***************
|
||||
|
||||
Reference in New Issue
Block a user