echovalidum 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- echovalidum-0.1.0/PKG-INFO +199 -0
- echovalidum-0.1.0/README.md +169 -0
- echovalidum-0.1.0/echovalidum/__init__.py +109 -0
- echovalidum-0.1.0/echovalidum/catalog.py +27 -0
- echovalidum-0.1.0/echovalidum/ifc.py +22 -0
- echovalidum-0.1.0/echovalidum/loops.py +34 -0
- echovalidum-0.1.0/echovalidum/memory.py +25 -0
- echovalidum-0.1.0/echovalidum/phi.py +11 -0
- echovalidum-0.1.0/echovalidum/verify.py +28 -0
- echovalidum-0.1.0/echovalidum.egg-info/PKG-INFO +199 -0
- echovalidum-0.1.0/echovalidum.egg-info/SOURCES.txt +60 -0
- echovalidum-0.1.0/echovalidum.egg-info/dependency_links.txt +1 -0
- echovalidum-0.1.0/echovalidum.egg-info/requires.txt +8 -0
- echovalidum-0.1.0/echovalidum.egg-info/top_level.txt +47 -0
- echovalidum-0.1.0/pyproject.toml +117 -0
- echovalidum-0.1.0/setup.cfg +4 -0
- echovalidum-0.1.0/soilith_64bit.py +410 -0
- echovalidum-0.1.0/soilith_abstract.py +278 -0
- echovalidum-0.1.0/soilith_arena.py +141 -0
- echovalidum-0.1.0/soilith_atlas.py +602 -0
- echovalidum-0.1.0/soilith_bench.py +297 -0
- echovalidum-0.1.0/soilith_bytecode.py +596 -0
- echovalidum-0.1.0/soilith_capability.py +304 -0
- echovalidum-0.1.0/soilith_catalog.py +1705 -0
- echovalidum-0.1.0/soilith_coherent.py +241 -0
- echovalidum-0.1.0/soilith_concurrent.py +334 -0
- echovalidum-0.1.0/soilith_conservation.py +357 -0
- echovalidum-0.1.0/soilith_contract.py +307 -0
- echovalidum-0.1.0/soilith_descent.py +484 -0
- echovalidum-0.1.0/soilith_discover.py +414 -0
- echovalidum-0.1.0/soilith_distributed.py +260 -0
- echovalidum-0.1.0/soilith_effect.py +317 -0
- echovalidum-0.1.0/soilith_fibration.py +548 -0
- echovalidum-0.1.0/soilith_gauge.py +339 -0
- echovalidum-0.1.0/soilith_gradual.py +344 -0
- echovalidum-0.1.0/soilith_ifc.py +351 -0
- echovalidum-0.1.0/soilith_incremental.py +304 -0
- echovalidum-0.1.0/soilith_intervals.py +425 -0
- echovalidum-0.1.0/soilith_lang.py +1382 -0
- echovalidum-0.1.0/soilith_linear.py +309 -0
- echovalidum-0.1.0/soilith_loop_ifc.py +741 -0
- echovalidum-0.1.0/soilith_magnitude_discover.py +283 -0
- echovalidum-0.1.0/soilith_memory.py +480 -0
- echovalidum-0.1.0/soilith_multiscale.py +418 -0
- echovalidum-0.1.0/soilith_ownership.py +332 -0
- echovalidum-0.1.0/soilith_pair_memory.py +451 -0
- echovalidum-0.1.0/soilith_phi.py +875 -0
- echovalidum-0.1.0/soilith_prob.py +247 -0
- echovalidum-0.1.0/soilith_refinement_check.py +370 -0
- echovalidum-0.1.0/soilith_region.py +317 -0
- echovalidum-0.1.0/soilith_resonance.py +228 -0
- echovalidum-0.1.0/soilith_rewrite.py +266 -0
- echovalidum-0.1.0/soilith_separation.py +405 -0
- echovalidum-0.1.0/soilith_session.py +336 -0
- echovalidum-0.1.0/soilith_signature.py +316 -0
- echovalidum-0.1.0/soilith_soundness.py +352 -0
- echovalidum-0.1.0/soilith_sparse.py +284 -0
- echovalidum-0.1.0/soilith_symmetry_closure.py +472 -0
- echovalidum-0.1.0/soilith_topology.py +470 -0
- echovalidum-0.1.0/soilith_typed_closure.py +416 -0
- echovalidum-0.1.0/soilith_weakmem.py +537 -0
- echovalidum-0.1.0/soilith_z3verify.py +854 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: echovalidum
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The echo, validated — a Python library for lattice-based memory with kernel-checked attestations for the Sabelfeld-Sands four-channel iteration-count NI model.
|
|
5
|
+
Author: Brisen Koch
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
|
+
Project-URL: Homepage, https://echovalidum.com/
|
|
8
|
+
Keywords: programming-language,lattice,memory-model,non-interference,information-flow-control,separation-logic,cayley-graph,abstract-interpretation,smt,z3,pqc,attestation
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering
|
|
18
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: numpy>=1.24
|
|
25
|
+
Requires-Dist: scipy>=1.10
|
|
26
|
+
Provides-Extra: verify
|
|
27
|
+
Requires-Dist: z3-solver>=4.12; extra == "verify"
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
30
|
+
|
|
31
|
+
# Echovalidum
|
|
32
|
+
|
|
33
|
+
*The echo, validated.*
|
|
34
|
+
|
|
35
|
+
[](https://pypi.org/project/echovalidum/)
|
|
36
|
+
[](https://pypi.org/project/echovalidum/)
|
|
37
|
+
[](https://www.echovalidum.com)
|
|
38
|
+
|
|
39
|
+
Echovalidum is a Python library for **lattice-based memory**. Every value is a
|
|
40
|
+
`Cell(value, trust, phase)` living on a bounded trust-coherence lattice; every
|
|
41
|
+
loop carries a declared termination bound; and every non-interference judgment
|
|
42
|
+
can be discharged as a Z3 / QF_BV obligation and signed through a post-quantum
|
|
43
|
+
attestation pipeline.
|
|
44
|
+
|
|
45
|
+
It contributes a unified substrate for four things that are usually studied in
|
|
46
|
+
isolation: refinement types over memory, Cayley-disjoint borrow checking,
|
|
47
|
+
abstract interpretation with widening, and information-flow control sensitive
|
|
48
|
+
to iteration count. The result is the first unified discharge of all four
|
|
49
|
+
Sabelfeld–Sands (2000) iteration-count covert channels as kernel-checked
|
|
50
|
+
attestations inside a single lattice substrate.
|
|
51
|
+
|
|
52
|
+
> **Internally codenamed Σoilith.** Echovalidum is the public-facing brand
|
|
53
|
+
> for the v0.1.0 facade. The underlying engine, arena format, and 45
|
|
54
|
+
> `soilith_*` modules retain that name in the source tree, similar to how
|
|
55
|
+
> PyTorch ships the `torch` import name. Both spellings refer to the same
|
|
56
|
+
> objects; `import echovalidum` is the recommended public API.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install echovalidum # core
|
|
62
|
+
pip install "echovalidum[verify]" # adds the Z3 backend (z3-solver)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Requires **Python ≥ 3.10**. The only hard dependency is `numpy >= 1.24`.
|
|
66
|
+
The Z3 backend is optional — empirical 2-trace NI checks work without it.
|
|
67
|
+
|
|
68
|
+
## 60-second tour
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
import echovalidum as ev
|
|
72
|
+
import numpy as np
|
|
73
|
+
|
|
74
|
+
# 1. Empirical iteration-count non-interference (Zone 154).
|
|
75
|
+
# The operator-range loop visits exactly 41 values regardless
|
|
76
|
+
# of HIGH inputs — count_a == count_b is the NI witness.
|
|
77
|
+
report = ev.iteration_count_ni_check(
|
|
78
|
+
ev.loops.factory_operator_range(0, 40),
|
|
79
|
+
high_inputs={"secret": (
|
|
80
|
+
ev.Cell(value=np.array([1.0]), trust=1.0, phase=0.0),
|
|
81
|
+
ev.Cell(value=np.array([99.0]), trust=1.0, phase=0.0),
|
|
82
|
+
)},
|
|
83
|
+
low_inputs={},
|
|
84
|
+
form=ev.LoopForm.OPERATOR_RANGE,
|
|
85
|
+
name="audit_all_phi",
|
|
86
|
+
)
|
|
87
|
+
assert report.noninterfering
|
|
88
|
+
assert report.count_a == report.count_b == 41
|
|
89
|
+
|
|
90
|
+
# 2. Z3 + PQC: discharge the SS loop-bound channel as UNSAT.
|
|
91
|
+
proof = ev.verify_loop_bound_ni(high_drives_bound=False, low_n_writes=41)
|
|
92
|
+
assert proof.verified
|
|
93
|
+
assert proof.judgment == "ss_channel_1_loop_bound"
|
|
94
|
+
|
|
95
|
+
attestation = ev.sign_with_pqc(proof)
|
|
96
|
+
# attestation["signature"], attestation["signer_id"], etc.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## What's inside
|
|
100
|
+
|
|
101
|
+
- **Trust-graded refinement types.** Every cell carries `(value, trust, phase)`
|
|
102
|
+
on a bounded lattice; `ψ{trust ≥ τ}` predicates compose with meet / join and
|
|
103
|
+
survive cross-process gossip.
|
|
104
|
+
- **Six basic loop forms with declared termination bounds.**
|
|
105
|
+
Operator range, Cayley ball over (ℤ/2)ᵏ, mem64 pages, fixpoint widen, DAG
|
|
106
|
+
replay, ESS resample. Each carries a proven (or, for one form, explicitly
|
|
107
|
+
empirical) bound.
|
|
108
|
+
- **Cayley-disjoint borrow checking** on (ℤ/2)ᵏ for *k* up to 30, plus a
|
|
109
|
+
hierarchical 64-bit virtual hierarchy with CHERI-flavored capabilities for
|
|
110
|
+
larger address spaces.
|
|
111
|
+
- **Sabelfeld–Sands four-channel non-interference.** Loop bound, outer
|
|
112
|
+
schedule, touch pattern, and data-dependent convergence are each encoded
|
|
113
|
+
as Z3 / QF_BV obligations. UNSAT on the negation proves termination-sensitive
|
|
114
|
+
NI; SAT yields a concrete (hₐ, h_b) counterexample. Every result is signed
|
|
115
|
+
through a post-quantum `SignedCertificationResult` pipeline.
|
|
116
|
+
- **Self-growing discovery catalog.** A persistent lawbook auto-indexes
|
|
117
|
+
machine-found laws and judgments by zone and kind; the current snapshot
|
|
118
|
+
contains 1608 entries across zones 116–154.
|
|
119
|
+
- **Adoption-contract DSL.** A small embedded `.sol` surface declares which
|
|
120
|
+
predicates external callers must honour
|
|
121
|
+
(`fn name(report) : ψ{trust ≥ 1.0}: yield report end`);
|
|
122
|
+
everything load-bearing is still plain Python.
|
|
123
|
+
|
|
124
|
+
## Public API at a glance
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
echovalidum
|
|
128
|
+
├── memory — Cell, Arena, SparseScaleMemory, Memory64, Capability
|
|
129
|
+
├── phi — PHI dict of operators (φ₀..φ₆₀)
|
|
130
|
+
├── ifc — Label, LabeledStore, noninterference_check, declassify
|
|
131
|
+
├── loops — LoopForm, SSChannel, IFCVerdict, LoopNIReport,
|
|
132
|
+
│ iteration_count_ni_check, discharge_loop_form_ni
|
|
133
|
+
├── verify — Z3VerifyResult,
|
|
134
|
+
│ verify_cayley_disjoint, verify_frame_disjoint,
|
|
135
|
+
│ verify_ai_sound, verify_loop_bound_ni,
|
|
136
|
+
│ verify_outer_schedule_ni, verify_touch_pattern_ni,
|
|
137
|
+
│ verify_iteration_bound, sign_with_pqc
|
|
138
|
+
└── catalog — scan_arena, build_manifest
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Top-level shortcuts (`ev.Cell`, `ev.verify_cayley_disjoint`, etc.) cover the
|
|
142
|
+
most common entry points; see `echovalidum.__all__` for the full list.
|
|
143
|
+
|
|
144
|
+
## Honest scope
|
|
145
|
+
|
|
146
|
+
The four-channel discharge proves NI for the **structural model** of each
|
|
147
|
+
loop form — what the iteration count is a function of. It does not lift
|
|
148
|
+
arbitrary user Python programs into Z3; that would require a separate
|
|
149
|
+
symbolic-execution layer Echovalidum does not claim to provide. For programs
|
|
150
|
+
whose loop parameters are LOW literals, the discharge is end-to-end
|
|
151
|
+
machine-checked; for programs whose parameters are computed at runtime, the
|
|
152
|
+
discharge runs on the live runtime object that the loop primitive received,
|
|
153
|
+
and the empirical 2-trace check covers the remainder.
|
|
154
|
+
|
|
155
|
+
Channel 4 (data-dependent convergence, e.g. particle filters) is fundamentally
|
|
156
|
+
HIGH-dependent in the iteration count. Echovalidum discharges the *bound*
|
|
157
|
+
in that case (`c ≤ max_iter`) — the Sabelfeld–Sands declassification budget —
|
|
158
|
+
rather than claiming non-interference where none exists.
|
|
159
|
+
|
|
160
|
+
## Status
|
|
161
|
+
|
|
162
|
+
| Item | Value |
|
|
163
|
+
| ------------------------- | ---------------------------------- |
|
|
164
|
+
| Version | 0.1.0 (β) |
|
|
165
|
+
| Test suite | 330 passing tests |
|
|
166
|
+
| Spec zones | 154 numbered zones |
|
|
167
|
+
| Discovery catalog | 1608 indexed entries (zones 116–154) |
|
|
168
|
+
| Median Z3 discharge | < 5 ms per judgment (QF_BV) |
|
|
169
|
+
| Hard dependency | `numpy >= 1.24` |
|
|
170
|
+
| Optional dependency | `z3-solver >= 4.12` |
|
|
171
|
+
| License | Proprietary |
|
|
172
|
+
|
|
173
|
+
## Citation
|
|
174
|
+
|
|
175
|
+
```bibtex
|
|
176
|
+
@software{echovalidum_2026,
|
|
177
|
+
title = {Echovalidum: a Python library for lattice-based memory
|
|
178
|
+
with kernel-checked Sabelfeld--Sands four-channel
|
|
179
|
+
non-interference},
|
|
180
|
+
author = {Koch, Brisen},
|
|
181
|
+
year = {2026},
|
|
182
|
+
version = {0.1.0},
|
|
183
|
+
url = {https://www.echovalidum.com/}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
A `CITATION.cff` is also shipped in the repository for the GitHub citation
|
|
188
|
+
widget.
|
|
189
|
+
|
|
190
|
+
## References
|
|
191
|
+
|
|
192
|
+
- Sabelfeld, A. and Sands, D. (2000). *Probabilistic Noninterference for
|
|
193
|
+
Multi-threaded Programs.* Proc. CSFW.
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
Proprietary. Public extraction and citation of the architecture is fine;
|
|
198
|
+
redistribution of the implementation is not yet open. Contact via
|
|
199
|
+
[echovalidum.com](https://www.echovalidum.com) for inquiries.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Echovalidum
|
|
2
|
+
|
|
3
|
+
*The echo, validated.*
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/echovalidum/)
|
|
6
|
+
[](https://pypi.org/project/echovalidum/)
|
|
7
|
+
[](https://www.echovalidum.com)
|
|
8
|
+
|
|
9
|
+
Echovalidum is a Python library for **lattice-based memory**. Every value is a
|
|
10
|
+
`Cell(value, trust, phase)` living on a bounded trust-coherence lattice; every
|
|
11
|
+
loop carries a declared termination bound; and every non-interference judgment
|
|
12
|
+
can be discharged as a Z3 / QF_BV obligation and signed through a post-quantum
|
|
13
|
+
attestation pipeline.
|
|
14
|
+
|
|
15
|
+
It contributes a unified substrate for four things that are usually studied in
|
|
16
|
+
isolation: refinement types over memory, Cayley-disjoint borrow checking,
|
|
17
|
+
abstract interpretation with widening, and information-flow control sensitive
|
|
18
|
+
to iteration count. The result is the first unified discharge of all four
|
|
19
|
+
Sabelfeld–Sands (2000) iteration-count covert channels as kernel-checked
|
|
20
|
+
attestations inside a single lattice substrate.
|
|
21
|
+
|
|
22
|
+
> **Internally codenamed Σoilith.** Echovalidum is the public-facing brand
|
|
23
|
+
> for the v0.1.0 facade. The underlying engine, arena format, and 45
|
|
24
|
+
> `soilith_*` modules retain that name in the source tree, similar to how
|
|
25
|
+
> PyTorch ships the `torch` import name. Both spellings refer to the same
|
|
26
|
+
> objects; `import echovalidum` is the recommended public API.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install echovalidum # core
|
|
32
|
+
pip install "echovalidum[verify]" # adds the Z3 backend (z3-solver)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Requires **Python ≥ 3.10**. The only hard dependency is `numpy >= 1.24`.
|
|
36
|
+
The Z3 backend is optional — empirical 2-trace NI checks work without it.
|
|
37
|
+
|
|
38
|
+
## 60-second tour
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
import echovalidum as ev
|
|
42
|
+
import numpy as np
|
|
43
|
+
|
|
44
|
+
# 1. Empirical iteration-count non-interference (Zone 154).
|
|
45
|
+
# The operator-range loop visits exactly 41 values regardless
|
|
46
|
+
# of HIGH inputs — count_a == count_b is the NI witness.
|
|
47
|
+
report = ev.iteration_count_ni_check(
|
|
48
|
+
ev.loops.factory_operator_range(0, 40),
|
|
49
|
+
high_inputs={"secret": (
|
|
50
|
+
ev.Cell(value=np.array([1.0]), trust=1.0, phase=0.0),
|
|
51
|
+
ev.Cell(value=np.array([99.0]), trust=1.0, phase=0.0),
|
|
52
|
+
)},
|
|
53
|
+
low_inputs={},
|
|
54
|
+
form=ev.LoopForm.OPERATOR_RANGE,
|
|
55
|
+
name="audit_all_phi",
|
|
56
|
+
)
|
|
57
|
+
assert report.noninterfering
|
|
58
|
+
assert report.count_a == report.count_b == 41
|
|
59
|
+
|
|
60
|
+
# 2. Z3 + PQC: discharge the SS loop-bound channel as UNSAT.
|
|
61
|
+
proof = ev.verify_loop_bound_ni(high_drives_bound=False, low_n_writes=41)
|
|
62
|
+
assert proof.verified
|
|
63
|
+
assert proof.judgment == "ss_channel_1_loop_bound"
|
|
64
|
+
|
|
65
|
+
attestation = ev.sign_with_pqc(proof)
|
|
66
|
+
# attestation["signature"], attestation["signer_id"], etc.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## What's inside
|
|
70
|
+
|
|
71
|
+
- **Trust-graded refinement types.** Every cell carries `(value, trust, phase)`
|
|
72
|
+
on a bounded lattice; `ψ{trust ≥ τ}` predicates compose with meet / join and
|
|
73
|
+
survive cross-process gossip.
|
|
74
|
+
- **Six basic loop forms with declared termination bounds.**
|
|
75
|
+
Operator range, Cayley ball over (ℤ/2)ᵏ, mem64 pages, fixpoint widen, DAG
|
|
76
|
+
replay, ESS resample. Each carries a proven (or, for one form, explicitly
|
|
77
|
+
empirical) bound.
|
|
78
|
+
- **Cayley-disjoint borrow checking** on (ℤ/2)ᵏ for *k* up to 30, plus a
|
|
79
|
+
hierarchical 64-bit virtual hierarchy with CHERI-flavored capabilities for
|
|
80
|
+
larger address spaces.
|
|
81
|
+
- **Sabelfeld–Sands four-channel non-interference.** Loop bound, outer
|
|
82
|
+
schedule, touch pattern, and data-dependent convergence are each encoded
|
|
83
|
+
as Z3 / QF_BV obligations. UNSAT on the negation proves termination-sensitive
|
|
84
|
+
NI; SAT yields a concrete (hₐ, h_b) counterexample. Every result is signed
|
|
85
|
+
through a post-quantum `SignedCertificationResult` pipeline.
|
|
86
|
+
- **Self-growing discovery catalog.** A persistent lawbook auto-indexes
|
|
87
|
+
machine-found laws and judgments by zone and kind; the current snapshot
|
|
88
|
+
contains 1608 entries across zones 116–154.
|
|
89
|
+
- **Adoption-contract DSL.** A small embedded `.sol` surface declares which
|
|
90
|
+
predicates external callers must honour
|
|
91
|
+
(`fn name(report) : ψ{trust ≥ 1.0}: yield report end`);
|
|
92
|
+
everything load-bearing is still plain Python.
|
|
93
|
+
|
|
94
|
+
## Public API at a glance
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
echovalidum
|
|
98
|
+
├── memory — Cell, Arena, SparseScaleMemory, Memory64, Capability
|
|
99
|
+
├── phi — PHI dict of operators (φ₀..φ₆₀)
|
|
100
|
+
├── ifc — Label, LabeledStore, noninterference_check, declassify
|
|
101
|
+
├── loops — LoopForm, SSChannel, IFCVerdict, LoopNIReport,
|
|
102
|
+
│ iteration_count_ni_check, discharge_loop_form_ni
|
|
103
|
+
├── verify — Z3VerifyResult,
|
|
104
|
+
│ verify_cayley_disjoint, verify_frame_disjoint,
|
|
105
|
+
│ verify_ai_sound, verify_loop_bound_ni,
|
|
106
|
+
│ verify_outer_schedule_ni, verify_touch_pattern_ni,
|
|
107
|
+
│ verify_iteration_bound, sign_with_pqc
|
|
108
|
+
└── catalog — scan_arena, build_manifest
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Top-level shortcuts (`ev.Cell`, `ev.verify_cayley_disjoint`, etc.) cover the
|
|
112
|
+
most common entry points; see `echovalidum.__all__` for the full list.
|
|
113
|
+
|
|
114
|
+
## Honest scope
|
|
115
|
+
|
|
116
|
+
The four-channel discharge proves NI for the **structural model** of each
|
|
117
|
+
loop form — what the iteration count is a function of. It does not lift
|
|
118
|
+
arbitrary user Python programs into Z3; that would require a separate
|
|
119
|
+
symbolic-execution layer Echovalidum does not claim to provide. For programs
|
|
120
|
+
whose loop parameters are LOW literals, the discharge is end-to-end
|
|
121
|
+
machine-checked; for programs whose parameters are computed at runtime, the
|
|
122
|
+
discharge runs on the live runtime object that the loop primitive received,
|
|
123
|
+
and the empirical 2-trace check covers the remainder.
|
|
124
|
+
|
|
125
|
+
Channel 4 (data-dependent convergence, e.g. particle filters) is fundamentally
|
|
126
|
+
HIGH-dependent in the iteration count. Echovalidum discharges the *bound*
|
|
127
|
+
in that case (`c ≤ max_iter`) — the Sabelfeld–Sands declassification budget —
|
|
128
|
+
rather than claiming non-interference where none exists.
|
|
129
|
+
|
|
130
|
+
## Status
|
|
131
|
+
|
|
132
|
+
| Item | Value |
|
|
133
|
+
| ------------------------- | ---------------------------------- |
|
|
134
|
+
| Version | 0.1.0 (β) |
|
|
135
|
+
| Test suite | 330 passing tests |
|
|
136
|
+
| Spec zones | 154 numbered zones |
|
|
137
|
+
| Discovery catalog | 1608 indexed entries (zones 116–154) |
|
|
138
|
+
| Median Z3 discharge | < 5 ms per judgment (QF_BV) |
|
|
139
|
+
| Hard dependency | `numpy >= 1.24` |
|
|
140
|
+
| Optional dependency | `z3-solver >= 4.12` |
|
|
141
|
+
| License | Proprietary |
|
|
142
|
+
|
|
143
|
+
## Citation
|
|
144
|
+
|
|
145
|
+
```bibtex
|
|
146
|
+
@software{echovalidum_2026,
|
|
147
|
+
title = {Echovalidum: a Python library for lattice-based memory
|
|
148
|
+
with kernel-checked Sabelfeld--Sands four-channel
|
|
149
|
+
non-interference},
|
|
150
|
+
author = {Koch, Brisen},
|
|
151
|
+
year = {2026},
|
|
152
|
+
version = {0.1.0},
|
|
153
|
+
url = {https://www.echovalidum.com/}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
A `CITATION.cff` is also shipped in the repository for the GitHub citation
|
|
158
|
+
widget.
|
|
159
|
+
|
|
160
|
+
## References
|
|
161
|
+
|
|
162
|
+
- Sabelfeld, A. and Sands, D. (2000). *Probabilistic Noninterference for
|
|
163
|
+
Multi-threaded Programs.* Proc. CSFW.
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
Proprietary. Public extraction and citation of the architecture is fine;
|
|
168
|
+
redistribution of the implementation is not yet open. Contact via
|
|
169
|
+
[echovalidum.com](https://www.echovalidum.com) for inquiries.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Echovalidum — *the echo, validated.*
|
|
3
|
+
|
|
4
|
+
A Python library for lattice-based memory with kernel-checked
|
|
5
|
+
attestations for the Sabelfeld-Sands four-channel iteration-count
|
|
6
|
+
non-interference model.
|
|
7
|
+
|
|
8
|
+
This package is the clean Python-library facade for the underlying
|
|
9
|
+
``soilith_*`` modules. It does not change any behaviour — every
|
|
10
|
+
function and type re-exported here is the same object exposed
|
|
11
|
+
under the historical ``soilith_*`` module names. The package
|
|
12
|
+
exists so that downstream code can write::
|
|
13
|
+
|
|
14
|
+
import echovalidum as ev
|
|
15
|
+
|
|
16
|
+
cell = ev.Cell(value=x, trust=0.95, phase=0.0)
|
|
17
|
+
rep = ev.iteration_count_ni_check(...)
|
|
18
|
+
proof = ev.verify_loop_bound_ni(...)
|
|
19
|
+
sig = ev.sign_with_pqc(proof)
|
|
20
|
+
|
|
21
|
+
instead of pulling each loose module by its historical name.
|
|
22
|
+
|
|
23
|
+
Submodules
|
|
24
|
+
----------
|
|
25
|
+
* :mod:`echovalidum.memory` — ``Cell``, ``Arena``, ``SparseScaleMemory``, ``Memory64``, ``Capability``.
|
|
26
|
+
* :mod:`echovalidum.phi` — ``PHI`` dict of operators (φ_0..φ_60).
|
|
27
|
+
* :mod:`echovalidum.ifc` — ``Label``, ``LabeledStore``, ``noninterference_check``, ``declassify``.
|
|
28
|
+
* :mod:`echovalidum.loops` — Zone-154 loop-form NI: ``LoopForm``, ``SSChannel``, ``discharge_loop_form_ni``.
|
|
29
|
+
* :mod:`echovalidum.verify` — Zone-151 Z3 + PQC pipeline: ``verify_cayley_disjoint``, ``verify_loop_bound_ni`` etc.
|
|
30
|
+
* :mod:`echovalidum.catalog` — discovery catalog: ``scan_arena``, ``build_manifest``.
|
|
31
|
+
|
|
32
|
+
Top-level headline re-exports
|
|
33
|
+
-----------------------------
|
|
34
|
+
The most-used names are also bound at the top level for one-line use::
|
|
35
|
+
|
|
36
|
+
ev.Cell, ev.TOP, ev.BOT
|
|
37
|
+
ev.iteration_count_ni_check
|
|
38
|
+
ev.discharge_loop_form_ni
|
|
39
|
+
ev.verify_cayley_disjoint
|
|
40
|
+
ev.verify_loop_bound_ni / verify_outer_schedule_ni /
|
|
41
|
+
verify_touch_pattern_ni / verify_iteration_bound
|
|
42
|
+
ev.sign_with_pqc
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
from __future__ import annotations
|
|
46
|
+
|
|
47
|
+
import sys
|
|
48
|
+
from pathlib import Path
|
|
49
|
+
|
|
50
|
+
# Put the legacy module directory on the import path so the
|
|
51
|
+
# underscore-prefixed ``soilith_*`` modules are findable both when
|
|
52
|
+
# this package is installed editable (``pip install -e .``) and
|
|
53
|
+
# when it is imported directly from a checkout.
|
|
54
|
+
_LEGACY_ROOT = Path(__file__).resolve().parent.parent
|
|
55
|
+
if str(_LEGACY_ROOT) not in sys.path:
|
|
56
|
+
sys.path.insert(0, str(_LEGACY_ROOT))
|
|
57
|
+
|
|
58
|
+
# Subsystem submodules (thin re-exports each).
|
|
59
|
+
from echovalidum import ( # noqa: E402,F401
|
|
60
|
+
memory, phi, ifc, loops, verify, catalog,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
# Headline re-exports at top level.
|
|
64
|
+
from echovalidum.memory import ( # noqa: E402,F401
|
|
65
|
+
Cell, BOT, TOP, Arena,
|
|
66
|
+
SparseScaleMemory, Memory64, Capability,
|
|
67
|
+
TrustError, QuorumError,
|
|
68
|
+
)
|
|
69
|
+
from echovalidum.loops import ( # noqa: E402,F401
|
|
70
|
+
LoopForm, IFCVerdict, SSChannel,
|
|
71
|
+
LoopNIReport,
|
|
72
|
+
classify_loop_form, channel_of,
|
|
73
|
+
iteration_count_ni_check, discharge_loop_form_ni,
|
|
74
|
+
)
|
|
75
|
+
from echovalidum.verify import ( # noqa: E402,F401
|
|
76
|
+
Z3VerifyResult,
|
|
77
|
+
verify_cayley_disjoint, verify_frame_disjoint, verify_ai_sound,
|
|
78
|
+
verify_loop_bound_ni, verify_outer_schedule_ni,
|
|
79
|
+
verify_touch_pattern_ni, verify_iteration_bound,
|
|
80
|
+
sign_with_pqc,
|
|
81
|
+
)
|
|
82
|
+
from echovalidum.ifc import ( # noqa: E402,F401
|
|
83
|
+
Label, LabeledStore,
|
|
84
|
+
noninterference_check, declassify,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
__version__ = "0.1.0"
|
|
88
|
+
|
|
89
|
+
__all__ = [
|
|
90
|
+
# Subsystem modules
|
|
91
|
+
"memory", "phi", "ifc", "loops", "verify", "catalog",
|
|
92
|
+
# Memory / core
|
|
93
|
+
"Cell", "BOT", "TOP", "Arena",
|
|
94
|
+
"SparseScaleMemory", "Memory64", "Capability",
|
|
95
|
+
"TrustError", "QuorumError",
|
|
96
|
+
# Loops / Zone 154
|
|
97
|
+
"LoopForm", "IFCVerdict", "SSChannel", "LoopNIReport",
|
|
98
|
+
"classify_loop_form", "channel_of",
|
|
99
|
+
"iteration_count_ni_check", "discharge_loop_form_ni",
|
|
100
|
+
# Verify / Zone 151
|
|
101
|
+
"Z3VerifyResult",
|
|
102
|
+
"verify_cayley_disjoint", "verify_frame_disjoint",
|
|
103
|
+
"verify_ai_sound", "verify_loop_bound_ni",
|
|
104
|
+
"verify_outer_schedule_ni", "verify_touch_pattern_ni",
|
|
105
|
+
"verify_iteration_bound", "sign_with_pqc",
|
|
106
|
+
# IFC / Zone 138
|
|
107
|
+
"Label", "LabeledStore",
|
|
108
|
+
"noninterference_check", "declassify",
|
|
109
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""echovalidum.catalog — discovery catalog.
|
|
2
|
+
|
|
3
|
+
Re-exports from ``soilith_catalog``. The catalog scans arena
|
|
4
|
+
files for slot families and emits a JSON manifest with stable
|
|
5
|
+
ids, per-zone counts, and audit summaries. It currently indexes
|
|
6
|
+
laws, topology, conservation, magnitude, symmetry, closure,
|
|
7
|
+
signature, typed closures, finite orders, round-trips,
|
|
8
|
+
composition laws, pair groups, fibrations, descent, separation,
|
|
9
|
+
linearity, capabilities, ownership, refinement checks, sessions,
|
|
10
|
+
effects, IFC, concurrency, region, gradual, contract, posterior,
|
|
11
|
+
incremental, abstract, weak memory, soundness, intervals, sparse,
|
|
12
|
+
benchmarks, z3verify, mem64, and loop_ifc — 36 kinds across
|
|
13
|
+
zones 116..154.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from soilith_catalog import ( # noqa: F401
|
|
19
|
+
CatalogEntry, scan_arena, build_manifest, write_manifest,
|
|
20
|
+
default_output_path,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"CatalogEntry",
|
|
25
|
+
"scan_arena", "build_manifest", "write_manifest",
|
|
26
|
+
"default_output_path",
|
|
27
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""echovalidum.ifc — Zone-138 information-flow control.
|
|
2
|
+
|
|
3
|
+
Re-exports from ``soilith_ifc``. The two-point security lattice
|
|
4
|
+
(``Label.LOW``, ``Label.HIGH``) plus the 2-trace non-interference
|
|
5
|
+
check ``noninterference_check`` and the capability-gated
|
|
6
|
+
``declassify``.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from soilith_ifc import ( # noqa: F401
|
|
12
|
+
Label, LabeledCell, LabeledStore,
|
|
13
|
+
NIReport,
|
|
14
|
+
IFCError, IllegalFlow, Interference,
|
|
15
|
+
apply_phi, declassify, noninterference_check,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"Label", "LabeledCell", "LabeledStore", "NIReport",
|
|
20
|
+
"IFCError", "IllegalFlow", "Interference",
|
|
21
|
+
"apply_phi", "declassify", "noninterference_check",
|
|
22
|
+
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""echovalidum.loops — Zone-154 loop-form non-interference.
|
|
2
|
+
|
|
3
|
+
Re-exports the six basic loop forms (Zone 153) and their
|
|
4
|
+
termination-sensitive NI machinery (Zone 154) from
|
|
5
|
+
``soilith_loop_ifc``: the ``LoopForm`` and ``IFCVerdict`` enums,
|
|
6
|
+
the ``SSChannel`` taxonomy that maps each form onto its
|
|
7
|
+
Sabelfeld-Sands covert channel, the 2-trace empirical check
|
|
8
|
+
``iteration_count_ni_check``, and the Z3-backed discharger
|
|
9
|
+
``discharge_loop_form_ni`` (which also routes through the
|
|
10
|
+
PQC/MVPS attestation pipeline when ``sign=True``).
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
from soilith_loop_ifc import ( # noqa: F401
|
|
16
|
+
LoopForm, IFCVerdict, SSChannel,
|
|
17
|
+
LoopNIReport,
|
|
18
|
+
classify_loop_form, channel_of,
|
|
19
|
+
iteration_count_ni_check, discharge_loop_form_ni,
|
|
20
|
+
factory_operator_range, factory_cayley_ball,
|
|
21
|
+
factory_mem64_pages, factory_fixpoint_widen,
|
|
22
|
+
factory_dag_replay, factory_ess_resample,
|
|
23
|
+
persist,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"LoopForm", "IFCVerdict", "SSChannel", "LoopNIReport",
|
|
28
|
+
"classify_loop_form", "channel_of",
|
|
29
|
+
"iteration_count_ni_check", "discharge_loop_form_ni",
|
|
30
|
+
"factory_operator_range", "factory_cayley_ball",
|
|
31
|
+
"factory_mem64_pages", "factory_fixpoint_widen",
|
|
32
|
+
"factory_dag_replay", "factory_ess_resample",
|
|
33
|
+
"persist",
|
|
34
|
+
]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""echovalidum.memory — core lattice memory primitives.
|
|
2
|
+
|
|
3
|
+
Re-exports from the historical ``soilith_lang``, ``soilith_arena``,
|
|
4
|
+
``soilith_sparse``, and ``soilith_64bit`` modules. No behaviour
|
|
5
|
+
change; this is the clean front door for code that wants to write
|
|
6
|
+
``from echovalidum.memory import Cell, Arena, Memory64`` etc.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from soilith_lang import ( # noqa: F401
|
|
12
|
+
Cell, BOT, TOP, TrustError, QuorumError,
|
|
13
|
+
)
|
|
14
|
+
from soilith_arena import Arena # noqa: F401
|
|
15
|
+
from soilith_sparse import SparseScaleMemory # noqa: F401
|
|
16
|
+
from soilith_64bit import ( # noqa: F401
|
|
17
|
+
Memory64, Capability, CapabilityFault,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"Cell", "BOT", "TOP", "TrustError", "QuorumError",
|
|
22
|
+
"Arena",
|
|
23
|
+
"SparseScaleMemory",
|
|
24
|
+
"Memory64", "Capability", "CapabilityFault",
|
|
25
|
+
]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""echovalidum.phi — operator algebra φ_0..φ_60.
|
|
2
|
+
|
|
3
|
+
Re-exports ``PHI`` (a dict ``{k: callable}``) and the individual
|
|
4
|
+
``phi_k`` functions from ``soilith_phi``.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from soilith_phi import PHI # noqa: F401
|
|
10
|
+
|
|
11
|
+
__all__ = ["PHI"]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""echovalidum.verify — Zone-151 Z3 + PQC verification pipeline.
|
|
2
|
+
|
|
3
|
+
Re-exports from ``soilith_z3verify``. Three classical judgments
|
|
4
|
+
(Cayley-disjoint borrows, frame-rule disjointness, AI soundness)
|
|
5
|
+
plus the four Sabelfeld-Sands iteration-count channels added in
|
|
6
|
+
Zone 154 × Zone 151. Every successful UNSAT can be wrapped by
|
|
7
|
+
``sign_with_pqc`` into an MVPS-compatible
|
|
8
|
+
``SignedCertificationResult`` attestation.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from soilith_z3verify import ( # noqa: F401
|
|
14
|
+
Z3VerifyResult, Z3VerifyError,
|
|
15
|
+
verify_cayley_disjoint, verify_frame_disjoint, verify_ai_sound,
|
|
16
|
+
verify_loop_bound_ni, verify_outer_schedule_ni,
|
|
17
|
+
verify_touch_pattern_ni, verify_iteration_bound,
|
|
18
|
+
sign_with_pqc, persist,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"Z3VerifyResult", "Z3VerifyError",
|
|
23
|
+
"verify_cayley_disjoint", "verify_frame_disjoint",
|
|
24
|
+
"verify_ai_sound",
|
|
25
|
+
"verify_loop_bound_ni", "verify_outer_schedule_ni",
|
|
26
|
+
"verify_touch_pattern_ni", "verify_iteration_bound",
|
|
27
|
+
"sign_with_pqc", "persist",
|
|
28
|
+
]
|