From 18d105f6103501e0c708f5d026e722fe605a853f Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 18 Sep 2021 00:58:03 -0400 Subject: [PATCH] cleaning up a few terms --- appendix.tex | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/appendix.tex b/appendix.tex index 7895315..70000f9 100644 --- a/appendix.tex +++ b/appendix.tex @@ -71,7 +71,7 @@ We define the circuit for a select-union-project-join $Q$ recursively by cases a \begin{algorithmic}[1] \Require $\query$: query \Require $\dbbase$: a \dbbaseName - \Ensure $\circuit = \tuple{E, V, \ell, \phi}$: a circuit encoding the lineage of each tuple in $\query(\dbbase)$ + \Ensure $\circuit = \tuple{E, V, \phi, \ell}$: a circuit encoding the lineage of each tuple in $\query(\dbbase)$ \If{$\query$ is $R$} \State $V = \comprehension{v_t}{t \in \dbbase.R}$ @@ -82,7 +82,7 @@ We define the circuit for a select-union-project-join $Q$ recursively by cases a \EndFor \ElsIf{$\query$ is $\sigma_\theta(\query')$} \State $\tuple{V, E, \phi', \ell} = \abbrStepOne(\query', \dbbase)$ - \For{$t \in \dbbase.R$} + \For{$t \in \domain(\phi')$} \If{$\theta(t)$} \State $\phi(t) = \phi'(t)$ \Else @@ -91,21 +91,21 @@ We define the circuit for a select-union-project-join $Q$ recursively by cases a \EndFor \ElsIf{$\query$ is $\pi_{\vec{A}}(\query')$} \State $\tuple{V', E', \phi', \ell'} = \abbrStepOne(\query', \dbbase)$ - \State $V = V' \cup \comprehension{v_t}{t \in \pi_{\vec{A}}(\query)}$ - \State $E = E' \cup \comprehension{(\phi(t'), v_t)}{t \in \pi_{\vec{A}}t', t' \in \query', t \in \pi_{\vec{A}}(\query')}$ + \State $V = V' \cup \comprehension{v_t}{t \in \pi_{\vec{A}}(\domain(\phi'))}$ + \State $E = E' \cup \comprehension{(\phi(t'), v_t)}{t \in \pi_{\vec{A}}t', t' \in \domain(\phi'), t \in \pi_{\vec{A}}(\domain(\phi'))}$ \Comment{Nodes with in-degrees above 2 are corrected (with logarithmic overhead) with an equivalent fan-in tree.} - \For{$t \in \pi_{\vec{A}}(\query')$} + \For{$t \in \pi_{\vec{A}}(\query'(\dbbase))$} \State $\phi(t) = v_t$ \Comment{$v_t$ as defined above} \State $\ell(v_t) = +$ \EndFor \ElsIf{$\query$ is $\query_1 \cup \query_2$} \State $\tuple{V_1, E_1, \phi_1, \ell_1} = \abbrStepOne(\query_1, \dbbase)$ \State $\tuple{V_2, E_2, \phi_2, \ell_2} = \abbrStepOne(\query_2, \dbbase)$ - \State $V = V_1 \cup V_2 \cup \comprehension{v_t}{t \in \query_1 \cap \query_2}$ - \State $E = E_1 \cup E_2 \cup \comprehension{(\phi_1(t), v_t), (\phi_2(t), v_t)}{t \in \query_1 \cap \query_2}$ + \State $V = V_1 \cup V_2 \cup \comprehension{v_t}{t \in \domain(\phi_1) \cap \domain(\phi_2)}$ + \State $E = E_1 \cup E_2 \cup \comprehension{(\phi_1(t), v_t), (\phi_2(t), v_t)}{t \in \domain(\phi_1) \cap \domain(\phi_2)}$ \State $\phi = \phi_1 \cup \phi_2$ \State $\ell = \ell_1 \cup \ell_2$ - \For{$t \in \query_1 \cap \query_2$} + \For{$t \in \domain(\phi_1) \cap \domain(\phi_2)$} \State $\phi(t) = v_t$ \Comment{$v_t$ as defined above} \State $\ell(v_t) = +$ \EndFor @@ -113,12 +113,12 @@ We define the circuit for a select-union-project-join $Q$ recursively by cases a \For{$i \in [1, k]$} $\tuple{V_i, E_i, \phi_i, \ell_i} = \abbrStepOne(\query_i, \dbbase)$ \EndFor - \State $V = V_1 \cup \ldots \cup V_k \cup \comprehension{v_t}{t \in \query_1 \bowtie \ldots \bowtie \query_k}$ + \State $V = V_1 \cup \ldots \cup V_k \cup \comprehension{v_t}{t \in \domain(\phi_1) \bowtie \ldots \bowtie \domain(\phi_k)}$ \State $E = E_1 \cup \ldots \cup E_k \cup \bigcup_{i \in [1,k]} - \comprehension{(\phi_i(\pi_{sch}(\query_i)(t))}{t \in \query_1 \bowtie \ldots \bowtie \query_k}$\Comment{Nodes with in-degrees above 2 are corrected (with $\log_2(k)$ overhead) with an equivalent fan-in tree.} + \comprehension{(\phi_i(\pi_{sch}(\query_i)(t))}{t \in \domain(\phi_1) \bowtie \ldots \bowtie \domain(\phi_k)}$\Comment{Nodes with in-degrees above 2 are corrected (with $\log_2(k)$ overhead) with an equivalent fan-in tree.} \State $\phi = \phi_1 \cup \ldots \cup \phi_k$ \State $\ell = \ell_1 \cup \ldots \cup \phi_k$ - \For{$t \in \query_1 \bowtie \ldots \bowtie \query_k$} + \For{$t \in \domain(\phi_1) \bowtie \ldots \bowtie \domain(\phi_k)$} \State $\phi(t) = v_t$ \State $\ell(v_t) = \times$ \EndFor