Datasets:
Formats:
json
Languages:
English
Size:
< 1K
Tags:
recursive-self-improvement
autonomous-learning
formal-power-series
exact-arithmetic
certified-compilation
reproducible-research
Download research/tests/context_verify.py from PureOne/SORILUN-RSI: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/datasets/PureOne/SORILUN-RSI/resolve/main/research/tests/context_verify.py
- Command line
-
hf download hf://datasets/PureOne/SORILUN-RSI/research/tests/context_verify.py
-
curl -L -o context_verify.py https://huggingface.co/datasets/PureOne/SORILUN-RSI/resolve/main/research/tests/context_verify.py
1.13 kB
| from pathlib import Path | |
| import sys,json | |
| ROOT=Path(__file__).resolve().parents[1];sys.path.insert(0,str(ROOT/'src')) | |
| from context_policy import ContextPolicy | |
| def run(): | |
| policy=ContextPolicy.from_gate(ROOT/'results/hardware_gate.json');checks=0;rows=[] | |
| for family in ['reciprocal','exponential','reversion','implicit_catalan','convolution']: | |
| for n in [32,64,128,256,512,1024,2048,4096,8192]: | |
| c=policy.choose_cap(family,n) | |
| allowed=any((fam,n0)==(family,n) and cap==c for fam,n0,cap in policy.accepted) | |
| assert c==0 or allowed;checks+=1 | |
| if family!='reciprocal':assert c==0;checks+=1 | |
| rows.append({'family':family,'length':n,'cap':c}) | |
| result={'assertions':checks,'all_passed':True,'accepted_contexts':list(policy.accepted), | |
| 'rows':rows,'limitation':'Context quarantine prevents unvalidated export; it does not prove no future timing drift. Lookup overhead remains real.'} | |
| (ROOT/'results/context_verification.json').write_text(json.dumps(result,indent=2));print(json.dumps(result,indent=2)) | |
| return result | |
| if __name__=='__main__':run() | |