main
Boris Glavic 2023-03-19 19:57:41 -05:00
parent d9882a068f
commit fc767e0ad4
1 changed files with 3 additions and 3 deletions

View File

@ -220,10 +220,10 @@ Note that the common operations of inserting and deleting rows can be expressed
%
The pattern update $\oup$ of an overlay update $\overlay$ is a set of pairs $\{ (\rangeOf{C_i}{R_i}, \pattern_i) \}$ where $\rangeOf{C_i}{R_i}$ is a range and $\pattern_i$ is a \emph{pattern formula}, i.e., a formula which may contain both absolute cell references (as in regular formulas) and references where rows are relative offsets (written as $+i$ or $-i$). We required that the ranges $\rangeOf{C_i}{R_i}$ are pairwise disjoint. The semantics of $(\rangeOf{C_i}{R_i}, \pattern_i)$ is that every cell $(\column, \row)$ in $\rangeOf{C_i}{R_i}$ is assigned a formula that is generated by replacing any relative references of the form $(\column, \delta)$ in $\pattern_i$ with $(\column, \row + \delta)$. We use $\pattern_i(\cell)$ to denote the instantiation of pattern $\pattern_i$ for cell $\cell$.
For instance, to store a rolling sum of the values in column \emph{C} as the cell values in column \emph{D} for the spreadsheet from \Cref{fig:example-spreadsheet-and-a}, we can use the following pattern update:
For instance, to store a running sum of the values in column \emph{C} as the cell values in column \emph{D} for the spreadsheet from \Cref{fig:example-spreadsheet-and-a}, we can use the following pattern update:
\[
\oup_{rolling} = (\rangeOf{D1}{D1}, (C,1)), (\rangeOf{D2}{D4}, (C,+0) + (D,-1))
\oup_{running} = (\rangeOf{D1}{D1}, (C,1)), (\rangeOf{D2}{D4}, (C,+0) + (D,-1))
\]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -279,7 +279,7 @@ Applying an overlay update $\overlay$ to a spreadsheet $\spreadsheet$ results i
\end{cases}
\end{align*}
For example, the result of applying the overlay update $\overlay_{rolling} = (\rtrans_{id},\oup_{rolling})$ where $\rframe_{id}(x) = x$ to our running example spreadsheet is shown in \Cref{fig:example-overlay-update}. The column \emph{D} is filled with new formulas that compute the hollowing sum.
For example, the result of applying the overlay update $\overlay_{running} = (\rtrans_{id},\oup_{running})$ where $\rframe_{id}(x) = x$ to our running example spreadsheet is shown in \Cref{fig:example-overlay-update}. The column \emph{D} is filled with new formulas that compute the hollowing sum.
Several remarks are in order. First, note that overlays can be used to encode common spreadsheet update operations in constant space, including . Second, \cite{tang-23-efcsfg} uses similar ideas to compress the dependencies in a spreadsheet using ranges and patterns. However, that work does not compress the updates themselves, but instead generates a compact representation of dependencies in a given spreadsheet.