I compare two ways to maintain several periodic histograms of one stream.
A concrete query
For counts modulo 4, 6 and 9, I can maintain three histograms or a single histogram modulo 36 and reconstruct the margins on demand. This models periodic counters with known periods and queries.
Contribution
My example checks all 19 marginal bins on 400 events. The dense joint table has 36 bins and takes 400 updates. The separate tables need 1,200 updates and 19 bins. This separates write cost from read cost. In the arithmetic setting, extracting primitive elements and computing in a smaller basis raise the same question about actual cost.
Next experiment
I will fix the write-to-query ratio before measuring memory, latency and margin reconstruction. The demonstration counts an integer stream. My research article explains the extra work needed for primes.
Reproducing the example
After extracting the files, I run python experience.py (Python 3.10+). The file resultats.json contains the reference output.
Prior work
Control from XII
In XII the partner set defines a closure. I test equality of closures, stability under union and duplicate masks on eight queries. I run python temoin_xii.py and compare with controle-xii.json.
Composing guarantees with explicit interfaces
I attach a set of scenarios to each transition and join compatible ports only. I take unions across alternatives and intersections along a sequence. Set-valued matrix multiplication specializes an established algebra. I check 16 outputs by direct walks over four scenarios. Forgetting ports introduces two false scenarios in my counterexample.
I run python temoin_xiv.py to replay my local check and keep its output in controle-xiv.json. Composing guarantees with explicit interfaces · Green, Karvounarakis & Tannen, Provenance semirings
Download bilingual starter kit ↓