Boris Glavic 2023-07-09 09:35:00 +02:00
parent 79a7d2c77d
commit 4946c0d84f
1 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ If a row with dependent cells is deleted, the dependent cells need to be updated
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Update Index}
\label{sec:system-index}
The update index stores sequence of updates ($\overlay = \overlay_k \circ \ldots \circ \overlay_1$) and provide efficient access to the cells of an overlay spreadsheet (denoted $\spreadsheet_\overlay$) where undefined cells have the value $\errorval$.
The update index stores a sequence of updates ($\overlay = \overlay_k \circ \ldots \circ \overlay_1$) and provides efficient access to the cells of an overlay spreadsheet (denoted $\spreadsheet_\overlay$) where undefined cells have the value $\errorval$.
This entails:
(i) cell expressions $\spreadsheet_\overlay[\column, \row]$ (for cell evaluation);
(ii) upstream dependencies of a range (for topological sort and computing the active set), and
@ -161,10 +161,10 @@ Consider a running sum, such as the one in \Cref{ex:recursive-running-sum}.
The $k$th element will have $O(k)$ upstream dependencies, and so naively following \Cref{alg:upstream} is in $O(k)$.
However, observe that a single pattern is responsible for all of these dependencies, suggesting that a more efficient option may be available.
This dependency chain arises from recursion over single pattern; most cells depend on other cells defined by the same pattern.
This dependency chain arises from recursion over a single pattern; most cells depend on other cells defined by the same pattern.
We refer to such a pattern as \emph{recursive}, even if it does not create dependency cycle over individual cells.
As with cell execution, the transitive closure of the dependencies of a recursive pattern has a closed-form representation.
As with cell execution, the transitive closure of the dependencies of a recursive pattern may permit a closed-form representation.
In our running example, the upstream of any $\cellRef{D}{k}$ is exactly $\cellRef{D}{1-(k-1)}$ and $\cellRef{C}{1-k}$.
%
The \texttt{lineage} field of \Cref{alg:upstream} is used to track the set of patterns visited, and the offset(s) at which they were visited.