summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2025-04-23 16:06:04 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2025-04-23 16:06:04 +0100
commit9545af5e7b69ab5d1b044009a0de9d6e1f0c0f49 (patch)
treeeb46277fae7283b7d979e5481e935c918a589fae
parentd9b5581e2111d85b4d547b47dc9940a792747627 (diff)
Describe the yet-to-make box-and-pointer diagram.
-rw-r--r--sec/systemt.ltx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sec/systemt.ltx b/sec/systemt.ltx
index b50928c..a808e4d 100644
--- a/sec/systemt.ltx
+++ b/sec/systemt.ltx
@@ -279,12 +279,15 @@ Consider the binary tree \(\mathsf{branch}(\mathsf{branch}(\mathsf{leaf}(1),
\mathsf{branch}(\mathsf{leaf}(4), \mathsf{leaf}(5))))\), depicted
diagramatically in \cref{fig:box-pointer:tree}. The recursive depth of the tree
is three, as there are at most three nested constructors (e.g.\ the path from
-root to the value four).
+root to the value four). \Cref{fig:box-pointer:heap} gives a representation of
+the heap used to store this tree. Each constructor has its own place in the
+heap. Leaves store the value of the leaf; branches store the indices of the two
+children. Like Church encodings, this encoding relies on having an encoding for
+sums in order to store the data for different constructors within a single type.
\TODO{
\begin{itemize}
\item create box-and-pointer diagram
- \item describe box-and-pointer diagram
\item explain briefly how to fold and roll
\end{itemize}
}