The symbolic evaluation is correct #
Under the descriptor of a parameter row, the symbolic evaluation of a query
holds the encodings of the rows the query computes at that row
(Sym.sym_correct), provided the environment is sound (Sym.EnvOK: the
descriptors without repetition and every parameter row's among them, and
enough counters for every bag recursion) and every value the evaluation
compares or groups is good (Sym.Good): a value of the cut, the null, or a
component of the parameter row. What makes the second hold is the cut, a
separate matter.
What the evaluation asks of the query and of the values #
Every window reads an all-regular input, which is what the windows the passes build do.
Equations
- Sym.winAllReg (AggQueryIn.Rel x✝ a) = True
- Sym.winAllReg (AggQueryIn.Hole x✝¹ s x✝) = True
- Sym.winAllReg (AggQueryIn.Param pv x✝) = True
- Sym.winAllReg AggQueryIn.Empty = True
- Sym.winAllReg (AggQueryIn.Proj ps q) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.Sel φ q hφ) = Sym.winAllReg q
- Sym.winAllReg (q₁.Prod q₂) = (Sym.winAllReg q₁ ∧ Sym.winAllReg q₂)
- Sym.winAllReg (q₁.Apply q₂) = (Sym.winAllReg q₁ ∧ Sym.winAllReg q₂)
- Sym.winAllReg (q₁.Sum q₂) = (Sym.winAllReg q₁ ∧ Sym.winAllReg q₂)
- Sym.winAllReg q.Dedup = Sym.winAllReg q
- Sym.winAllReg (q₁.Diff q₂) = (Sym.winAllReg q₁ ∧ Sym.winAllReg q₂)
- Sym.winAllReg (AggQueryIn.Explode k a q) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.Mu s q₀ q₁) = (Sym.winAllReg q₀ ∧ Sym.winAllReg q₁)
- Sym.winAllReg (AggQueryIn.MuSet s q₀ q₁) = (Sym.winAllReg q₀ ∧ Sym.winAllReg q₁)
- Sym.winAllReg (AggQueryIn.Gamma is ts fs q keep ord) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.GammaScalar ts fs q ord) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.GammaNest is his p f q) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.ProvSum is his t q) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.Retag h q) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.GammaTok is his ts fs a q keep) = Sym.winAllReg q
- Sym.winAllReg (AggQueryIn.Win P O o w t f q a dist keep) = (κ = ColKind.allReg n ∧ Sym.winAllReg q)
- Sym.winAllReg (AggQueryIn.WinExpr P O o ws ts fs g q_1 keeps) = Sym.winAllReg q_1
Instances For
Dependency graph
Every value the evaluation of a query compares, groups or emits from
nowhere is a value of the cut (CG): the values of the relations it
reads, the constants, the values its aggregations compute; and under a
recursion, at every round.
Equations
- One or more equations did not get rendered due to their size.
- Sym.Good G (AggQueryIn.Rel x✝² a) x✝¹ x✝ = ∀ (v : Tuple T x✝²), Multiset.Mem ((AggQueryIn.Rel x✝² a).evaluatePlain x✝¹ x✝) v → ∀ (i : Fin x✝²), G (v i)
- Sym.Good G (AggQueryIn.Hole x✝³ s x✝²) x✝¹ x✝ = True
- Sym.Good G (AggQueryIn.Param pv x✝²) x✝¹ x✝ = ∀ (j : Fin x✝³) (a : T), pv j = Sum.inl a → G a
- Sym.Good G AggQueryIn.Empty x✝¹ x✝ = True
- Sym.Good G (AggQueryIn.Proj ps q) x✝¹ x✝ = ((∀ (j : Fin x✝³), ∀ a ∈ (ps j).consts, G a) ∧ Sym.Good G q x✝¹ x✝)
- Sym.Good G (AggQueryIn.Sel φ q hφ) x✝¹ x✝ = ((∀ a ∈ φ.consts, G a) ∧ Sym.Good G q x✝¹ x✝)
- Sym.Good G (q₁.Prod q₂) x✝¹ x✝ = (Sym.Good G q₁ x✝¹ x✝ ∧ Sym.Good G q₂ x✝¹ x✝)
- Sym.Good G (a.Apply a_1) x✝¹ x✝ = False
- Sym.Good G (a.Sum a_1) x✝¹ x✝ = False
- Sym.Good G a.Dedup x✝¹ x✝ = False
- Sym.Good G (a.Diff a_1) x✝¹ x✝ = False
- Sym.Good G (AggQueryIn.Explode k a q) x✝¹ x✝ = Sym.Good G q x✝¹ x✝
- Sym.Good G (AggQueryIn.MuSet s a a_1) x✝¹ x✝ = False
- Sym.Good G (AggQueryIn.ProvSum is his t a) x✝¹ x✝ = False
- Sym.Good G (AggQueryIn.Retag h q) x✝¹ x✝ = Sym.Good G q x✝¹ x✝
- Sym.Good G (AggQueryIn.GammaTok is his ts fs a a_1 keep) x✝¹ x✝ = False
- Sym.Good G (AggQueryIn.WinExpr P O o ws ts fs g a keeps) x✝¹ x✝ = False
Instances For
Dependency graph
The cut at an instance, as a finite set of values.
Equations
- Sym.cutAt env D γ = (Multiset.map (fun (y : Tuple T 1) => y 0) (env.CQ.evaluatePlain D γ)).toFinset
Instances For
Dependency graph
The environment is sound at an instance: the descriptors are listed once each and hold every parameter row's, and every arity of a bag recursion has a list of counters long enough for the rounds it can run.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The relations the symbolic evaluation names #
The environment names no relation s.
Equations
- Sym.EnvNoMention env s = (AggQueryIn.noMention s env.CQ ∧ AggQueryIn.noMention s env.Desc ∧ ∀ (n : ℕ), AggQueryIn.noMention s (env.Lq n) ∧ AggQueryIn.noMention s (env.Sq n))
Instances For
Dependency graph
A symbolic recursive term keeps each row's further columns #
The correctness of the symbolic evaluation #
The padding row a scalar aggregation adds under a descriptor: the descriptor's cells, then constant cells.
Equations
- Sym.padRow m d x = Fin.addCases (fun (i₀ : Fin k) => d (Sym.ci i₀ (finProdFinEquiv.symm x).2)) (fun (x : Fin m) => 0) (finProdFinEquiv.symm x).1
Instances For
Dependency graph
The good values, as a finite set.
Equations
- Sym.goodSet C par = C ∪ Finset.image par Finset.univ ∪ ValueType.nullVal.toFinset
Instances For
Dependency graph
What the symbolic evaluation asks of its input query: a signature whose aggregates count, windows over all-regular inputs, and restricted recursions.
Equations
- Sym.SymSrc Θ q = (AggQueryIn.inSig Θ q ∧ (∀ g ∈ Θ, g.ReadsCount) ∧ Sym.winAllReg q ∧ q.hygienic)
Instances For
Dependency graph
Goodness depends on the instance only where the query reads it #
The symbolic evaluation is correct on a closed query: under the descriptor of a parameter row, its symbolic relation holds the encodings of the rows the query computes at that row.