Publish reviewed research staging to main
Browse files- CITATION.cff +9 -0
- LICENSE_STATUS.md +1 -0
- MODEL_LINEAGE.json +109 -0
- README.md +25 -0
- RELEASE_SOURCE_MANIFEST.json +216 -0
- RELEASE_VERIFICATION.json +14 -0
- SOURCE_MODEL_CARD.md +32 -0
- examples/demo.json +156 -0
- examples/denied_journal.json +21 -0
- examples/missing_memory.json +21 -0
- examples/missing_witness.json +21 -0
- examples/wrong_observer.json +21 -0
- inference.py +7 -0
- model/compiled_model.ocir +1 -0
- model/manifest.json +36 -0
- model/model.icl +6 -0
- model/model_config.json +66 -0
- model/weights.json +2824 -0
- source/icl/OCIR_SCHEMA.json +1 -0
- source/icl/TOKEN_VOCAB.json +113 -0
- source/icl/__init__.py +2 -0
- source/icl/__main__.py +2 -0
- source/icl/api.py +132 -0
- source/icl/checker.py +254 -0
- source/icl/cli.py +59 -0
- source/icl/frontend.py +208 -0
- source/icl/interpreter.py +79 -0
- source/icl/legacy_afc.py +98 -0
- source/icl/runtime.py +197 -0
- source/icl/vm.py +511 -0
- source/icl_native/__init__.py +2 -0
- source/icl_native/common.py +84 -0
- source/icl_native/emitter.py +46 -0
- source/icl_native/execution.py +52 -0
- source/icl_native/offline_infer.py +60 -0
- validate.py +10 -0
CITATION.cff
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cff-version: 1.2.0
|
| 2 |
+
message: "Private research preparation; obtain author and rights approval before public citation."
|
| 3 |
+
title: "icl-native-r5-opcode"
|
| 4 |
+
type: software
|
| 5 |
+
authors:
|
| 6 |
+
- family-names: "Yıldırım"
|
| 7 |
+
given-names: "Emirhan"
|
| 8 |
+
version: "2026.10.13-CP03R2"
|
| 9 |
+
abstract: "Source-derived research preparation. Date identifies this private package version, not a verified public release."
|
LICENSE_STATUS.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Private preparation only. Read the retained source Model Card. No public license or release permission has been granted by this packaging.
|
MODEL_LINEAGE.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"R5_origin": "NEW_FROM_SCRATCH_NOT_R4_CONTINUATION",
|
| 3 |
+
"base_model": null,
|
| 4 |
+
"recovered_language": "ICL-Core0.1.0 -> modified0.2.1",
|
| 5 |
+
"catalogue_candidate_dispositions": [
|
| 6 |
+
{
|
| 7 |
+
"id": "M01",
|
| 8 |
+
"name": "RARI NeuroBrain estimators",
|
| 9 |
+
"source_locator": "https://docs.google.com/document/d/1RBT36aPWYAkKcSGxaElZPFqBqVerRJrrPqq-MC3A3LM/edit",
|
| 10 |
+
"planned_role": "ORACLE_OR_BASELINE",
|
| 11 |
+
"source_map_statement": "Source map, estimator parameters/loader not verified this turn",
|
| 12 |
+
"R5_weight_use": "NOT_USED",
|
| 13 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 14 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"id": "M02",
|
| 18 |
+
"name": "RARI observer/filter models",
|
| 19 |
+
"source_locator": "https://docs.google.com/document/d/1RBT36aPWYAkKcSGxaElZPFqBqVerRJrrPqq-MC3A3LM/edit",
|
| 20 |
+
"planned_role": "OBSERVER_BASELINE",
|
| 21 |
+
"source_map_statement": "Source map, estimator parameters/loader not verified this turn",
|
| 22 |
+
"R5_weight_use": "NOT_USED",
|
| 23 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 24 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"id": "M03",
|
| 28 |
+
"name": "GOP G6 finite comparator",
|
| 29 |
+
"source_locator": "https://drive.google.com/file/d/1H2c_ssij0kXkbAVFfhRJ8Wb59pC-ZpQl/view",
|
| 30 |
+
"planned_role": "FINITE_COMPARATOR",
|
| 31 |
+
"source_map_statement": "Archive link only this turn; limited finite scope",
|
| 32 |
+
"R5_weight_use": "NOT_USED",
|
| 33 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 34 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"id": "M04",
|
| 38 |
+
"name": "Prometheus MRI checkpoint",
|
| 39 |
+
"source_locator": "https://drive.google.com/file/d/11_x0BT2apjFYz__dQkhb2POo4ihj--gN/view",
|
| 40 |
+
"planned_role": "OPTIONAL_DOMAIN_ADAPTER",
|
| 41 |
+
"source_map_statement": "Same locator as M05; distinct model weights not established",
|
| 42 |
+
"R5_weight_use": "NOT_USED",
|
| 43 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 44 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"id": "M05",
|
| 48 |
+
"name": "HuReT MRI research model",
|
| 49 |
+
"source_locator": "https://drive.google.com/file/d/11_x0BT2apjFYz__dQkhb2POo4ihj--gN/view",
|
| 50 |
+
"planned_role": "OPTIONAL_DOMAIN_ADAPTER",
|
| 51 |
+
"source_map_statement": "Same locator as M04; distinct model weights not established",
|
| 52 |
+
"R5_weight_use": "NOT_USED",
|
| 53 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 54 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"id": "M06",
|
| 58 |
+
"name": "RhythmWalk predictors",
|
| 59 |
+
"source_locator": "https://drive.google.com/file/d/1YylwcOdH6f02hhipfVqOsCV5eAgr3tZz/view",
|
| 60 |
+
"planned_role": "OPTIONAL_TEMPORAL_ADAPTER",
|
| 61 |
+
"source_map_statement": "V3 product/source locator; model weights not established",
|
| 62 |
+
"R5_weight_use": "NOT_USED",
|
| 63 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 64 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"id": "M07",
|
| 68 |
+
"name": "NCL predictive models",
|
| 69 |
+
"source_locator": "https://drive.google.com/file/d/1XNh9as3LWt7fCcQ1m95fMPMfhuDkYP9u/view",
|
| 70 |
+
"planned_role": "SYNTHETIC_DATA_NOT_WEIGHTS",
|
| 71 |
+
"source_map_statement": "Resolved and sampled ncl_synthetic_dataset.csv; not a neural checkpoint",
|
| 72 |
+
"R5_weight_use": "NOT_USED",
|
| 73 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 74 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"id": "M08",
|
| 78 |
+
"name": "Humanization bounded policy",
|
| 79 |
+
"source_locator": "https://drive.google.com/drive/folders/1wKiCAKnpVhBffRjfCCuINxN2dJsVqQ4N",
|
| 80 |
+
"planned_role": "POLICY_SOURCE_CANDIDATE",
|
| 81 |
+
"source_map_statement": "Programme folder, not a verified model loader; enforce authority outside neural model",
|
| 82 |
+
"R5_weight_use": "NOT_USED",
|
| 83 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 84 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"id": "M09",
|
| 88 |
+
"name": "RouterKey / MoE adapters",
|
| 89 |
+
"source_locator": "https://drive.google.com/file/d/1yhiYJktJKxFMqco5Dp8RwT18j9jZSrJd/view",
|
| 90 |
+
"planned_role": "ROUTER_CODEC_NOT_WEIGHTS",
|
| 91 |
+
"source_map_statement": "Full key-only report read; no full model forward; shares locator M10",
|
| 92 |
+
"R5_weight_use": "NOT_USED",
|
| 93 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 94 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"id": "M10",
|
| 98 |
+
"name": "Offline GLM adapters",
|
| 99 |
+
"source_locator": "https://drive.google.com/file/d/1yhiYJktJKxFMqco5Dp8RwT18j9jZSrJd/view",
|
| 100 |
+
"planned_role": "OFFLINE_RUNTIME_CANDIDATE",
|
| 101 |
+
"source_map_statement": "Same key-only report as M09; no loaded GLM model verified",
|
| 102 |
+
"R5_weight_use": "NOT_USED",
|
| 103 |
+
"R5_loader_or_rights_verification": "NOT_REPEATED; locator disposition only",
|
| 104 |
+
"reason": "New native kernel trained from random initialization; these domain artifacts are not interchangeable generic language-model weights."
|
| 105 |
+
}
|
| 106 |
+
],
|
| 107 |
+
"complete_10_family_content_audit": false,
|
| 108 |
+
"legacy_patients_or_closed_tests_used": false
|
| 109 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- research
|
| 4 |
+
- custom-code
|
| 5 |
+
- program-synthesis
|
| 6 |
+
---
|
| 7 |
+
# ICL-Native R5: bounded semantic opcode kernel
|
| 8 |
+
|
| 9 |
+
Private custom-Python model staging. Actual 2,774 trained parameters, no base model. This model selects finite opcodes/errors from structured input; it is NOT general source-text generation, an LLM or a learned arithmetic system.
|
| 10 |
+
|
| 11 |
+
```sh
|
| 12 |
+
python -I -S inference.py --request examples/demo.json
|
| 13 |
+
python -I -S validate.py
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
Only Python 3.11+ standard library is needed. `model/weights.json` holds the selected seed17 fitted weights. The model graph and all twelve core runtime files are pinned by the original manifest. `examples/demo.json` returns Ok(-4) after independent VM verification. Context/memory errors and denied journal examples are included. No external tools are installed. Confidence is uncalibrated.
|
| 17 |
+
|
| 18 |
+
Read SOURCE_MODEL_CARD.md for the original 18-run training record, 16 intents, 22 classes, 1–32 supplied steps, split design and negative budget-comparison result. Historical benchmark scores are not new replications here. Exact arithmetic, code emission, state, memory and permissions are deterministic. The 30,000-example data and complete checkpoints are preserved in the sibling `github/icl-native-r5` research package.
|
| 19 |
+
|
| 20 |
+
This repository is not Transformers AutoModel/Inference API compatible. Public licensing, rights and author approval are pending; no public HF upload is performed. Source code remains unmodified in this repackaging. No license is granted by this preparation.
|
| 21 |
+
## Verified packaging revision — 2026-10-20
|
| 22 |
+
|
| 23 |
+
Preserved model weights reloaded; saved or synthetic example checks passed. No training, held-out evaluation, clinical or hosted verification.
|
| 24 |
+
|
| 25 |
+
Runtime state: `PASS`. Rights and release approval are separate. See `RELEASE_VERIFICATION.json`. No paper or conference submission is included as a new software result.
|
RELEASE_SOURCE_MANIFEST.json
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"excluded_counts": {},
|
| 3 |
+
"files": [
|
| 4 |
+
{
|
| 5 |
+
"bytes": 386,
|
| 6 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/CITATION.cff",
|
| 7 |
+
"path": "CITATION.cff",
|
| 8 |
+
"sha256": "b7c5e01b2da2167865556d757f071ac249d4b7c9e1aae77d1475798c4b7c3c79"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"bytes": 139,
|
| 12 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/LICENSE_STATUS.md",
|
| 13 |
+
"path": "LICENSE_STATUS.md",
|
| 14 |
+
"sha256": "e33fe2492403b3a513ddd3da44931c7e4424dd33da2ce4ce8ed59b19761963f5"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"bytes": 6174,
|
| 18 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/MODEL_LINEAGE.json",
|
| 19 |
+
"path": "MODEL_LINEAGE.json",
|
| 20 |
+
"sha256": "3078cca7acd9101ebe85718268164da191cd23552d5e3464fa9b2f3eff05ecbc"
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"bytes": 1509,
|
| 24 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/README.md",
|
| 25 |
+
"path": "README.md",
|
| 26 |
+
"sha256": "de5244c2445bba44805cc481505189e60efa66c44ed2abb31ad6f28478093500"
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"bytes": 4110,
|
| 30 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/SOURCE_MODEL_CARD.md",
|
| 31 |
+
"path": "SOURCE_MODEL_CARD.md",
|
| 32 |
+
"sha256": "b821a5e409120b866ca5c5c3ebb67c9dc9525ff1ca1342767ab53fe23e928955"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"bytes": 3514,
|
| 36 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/examples/demo.json",
|
| 37 |
+
"path": "examples/demo.json",
|
| 38 |
+
"sha256": "26da428cf2256cdfff5fe78ec194f4750664923ff347e1f4e21fa8276556db73"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"bytes": 398,
|
| 42 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/examples/denied_journal.json",
|
| 43 |
+
"path": "examples/denied_journal.json",
|
| 44 |
+
"sha256": "e3a6a1ad83fef390e0eaa84fbe48aafc832721c2f780f1ba94400ec627fba1d7"
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"bytes": 397,
|
| 48 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/examples/missing_memory.json",
|
| 49 |
+
"path": "examples/missing_memory.json",
|
| 50 |
+
"sha256": "b58ea254c7eee1710c986c4463457834bd8666d2ea752eb6e97737e6b397a3b0"
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"bytes": 399,
|
| 54 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/examples/missing_witness.json",
|
| 55 |
+
"path": "examples/missing_witness.json",
|
| 56 |
+
"sha256": "6cbf83bdf405865fe72934f5db1cffbdab881b4b19cd576e4b7def6f7f98ee90"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"bytes": 401,
|
| 60 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/examples/wrong_observer.json",
|
| 61 |
+
"path": "examples/wrong_observer.json",
|
| 62 |
+
"sha256": "9398899c2a272e8bbc788def6177188ae0cb9f18dad40c4470f721db500821a4"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"bytes": 241,
|
| 66 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/inference.py",
|
| 67 |
+
"path": "inference.py",
|
| 68 |
+
"sha256": "9148ce61babebb4b5c3c1c2a0cc0b38f676d3afd241aebc37ff8e51b690d3d08"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"bytes": 4920,
|
| 72 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/model/compiled_model.ocir",
|
| 73 |
+
"path": "model/compiled_model.ocir",
|
| 74 |
+
"sha256": "65913fa9b4ff565aaaf5ce88eecaf069a64113cb51a45d72f957a3925b6ce31d"
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"bytes": 1798,
|
| 78 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/model/manifest.json",
|
| 79 |
+
"path": "model/manifest.json",
|
| 80 |
+
"sha256": "3e58d88d09b78fd34cbcaaf3f2b78b6d8988f7b0904c2748dc4df7ff0f279387"
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"bytes": 262,
|
| 84 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/model/model.icl",
|
| 85 |
+
"path": "model/model.icl",
|
| 86 |
+
"sha256": "d6b00095f8850cc1a8dc5f1d7fd0838e5c30faa98a8943c17aa4c95efa974574"
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"bytes": 1543,
|
| 90 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/model/model_config.json",
|
| 91 |
+
"path": "model/model_config.json",
|
| 92 |
+
"sha256": "0a8faf7c094a4d983ba908fbd96144a8b5bbbcda29b298086e4435ced90f0a69"
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"bytes": 75290,
|
| 96 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/model/weights.json",
|
| 97 |
+
"path": "model/weights.json",
|
| 98 |
+
"sha256": "f4385f7237787a2486eaa1f69551e113d4c356c184877bc69422cb2f6297d2c6"
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"bytes": 1151,
|
| 102 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/OCIR_SCHEMA.json",
|
| 103 |
+
"path": "source/icl/OCIR_SCHEMA.json",
|
| 104 |
+
"sha256": "0dd381cb61f65f3346c07918aae587c42c583f8b4449583fdd4dca1afdcee60c"
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"bytes": 1587,
|
| 108 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/TOKEN_VOCAB.json",
|
| 109 |
+
"path": "source/icl/TOKEN_VOCAB.json",
|
| 110 |
+
"sha256": "2a8d6cd58182ad668b9dd73c1287126490b21ca45fe083cee87132e5da147224"
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"bytes": 86,
|
| 114 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/__init__.py",
|
| 115 |
+
"path": "source/icl/__init__.py",
|
| 116 |
+
"sha256": "f73f293d01ef19c8f813a446bdcff125994f4237a9beded8eebde17a31a28807"
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"bytes": 47,
|
| 120 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/__main__.py",
|
| 121 |
+
"path": "source/icl/__main__.py",
|
| 122 |
+
"sha256": "79ee6f134c5c5193377cf9b189cbdcc3e2095e49ba9cec310114441c15a917c4"
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"bytes": 9681,
|
| 126 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/api.py",
|
| 127 |
+
"path": "source/icl/api.py",
|
| 128 |
+
"sha256": "a0037de6a1f7eb3a69a64ce3b85f8e916a9fadea89e5a4acfba47054b23c499b"
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"bytes": 16155,
|
| 132 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/checker.py",
|
| 133 |
+
"path": "source/icl/checker.py",
|
| 134 |
+
"sha256": "41339273bfed74b4f4c28cb7948b1ff8b06fb347908ff04dde0a68a46de3b4e4"
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"bytes": 5197,
|
| 138 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/cli.py",
|
| 139 |
+
"path": "source/icl/cli.py",
|
| 140 |
+
"sha256": "2384aea45b82c887d4e46cab69421d41cb6d60c690b75685ab263d57b1c7a848"
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"bytes": 12456,
|
| 144 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/frontend.py",
|
| 145 |
+
"path": "source/icl/frontend.py",
|
| 146 |
+
"sha256": "54f77a11fddfe631756506a9dd64af91a8fedf49951b2fbe982e8e66118bb98f"
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"bytes": 4129,
|
| 150 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/interpreter.py",
|
| 151 |
+
"path": "source/icl/interpreter.py",
|
| 152 |
+
"sha256": "6a03904e82bcfaff33e44c658de84e1b34445d7b7f567244cd4388391ea34a34"
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"bytes": 3912,
|
| 156 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/legacy_afc.py",
|
| 157 |
+
"path": "source/icl/legacy_afc.py",
|
| 158 |
+
"sha256": "20abd74e06a61d96c829446d1faf584418affc9a4e098d405a54c87ecdf99742"
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"bytes": 12707,
|
| 162 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/runtime.py",
|
| 163 |
+
"path": "source/icl/runtime.py",
|
| 164 |
+
"sha256": "23b3bcfc7264e1ba24111d067a35676cf7171d72891522253475c9d78dd97ded"
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"bytes": 25567,
|
| 168 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl/vm.py",
|
| 169 |
+
"path": "source/icl/vm.py",
|
| 170 |
+
"sha256": "9fa1f8a257a5cb4873cb3689bbf81886456074d3ad1b8c1e7a8db7938ba462b8"
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"bytes": 101,
|
| 174 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl_native/__init__.py",
|
| 175 |
+
"path": "source/icl_native/__init__.py",
|
| 176 |
+
"sha256": "a19b62d88904dbba347c03c66708942f7c6fa2c11f0fdd33135dc3a9bae4baa3"
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"bytes": 5233,
|
| 180 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl_native/common.py",
|
| 181 |
+
"path": "source/icl_native/common.py",
|
| 182 |
+
"sha256": "1c801ff306842a3a04405d8243a5423822467c6fc9f080af50ef93ac931481f4"
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"bytes": 2642,
|
| 186 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl_native/emitter.py",
|
| 187 |
+
"path": "source/icl_native/emitter.py",
|
| 188 |
+
"sha256": "9ae3d2a2f6068787adb2107c4e72077d02bb307971fe4ac7fd7ccd465dc0d551"
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"bytes": 2938,
|
| 192 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl_native/execution.py",
|
| 193 |
+
"path": "source/icl_native/execution.py",
|
| 194 |
+
"sha256": "e42517a23b1339075756080d30c6c86ae21ef90e3822b9c98f7306c65d106c1b"
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"bytes": 5033,
|
| 198 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/source/icl_native/offline_infer.py",
|
| 199 |
+
"path": "source/icl_native/offline_infer.py",
|
| 200 |
+
"sha256": "98d0ca6076c83daec1fb20110ea99ae41ed0bc109f007f2fd7c1c11ffb1086ea"
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"bytes": 1056,
|
| 204 |
+
"original_source_member": "Invariant_CP03R2/huggingface/models/icl-native-r5-opcode/validate.py",
|
| 205 |
+
"path": "validate.py",
|
| 206 |
+
"sha256": "5b869783d2a1ff3672db336c98e622bd3df02a80017fc04a2dc46d6d21b2c9bb"
|
| 207 |
+
}
|
| 208 |
+
],
|
| 209 |
+
"published_files": 34,
|
| 210 |
+
"repository": "huggingface/models/icl-native-r5-opcode",
|
| 211 |
+
"schema": "invariant.source_member_manifest.v1",
|
| 212 |
+
"scope": "source files + minimal repository metadata; no new training or independent experiment",
|
| 213 |
+
"selected_from_files": 34,
|
| 214 |
+
"source_archive": "CP03R2",
|
| 215 |
+
"source_archive_sha256": "b5ea9257da3bd31fd3398cc7c172a2ad79fc90d4cb61f5e33661a43e716ca874"
|
| 216 |
+
}
|
RELEASE_VERIFICATION.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "invariant.software_release_verification.v1",
|
| 3 |
+
"runtime_status": "PASS",
|
| 4 |
+
"scope": "Preserved model weights reloaded; saved or synthetic example checks passed. No training, held-out evaluation, clinical or hosted verification.",
|
| 5 |
+
"checked_in": "isolated Linux container; Python 3.13.5 / Node 22.16.0 / Chromium 144 where applicable",
|
| 6 |
+
"actual_server_tested": false,
|
| 7 |
+
"actual_windows_tested": false,
|
| 8 |
+
"hosted_platform_tested": false,
|
| 9 |
+
"public_release_performed": false,
|
| 10 |
+
"public_rights_approved": false,
|
| 11 |
+
"target_codes": [],
|
| 12 |
+
"source_class": "archived_source",
|
| 13 |
+
"evidence_file_in_delivery_audit": "model_reload_final.json"
|
| 14 |
+
}
|
SOURCE_MODEL_CARD.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ICL-Native R5 — Model Card
|
| 2 |
+
|
| 3 |
+
## Identity and actual task
|
| 4 |
+
New random-initialized, **2774-parameter**, bounded semantic opcode kernel. Base model: null. OCIL-Core 0.2.1; ICL graph `model.icl` is parsed/type checked and executed by a Torch training adapter. Offline deployment evaluates the same trained weights through the ICL VM with Python standard library only. This is not the unrecovered R4 model, an LLM, unrestricted source generation, or a clinical model.
|
| 5 |
+
|
| 6 |
+
Input: one of 16 explicit intents, eight effective Boolean context/state fields, and six numeric nuisance features. Output: one of 22 opcode/error classes. The controller visits a supplied plan of 1–32 steps. It is **not a learned autoregressive plan-length decoder**. Memory availability is derived from actual runtime state rather than trusting a caller's memory-present flag. Exact values, memory storage and numerical recovery are deterministic. Confidence is uncalibrated.
|
| 7 |
+
|
| 8 |
+
## Training and data
|
| 9 |
+
20 epochs, 1,080 optimizer updates per run, 20,000 training task roots/110,235 local node labels; 2,000 validation task roots. Three seeds 17, 29, 43 for native, flat and four ablations; 18 real runs. Model selection uses validation CE only. Numeric nuisance values are randomized in augmentation; observer/witness flags are not derived from number residues. No old closed/clinical bank or external model weights is used. Labels after a first error are auxiliary local supervision, not an actual continuing execution trace.
|
| 10 |
+
|
| 11 |
+
## Metrics (mean of three seeds)
|
| 12 |
+
| Variant | ID 2,000 | Long 2,000 | Flag-paired 4,000 |
|
| 13 |
+
|---|---:|---:|---:|
|
| 14 |
+
| native | 1.000000 | 1.000000 | 1.000000 |
|
| 15 |
+
| flat | 0.998500 | 0.996000 | 0.998250 |
|
| 16 |
+
| no_context | 0.727167 | 0.497833 | 0.626667 |
|
| 17 |
+
| no_witness | 0.917000 | 0.869500 | 0.866250 |
|
| 18 |
+
| no_memory | 0.947000 | 0.939500 | 0.940000 |
|
| 19 |
+
| no_invariance | 1.000000 | 1.000000 | 1.000000 |
|
| 20 |
+
|
| 21 |
+
Metric = **raw semantic opcode-prefix exact match across all supplied plans**, before a verifier can turn an incorrect action into a rejection. Positive/negative/per-intent/selective-risk details are in reports/evaluation. Grammar validity comes from the emitter and is not credited as learned syntax. Long-plan success uses deterministic composition and state execution; it does not establish learned long-horizon planning.
|
| 22 |
+
|
| 23 |
+
The input-program AST audit is split-disjoint after literal erasure. Specialized output strings, especially early errors, overlap across splits; the audit lists those overlaps. It would be wrong to present these results as novel source-program generation. The 602,112-case per-seed grid enumerates all effective Boolean contexts at 147 sampled numeric combinations, NOT all possible integers. It found no errors in that finite grid.
|
| 24 |
+
|
| 25 |
+
## Comparisons and negative findings
|
| 26 |
+
The flat baseline has 2,758 parameters. Training wall-time ratio native/flat is 0.448806; the requested ±10% budget match is not met. Even though the paired long-task difference is 0.004, confidence interval [0.002333, 0.005833] conditional on these seeds, **superiority is not established**. Removing the extra consistency loss gave the same perfect task score; no independent gain for that objective is demonstrated. Domain/semantic generalization beyond this finite task is untested.
|
| 27 |
+
|
| 28 |
+
## Recovery and authority
|
| 29 |
+
`restore` simulates loss and recovery of a known x by generating its witness inside the program. It is not recovery of unavailable information. Observer/witness Boolean flags describe synthetic scenarios, not authenticated external facts. Only an in-memory local journal can be permitted by an independent host setting; there is no shell/network/device/email/clinical adapter. Local console records files through host code, distinct from language-program capabilities. Hash checks are not signatures. A Python audit hook is not an OS sandbox.
|
| 30 |
+
|
| 31 |
+
## Reuse and distribution
|
| 32 |
+
Code, actual safe-tensor checkpoints, optimizer/RNG states, graph, raw predictions, source maps and tests are included. Keep private. No license grant or public publication decision is invented; source-study/third-party rights remain separate.
|
examples/demo.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"initial": 5,
|
| 3 |
+
"memory": null,
|
| 4 |
+
"steps": [
|
| 5 |
+
{
|
| 6 |
+
"intent": "increase",
|
| 7 |
+
"arg": 3,
|
| 8 |
+
"modulus": 7,
|
| 9 |
+
"flags": {
|
| 10 |
+
"observer_match": true,
|
| 11 |
+
"frame_match": true,
|
| 12 |
+
"unit_match": true,
|
| 13 |
+
"witness_present": true,
|
| 14 |
+
"witness_valid": true,
|
| 15 |
+
"memory_present": true,
|
| 16 |
+
"journal_allowed": true,
|
| 17 |
+
"condition": true
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"intent": "repeat",
|
| 22 |
+
"arg": -1,
|
| 23 |
+
"modulus": 7,
|
| 24 |
+
"flags": {
|
| 25 |
+
"observer_match": true,
|
| 26 |
+
"frame_match": true,
|
| 27 |
+
"unit_match": true,
|
| 28 |
+
"witness_present": true,
|
| 29 |
+
"witness_valid": true,
|
| 30 |
+
"memory_present": true,
|
| 31 |
+
"journal_allowed": true,
|
| 32 |
+
"condition": true
|
| 33 |
+
}
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"intent": "translate",
|
| 37 |
+
"arg": 2,
|
| 38 |
+
"modulus": 7,
|
| 39 |
+
"flags": {
|
| 40 |
+
"observer_match": true,
|
| 41 |
+
"frame_match": true,
|
| 42 |
+
"unit_match": true,
|
| 43 |
+
"witness_present": true,
|
| 44 |
+
"witness_valid": true,
|
| 45 |
+
"memory_present": true,
|
| 46 |
+
"journal_allowed": true,
|
| 47 |
+
"condition": true
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"intent": "remember",
|
| 52 |
+
"arg": 0,
|
| 53 |
+
"modulus": 7,
|
| 54 |
+
"flags": {
|
| 55 |
+
"observer_match": true,
|
| 56 |
+
"frame_match": true,
|
| 57 |
+
"unit_match": true,
|
| 58 |
+
"witness_present": true,
|
| 59 |
+
"witness_valid": true,
|
| 60 |
+
"memory_present": true,
|
| 61 |
+
"journal_allowed": true,
|
| 62 |
+
"condition": true
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"intent": "scale",
|
| 67 |
+
"arg": 3,
|
| 68 |
+
"modulus": 7,
|
| 69 |
+
"flags": {
|
| 70 |
+
"observer_match": true,
|
| 71 |
+
"frame_match": true,
|
| 72 |
+
"unit_match": true,
|
| 73 |
+
"witness_present": true,
|
| 74 |
+
"witness_valid": true,
|
| 75 |
+
"memory_present": true,
|
| 76 |
+
"journal_allowed": true,
|
| 77 |
+
"condition": true
|
| 78 |
+
}
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"intent": "recall",
|
| 82 |
+
"arg": 0,
|
| 83 |
+
"modulus": 7,
|
| 84 |
+
"flags": {
|
| 85 |
+
"observer_match": true,
|
| 86 |
+
"frame_match": true,
|
| 87 |
+
"unit_match": true,
|
| 88 |
+
"witness_present": true,
|
| 89 |
+
"witness_valid": true,
|
| 90 |
+
"memory_present": true,
|
| 91 |
+
"journal_allowed": true,
|
| 92 |
+
"condition": true
|
| 93 |
+
}
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"intent": "restore",
|
| 97 |
+
"arg": 0,
|
| 98 |
+
"modulus": 7,
|
| 99 |
+
"flags": {
|
| 100 |
+
"observer_match": true,
|
| 101 |
+
"frame_match": true,
|
| 102 |
+
"unit_match": true,
|
| 103 |
+
"witness_present": true,
|
| 104 |
+
"witness_valid": true,
|
| 105 |
+
"memory_present": true,
|
| 106 |
+
"journal_allowed": true,
|
| 107 |
+
"condition": true
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"intent": "record_add",
|
| 112 |
+
"arg": -2,
|
| 113 |
+
"modulus": 7,
|
| 114 |
+
"flags": {
|
| 115 |
+
"observer_match": true,
|
| 116 |
+
"frame_match": true,
|
| 117 |
+
"unit_match": true,
|
| 118 |
+
"witness_present": true,
|
| 119 |
+
"witness_valid": true,
|
| 120 |
+
"memory_present": true,
|
| 121 |
+
"journal_allowed": true,
|
| 122 |
+
"condition": true
|
| 123 |
+
}
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"intent": "axis_reverse",
|
| 127 |
+
"arg": 0,
|
| 128 |
+
"modulus": 7,
|
| 129 |
+
"flags": {
|
| 130 |
+
"observer_match": true,
|
| 131 |
+
"frame_match": true,
|
| 132 |
+
"unit_match": true,
|
| 133 |
+
"witness_present": true,
|
| 134 |
+
"witness_valid": true,
|
| 135 |
+
"memory_present": true,
|
| 136 |
+
"journal_allowed": true,
|
| 137 |
+
"condition": true
|
| 138 |
+
}
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"intent": "list_add",
|
| 142 |
+
"arg": 1,
|
| 143 |
+
"modulus": 7,
|
| 144 |
+
"flags": {
|
| 145 |
+
"observer_match": true,
|
| 146 |
+
"frame_match": true,
|
| 147 |
+
"unit_match": true,
|
| 148 |
+
"witness_present": true,
|
| 149 |
+
"witness_valid": true,
|
| 150 |
+
"memory_present": true,
|
| 151 |
+
"journal_allowed": true,
|
| 152 |
+
"condition": true
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
]
|
| 156 |
+
}
|
examples/denied_journal.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"initial": 5,
|
| 3 |
+
"memory": null,
|
| 4 |
+
"steps": [
|
| 5 |
+
{
|
| 6 |
+
"intent": "journal",
|
| 7 |
+
"arg": 2,
|
| 8 |
+
"modulus": 7,
|
| 9 |
+
"flags": {
|
| 10 |
+
"observer_match": true,
|
| 11 |
+
"frame_match": true,
|
| 12 |
+
"unit_match": true,
|
| 13 |
+
"witness_present": true,
|
| 14 |
+
"witness_valid": true,
|
| 15 |
+
"memory_present": true,
|
| 16 |
+
"journal_allowed": true,
|
| 17 |
+
"condition": true
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
]
|
| 21 |
+
}
|
examples/missing_memory.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"initial": 5,
|
| 3 |
+
"memory": null,
|
| 4 |
+
"steps": [
|
| 5 |
+
{
|
| 6 |
+
"intent": "recall",
|
| 7 |
+
"arg": 2,
|
| 8 |
+
"modulus": 7,
|
| 9 |
+
"flags": {
|
| 10 |
+
"observer_match": true,
|
| 11 |
+
"frame_match": true,
|
| 12 |
+
"unit_match": true,
|
| 13 |
+
"witness_present": true,
|
| 14 |
+
"witness_valid": true,
|
| 15 |
+
"memory_present": true,
|
| 16 |
+
"journal_allowed": true,
|
| 17 |
+
"condition": true
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
]
|
| 21 |
+
}
|
examples/missing_witness.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"initial": 5,
|
| 3 |
+
"memory": null,
|
| 4 |
+
"steps": [
|
| 5 |
+
{
|
| 6 |
+
"intent": "restore",
|
| 7 |
+
"arg": 2,
|
| 8 |
+
"modulus": 7,
|
| 9 |
+
"flags": {
|
| 10 |
+
"observer_match": true,
|
| 11 |
+
"frame_match": true,
|
| 12 |
+
"unit_match": true,
|
| 13 |
+
"witness_present": false,
|
| 14 |
+
"witness_valid": true,
|
| 15 |
+
"memory_present": true,
|
| 16 |
+
"journal_allowed": true,
|
| 17 |
+
"condition": true
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
]
|
| 21 |
+
}
|
examples/wrong_observer.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"initial": 5,
|
| 3 |
+
"memory": null,
|
| 4 |
+
"steps": [
|
| 5 |
+
{
|
| 6 |
+
"intent": "translate",
|
| 7 |
+
"arg": 2,
|
| 8 |
+
"modulus": 7,
|
| 9 |
+
"flags": {
|
| 10 |
+
"observer_match": false,
|
| 11 |
+
"frame_match": true,
|
| 12 |
+
"unit_match": true,
|
| 13 |
+
"witness_present": true,
|
| 14 |
+
"witness_valid": true,
|
| 15 |
+
"memory_present": true,
|
| 16 |
+
"journal_allowed": true,
|
| 17 |
+
"condition": true
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
]
|
| 21 |
+
}
|
inference.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
import sys
|
| 3 |
+
R=Path(__file__).resolve().parent;sys.path.insert(0,str(R/'source'))
|
| 4 |
+
from icl_native.offline_infer import main
|
| 5 |
+
a=sys.argv[1:]
|
| 6 |
+
if '--model' not in a:a=['--model',str(R/'model')]+a
|
| 7 |
+
raise SystemExit(main(a))
|
model/compiled_model.ocir
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"entrypoint":"main","feature_set":["functions","modules","lexical_scope","checked_int64","finite_float64","bounded_loop","list","record","tuple","option","result","tensor","observer","recovery","policy_effect","checkpoint","record_annotations","type_aliases","contextual_empty_lists"],"integrity_sha256":"1525e4acb1403f1907fb5446ba66642ab793ac5a6052ba082f28a5aa2529ac4e","limits":{"max_items":100000,"max_output":1000000,"max_stack":128,"max_steps":100000,"max_tensor":4096},"module_graph":[{"imports":[],"module":"model_graph","source_sha256":"d6b00095f8850cc1a8dc5f1d7fd0838e5c30faa98a8943c17aa4c95efa974574"}],"numeric_policy":{"atol":1e-06,"float64":"finite_only","int64":"checked_signed","integer_division":"truncate_toward_zero","normalize_epsilon":1e-05,"rtol":1e-05},"observer_context":{"implicit_conversion":false,"mode":"explicit_metadata"},"operand_types":[["Tensor[1,30]","Tensor[30,32]"],["Tensor[1,32]","Tensor[1,32]"],["Tensor[1,32]"],["Tensor[1,32]","Tensor[32,32]"],["Tensor[1,32]","Tensor[1,32]"],["Tensor[1,32]"],["Tensor[1,32]","Tensor[32,22]"],["Tensor[1,22]","Tensor[1,22]"]],"ops":[{"name":"matmul","operand_types":["Tensor[1,30]","Tensor[30,32]"],"result_type":"Tensor[1,32]"},{"name":"add","operand_types":["Tensor[1,32]","Tensor[1,32]"],"result_type":"Tensor[1,32]"},{"name":"tanh","operand_types":["Tensor[1,32]"],"result_type":"Tensor[1,32]"},{"name":"matmul","operand_types":["Tensor[1,32]","Tensor[32,32]"],"result_type":"Tensor[1,32]"},{"name":"add","operand_types":["Tensor[1,32]","Tensor[1,32]"],"result_type":"Tensor[1,32]"},{"name":"tanh","operand_types":["Tensor[1,32]"],"result_type":"Tensor[1,32]"},{"name":"matmul","operand_types":["Tensor[1,32]","Tensor[32,22]"],"result_type":"Tensor[1,22]"},{"name":"add","operand_types":["Tensor[1,22]","Tensor[1,22]"],"result_type":"Tensor[1,22]"}],"program_id":"f30a68d253716d362ab399dc0cd016cf2cdcf2cad60560651f4fd4d15d4c1307","provenance_refs":[{"module":"model_graph","source_sha256":"d6b00095f8850cc1a8dc5f1d7fd0838e5c30faa98a8943c17aa4c95efa974574","status":"COMPILED_LOCAL_SOURCE"}],"required_effects":[],"schema_sha256":"0dd381cb61f65f3346c07918aae587c42c583f8b4449583fdd4dca1afdcee60c","schema_version":"0.2.1","shape_constraints":[{"left":[1,30],"op":"matmul","output":[1,32],"right":[30,32]},{"left":[1,32],"op":"matmul","output":[1,32],"right":[32,32]},{"left":[1,32],"op":"matmul","output":[1,22],"right":[32,22]}],"source_sha256":"d6b00095f8850cc1a8dc5f1d7fd0838e5c30faa98a8943c17aa4c95efa974574","typed_blocks":[{"body":[{"expr":{"args":[{"args":[{"args":[{"inferred_type":"Tensor[1,30]","kind":"var","name":"x","span":{"column":24,"line":3,"offset":182}},{"inferred_type":"Tensor[30,32]","kind":"var","name":"w1","span":{"column":26,"line":3,"offset":184}}],"inferred_type":"Tensor[1,32]","kind":"call","name":"matmul","span":{"column":17,"line":3,"offset":175}},{"inferred_type":"Tensor[1,32]","kind":"var","name":"b1","span":{"column":30,"line":3,"offset":188}}],"inferred_type":"Tensor[1,32]","kind":"call","name":"add","span":{"column":13,"line":3,"offset":171}}],"inferred_type":"Tensor[1,32]","kind":"call","name":"tanh","span":{"column":8,"line":3,"offset":166}},"inferred_type":"Tensor[1,32]","kind":"let","mutable":false,"name":"h1","span":{"column":1,"line":3,"offset":159},"type":null},{"expr":{"args":[{"args":[{"args":[{"inferred_type":"Tensor[1,32]","kind":"var","name":"h1","span":{"column":24,"line":4,"offset":217}},{"inferred_type":"Tensor[32,32]","kind":"var","name":"w2","span":{"column":27,"line":4,"offset":220}}],"inferred_type":"Tensor[1,32]","kind":"call","name":"matmul","span":{"column":17,"line":4,"offset":210}},{"inferred_type":"Tensor[1,32]","kind":"var","name":"b2","span":{"column":31,"line":4,"offset":224}}],"inferred_type":"Tensor[1,32]","kind":"call","name":"add","span":{"column":13,"line":4,"offset":206}}],"inferred_type":"Tensor[1,32]","kind":"call","name":"tanh","span":{"column":8,"line":4,"offset":201}},"inferred_type":"Tensor[1,32]","kind":"let","mutable":false,"name":"h2","span":{"column":1,"line":4,"offset":194},"type":null},{"expr":{"args":[{"args":[{"inferred_type":"Tensor[1,32]","kind":"var","name":"h2","span":{"column":19,"line":5,"offset":248}},{"inferred_type":"Tensor[32,22]","kind":"var","name":"wo","span":{"column":22,"line":5,"offset":251}}],"inferred_type":"Tensor[1,22]","kind":"call","name":"matmul","span":{"column":12,"line":5,"offset":241}},{"inferred_type":"Tensor[1,22]","kind":"var","name":"bo","span":{"column":26,"line":5,"offset":255}}],"inferred_type":"Tensor[1,22]","kind":"call","name":"add","span":{"column":8,"line":5,"offset":237}},"kind":"return","span":{"column":1,"line":5,"offset":230}}],"name":"main","params":[["x","Tensor[1,30]"],["w1","Tensor[30,32]"],["b1","Tensor[1,32]"],["w2","Tensor[32,32]"],["b2","Tensor[1,32]"],["wo","Tensor[32,22]"],["bo","Tensor[1,22]"]],"return_type":"Tensor[1,22]","span":{"column":1,"line":2,"offset":20}}]}
|
model/manifest.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "ICL_R5_OFFLINE_BUNDLE/1",
|
| 3 |
+
"files": {
|
| 4 |
+
"weights.json": {
|
| 5 |
+
"bytes": 75290,
|
| 6 |
+
"sha256": "f4385f7237787a2486eaa1f69551e113d4c356c184877bc69422cb2f6297d2c6"
|
| 7 |
+
},
|
| 8 |
+
"compiled_model.ocir": {
|
| 9 |
+
"bytes": 4920,
|
| 10 |
+
"sha256": "65913fa9b4ff565aaaf5ce88eecaf069a64113cb51a45d72f957a3925b6ce31d"
|
| 11 |
+
},
|
| 12 |
+
"model.icl": {
|
| 13 |
+
"bytes": 262,
|
| 14 |
+
"sha256": "d6b00095f8850cc1a8dc5f1d7fd0838e5c30faa98a8943c17aa4c95efa974574"
|
| 15 |
+
},
|
| 16 |
+
"model_config.json": {
|
| 17 |
+
"bytes": 1543,
|
| 18 |
+
"sha256": "0a8faf7c094a4d983ba908fbd96144a8b5bbbcda29b298086e4435ced90f0a69"
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
"runtime_file_hashes": {
|
| 22 |
+
"__init__.py": "f73f293d01ef19c8f813a446bdcff125994f4237a9beded8eebde17a31a28807",
|
| 23 |
+
"__main__.py": "79ee6f134c5c5193377cf9b189cbdcc3e2095e49ba9cec310114441c15a917c4",
|
| 24 |
+
"api.py": "a0037de6a1f7eb3a69a64ce3b85f8e916a9fadea89e5a4acfba47054b23c499b",
|
| 25 |
+
"checker.py": "41339273bfed74b4f4c28cb7948b1ff8b06fb347908ff04dde0a68a46de3b4e4",
|
| 26 |
+
"cli.py": "2384aea45b82c887d4e46cab69421d41cb6d60c690b75685ab263d57b1c7a848",
|
| 27 |
+
"frontend.py": "54f77a11fddfe631756506a9dd64af91a8fedf49951b2fbe982e8e66118bb98f",
|
| 28 |
+
"interpreter.py": "6a03904e82bcfaff33e44c658de84e1b34445d7b7f567244cd4388391ea34a34",
|
| 29 |
+
"legacy_afc.py": "20abd74e06a61d96c829446d1faf584418affc9a4e098d405a54c87ecdf99742",
|
| 30 |
+
"runtime.py": "23b3bcfc7264e1ba24111d067a35676cf7171d72891522253475c9d78dd97ded",
|
| 31 |
+
"vm.py": "9fa1f8a257a5cb4873cb3689bbf81886456074d3ad1b8c1e7a8db7938ba462b8",
|
| 32 |
+
"OCIR_SCHEMA.json": "0dd381cb61f65f3346c07918aae587c42c583f8b4449583fdd4dca1afdcee60c",
|
| 33 |
+
"TOKEN_VOCAB.json": "2a8d6cd58182ad668b9dd73c1287126490b21ca45fe083cee87132e5da147224"
|
| 34 |
+
},
|
| 35 |
+
"security": "Hash detects accidental/tampered-content mismatch, not publisher authentication or OS sandbox certification."
|
| 36 |
+
}
|
model/model.icl
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
module model_graph;
|
| 2 |
+
fn main(x:Tensor[1,30],w1:Tensor[30,32],b1:Tensor[1,32],w2:Tensor[32,32],b2:Tensor[1,32],wo:Tensor[32,22],bo:Tensor[1,22])->Tensor[1,22] {
|
| 3 |
+
let h1=tanh(add(matmul(x,w1),b1));
|
| 4 |
+
let h2=tanh(add(matmul(h1,w2),b2));
|
| 5 |
+
return add(matmul(h2,wo),bo);
|
| 6 |
+
}
|
model/model_config.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"seed": 17,
|
| 3 |
+
"choice": "preselected first seed, not selected on held-out outcomes",
|
| 4 |
+
"actions": [
|
| 5 |
+
"ADD",
|
| 6 |
+
"SUB",
|
| 7 |
+
"MUL",
|
| 8 |
+
"MAX",
|
| 9 |
+
"MIN",
|
| 10 |
+
"ABS",
|
| 11 |
+
"REPEAT",
|
| 12 |
+
"TRANSLATE",
|
| 13 |
+
"RESTORE",
|
| 14 |
+
"STORE",
|
| 15 |
+
"RECALL",
|
| 16 |
+
"JOURNAL",
|
| 17 |
+
"RECORD_ADD",
|
| 18 |
+
"LIST_ADD",
|
| 19 |
+
"NEGATE",
|
| 20 |
+
"OBSERVER_MISMATCH",
|
| 21 |
+
"FRAME_MISMATCH",
|
| 22 |
+
"UNIT_MISMATCH",
|
| 23 |
+
"NON_IDENTIFIABLE",
|
| 24 |
+
"WITNESS_CORRUPT",
|
| 25 |
+
"MEMORY_MISSING",
|
| 26 |
+
"EFFECT_DENIED"
|
| 27 |
+
],
|
| 28 |
+
"feature_names": [
|
| 29 |
+
"intent:increase",
|
| 30 |
+
"intent:decrease",
|
| 31 |
+
"intent:scale",
|
| 32 |
+
"intent:floor",
|
| 33 |
+
"intent:ceiling",
|
| 34 |
+
"intent:magnitude",
|
| 35 |
+
"intent:repeat",
|
| 36 |
+
"intent:translate",
|
| 37 |
+
"intent:restore",
|
| 38 |
+
"intent:remember",
|
| 39 |
+
"intent:recall",
|
| 40 |
+
"intent:journal",
|
| 41 |
+
"intent:conditional",
|
| 42 |
+
"intent:record_add",
|
| 43 |
+
"intent:list_add",
|
| 44 |
+
"intent:axis_reverse",
|
| 45 |
+
"flag:observer_match",
|
| 46 |
+
"flag:frame_match",
|
| 47 |
+
"flag:unit_match",
|
| 48 |
+
"flag:witness_present",
|
| 49 |
+
"flag:witness_valid",
|
| 50 |
+
"flag:memory_present",
|
| 51 |
+
"flag:journal_allowed",
|
| 52 |
+
"flag:condition",
|
| 53 |
+
"nuisance:value",
|
| 54 |
+
"nuisance:arg",
|
| 55 |
+
"nuisance:modulus",
|
| 56 |
+
"nuisance:parity",
|
| 57 |
+
"nuisance:residue3",
|
| 58 |
+
"nuisance:residue5"
|
| 59 |
+
],
|
| 60 |
+
"schema_version": "0.2.1",
|
| 61 |
+
"schema_sha256": "0dd381cb61f65f3346c07918aae587c42c583f8b4449583fdd4dca1afdcee60c",
|
| 62 |
+
"parameters": 2774,
|
| 63 |
+
"base_model": null,
|
| 64 |
+
"source_checkpoint_sha256": "46b25e6559918e769eb730da61719828fd6c88409cf1a1e4d5651c624bc3118f",
|
| 65 |
+
"scope": "bounded opcode classifier, deterministic composer/emitter/executor"
|
| 66 |
+
}
|
model/weights.json
ADDED
|
@@ -0,0 +1,2824 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"w1": {
|
| 3 |
+
"shape": [
|
| 4 |
+
30,
|
| 5 |
+
32
|
| 6 |
+
],
|
| 7 |
+
"data": [
|
| 8 |
+
-0.5488966703414917,
|
| 9 |
+
-0.08593291789293289,
|
| 10 |
+
0.5386847257614136,
|
| 11 |
+
-0.11527922004461288,
|
| 12 |
+
0.5276094675064087,
|
| 13 |
+
0.5239102244377136,
|
| 14 |
+
0.2667744755744934,
|
| 15 |
+
-0.48160919547080994,
|
| 16 |
+
-0.42378148436546326,
|
| 17 |
+
-0.45551472902297974,
|
| 18 |
+
0.44894301891326904,
|
| 19 |
+
0.40508943796157837,
|
| 20 |
+
0.32896095514297485,
|
| 21 |
+
-0.1297110617160797,
|
| 22 |
+
0.46540695428848267,
|
| 23 |
+
0.5252204537391663,
|
| 24 |
+
-0.4742470979690552,
|
| 25 |
+
-0.44977128505706787,
|
| 26 |
+
-0.5083129405975342,
|
| 27 |
+
0.048102714121341705,
|
| 28 |
+
0.48412609100341797,
|
| 29 |
+
0.31284621357917786,
|
| 30 |
+
0.5330861806869507,
|
| 31 |
+
0.26352381706237793,
|
| 32 |
+
-0.5231456756591797,
|
| 33 |
+
-0.7219465374946594,
|
| 34 |
+
-0.5547614693641663,
|
| 35 |
+
-0.19468623399734497,
|
| 36 |
+
-0.3103106915950775,
|
| 37 |
+
0.3873853385448456,
|
| 38 |
+
-0.3373004198074341,
|
| 39 |
+
-0.5831712484359741,
|
| 40 |
+
0.41279247403144836,
|
| 41 |
+
-0.446401983499527,
|
| 42 |
+
0.2757759094238281,
|
| 43 |
+
0.35344198346138,
|
| 44 |
+
0.4034237861633301,
|
| 45 |
+
0.5448958873748779,
|
| 46 |
+
0.5372898578643799,
|
| 47 |
+
0.40051308274269104,
|
| 48 |
+
-0.28691014647483826,
|
| 49 |
+
0.5974467992782593,
|
| 50 |
+
-0.9412275552749634,
|
| 51 |
+
0.5422351956367493,
|
| 52 |
+
0.4789050817489624,
|
| 53 |
+
-0.5489935874938965,
|
| 54 |
+
0.3875492513179779,
|
| 55 |
+
-0.3904019594192505,
|
| 56 |
+
-0.29790589213371277,
|
| 57 |
+
0.5539658665657043,
|
| 58 |
+
-0.37398454546928406,
|
| 59 |
+
-0.36495241522789,
|
| 60 |
+
-0.42312175035476685,
|
| 61 |
+
0.06898502260446548,
|
| 62 |
+
0.3863160312175751,
|
| 63 |
+
0.44947755336761475,
|
| 64 |
+
-0.37245747447013855,
|
| 65 |
+
0.6392247080802917,
|
| 66 |
+
-0.39478254318237305,
|
| 67 |
+
0.6875461935997009,
|
| 68 |
+
-0.5576581954956055,
|
| 69 |
+
0.47803521156311035,
|
| 70 |
+
-0.48461440205574036,
|
| 71 |
+
0.3100711405277252,
|
| 72 |
+
-0.24585741758346558,
|
| 73 |
+
0.6967970132827759,
|
| 74 |
+
-0.3403576612472534,
|
| 75 |
+
0.2939182221889496,
|
| 76 |
+
0.5761148929595947,
|
| 77 |
+
-0.4314090311527252,
|
| 78 |
+
0.5944485664367676,
|
| 79 |
+
0.7156250476837158,
|
| 80 |
+
0.5832403898239136,
|
| 81 |
+
0.6609600186347961,
|
| 82 |
+
0.4671705365180969,
|
| 83 |
+
0.44416898488998413,
|
| 84 |
+
-0.4081263542175293,
|
| 85 |
+
-0.41817739605903625,
|
| 86 |
+
0.5767237544059753,
|
| 87 |
+
-0.43526920676231384,
|
| 88 |
+
0.4799668788909912,
|
| 89 |
+
-0.2550618052482605,
|
| 90 |
+
0.3990604877471924,
|
| 91 |
+
-0.6457293033599854,
|
| 92 |
+
-0.5282684564590454,
|
| 93 |
+
-0.49335336685180664,
|
| 94 |
+
0.3576943874359131,
|
| 95 |
+
-0.6070857644081116,
|
| 96 |
+
0.45286858081817627,
|
| 97 |
+
-0.6534950733184814,
|
| 98 |
+
0.5726582407951355,
|
| 99 |
+
-0.38555899262428284,
|
| 100 |
+
0.5510165095329285,
|
| 101 |
+
0.4904101490974426,
|
| 102 |
+
-0.3645825982093811,
|
| 103 |
+
0.48236018419265747,
|
| 104 |
+
0.5967796444892883,
|
| 105 |
+
-0.4618927836418152,
|
| 106 |
+
0.47114798426628113,
|
| 107 |
+
-0.7329348921775818,
|
| 108 |
+
-0.48430487513542175,
|
| 109 |
+
-0.5966583490371704,
|
| 110 |
+
0.5011285543441772,
|
| 111 |
+
-0.3746306598186493,
|
| 112 |
+
-0.3945414125919342,
|
| 113 |
+
-0.1043902039527893,
|
| 114 |
+
-0.49297523498535156,
|
| 115 |
+
-0.6017966866493225,
|
| 116 |
+
0.5076148509979248,
|
| 117 |
+
-0.4691731035709381,
|
| 118 |
+
-0.1496807485818863,
|
| 119 |
+
-0.37746888399124146,
|
| 120 |
+
-0.3639369010925293,
|
| 121 |
+
0.299565851688385,
|
| 122 |
+
0.5902070999145508,
|
| 123 |
+
0.4756924510002136,
|
| 124 |
+
-0.5825579762458801,
|
| 125 |
+
0.45068368315696716,
|
| 126 |
+
-0.5842808485031128,
|
| 127 |
+
0.5202412605285645,
|
| 128 |
+
-0.5344223976135254,
|
| 129 |
+
-0.45949897170066833,
|
| 130 |
+
-0.3554128408432007,
|
| 131 |
+
0.45180270075798035,
|
| 132 |
+
0.48409485816955566,
|
| 133 |
+
-0.6837796568870544,
|
| 134 |
+
0.6565655469894409,
|
| 135 |
+
0.6284458637237549,
|
| 136 |
+
0.581606388092041,
|
| 137 |
+
0.08924071490764618,
|
| 138 |
+
-0.5221413373947144,
|
| 139 |
+
0.3925965428352356,
|
| 140 |
+
0.7244848012924194,
|
| 141 |
+
-0.48466020822525024,
|
| 142 |
+
-0.6208491325378418,
|
| 143 |
+
-0.537087619304657,
|
| 144 |
+
0.5254541635513306,
|
| 145 |
+
0.6037610173225403,
|
| 146 |
+
0.40344175696372986,
|
| 147 |
+
-0.4285893738269806,
|
| 148 |
+
0.3539985120296478,
|
| 149 |
+
0.4335514008998871,
|
| 150 |
+
-0.39308956265449524,
|
| 151 |
+
-0.5236027240753174,
|
| 152 |
+
0.8613845109939575,
|
| 153 |
+
0.6111376285552979,
|
| 154 |
+
-0.5862669348716736,
|
| 155 |
+
0.5153316855430603,
|
| 156 |
+
-0.29207855463027954,
|
| 157 |
+
0.3187897801399231,
|
| 158 |
+
-0.6437675952911377,
|
| 159 |
+
-0.487657368183136,
|
| 160 |
+
-0.238347128033638,
|
| 161 |
+
0.5846917629241943,
|
| 162 |
+
0.3970000445842743,
|
| 163 |
+
-0.4527803957462311,
|
| 164 |
+
0.3972559869289398,
|
| 165 |
+
0.1303258240222931,
|
| 166 |
+
0.4329298436641693,
|
| 167 |
+
0.3383236229419708,
|
| 168 |
+
-0.11817159503698349,
|
| 169 |
+
0.6526093482971191,
|
| 170 |
+
0.7772384881973267,
|
| 171 |
+
-0.6000686883926392,
|
| 172 |
+
0.328559935092926,
|
| 173 |
+
-0.5089402198791504,
|
| 174 |
+
-0.22956186532974243,
|
| 175 |
+
-0.38165557384490967,
|
| 176 |
+
0.4861235022544861,
|
| 177 |
+
-0.43756017088890076,
|
| 178 |
+
-0.6197691559791565,
|
| 179 |
+
-0.46117734909057617,
|
| 180 |
+
0.5947796702384949,
|
| 181 |
+
0.5957403779029846,
|
| 182 |
+
0.6052441000938416,
|
| 183 |
+
-0.005228719208389521,
|
| 184 |
+
0.5038419961929321,
|
| 185 |
+
-0.46628355979919434,
|
| 186 |
+
-0.5361005067825317,
|
| 187 |
+
-0.45644819736480713,
|
| 188 |
+
0.2022489607334137,
|
| 189 |
+
0.9743813872337341,
|
| 190 |
+
-0.5054241418838501,
|
| 191 |
+
0.413500040769577,
|
| 192 |
+
-0.609239935874939,
|
| 193 |
+
0.2887095510959625,
|
| 194 |
+
0.6669336557388306,
|
| 195 |
+
0.8208209872245789,
|
| 196 |
+
-0.4311579763889313,
|
| 197 |
+
-0.473364919424057,
|
| 198 |
+
-0.5393997430801392,
|
| 199 |
+
0.07978760451078415,
|
| 200 |
+
0.40551045536994934,
|
| 201 |
+
0.39571866393089294,
|
| 202 |
+
-0.41139501333236694,
|
| 203 |
+
0.5627273917198181,
|
| 204 |
+
0.42904725670814514,
|
| 205 |
+
0.10078001022338867,
|
| 206 |
+
-0.6481370329856873,
|
| 207 |
+
-0.45294639468193054,
|
| 208 |
+
-0.7407980561256409,
|
| 209 |
+
0.30929553508758545,
|
| 210 |
+
-0.5597099661827087,
|
| 211 |
+
-0.4542389214038849,
|
| 212 |
+
-0.5131598114967346,
|
| 213 |
+
-0.5234488844871521,
|
| 214 |
+
-0.5677126049995422,
|
| 215 |
+
0.02679944597184658,
|
| 216 |
+
0.7225686311721802,
|
| 217 |
+
0.5193125009536743,
|
| 218 |
+
-0.4365570843219757,
|
| 219 |
+
-0.17807486653327942,
|
| 220 |
+
0.5545235872268677,
|
| 221 |
+
-0.6007466912269592,
|
| 222 |
+
0.42812374234199524,
|
| 223 |
+
0.08186574280261993,
|
| 224 |
+
0.2659360468387604,
|
| 225 |
+
-0.41609466075897217,
|
| 226 |
+
-0.5962536334991455,
|
| 227 |
+
-0.3122826814651489,
|
| 228 |
+
0.32409751415252686,
|
| 229 |
+
0.6739369630813599,
|
| 230 |
+
0.5346131324768066,
|
| 231 |
+
-0.6569995284080505,
|
| 232 |
+
-0.5584861636161804,
|
| 233 |
+
0.5756837725639343,
|
| 234 |
+
0.7416533827781677,
|
| 235 |
+
0.23805756866931915,
|
| 236 |
+
-0.3694150149822235,
|
| 237 |
+
0.4609140157699585,
|
| 238 |
+
0.4063715934753418,
|
| 239 |
+
0.09016892313957214,
|
| 240 |
+
-0.23848992586135864,
|
| 241 |
+
0.5578575134277344,
|
| 242 |
+
-0.46439528465270996,
|
| 243 |
+
-0.4068780541419983,
|
| 244 |
+
0.544366717338562,
|
| 245 |
+
0.3993358314037323,
|
| 246 |
+
-0.4173828065395355,
|
| 247 |
+
0.229123055934906,
|
| 248 |
+
-0.5490871667861938,
|
| 249 |
+
0.5770585536956787,
|
| 250 |
+
-0.39044317603111267,
|
| 251 |
+
-0.6179271936416626,
|
| 252 |
+
-0.4629450738430023,
|
| 253 |
+
0.47791239619255066,
|
| 254 |
+
0.7727953195571899,
|
| 255 |
+
-0.4947788417339325,
|
| 256 |
+
0.21023114025592804,
|
| 257 |
+
-0.2763822674751282,
|
| 258 |
+
0.31660231947898865,
|
| 259 |
+
0.7578261494636536,
|
| 260 |
+
0.36358076333999634,
|
| 261 |
+
-0.2730739414691925,
|
| 262 |
+
0.7853317856788635,
|
| 263 |
+
0.0518028624355793,
|
| 264 |
+
-0.5771622061729431,
|
| 265 |
+
0.34737157821655273,
|
| 266 |
+
-0.05463007092475891,
|
| 267 |
+
-0.48710644245147705,
|
| 268 |
+
-0.2929217219352722,
|
| 269 |
+
0.10876808315515518,
|
| 270 |
+
0.56290602684021,
|
| 271 |
+
0.44349828362464905,
|
| 272 |
+
0.48770076036453247,
|
| 273 |
+
-0.4980546832084656,
|
| 274 |
+
-0.5883984565734863,
|
| 275 |
+
0.25160253047943115,
|
| 276 |
+
0.10964559763669968,
|
| 277 |
+
0.37879517674446106,
|
| 278 |
+
-0.290043443441391,
|
| 279 |
+
0.5417924523353577,
|
| 280 |
+
0.4497000277042389,
|
| 281 |
+
-0.5163202285766602,
|
| 282 |
+
-0.28064480423927307,
|
| 283 |
+
0.29856574535369873,
|
| 284 |
+
0.4774533808231354,
|
| 285 |
+
-0.3002442419528961,
|
| 286 |
+
-0.1280519813299179,
|
| 287 |
+
-0.404786080121994,
|
| 288 |
+
0.5543663501739502,
|
| 289 |
+
-0.5511503219604492,
|
| 290 |
+
0.4968489706516266,
|
| 291 |
+
-0.4734399616718292,
|
| 292 |
+
0.5590401887893677,
|
| 293 |
+
-0.5166779160499573,
|
| 294 |
+
0.40771347284317017,
|
| 295 |
+
-0.6714063882827759,
|
| 296 |
+
0.6584751009941101,
|
| 297 |
+
-0.09569267183542252,
|
| 298 |
+
0.5472999215126038,
|
| 299 |
+
-0.48260003328323364,
|
| 300 |
+
-0.11467840522527695,
|
| 301 |
+
-0.18142664432525635,
|
| 302 |
+
-0.6749077439308167,
|
| 303 |
+
0.5573946237564087,
|
| 304 |
+
0.440958172082901,
|
| 305 |
+
-0.3269651234149933,
|
| 306 |
+
0.5036769509315491,
|
| 307 |
+
-0.6093200445175171,
|
| 308 |
+
0.38963407278060913,
|
| 309 |
+
-0.0026236730627715588,
|
| 310 |
+
-0.4701225161552429,
|
| 311 |
+
-0.520491898059845,
|
| 312 |
+
-0.4147573709487915,
|
| 313 |
+
-0.3283874988555908,
|
| 314 |
+
0.4954054057598114,
|
| 315 |
+
-0.6171549558639526,
|
| 316 |
+
0.38185861706733704,
|
| 317 |
+
-0.5666277408599854,
|
| 318 |
+
0.7219245433807373,
|
| 319 |
+
0.58454430103302,
|
| 320 |
+
-0.47670692205429077,
|
| 321 |
+
0.42368021607398987,
|
| 322 |
+
-0.5197672247886658,
|
| 323 |
+
-0.48470231890678406,
|
| 324 |
+
-0.6032153964042664,
|
| 325 |
+
-0.1776377558708191,
|
| 326 |
+
0.34772226214408875,
|
| 327 |
+
-0.5075376033782959,
|
| 328 |
+
0.5055197477340698,
|
| 329 |
+
-0.6107749342918396,
|
| 330 |
+
0.5693075060844421,
|
| 331 |
+
0.9442098736763,
|
| 332 |
+
-0.6182811856269836,
|
| 333 |
+
0.5870493054389954,
|
| 334 |
+
0.2253257781267166,
|
| 335 |
+
-0.1791469007730484,
|
| 336 |
+
-0.22695675492286682,
|
| 337 |
+
0.31226152181625366,
|
| 338 |
+
0.04046796262264252,
|
| 339 |
+
0.17730140686035156,
|
| 340 |
+
-0.6283512115478516,
|
| 341 |
+
0.6919345855712891,
|
| 342 |
+
0.6322853565216064,
|
| 343 |
+
-0.21163585782051086,
|
| 344 |
+
-0.525471568107605,
|
| 345 |
+
0.3001823425292969,
|
| 346 |
+
-0.2083841860294342,
|
| 347 |
+
0.4563871920108795,
|
| 348 |
+
-0.46424710750579834,
|
| 349 |
+
0.5040539503097534,
|
| 350 |
+
-0.4580048620700836,
|
| 351 |
+
-0.5883434414863586,
|
| 352 |
+
0.6421611309051514,
|
| 353 |
+
-0.7878042459487915,
|
| 354 |
+
0.793711245059967,
|
| 355 |
+
0.42383310198783875,
|
| 356 |
+
0.49203595519065857,
|
| 357 |
+
-0.14698092639446259,
|
| 358 |
+
-0.013634764589369297,
|
| 359 |
+
-0.6515633463859558,
|
| 360 |
+
-0.611086905002594,
|
| 361 |
+
0.4841988980770111,
|
| 362 |
+
-0.6612274646759033,
|
| 363 |
+
-0.40686869621276855,
|
| 364 |
+
-0.28031399846076965,
|
| 365 |
+
0.47590166330337524,
|
| 366 |
+
-0.8496487140655518,
|
| 367 |
+
0.4805188775062561,
|
| 368 |
+
0.10948624461889267,
|
| 369 |
+
0.5154337286949158,
|
| 370 |
+
-0.2509177327156067,
|
| 371 |
+
-0.29934972524642944,
|
| 372 |
+
-0.6761432886123657,
|
| 373 |
+
0.7292912602424622,
|
| 374 |
+
-0.4002574682235718,
|
| 375 |
+
-0.6207399964332581,
|
| 376 |
+
-0.838944673538208,
|
| 377 |
+
-0.6486210823059082,
|
| 378 |
+
-0.5000784993171692,
|
| 379 |
+
-0.6842228174209595,
|
| 380 |
+
0.213387131690979,
|
| 381 |
+
-0.5762696266174316,
|
| 382 |
+
-0.12696601450443268,
|
| 383 |
+
-0.5075131058692932,
|
| 384 |
+
-0.5239382982254028,
|
| 385 |
+
-0.09663907438516617,
|
| 386 |
+
0.08113496750593185,
|
| 387 |
+
-0.5137198567390442,
|
| 388 |
+
-0.30290159583091736,
|
| 389 |
+
-0.5024582743644714,
|
| 390 |
+
0.2599025070667267,
|
| 391 |
+
0.48784178495407104,
|
| 392 |
+
0.055365972220897675,
|
| 393 |
+
-0.31638234853744507,
|
| 394 |
+
0.2888021767139435,
|
| 395 |
+
0.21264268457889557,
|
| 396 |
+
0.638916015625,
|
| 397 |
+
0.45516276359558105,
|
| 398 |
+
0.5979908108711243,
|
| 399 |
+
0.2697484791278839,
|
| 400 |
+
-0.601152241230011,
|
| 401 |
+
0.08367829769849777,
|
| 402 |
+
0.27593091130256653,
|
| 403 |
+
0.2619452476501465,
|
| 404 |
+
0.37542665004730225,
|
| 405 |
+
-0.5827372670173645,
|
| 406 |
+
0.7164355516433716,
|
| 407 |
+
0.29327672719955444,
|
| 408 |
+
-0.3225495219230652,
|
| 409 |
+
0.14185361564159393,
|
| 410 |
+
-0.8465701937675476,
|
| 411 |
+
-0.17891362309455872,
|
| 412 |
+
0.2571544051170349,
|
| 413 |
+
0.1886378526687622,
|
| 414 |
+
0.46635645627975464,
|
| 415 |
+
0.27793434262275696,
|
| 416 |
+
-0.47681981325149536,
|
| 417 |
+
-0.1061960980296135,
|
| 418 |
+
-0.5719597339630127,
|
| 419 |
+
0.4304024577140808,
|
| 420 |
+
-0.5177552700042725,
|
| 421 |
+
0.43166348338127136,
|
| 422 |
+
-0.5323641896247864,
|
| 423 |
+
-0.11818656325340271,
|
| 424 |
+
-0.05869956314563751,
|
| 425 |
+
-0.630853533744812,
|
| 426 |
+
0.5522435903549194,
|
| 427 |
+
-0.26830682158470154,
|
| 428 |
+
-0.5874941945075989,
|
| 429 |
+
0.274897038936615,
|
| 430 |
+
0.6072633862495422,
|
| 431 |
+
-0.5939161777496338,
|
| 432 |
+
-0.5861645340919495,
|
| 433 |
+
-0.4334408640861511,
|
| 434 |
+
0.3161979615688324,
|
| 435 |
+
0.2808525562286377,
|
| 436 |
+
-0.4504222869873047,
|
| 437 |
+
-0.0519416444003582,
|
| 438 |
+
0.2261221706867218,
|
| 439 |
+
0.49213266372680664,
|
| 440 |
+
0.4448302388191223,
|
| 441 |
+
-0.4500104784965515,
|
| 442 |
+
-0.039395689964294434,
|
| 443 |
+
0.42932918667793274,
|
| 444 |
+
0.5171367526054382,
|
| 445 |
+
0.5085828304290771,
|
| 446 |
+
-0.32407456636428833,
|
| 447 |
+
-0.44762447476387024,
|
| 448 |
+
0.3271075487136841,
|
| 449 |
+
0.38971295952796936,
|
| 450 |
+
0.5840552449226379,
|
| 451 |
+
-0.38570669293403625,
|
| 452 |
+
-0.6695638298988342,
|
| 453 |
+
-0.7533370852470398,
|
| 454 |
+
-0.5539284348487854,
|
| 455 |
+
0.6343709826469421,
|
| 456 |
+
-0.4014757573604584,
|
| 457 |
+
-0.5834019780158997,
|
| 458 |
+
-0.4964871108531952,
|
| 459 |
+
0.5439229011535645,
|
| 460 |
+
-0.37932559847831726,
|
| 461 |
+
0.556016743183136,
|
| 462 |
+
0.36505022644996643,
|
| 463 |
+
0.658854603767395,
|
| 464 |
+
-0.5856919884681702,
|
| 465 |
+
0.5211732983589172,
|
| 466 |
+
0.5257969498634338,
|
| 467 |
+
0.033363766968250275,
|
| 468 |
+
-0.6026785373687744,
|
| 469 |
+
-0.36229389905929565,
|
| 470 |
+
0.5080668330192566,
|
| 471 |
+
-0.48063787817955017,
|
| 472 |
+
-0.17072567343711853,
|
| 473 |
+
0.2689678370952606,
|
| 474 |
+
0.6430474519729614,
|
| 475 |
+
0.5084283351898193,
|
| 476 |
+
0.032115768641233444,
|
| 477 |
+
-0.42459872364997864,
|
| 478 |
+
-0.5446518659591675,
|
| 479 |
+
0.4938414394855499,
|
| 480 |
+
0.4291890263557434,
|
| 481 |
+
0.4820692539215088,
|
| 482 |
+
-0.5631460547447205,
|
| 483 |
+
-0.5235498547554016,
|
| 484 |
+
-0.1327357292175293,
|
| 485 |
+
-0.6124010682106018,
|
| 486 |
+
0.5722095370292664,
|
| 487 |
+
0.5760930180549622,
|
| 488 |
+
-0.557637631893158,
|
| 489 |
+
0.22705884277820587,
|
| 490 |
+
0.511828601360321,
|
| 491 |
+
-0.3010265529155731,
|
| 492 |
+
0.607011079788208,
|
| 493 |
+
-0.6336585283279419,
|
| 494 |
+
-0.6199253797531128,
|
| 495 |
+
0.48826292157173157,
|
| 496 |
+
0.3967286944389343,
|
| 497 |
+
-0.2849735617637634,
|
| 498 |
+
0.43583595752716064,
|
| 499 |
+
0.6015684604644775,
|
| 500 |
+
0.4726688265800476,
|
| 501 |
+
0.3331848978996277,
|
| 502 |
+
-0.4791380763053894,
|
| 503 |
+
0.3802970349788666,
|
| 504 |
+
0.5389403700828552,
|
| 505 |
+
-0.5349174737930298,
|
| 506 |
+
0.6625897288322449,
|
| 507 |
+
0.5519260168075562,
|
| 508 |
+
0.5648009777069092,
|
| 509 |
+
0.4412316083908081,
|
| 510 |
+
-0.6444944739341736,
|
| 511 |
+
0.3868718147277832,
|
| 512 |
+
0.7869400382041931,
|
| 513 |
+
0.5635072588920593,
|
| 514 |
+
-0.7581864595413208,
|
| 515 |
+
-0.43755513429641724,
|
| 516 |
+
-0.19367095828056335,
|
| 517 |
+
0.60500568151474,
|
| 518 |
+
-0.473347008228302,
|
| 519 |
+
-0.04229379817843437,
|
| 520 |
+
-0.16389791667461395,
|
| 521 |
+
-0.046836283057928085,
|
| 522 |
+
0.17623679339885712,
|
| 523 |
+
-0.042533792555332184,
|
| 524 |
+
-0.14560171961784363,
|
| 525 |
+
-0.10979795455932617,
|
| 526 |
+
-0.000812417536508292,
|
| 527 |
+
0.10412212461233139,
|
| 528 |
+
0.20097237825393677,
|
| 529 |
+
-0.00750306760892272,
|
| 530 |
+
0.1720348298549652,
|
| 531 |
+
0.06982551515102386,
|
| 532 |
+
0.048237212002277374,
|
| 533 |
+
-0.23839281499385834,
|
| 534 |
+
0.3583084046840668,
|
| 535 |
+
-0.23288936913013458,
|
| 536 |
+
-0.22252047061920166,
|
| 537 |
+
-0.07366273552179337,
|
| 538 |
+
0.3645133674144745,
|
| 539 |
+
-0.26447516679763794,
|
| 540 |
+
-0.11945220828056335,
|
| 541 |
+
0.26163938641548157,
|
| 542 |
+
0.2344539314508438,
|
| 543 |
+
0.15971706807613373,
|
| 544 |
+
-0.1326783150434494,
|
| 545 |
+
0.12608030438423157,
|
| 546 |
+
-0.4383699595928192,
|
| 547 |
+
-0.5530542135238647,
|
| 548 |
+
0.20570719242095947,
|
| 549 |
+
0.05023733898997307,
|
| 550 |
+
0.1964007318019867,
|
| 551 |
+
0.5211929678916931,
|
| 552 |
+
0.011690662242472172,
|
| 553 |
+
-0.1282302439212799,
|
| 554 |
+
0.2111765444278717,
|
| 555 |
+
-0.06438232958316803,
|
| 556 |
+
0.018117204308509827,
|
| 557 |
+
-0.10277930647134781,
|
| 558 |
+
-0.39649415016174316,
|
| 559 |
+
-0.1702582687139511,
|
| 560 |
+
-0.023678457364439964,
|
| 561 |
+
-0.03561067208647728,
|
| 562 |
+
0.06724896281957626,
|
| 563 |
+
0.09960493445396423,
|
| 564 |
+
0.20002371072769165,
|
| 565 |
+
0.2907847464084625,
|
| 566 |
+
0.03925766795873642,
|
| 567 |
+
0.0065562245436012745,
|
| 568 |
+
-0.11187387257814407,
|
| 569 |
+
0.1333198845386505,
|
| 570 |
+
-0.05301545560359955,
|
| 571 |
+
-0.034278661012649536,
|
| 572 |
+
0.09543751925230026,
|
| 573 |
+
0.07358504086732864,
|
| 574 |
+
0.26777175068855286,
|
| 575 |
+
-0.16850227117538452,
|
| 576 |
+
0.2209654003381729,
|
| 577 |
+
0.502488911151886,
|
| 578 |
+
0.6801419854164124,
|
| 579 |
+
-0.4001198410987854,
|
| 580 |
+
-0.29424628615379333,
|
| 581 |
+
-0.08849529922008514,
|
| 582 |
+
0.25346314907073975,
|
| 583 |
+
0.12016011029481888,
|
| 584 |
+
-0.183090940117836,
|
| 585 |
+
0.24284860491752625,
|
| 586 |
+
0.2019088715314865,
|
| 587 |
+
0.2086249589920044,
|
| 588 |
+
0.26586925983428955,
|
| 589 |
+
-0.23053331673145294,
|
| 590 |
+
-0.04497445374727249,
|
| 591 |
+
-0.12829023599624634,
|
| 592 |
+
0.1478312462568283,
|
| 593 |
+
0.1556464284658432,
|
| 594 |
+
0.09635277837514877,
|
| 595 |
+
0.2254221886396408,
|
| 596 |
+
0.2085561901330948,
|
| 597 |
+
-0.04151191934943199,
|
| 598 |
+
-0.3400104343891144,
|
| 599 |
+
-0.161619171500206,
|
| 600 |
+
0.061953913420438766,
|
| 601 |
+
0.06938552856445312,
|
| 602 |
+
0.2185511291027069,
|
| 603 |
+
0.13206222653388977,
|
| 604 |
+
-0.13662301003932953,
|
| 605 |
+
0.03838811814785004,
|
| 606 |
+
0.24795491993427277,
|
| 607 |
+
-0.22635267674922943,
|
| 608 |
+
0.26808175444602966,
|
| 609 |
+
0.05375305190682411,
|
| 610 |
+
0.1312665194272995,
|
| 611 |
+
-0.18162821233272552,
|
| 612 |
+
0.2682986855506897,
|
| 613 |
+
0.37956565618515015,
|
| 614 |
+
0.057593319565057755,
|
| 615 |
+
0.14767535030841827,
|
| 616 |
+
-0.23180840909481049,
|
| 617 |
+
-0.3678608238697052,
|
| 618 |
+
-0.5583789944648743,
|
| 619 |
+
0.07128473371267319,
|
| 620 |
+
0.10965823382139206,
|
| 621 |
+
-0.31575843691825867,
|
| 622 |
+
-0.10914731025695801,
|
| 623 |
+
-0.35615110397338867,
|
| 624 |
+
0.04601464793086052,
|
| 625 |
+
-0.23540574312210083,
|
| 626 |
+
-0.17907334864139557,
|
| 627 |
+
-0.34793782234191895,
|
| 628 |
+
-0.34167394042015076,
|
| 629 |
+
-0.47616836428642273,
|
| 630 |
+
-0.24529176950454712,
|
| 631 |
+
0.11963231861591339,
|
| 632 |
+
0.1936894804239273,
|
| 633 |
+
-0.006651640869677067,
|
| 634 |
+
0.007289855275303125,
|
| 635 |
+
-0.03284122049808502,
|
| 636 |
+
-0.22686517238616943,
|
| 637 |
+
-0.13926152884960175,
|
| 638 |
+
-0.25020575523376465,
|
| 639 |
+
0.20833373069763184,
|
| 640 |
+
-0.11253945529460907,
|
| 641 |
+
0.12057550251483917,
|
| 642 |
+
-0.022917678579688072,
|
| 643 |
+
0.04169459268450737,
|
| 644 |
+
0.14982087910175323,
|
| 645 |
+
-0.10561981052160263,
|
| 646 |
+
0.2822776436805725,
|
| 647 |
+
0.01875096559524536,
|
| 648 |
+
-0.07925187051296234,
|
| 649 |
+
-0.22598512470722198,
|
| 650 |
+
-0.18576356768608093,
|
| 651 |
+
0.16715767979621887,
|
| 652 |
+
0.1415344923734665,
|
| 653 |
+
0.026288799941539764,
|
| 654 |
+
0.2131047248840332,
|
| 655 |
+
-0.040931981056928635,
|
| 656 |
+
0.24032042920589447,
|
| 657 |
+
-0.010192576795816422,
|
| 658 |
+
-0.003330687992274761,
|
| 659 |
+
0.504662036895752,
|
| 660 |
+
0.5437992811203003,
|
| 661 |
+
-0.3169926404953003,
|
| 662 |
+
0.09638766944408417,
|
| 663 |
+
0.3067358434200287,
|
| 664 |
+
0.06145891919732094,
|
| 665 |
+
-0.07863249629735947,
|
| 666 |
+
-0.08540267497301102,
|
| 667 |
+
0.1543775498867035,
|
| 668 |
+
-0.30020517110824585,
|
| 669 |
+
-0.35361987352371216,
|
| 670 |
+
0.04363108426332474,
|
| 671 |
+
0.24259968101978302,
|
| 672 |
+
-0.4847774803638458,
|
| 673 |
+
0.20528705418109894,
|
| 674 |
+
0.20164655148983002,
|
| 675 |
+
-0.01677972637116909,
|
| 676 |
+
0.04092950001358986,
|
| 677 |
+
-0.11456584185361862,
|
| 678 |
+
0.11674720793962479,
|
| 679 |
+
-0.21948687732219696,
|
| 680 |
+
0.09659700840711594,
|
| 681 |
+
-0.06174008175730705,
|
| 682 |
+
-0.12229377031326294,
|
| 683 |
+
-0.18225517868995667,
|
| 684 |
+
-0.13672633469104767,
|
| 685 |
+
0.2011241614818573,
|
| 686 |
+
-0.40462711453437805,
|
| 687 |
+
-0.03922515735030174,
|
| 688 |
+
0.4779961407184601,
|
| 689 |
+
-0.16949136555194855,
|
| 690 |
+
0.28197190165519714,
|
| 691 |
+
-0.0651712417602539,
|
| 692 |
+
-0.18198411166667938,
|
| 693 |
+
0.052842386066913605,
|
| 694 |
+
0.09949929267168045,
|
| 695 |
+
-0.22297944128513336,
|
| 696 |
+
-0.057711027562618256,
|
| 697 |
+
0.27514883875846863,
|
| 698 |
+
-0.39546141028404236,
|
| 699 |
+
0.1879843771457672,
|
| 700 |
+
-0.19569970667362213,
|
| 701 |
+
-0.21887756884098053,
|
| 702 |
+
-0.192561537027359,
|
| 703 |
+
0.16887126863002777,
|
| 704 |
+
-0.08057205379009247,
|
| 705 |
+
-0.09789175540208817,
|
| 706 |
+
-0.05233345553278923,
|
| 707 |
+
0.005102627445012331,
|
| 708 |
+
-0.2575450837612152,
|
| 709 |
+
0.330186665058136,
|
| 710 |
+
-0.6725046634674072,
|
| 711 |
+
-0.09959437698125839,
|
| 712 |
+
-0.045458149164915085,
|
| 713 |
+
0.21965444087982178,
|
| 714 |
+
-0.00013260619016364217,
|
| 715 |
+
0.28631147742271423,
|
| 716 |
+
0.395963191986084,
|
| 717 |
+
0.014002902433276176,
|
| 718 |
+
0.05100059136748314,
|
| 719 |
+
-0.47803983092308044,
|
| 720 |
+
-0.35184553265571594,
|
| 721 |
+
0.24095815420150757,
|
| 722 |
+
-0.26707109808921814,
|
| 723 |
+
0.02945927157998085,
|
| 724 |
+
-0.021550685167312622,
|
| 725 |
+
0.0865086168050766,
|
| 726 |
+
0.12556840479373932,
|
| 727 |
+
-0.023434923961758614,
|
| 728 |
+
-0.23609891533851624,
|
| 729 |
+
-0.11124417930841446,
|
| 730 |
+
0.08189614117145538,
|
| 731 |
+
-0.0623178668320179,
|
| 732 |
+
0.5730078816413879,
|
| 733 |
+
0.07188976556062698,
|
| 734 |
+
-0.2833845615386963,
|
| 735 |
+
0.10521174222230911,
|
| 736 |
+
0.04196837544441223,
|
| 737 |
+
0.1458122879266739,
|
| 738 |
+
-0.2975368797779083,
|
| 739 |
+
-0.221624493598938,
|
| 740 |
+
-0.25704318284988403,
|
| 741 |
+
-0.11698277294635773,
|
| 742 |
+
-0.4051510691642761,
|
| 743 |
+
0.24249841272830963,
|
| 744 |
+
-0.36092066764831543,
|
| 745 |
+
0.09584717452526093,
|
| 746 |
+
0.049728281795978546,
|
| 747 |
+
-0.04320039227604866,
|
| 748 |
+
0.11536545306444168,
|
| 749 |
+
-0.07639521360397339,
|
| 750 |
+
-0.14649368822574615,
|
| 751 |
+
-0.25324591994285583,
|
| 752 |
+
-0.005763915833085775,
|
| 753 |
+
-0.5686010718345642,
|
| 754 |
+
0.2630966305732727,
|
| 755 |
+
0.02403961308300495,
|
| 756 |
+
-0.10315421968698502,
|
| 757 |
+
-0.033482328057289124,
|
| 758 |
+
0.1061115488409996,
|
| 759 |
+
0.12253917753696442,
|
| 760 |
+
0.04944491386413574,
|
| 761 |
+
-0.3874559998512268,
|
| 762 |
+
0.028973400592803955,
|
| 763 |
+
0.17262256145477295,
|
| 764 |
+
0.22983339428901672,
|
| 765 |
+
0.10847950726747513,
|
| 766 |
+
0.07570980489253998,
|
| 767 |
+
-0.29912444949150085,
|
| 768 |
+
-0.1893816739320755,
|
| 769 |
+
-0.31946074962615967,
|
| 770 |
+
-0.10217683017253876,
|
| 771 |
+
-0.4927314817905426,
|
| 772 |
+
0.1326046586036682,
|
| 773 |
+
0.27646544575691223,
|
| 774 |
+
0.16918408870697021,
|
| 775 |
+
-0.1824277937412262,
|
| 776 |
+
0.002850130433216691,
|
| 777 |
+
-0.0009537636069580913,
|
| 778 |
+
0.0019877750892192125,
|
| 779 |
+
-0.004948409739881754,
|
| 780 |
+
-0.008316612802445889,
|
| 781 |
+
0.004207105841487646,
|
| 782 |
+
-0.005114191211760044,
|
| 783 |
+
-0.00041094611515291035,
|
| 784 |
+
0.004531696438789368,
|
| 785 |
+
0.0046106320805847645,
|
| 786 |
+
-0.004249882884323597,
|
| 787 |
+
-0.0028968206606805325,
|
| 788 |
+
-0.004400105681270361,
|
| 789 |
+
0.005509004928171635,
|
| 790 |
+
0.004082438535988331,
|
| 791 |
+
0.0033618228044360876,
|
| 792 |
+
0.005578058306127787,
|
| 793 |
+
0.0025190431624650955,
|
| 794 |
+
0.0029459537472575903,
|
| 795 |
+
0.0029643557500094175,
|
| 796 |
+
0.008913869969546795,
|
| 797 |
+
-0.00119783787522465,
|
| 798 |
+
-0.0011385264806449413,
|
| 799 |
+
0.0010599781526252627,
|
| 800 |
+
-0.009323070757091045,
|
| 801 |
+
0.00029228199855424464,
|
| 802 |
+
0.0032860198989510536,
|
| 803 |
+
-0.0018906857585534453,
|
| 804 |
+
-0.004786238539963961,
|
| 805 |
+
0.0029093800112605095,
|
| 806 |
+
0.008732978254556656,
|
| 807 |
+
-0.0012697507627308369,
|
| 808 |
+
-0.0015244890237227082,
|
| 809 |
+
-0.0007339715375564992,
|
| 810 |
+
0.004065475892275572,
|
| 811 |
+
-0.002048727124929428,
|
| 812 |
+
0.0037553783040493727,
|
| 813 |
+
0.0065777297131717205,
|
| 814 |
+
0.0031715575605630875,
|
| 815 |
+
0.00325014628469944,
|
| 816 |
+
-0.006142215803265572,
|
| 817 |
+
-0.005848207511007786,
|
| 818 |
+
-0.0037326489109545946,
|
| 819 |
+
-0.00044978829100728035,
|
| 820 |
+
-0.011724578216671944,
|
| 821 |
+
0.005017526913434267,
|
| 822 |
+
-0.0035253034438937902,
|
| 823 |
+
-0.00019609919399954379,
|
| 824 |
+
-0.00148602738045156,
|
| 825 |
+
0.0021495576947927475,
|
| 826 |
+
0.0009647426195442677,
|
| 827 |
+
0.002942750696092844,
|
| 828 |
+
-0.01105999294668436,
|
| 829 |
+
0.00486386101692915,
|
| 830 |
+
-0.004324464127421379,
|
| 831 |
+
0.005949683953076601,
|
| 832 |
+
-0.004664322827011347,
|
| 833 |
+
0.003913524094969034,
|
| 834 |
+
-0.0012645965907722712,
|
| 835 |
+
-0.001229200861416757,
|
| 836 |
+
-0.00215838011354208,
|
| 837 |
+
0.002429769840091467,
|
| 838 |
+
0.00014661383465863764,
|
| 839 |
+
-0.00026782171335071325,
|
| 840 |
+
0.0014878136571496725,
|
| 841 |
+
-0.011606430634856224,
|
| 842 |
+
0.013660091906785965,
|
| 843 |
+
-0.03923620283603668,
|
| 844 |
+
0.012667507864534855,
|
| 845 |
+
-0.01129599753767252,
|
| 846 |
+
-0.002176530659198761,
|
| 847 |
+
-0.005026976577937603,
|
| 848 |
+
-0.00729585625231266,
|
| 849 |
+
0.0351935513317585,
|
| 850 |
+
-0.008873775601387024,
|
| 851 |
+
0.008286446332931519,
|
| 852 |
+
-0.0018937521381303668,
|
| 853 |
+
0.004342446569353342,
|
| 854 |
+
0.005578185431659222,
|
| 855 |
+
0.001724852598272264,
|
| 856 |
+
0.029082277789711952,
|
| 857 |
+
-0.01923050358891487,
|
| 858 |
+
-0.0023423731327056885,
|
| 859 |
+
-0.005308382213115692,
|
| 860 |
+
-0.033989015966653824,
|
| 861 |
+
-0.006406776607036591,
|
| 862 |
+
-0.01943986490368843,
|
| 863 |
+
0.004477210342884064,
|
| 864 |
+
0.006001736037433147,
|
| 865 |
+
-0.013980921357870102,
|
| 866 |
+
-0.011277023702859879,
|
| 867 |
+
-0.015905721113085747,
|
| 868 |
+
-0.02820765972137451,
|
| 869 |
+
0.019384276121854782,
|
| 870 |
+
0.029217487201094627,
|
| 871 |
+
-0.0157290268689394,
|
| 872 |
+
-0.00011734727013390511,
|
| 873 |
+
-0.000315455166855827,
|
| 874 |
+
-0.007524586282670498,
|
| 875 |
+
-0.011345199309289455,
|
| 876 |
+
-0.00017373525770381093,
|
| 877 |
+
0.022696511819958687,
|
| 878 |
+
0.00016490250709466636,
|
| 879 |
+
-0.006264247931540012,
|
| 880 |
+
-0.0005076624802313745,
|
| 881 |
+
0.014368499629199505,
|
| 882 |
+
-0.005704553332179785,
|
| 883 |
+
0.0048988894559443,
|
| 884 |
+
0.0034469368401914835,
|
| 885 |
+
0.005690488964319229,
|
| 886 |
+
-0.00731660658493638,
|
| 887 |
+
-0.01312793418765068,
|
| 888 |
+
0.027105165645480156,
|
| 889 |
+
0.004152554087340832,
|
| 890 |
+
0.015373715199530125,
|
| 891 |
+
-0.00014540599659085274,
|
| 892 |
+
-0.008389804512262344,
|
| 893 |
+
0.0024012592621147633,
|
| 894 |
+
0.007523218169808388,
|
| 895 |
+
-0.002189652994275093,
|
| 896 |
+
-0.0079547930508852,
|
| 897 |
+
0.00887039490044117,
|
| 898 |
+
-0.003295361762866378,
|
| 899 |
+
-0.011245502158999443,
|
| 900 |
+
0.01634286344051361,
|
| 901 |
+
-0.004305421374738216,
|
| 902 |
+
-0.020577874034643173,
|
| 903 |
+
-0.010176942683756351,
|
| 904 |
+
-0.002636705059558153,
|
| 905 |
+
0.002629427472129464,
|
| 906 |
+
0.010027662850916386,
|
| 907 |
+
-0.0019386817002668977,
|
| 908 |
+
0.011943185701966286,
|
| 909 |
+
0.0013497850159183145,
|
| 910 |
+
-0.0030482232104986906,
|
| 911 |
+
0.0027056438848376274,
|
| 912 |
+
0.004057863261550665,
|
| 913 |
+
0.01590159721672535,
|
| 914 |
+
-0.006561584770679474,
|
| 915 |
+
0.005488707218319178,
|
| 916 |
+
-0.0035933731123805046,
|
| 917 |
+
0.012101414613425732,
|
| 918 |
+
0.009126783348619938,
|
| 919 |
+
0.006772737018764019,
|
| 920 |
+
0.017966073006391525,
|
| 921 |
+
0.01271012146025896,
|
| 922 |
+
0.011593744158744812,
|
| 923 |
+
0.00381386443041265,
|
| 924 |
+
-0.007865527644753456,
|
| 925 |
+
0.0008343009976670146,
|
| 926 |
+
-0.0030884721782058477,
|
| 927 |
+
0.010167327709496021,
|
| 928 |
+
-0.011945083737373352,
|
| 929 |
+
-0.007140151225030422,
|
| 930 |
+
-0.0012977288570255041,
|
| 931 |
+
-0.010239080525934696,
|
| 932 |
+
-0.015454847365617752,
|
| 933 |
+
-0.0038246193435043097,
|
| 934 |
+
0.014328232035040855,
|
| 935 |
+
-0.011641643941402435,
|
| 936 |
+
-0.007750903721898794,
|
| 937 |
+
0.013255380094051361,
|
| 938 |
+
0.011205035261809826,
|
| 939 |
+
-0.015209320932626724,
|
| 940 |
+
0.006413482595235109,
|
| 941 |
+
0.008777493610978127,
|
| 942 |
+
0.004896240308880806,
|
| 943 |
+
0.0013897825265303254,
|
| 944 |
+
-0.001962441485375166,
|
| 945 |
+
0.0057435366325080395,
|
| 946 |
+
0.0014271686086431146,
|
| 947 |
+
-0.008656928315758705,
|
| 948 |
+
-0.0009493909310549498,
|
| 949 |
+
-4.59537077404093e-05,
|
| 950 |
+
0.006630320567637682,
|
| 951 |
+
-0.007160136476159096,
|
| 952 |
+
0.021778007969260216,
|
| 953 |
+
0.012312923558056355,
|
| 954 |
+
0.006152208428829908,
|
| 955 |
+
0.005909174680709839,
|
| 956 |
+
-0.011128720827400684,
|
| 957 |
+
0.005952140782028437,
|
| 958 |
+
-0.01499018631875515,
|
| 959 |
+
0.0040036034770309925,
|
| 960 |
+
-0.007701188325881958,
|
| 961 |
+
-0.002836391795426607,
|
| 962 |
+
-0.0007777111022733152,
|
| 963 |
+
-0.010451355949044228,
|
| 964 |
+
-0.022016670554876328,
|
| 965 |
+
-0.0022132727317512035,
|
| 966 |
+
0.01658616214990616,
|
| 967 |
+
-0.01811685971915722
|
| 968 |
+
]
|
| 969 |
+
},
|
| 970 |
+
"b1": {
|
| 971 |
+
"shape": [
|
| 972 |
+
1,
|
| 973 |
+
32
|
| 974 |
+
],
|
| 975 |
+
"data": [
|
| 976 |
+
0.41140854358673096,
|
| 977 |
+
0.04173576086759567,
|
| 978 |
+
0.13452301919460297,
|
| 979 |
+
-0.16835665702819824,
|
| 980 |
+
-0.18976707756519318,
|
| 981 |
+
0.24743373692035675,
|
| 982 |
+
0.2824676036834717,
|
| 983 |
+
0.33658891916275024,
|
| 984 |
+
-0.21462462842464447,
|
| 985 |
+
0.2634226083755493,
|
| 986 |
+
-0.1966567486524582,
|
| 987 |
+
-0.2314452975988388,
|
| 988 |
+
-0.16719190776348114,
|
| 989 |
+
0.15494607388973236,
|
| 990 |
+
-0.016421256586909294,
|
| 991 |
+
-0.11141982674598694,
|
| 992 |
+
0.12311933189630508,
|
| 993 |
+
-0.09508314728736877,
|
| 994 |
+
0.04821639508008957,
|
| 995 |
+
0.0026365062221884727,
|
| 996 |
+
-0.09570834040641785,
|
| 997 |
+
0.09805349260568619,
|
| 998 |
+
0.07465144246816635,
|
| 999 |
+
0.18552590906620026,
|
| 1000 |
+
0.06514368206262589,
|
| 1001 |
+
-0.26759371161460876,
|
| 1002 |
+
-0.09934244304895401,
|
| 1003 |
+
0.3285941183567047,
|
| 1004 |
+
-0.05968666449189186,
|
| 1005 |
+
-0.17026019096374512,
|
| 1006 |
+
-0.0382223017513752,
|
| 1007 |
+
-0.36833757162094116
|
| 1008 |
+
]
|
| 1009 |
+
},
|
| 1010 |
+
"w2": {
|
| 1011 |
+
"shape": [
|
| 1012 |
+
32,
|
| 1013 |
+
32
|
| 1014 |
+
],
|
| 1015 |
+
"data": [
|
| 1016 |
+
0.5833324790000916,
|
| 1017 |
+
-0.04406915232539177,
|
| 1018 |
+
0.6600975394248962,
|
| 1019 |
+
0.7142001390457153,
|
| 1020 |
+
-0.5744909644126892,
|
| 1021 |
+
0.5403149724006653,
|
| 1022 |
+
0.5255634188652039,
|
| 1023 |
+
0.4884111285209656,
|
| 1024 |
+
0.7351821660995483,
|
| 1025 |
+
-0.40603965520858765,
|
| 1026 |
+
-0.5451126098632812,
|
| 1027 |
+
-0.8551400303840637,
|
| 1028 |
+
0.6571963429450989,
|
| 1029 |
+
-0.0016029041726142168,
|
| 1030 |
+
-0.21257120370864868,
|
| 1031 |
+
0.262179970741272,
|
| 1032 |
+
0.5852038264274597,
|
| 1033 |
+
-0.4373844563961029,
|
| 1034 |
+
-0.3300783932209015,
|
| 1035 |
+
0.5403759479522705,
|
| 1036 |
+
0.5167884826660156,
|
| 1037 |
+
-0.5400581359863281,
|
| 1038 |
+
0.349983274936676,
|
| 1039 |
+
0.6145856976509094,
|
| 1040 |
+
-0.5377432703971863,
|
| 1041 |
+
-0.4395396113395691,
|
| 1042 |
+
0.242854505777359,
|
| 1043 |
+
0.3129275441169739,
|
| 1044 |
+
0.5349745750427246,
|
| 1045 |
+
-0.36281147599220276,
|
| 1046 |
+
-0.012708989903330803,
|
| 1047 |
+
-0.29258570075035095,
|
| 1048 |
+
0.1502782255411148,
|
| 1049 |
+
-0.5993214845657349,
|
| 1050 |
+
-0.42047733068466187,
|
| 1051 |
+
-0.7328343391418457,
|
| 1052 |
+
0.07879219204187393,
|
| 1053 |
+
-0.4335479736328125,
|
| 1054 |
+
-0.46740323305130005,
|
| 1055 |
+
0.3897668719291687,
|
| 1056 |
+
-0.34847062826156616,
|
| 1057 |
+
0.2858060598373413,
|
| 1058 |
+
0.6377367377281189,
|
| 1059 |
+
-0.5783088803291321,
|
| 1060 |
+
0.4374323785305023,
|
| 1061 |
+
0.6072802543640137,
|
| 1062 |
+
0.1994921714067459,
|
| 1063 |
+
0.4401877224445343,
|
| 1064 |
+
-0.5351462960243225,
|
| 1065 |
+
0.6453456878662109,
|
| 1066 |
+
0.349551796913147,
|
| 1067 |
+
-0.3295154571533203,
|
| 1068 |
+
0.15862075984477997,
|
| 1069 |
+
-0.38853126764297485,
|
| 1070 |
+
-0.03560666739940643,
|
| 1071 |
+
-1.0106849670410156,
|
| 1072 |
+
-0.05049445480108261,
|
| 1073 |
+
0.5666105151176453,
|
| 1074 |
+
0.1269836723804474,
|
| 1075 |
+
0.49595582485198975,
|
| 1076 |
+
-0.25165697932243347,
|
| 1077 |
+
0.3981028199195862,
|
| 1078 |
+
-0.3493008017539978,
|
| 1079 |
+
-0.580100417137146,
|
| 1080 |
+
0.512855589389801,
|
| 1081 |
+
0.49403664469718933,
|
| 1082 |
+
0.7002808451652527,
|
| 1083 |
+
-0.6447817087173462,
|
| 1084 |
+
-0.46112489700317383,
|
| 1085 |
+
-0.6727323532104492,
|
| 1086 |
+
-0.30430856347084045,
|
| 1087 |
+
0.029585890471935272,
|
| 1088 |
+
0.5084590911865234,
|
| 1089 |
+
-0.02487567998468876,
|
| 1090 |
+
-0.6376674175262451,
|
| 1091 |
+
0.15851113200187683,
|
| 1092 |
+
-0.16205526888370514,
|
| 1093 |
+
0.49677708745002747,
|
| 1094 |
+
0.6316495537757874,
|
| 1095 |
+
0.09202060848474503,
|
| 1096 |
+
-0.044446852058172226,
|
| 1097 |
+
-0.44909048080444336,
|
| 1098 |
+
-0.3618501126766205,
|
| 1099 |
+
0.2309982031583786,
|
| 1100 |
+
-0.3059355318546295,
|
| 1101 |
+
0.2216901332139969,
|
| 1102 |
+
0.7052450180053711,
|
| 1103 |
+
0.5653706789016724,
|
| 1104 |
+
-0.24655191600322723,
|
| 1105 |
+
0.012539896182715893,
|
| 1106 |
+
-0.5066306591033936,
|
| 1107 |
+
0.4240724742412567,
|
| 1108 |
+
0.2995709776878357,
|
| 1109 |
+
0.4913083612918854,
|
| 1110 |
+
-0.3670593202114105,
|
| 1111 |
+
0.1709272414445877,
|
| 1112 |
+
-0.16780859231948853,
|
| 1113 |
+
0.27923518419265747,
|
| 1114 |
+
0.3594975471496582,
|
| 1115 |
+
-0.10006467998027802,
|
| 1116 |
+
0.11873389780521393,
|
| 1117 |
+
-0.21080812811851501,
|
| 1118 |
+
0.36188894510269165,
|
| 1119 |
+
0.1155799925327301,
|
| 1120 |
+
-0.03603120148181915,
|
| 1121 |
+
-0.4752098321914673,
|
| 1122 |
+
-0.06422003358602524,
|
| 1123 |
+
-0.2022850066423416,
|
| 1124 |
+
0.46574854850769043,
|
| 1125 |
+
-0.5363007187843323,
|
| 1126 |
+
-0.49227839708328247,
|
| 1127 |
+
0.5008364915847778,
|
| 1128 |
+
0.15924297273159027,
|
| 1129 |
+
0.4999876916408539,
|
| 1130 |
+
0.2093067318201065,
|
| 1131 |
+
0.2674435079097748,
|
| 1132 |
+
0.19237685203552246,
|
| 1133 |
+
0.3519442081451416,
|
| 1134 |
+
-0.3069104850292206,
|
| 1135 |
+
-0.035096026957035065,
|
| 1136 |
+
-0.48597055673599243,
|
| 1137 |
+
0.43370747566223145,
|
| 1138 |
+
0.26168137788772583,
|
| 1139 |
+
-0.7016384601593018,
|
| 1140 |
+
0.24665753543376923,
|
| 1141 |
+
-0.6467354893684387,
|
| 1142 |
+
0.5018359422683716,
|
| 1143 |
+
0.033296145498752594,
|
| 1144 |
+
0.6295042634010315,
|
| 1145 |
+
-0.4614506661891937,
|
| 1146 |
+
0.13660889863967896,
|
| 1147 |
+
0.21576815843582153,
|
| 1148 |
+
-0.5289676189422607,
|
| 1149 |
+
0.16124995052814484,
|
| 1150 |
+
-0.430896133184433,
|
| 1151 |
+
-0.2777698338031769,
|
| 1152 |
+
-0.3694620132446289,
|
| 1153 |
+
-0.3000061810016632,
|
| 1154 |
+
0.4746783673763275,
|
| 1155 |
+
-0.21980877220630646,
|
| 1156 |
+
0.028262704610824585,
|
| 1157 |
+
-0.6049205660820007,
|
| 1158 |
+
-0.2659418284893036,
|
| 1159 |
+
0.5230205059051514,
|
| 1160 |
+
0.428293377161026,
|
| 1161 |
+
0.7031703591346741,
|
| 1162 |
+
-0.8487260341644287,
|
| 1163 |
+
0.14968392252922058,
|
| 1164 |
+
-0.33109772205352783,
|
| 1165 |
+
0.015154345892369747,
|
| 1166 |
+
-0.634479820728302,
|
| 1167 |
+
-0.5703725814819336,
|
| 1168 |
+
-0.42063236236572266,
|
| 1169 |
+
0.5424582362174988,
|
| 1170 |
+
-0.3817545771598816,
|
| 1171 |
+
-0.34744349122047424,
|
| 1172 |
+
-0.24597947299480438,
|
| 1173 |
+
-0.36885523796081543,
|
| 1174 |
+
-0.4962368905544281,
|
| 1175 |
+
-0.30333632230758667,
|
| 1176 |
+
-0.5365340709686279,
|
| 1177 |
+
0.4581771492958069,
|
| 1178 |
+
0.3692333698272705,
|
| 1179 |
+
-0.6331499218940735,
|
| 1180 |
+
0.37304970622062683,
|
| 1181 |
+
-0.2613667845726013,
|
| 1182 |
+
0.6492074131965637,
|
| 1183 |
+
0.14226311445236206,
|
| 1184 |
+
0.5509650111198425,
|
| 1185 |
+
0.45414191484451294,
|
| 1186 |
+
-0.29219260811805725,
|
| 1187 |
+
0.1414361596107483,
|
| 1188 |
+
-0.24997463822364807,
|
| 1189 |
+
-0.20976391434669495,
|
| 1190 |
+
-0.4982142746448517,
|
| 1191 |
+
0.29630526900291443,
|
| 1192 |
+
0.07064923644065857,
|
| 1193 |
+
-0.4267894923686981,
|
| 1194 |
+
0.3634204566478729,
|
| 1195 |
+
0.017851252108812332,
|
| 1196 |
+
0.5771238207817078,
|
| 1197 |
+
0.20217125117778778,
|
| 1198 |
+
0.39566054940223694,
|
| 1199 |
+
-0.5220259428024292,
|
| 1200 |
+
0.4514642357826233,
|
| 1201 |
+
0.37925097346305847,
|
| 1202 |
+
-0.10530488193035126,
|
| 1203 |
+
-0.2922782003879547,
|
| 1204 |
+
0.08175758272409439,
|
| 1205 |
+
-0.20521482825279236,
|
| 1206 |
+
-0.0306957196444273,
|
| 1207 |
+
0.48851072788238525,
|
| 1208 |
+
-0.10273008048534393,
|
| 1209 |
+
0.42951491475105286,
|
| 1210 |
+
0.02238401770591736,
|
| 1211 |
+
-0.5642263889312744,
|
| 1212 |
+
0.6398353576660156,
|
| 1213 |
+
0.3255603015422821,
|
| 1214 |
+
0.05302750691771507,
|
| 1215 |
+
0.22017233073711395,
|
| 1216 |
+
0.48476746678352356,
|
| 1217 |
+
-0.36019018292427063,
|
| 1218 |
+
-0.3300016522407532,
|
| 1219 |
+
0.4121972918510437,
|
| 1220 |
+
-0.060121260583400726,
|
| 1221 |
+
-0.47367820143699646,
|
| 1222 |
+
0.4820711612701416,
|
| 1223 |
+
-0.3144012987613678,
|
| 1224 |
+
-0.18787987530231476,
|
| 1225 |
+
-0.6451897621154785,
|
| 1226 |
+
0.09151020646095276,
|
| 1227 |
+
0.3710666596889496,
|
| 1228 |
+
0.015813039615750313,
|
| 1229 |
+
0.493587464094162,
|
| 1230 |
+
0.6230376958847046,
|
| 1231 |
+
-0.5254106521606445,
|
| 1232 |
+
-0.6215486526489258,
|
| 1233 |
+
0.6611680388450623,
|
| 1234 |
+
-0.529807448387146,
|
| 1235 |
+
0.31883421540260315,
|
| 1236 |
+
-0.48107075691223145,
|
| 1237 |
+
-0.3159598112106323,
|
| 1238 |
+
0.14964470267295837,
|
| 1239 |
+
0.5351456999778748,
|
| 1240 |
+
-0.2974824905395508,
|
| 1241 |
+
-0.46421006321907043,
|
| 1242 |
+
0.5263380408287048,
|
| 1243 |
+
-0.6271401047706604,
|
| 1244 |
+
0.4400186538696289,
|
| 1245 |
+
-0.17663508653640747,
|
| 1246 |
+
0.26863738894462585,
|
| 1247 |
+
0.6724404096603394,
|
| 1248 |
+
-0.22855490446090698,
|
| 1249 |
+
-0.3761236071586609,
|
| 1250 |
+
0.260640412569046,
|
| 1251 |
+
-0.3002377450466156,
|
| 1252 |
+
-0.5119364857673645,
|
| 1253 |
+
0.19921129941940308,
|
| 1254 |
+
-0.3379356563091278,
|
| 1255 |
+
-0.5390681624412537,
|
| 1256 |
+
0.26380741596221924,
|
| 1257 |
+
-0.7100263237953186,
|
| 1258 |
+
0.7113850712776184,
|
| 1259 |
+
0.23713169991970062,
|
| 1260 |
+
0.6110486388206482,
|
| 1261 |
+
0.19032925367355347,
|
| 1262 |
+
-0.3739713430404663,
|
| 1263 |
+
-0.5558298230171204,
|
| 1264 |
+
0.21515342593193054,
|
| 1265 |
+
0.24163122475147247,
|
| 1266 |
+
-0.4011124074459076,
|
| 1267 |
+
0.6750406622886658,
|
| 1268 |
+
-0.3016811013221741,
|
| 1269 |
+
0.6329986453056335,
|
| 1270 |
+
-0.6256395578384399,
|
| 1271 |
+
-0.4204891324043274,
|
| 1272 |
+
0.3094017207622528,
|
| 1273 |
+
-0.5445554852485657,
|
| 1274 |
+
-0.41654062271118164,
|
| 1275 |
+
0.012857383117079735,
|
| 1276 |
+
-0.1534586399793625,
|
| 1277 |
+
0.5336133241653442,
|
| 1278 |
+
-0.2742224931716919,
|
| 1279 |
+
0.4339938461780548,
|
| 1280 |
+
-0.5819524526596069,
|
| 1281 |
+
-0.4246542751789093,
|
| 1282 |
+
0.5119465589523315,
|
| 1283 |
+
-0.08963221311569214,
|
| 1284 |
+
-0.27624261379241943,
|
| 1285 |
+
0.5424147248268127,
|
| 1286 |
+
-0.5992923378944397,
|
| 1287 |
+
-0.2918991446495056,
|
| 1288 |
+
0.5111084580421448,
|
| 1289 |
+
0.6846715807914734,
|
| 1290 |
+
0.7504979372024536,
|
| 1291 |
+
-0.245253324508667,
|
| 1292 |
+
-0.6776694655418396,
|
| 1293 |
+
-0.07147231698036194,
|
| 1294 |
+
-0.3852207362651825,
|
| 1295 |
+
0.2938641309738159,
|
| 1296 |
+
-0.46525564789772034,
|
| 1297 |
+
-0.5311563014984131,
|
| 1298 |
+
-0.5654810070991516,
|
| 1299 |
+
0.6059191226959229,
|
| 1300 |
+
-0.2312941551208496,
|
| 1301 |
+
0.44127240777015686,
|
| 1302 |
+
-0.23609904944896698,
|
| 1303 |
+
-0.4189485013484955,
|
| 1304 |
+
-0.02442186512053013,
|
| 1305 |
+
-0.08868797868490219,
|
| 1306 |
+
0.44043442606925964,
|
| 1307 |
+
-0.7043417096138,
|
| 1308 |
+
0.6295157074928284,
|
| 1309 |
+
-0.2798103094100952,
|
| 1310 |
+
0.8230570554733276,
|
| 1311 |
+
0.614812970161438,
|
| 1312 |
+
-0.29268983006477356,
|
| 1313 |
+
-0.7184505462646484,
|
| 1314 |
+
-0.39698925614356995,
|
| 1315 |
+
-0.45872190594673157,
|
| 1316 |
+
-0.05979219451546669,
|
| 1317 |
+
-0.3655514121055603,
|
| 1318 |
+
-0.38769295811653137,
|
| 1319 |
+
0.3701415956020355,
|
| 1320 |
+
-0.2648469805717468,
|
| 1321 |
+
0.3112601935863495,
|
| 1322 |
+
-0.42514297366142273,
|
| 1323 |
+
0.262031227350235,
|
| 1324 |
+
0.6487522125244141,
|
| 1325 |
+
-0.8340243697166443,
|
| 1326 |
+
-0.3777776062488556,
|
| 1327 |
+
-0.6580366492271423,
|
| 1328 |
+
-0.7763147354125977,
|
| 1329 |
+
0.3084772527217865,
|
| 1330 |
+
0.47092580795288086,
|
| 1331 |
+
-0.5821054577827454,
|
| 1332 |
+
-0.18236568570137024,
|
| 1333 |
+
0.26621055603027344,
|
| 1334 |
+
0.23267990350723267,
|
| 1335 |
+
-0.40806877613067627,
|
| 1336 |
+
0.33092641830444336,
|
| 1337 |
+
0.5049144625663757,
|
| 1338 |
+
0.5978044867515564,
|
| 1339 |
+
0.09595219790935516,
|
| 1340 |
+
0.13087329268455505,
|
| 1341 |
+
0.3329981863498688,
|
| 1342 |
+
-0.4476466774940491,
|
| 1343 |
+
0.4787166118621826,
|
| 1344 |
+
-0.8050774931907654,
|
| 1345 |
+
-0.3497099280357361,
|
| 1346 |
+
0.40341219305992126,
|
| 1347 |
+
0.16913624107837677,
|
| 1348 |
+
-0.430574506521225,
|
| 1349 |
+
0.1418146789073944,
|
| 1350 |
+
-0.595954418182373,
|
| 1351 |
+
-0.2903168797492981,
|
| 1352 |
+
0.6807904243469238,
|
| 1353 |
+
-0.3185294270515442,
|
| 1354 |
+
-0.21566346287727356,
|
| 1355 |
+
0.19651934504508972,
|
| 1356 |
+
-0.516979992389679,
|
| 1357 |
+
0.44546905159950256,
|
| 1358 |
+
0.045729346573352814,
|
| 1359 |
+
0.3873681128025055,
|
| 1360 |
+
0.5284611582756042,
|
| 1361 |
+
-0.5343829989433289,
|
| 1362 |
+
-0.1261325180530548,
|
| 1363 |
+
-0.1843467652797699,
|
| 1364 |
+
0.6600763201713562,
|
| 1365 |
+
0.37744462490081787,
|
| 1366 |
+
-0.0635499432682991,
|
| 1367 |
+
-0.10794416815042496,
|
| 1368 |
+
-0.0002241041511297226,
|
| 1369 |
+
0.22270141541957855,
|
| 1370 |
+
0.6185049414634705,
|
| 1371 |
+
-0.6216243505477905,
|
| 1372 |
+
0.41236862540245056,
|
| 1373 |
+
0.1597968488931656,
|
| 1374 |
+
-0.40577638149261475,
|
| 1375 |
+
0.049581047147512436,
|
| 1376 |
+
-0.5208377838134766,
|
| 1377 |
+
-0.6065584421157837,
|
| 1378 |
+
0.07122477144002914,
|
| 1379 |
+
0.4274607300758362,
|
| 1380 |
+
-0.3176823854446411,
|
| 1381 |
+
-0.6851423382759094,
|
| 1382 |
+
-0.17077049612998962,
|
| 1383 |
+
-0.4044148027896881,
|
| 1384 |
+
0.3310195803642273,
|
| 1385 |
+
0.6188254356384277,
|
| 1386 |
+
0.24962544441223145,
|
| 1387 |
+
-0.2544820308685303,
|
| 1388 |
+
-0.5683344006538391,
|
| 1389 |
+
0.7191358804702759,
|
| 1390 |
+
0.3987292945384979,
|
| 1391 |
+
-0.29436302185058594,
|
| 1392 |
+
0.24791575968265533,
|
| 1393 |
+
0.4268662929534912,
|
| 1394 |
+
-0.812101423740387,
|
| 1395 |
+
-0.5028775930404663,
|
| 1396 |
+
-0.4908024072647095,
|
| 1397 |
+
-0.31225505471229553,
|
| 1398 |
+
-0.39285531640052795,
|
| 1399 |
+
0.2145087718963623,
|
| 1400 |
+
0.5212684869766235,
|
| 1401 |
+
-0.4105469882488251,
|
| 1402 |
+
-0.32129278779029846,
|
| 1403 |
+
-0.23772810399532318,
|
| 1404 |
+
-0.28639471530914307,
|
| 1405 |
+
0.08771773427724838,
|
| 1406 |
+
0.07542192935943604,
|
| 1407 |
+
-0.017433010041713715,
|
| 1408 |
+
0.0651613101363182,
|
| 1409 |
+
-0.3744242787361145,
|
| 1410 |
+
0.001255915267392993,
|
| 1411 |
+
0.6371977925300598,
|
| 1412 |
+
-0.5604463815689087,
|
| 1413 |
+
0.12174168974161148,
|
| 1414 |
+
0.5265082716941833,
|
| 1415 |
+
0.580610454082489,
|
| 1416 |
+
-0.4659837782382965,
|
| 1417 |
+
0.5650064945220947,
|
| 1418 |
+
-0.5126415491104126,
|
| 1419 |
+
-0.5266972184181213,
|
| 1420 |
+
-0.02548130974173546,
|
| 1421 |
+
-0.5531303882598877,
|
| 1422 |
+
0.7300903797149658,
|
| 1423 |
+
0.3502790033817291,
|
| 1424 |
+
-0.19735898077487946,
|
| 1425 |
+
0.3693282902240753,
|
| 1426 |
+
-0.6501651406288147,
|
| 1427 |
+
0.4646427631378174,
|
| 1428 |
+
0.5543301105499268,
|
| 1429 |
+
-0.30201414227485657,
|
| 1430 |
+
-0.47283875942230225,
|
| 1431 |
+
-0.44695931673049927,
|
| 1432 |
+
-0.39823076128959656,
|
| 1433 |
+
-0.331135094165802,
|
| 1434 |
+
-0.4449721574783325,
|
| 1435 |
+
-0.5523015856742859,
|
| 1436 |
+
0.025226440280675888,
|
| 1437 |
+
-0.4603944718837738,
|
| 1438 |
+
-0.3619481027126312,
|
| 1439 |
+
0.6661345958709717,
|
| 1440 |
+
-0.16382713615894318,
|
| 1441 |
+
0.22786790132522583,
|
| 1442 |
+
0.35439828038215637,
|
| 1443 |
+
-0.3898983597755432,
|
| 1444 |
+
0.5926012396812439,
|
| 1445 |
+
0.6024504899978638,
|
| 1446 |
+
0.21765899658203125,
|
| 1447 |
+
-0.16284504532814026,
|
| 1448 |
+
-0.3862069249153137,
|
| 1449 |
+
0.2501187324523926,
|
| 1450 |
+
-0.08133663982152939,
|
| 1451 |
+
-0.7289565801620483,
|
| 1452 |
+
-0.09309838712215424,
|
| 1453 |
+
-0.14477242529392242,
|
| 1454 |
+
0.48450803756713867,
|
| 1455 |
+
0.4594329297542572,
|
| 1456 |
+
0.006138231139630079,
|
| 1457 |
+
-0.4999004602432251,
|
| 1458 |
+
0.2860872447490692,
|
| 1459 |
+
0.09353700280189514,
|
| 1460 |
+
0.15789562463760376,
|
| 1461 |
+
0.5243611335754395,
|
| 1462 |
+
-0.6703538298606873,
|
| 1463 |
+
0.3256537616252899,
|
| 1464 |
+
-0.1973860114812851,
|
| 1465 |
+
0.49629539251327515,
|
| 1466 |
+
0.3557225167751312,
|
| 1467 |
+
-0.6070427894592285,
|
| 1468 |
+
-0.2587185502052307,
|
| 1469 |
+
0.6013321876525879,
|
| 1470 |
+
-0.21388165652751923,
|
| 1471 |
+
0.27553173899650574,
|
| 1472 |
+
0.4662202298641205,
|
| 1473 |
+
-0.2665696442127228,
|
| 1474 |
+
-0.03399352729320526,
|
| 1475 |
+
0.259753942489624,
|
| 1476 |
+
-0.33015790581703186,
|
| 1477 |
+
-0.296721488237381,
|
| 1478 |
+
-0.5230078101158142,
|
| 1479 |
+
-0.4484809637069702,
|
| 1480 |
+
0.24322441220283508,
|
| 1481 |
+
-0.4481692314147949,
|
| 1482 |
+
-0.11759919673204422,
|
| 1483 |
+
0.5892905592918396,
|
| 1484 |
+
-0.3177355229854584,
|
| 1485 |
+
0.35668259859085083,
|
| 1486 |
+
0.40587493777275085,
|
| 1487 |
+
0.5350204706192017,
|
| 1488 |
+
-0.4253546893596649,
|
| 1489 |
+
0.4767685830593109,
|
| 1490 |
+
-0.23908862471580505,
|
| 1491 |
+
-0.5818323493003845,
|
| 1492 |
+
-0.47033533453941345,
|
| 1493 |
+
-0.13237595558166504,
|
| 1494 |
+
-0.3849073052406311,
|
| 1495 |
+
-0.09731189161539078,
|
| 1496 |
+
-0.4081884026527405,
|
| 1497 |
+
0.2294994294643402,
|
| 1498 |
+
-0.00451787281781435,
|
| 1499 |
+
-0.0033397148363292217,
|
| 1500 |
+
0.3084481358528137,
|
| 1501 |
+
-0.5034567713737488,
|
| 1502 |
+
-0.5140432119369507,
|
| 1503 |
+
-0.5681009292602539,
|
| 1504 |
+
0.3150945007801056,
|
| 1505 |
+
0.6291296482086182,
|
| 1506 |
+
-0.38377049565315247,
|
| 1507 |
+
0.5602982044219971,
|
| 1508 |
+
0.5160306692123413,
|
| 1509 |
+
-0.32025274634361267,
|
| 1510 |
+
0.5780768394470215,
|
| 1511 |
+
-0.23512595891952515,
|
| 1512 |
+
-0.4884661138057709,
|
| 1513 |
+
-0.13480080664157867,
|
| 1514 |
+
0.26555335521698,
|
| 1515 |
+
-0.5860243439674377,
|
| 1516 |
+
-0.567520797252655,
|
| 1517 |
+
0.4778851568698883,
|
| 1518 |
+
0.331341952085495,
|
| 1519 |
+
-0.48603272438049316,
|
| 1520 |
+
0.6391537189483643,
|
| 1521 |
+
0.5108295679092407,
|
| 1522 |
+
-0.5969434976577759,
|
| 1523 |
+
-0.0065856981091201305,
|
| 1524 |
+
-0.2848271131515503,
|
| 1525 |
+
-0.2556472718715668,
|
| 1526 |
+
-0.3502233922481537,
|
| 1527 |
+
0.5650025606155396,
|
| 1528 |
+
0.5705208778381348,
|
| 1529 |
+
-0.48064252734184265,
|
| 1530 |
+
0.28450024127960205,
|
| 1531 |
+
0.45592421293258667,
|
| 1532 |
+
-0.24283505976200104,
|
| 1533 |
+
0.3628832697868347,
|
| 1534 |
+
-0.537107527256012,
|
| 1535 |
+
-0.3009094297885895,
|
| 1536 |
+
0.1435806304216385,
|
| 1537 |
+
0.2973416745662689,
|
| 1538 |
+
0.3000403344631195,
|
| 1539 |
+
0.14843465387821198,
|
| 1540 |
+
0.6331756711006165,
|
| 1541 |
+
-0.8105208277702332,
|
| 1542 |
+
0.6428540349006653,
|
| 1543 |
+
-0.5015450119972229,
|
| 1544 |
+
0.585994303226471,
|
| 1545 |
+
0.3610047996044159,
|
| 1546 |
+
0.19323234260082245,
|
| 1547 |
+
-0.35460948944091797,
|
| 1548 |
+
-0.4039037227630615,
|
| 1549 |
+
0.38896507024765015,
|
| 1550 |
+
-0.536838710308075,
|
| 1551 |
+
-0.3164752125740051,
|
| 1552 |
+
-0.2043737918138504,
|
| 1553 |
+
-0.07109805941581726,
|
| 1554 |
+
0.059553660452365875,
|
| 1555 |
+
-0.24188177287578583,
|
| 1556 |
+
-0.5634654760360718,
|
| 1557 |
+
0.15655209124088287,
|
| 1558 |
+
0.4238407611846924,
|
| 1559 |
+
0.14595751464366913,
|
| 1560 |
+
-0.10296721011400223,
|
| 1561 |
+
0.38230571150779724,
|
| 1562 |
+
-0.28457918763160706,
|
| 1563 |
+
0.5762684345245361,
|
| 1564 |
+
-0.6562983393669128,
|
| 1565 |
+
0.09346769750118256,
|
| 1566 |
+
0.6954041123390198,
|
| 1567 |
+
0.29474541544914246,
|
| 1568 |
+
-0.1399531066417694,
|
| 1569 |
+
-0.6600004434585571,
|
| 1570 |
+
-0.6112341284751892,
|
| 1571 |
+
-0.10551806539297104,
|
| 1572 |
+
0.375020295381546,
|
| 1573 |
+
-0.6612086892127991,
|
| 1574 |
+
-0.4609551429748535,
|
| 1575 |
+
0.5355013608932495,
|
| 1576 |
+
0.6289262175559998,
|
| 1577 |
+
0.5566124320030212,
|
| 1578 |
+
0.42343708872795105,
|
| 1579 |
+
0.23909102380275726,
|
| 1580 |
+
0.3759506046772003,
|
| 1581 |
+
-0.6171351671218872,
|
| 1582 |
+
0.02336261048913002,
|
| 1583 |
+
0.12490686774253845,
|
| 1584 |
+
-0.5330260992050171,
|
| 1585 |
+
0.20627610385417938,
|
| 1586 |
+
0.43712615966796875,
|
| 1587 |
+
-0.2231852412223816,
|
| 1588 |
+
0.4220152199268341,
|
| 1589 |
+
-0.2680485248565674,
|
| 1590 |
+
0.3509346842765808,
|
| 1591 |
+
-0.264874130487442,
|
| 1592 |
+
0.4431266486644745,
|
| 1593 |
+
0.08768787980079651,
|
| 1594 |
+
0.4680672883987427,
|
| 1595 |
+
0.5259952545166016,
|
| 1596 |
+
0.7430881857872009,
|
| 1597 |
+
-0.088637575507164,
|
| 1598 |
+
-0.15696024894714355,
|
| 1599 |
+
0.1818857043981552,
|
| 1600 |
+
-0.6777862906455994,
|
| 1601 |
+
-0.6387791037559509,
|
| 1602 |
+
0.11267044395208359,
|
| 1603 |
+
0.40609756112098694,
|
| 1604 |
+
-0.7288401126861572,
|
| 1605 |
+
0.28566256165504456,
|
| 1606 |
+
0.8961007595062256,
|
| 1607 |
+
-0.41366830468177795,
|
| 1608 |
+
-0.01137426309287548,
|
| 1609 |
+
-0.6116126179695129,
|
| 1610 |
+
-0.5873274207115173,
|
| 1611 |
+
0.8039853572845459,
|
| 1612 |
+
0.5238677263259888,
|
| 1613 |
+
0.627322793006897,
|
| 1614 |
+
-0.30294591188430786,
|
| 1615 |
+
0.3690156042575836,
|
| 1616 |
+
0.1990407407283783,
|
| 1617 |
+
-0.3586515784263611,
|
| 1618 |
+
0.31159451603889465,
|
| 1619 |
+
0.5810842514038086,
|
| 1620 |
+
-0.42150405049324036,
|
| 1621 |
+
0.5331746935844421,
|
| 1622 |
+
-0.007083773147314787,
|
| 1623 |
+
-0.7303491830825806,
|
| 1624 |
+
-0.130608931183815,
|
| 1625 |
+
0.3361595869064331,
|
| 1626 |
+
0.45849668979644775,
|
| 1627 |
+
0.5759662985801697,
|
| 1628 |
+
-0.3778841495513916,
|
| 1629 |
+
0.33967170119285583,
|
| 1630 |
+
0.4483658969402313,
|
| 1631 |
+
0.4283217489719391,
|
| 1632 |
+
-0.13051319122314453,
|
| 1633 |
+
-0.567672073841095,
|
| 1634 |
+
-0.1505625993013382,
|
| 1635 |
+
0.5552942752838135,
|
| 1636 |
+
0.5884599685668945,
|
| 1637 |
+
-0.07561260461807251,
|
| 1638 |
+
0.3589589297771454,
|
| 1639 |
+
-0.5309117436408997,
|
| 1640 |
+
0.25145286321640015,
|
| 1641 |
+
-0.03258868306875229,
|
| 1642 |
+
-0.4362887442111969,
|
| 1643 |
+
-0.22799895703792572,
|
| 1644 |
+
-0.6275490522384644,
|
| 1645 |
+
0.4849860668182373,
|
| 1646 |
+
-0.025979941710829735,
|
| 1647 |
+
0.22708173096179962,
|
| 1648 |
+
0.6644428372383118,
|
| 1649 |
+
-0.5695757865905762,
|
| 1650 |
+
0.08982725441455841,
|
| 1651 |
+
-0.4195552170276642,
|
| 1652 |
+
0.10517806559801102,
|
| 1653 |
+
-0.4226057827472687,
|
| 1654 |
+
0.4714082181453705,
|
| 1655 |
+
0.6985716819763184,
|
| 1656 |
+
0.0006538079469464719,
|
| 1657 |
+
-0.448317289352417,
|
| 1658 |
+
0.5904045701026917,
|
| 1659 |
+
0.3350187838077545,
|
| 1660 |
+
0.14181968569755554,
|
| 1661 |
+
-0.5558332800865173,
|
| 1662 |
+
-0.6289500594139099,
|
| 1663 |
+
-0.5208578705787659,
|
| 1664 |
+
0.285884290933609,
|
| 1665 |
+
0.6213005781173706,
|
| 1666 |
+
0.597499668598175,
|
| 1667 |
+
-0.05058666318655014,
|
| 1668 |
+
0.0651242807507515,
|
| 1669 |
+
0.1600625216960907,
|
| 1670 |
+
0.3476071357727051,
|
| 1671 |
+
0.6439316868782043,
|
| 1672 |
+
0.25930044054985046,
|
| 1673 |
+
-0.38758036494255066,
|
| 1674 |
+
-0.6922540068626404,
|
| 1675 |
+
-0.2964532971382141,
|
| 1676 |
+
-0.3088078796863556,
|
| 1677 |
+
0.3672376275062561,
|
| 1678 |
+
-0.16195623576641083,
|
| 1679 |
+
-0.4334561824798584,
|
| 1680 |
+
0.5793628692626953,
|
| 1681 |
+
0.3117627799510956,
|
| 1682 |
+
-0.15734943747520447,
|
| 1683 |
+
-0.7649829983711243,
|
| 1684 |
+
-0.5475243330001831,
|
| 1685 |
+
0.5346915125846863,
|
| 1686 |
+
-0.36272743344306946,
|
| 1687 |
+
0.3564032316207886,
|
| 1688 |
+
0.533324122428894,
|
| 1689 |
+
0.42281702160835266,
|
| 1690 |
+
-0.28033384680747986,
|
| 1691 |
+
-0.4088839888572693,
|
| 1692 |
+
-0.2303830087184906,
|
| 1693 |
+
-0.23751872777938843,
|
| 1694 |
+
0.041421279311180115,
|
| 1695 |
+
0.5180373787879944,
|
| 1696 |
+
0.7062609791755676,
|
| 1697 |
+
-0.542513906955719,
|
| 1698 |
+
-0.4302293062210083,
|
| 1699 |
+
0.20035797357559204,
|
| 1700 |
+
-0.08692830801010132,
|
| 1701 |
+
0.25010326504707336,
|
| 1702 |
+
0.7066624164581299,
|
| 1703 |
+
-0.10798093676567078,
|
| 1704 |
+
-0.25053149461746216,
|
| 1705 |
+
-0.17489944398403168,
|
| 1706 |
+
-0.4802313446998596,
|
| 1707 |
+
-0.48023828864097595,
|
| 1708 |
+
-0.814469575881958,
|
| 1709 |
+
0.37388914823532104,
|
| 1710 |
+
0.6281175017356873,
|
| 1711 |
+
0.6759769320487976,
|
| 1712 |
+
-0.5401461720466614,
|
| 1713 |
+
-0.10508890450000763,
|
| 1714 |
+
0.07514649629592896,
|
| 1715 |
+
-0.4732096195220947,
|
| 1716 |
+
0.1317974030971527,
|
| 1717 |
+
0.1791929453611374,
|
| 1718 |
+
0.14001530408859253,
|
| 1719 |
+
0.06956925243139267,
|
| 1720 |
+
0.2839416265487671,
|
| 1721 |
+
0.29040631651878357,
|
| 1722 |
+
0.504808247089386,
|
| 1723 |
+
-0.5646824240684509,
|
| 1724 |
+
-0.2524738013744354,
|
| 1725 |
+
-0.4599587917327881,
|
| 1726 |
+
0.08754394203424454,
|
| 1727 |
+
-0.3513955771923065,
|
| 1728 |
+
0.22336141765117645,
|
| 1729 |
+
0.7614261507987976,
|
| 1730 |
+
-0.18434885144233704,
|
| 1731 |
+
-0.3153497874736786,
|
| 1732 |
+
-0.5770508646965027,
|
| 1733 |
+
-0.43566399812698364,
|
| 1734 |
+
-0.29947298765182495,
|
| 1735 |
+
0.5062375664710999,
|
| 1736 |
+
0.023155812174081802,
|
| 1737 |
+
-0.6824156641960144,
|
| 1738 |
+
0.6973771452903748,
|
| 1739 |
+
0.47541025280952454,
|
| 1740 |
+
0.5671731233596802,
|
| 1741 |
+
-0.09654698520898819,
|
| 1742 |
+
0.4690018892288208,
|
| 1743 |
+
-0.38557863235473633,
|
| 1744 |
+
0.3489590585231781,
|
| 1745 |
+
0.5635160207748413,
|
| 1746 |
+
-0.4245689809322357,
|
| 1747 |
+
0.4814533591270447,
|
| 1748 |
+
0.46730050444602966,
|
| 1749 |
+
-0.3316380977630615,
|
| 1750 |
+
-0.32189619541168213,
|
| 1751 |
+
0.2787921726703644,
|
| 1752 |
+
0.2366294413805008,
|
| 1753 |
+
-0.002128796186298132,
|
| 1754 |
+
0.0287551861256361,
|
| 1755 |
+
0.6690114140510559,
|
| 1756 |
+
-0.5146788358688354,
|
| 1757 |
+
0.3941262662410736,
|
| 1758 |
+
0.5120462775230408,
|
| 1759 |
+
-0.7658915519714355,
|
| 1760 |
+
0.40105944871902466,
|
| 1761 |
+
0.01692848466336727,
|
| 1762 |
+
0.3542935848236084,
|
| 1763 |
+
0.5126014351844788,
|
| 1764 |
+
-0.4018067419528961,
|
| 1765 |
+
0.4152436852455139,
|
| 1766 |
+
0.05601850897073746,
|
| 1767 |
+
0.13929006457328796,
|
| 1768 |
+
0.24814122915267944,
|
| 1769 |
+
-0.5372462868690491,
|
| 1770 |
+
-0.3253263831138611,
|
| 1771 |
+
0.5030489563941956,
|
| 1772 |
+
0.4511641263961792,
|
| 1773 |
+
-0.5183212161064148,
|
| 1774 |
+
0.13135740160942078,
|
| 1775 |
+
0.04129188135266304,
|
| 1776 |
+
0.21124593913555145,
|
| 1777 |
+
-0.3409647047519684,
|
| 1778 |
+
-0.415905237197876,
|
| 1779 |
+
-0.15260761976242065,
|
| 1780 |
+
-0.5333403944969177,
|
| 1781 |
+
-0.48056522011756897,
|
| 1782 |
+
-0.40028244256973267,
|
| 1783 |
+
-0.43734610080718994,
|
| 1784 |
+
-0.2133392095565796,
|
| 1785 |
+
-0.29550036787986755,
|
| 1786 |
+
0.5717685222625732,
|
| 1787 |
+
0.7785221934318542,
|
| 1788 |
+
0.4324593245983124,
|
| 1789 |
+
-0.5249910950660706,
|
| 1790 |
+
0.4615764021873474,
|
| 1791 |
+
0.4814251661300659,
|
| 1792 |
+
-0.414835125207901,
|
| 1793 |
+
-0.6916537880897522,
|
| 1794 |
+
-0.5298791527748108,
|
| 1795 |
+
-0.9781942367553711,
|
| 1796 |
+
0.43843767046928406,
|
| 1797 |
+
-0.16492238640785217,
|
| 1798 |
+
0.7092018723487854,
|
| 1799 |
+
-0.2542411684989929,
|
| 1800 |
+
0.42584559321403503,
|
| 1801 |
+
0.4929214119911194,
|
| 1802 |
+
0.7086622714996338,
|
| 1803 |
+
-0.28084853291511536,
|
| 1804 |
+
-0.34635114669799805,
|
| 1805 |
+
0.5568549036979675,
|
| 1806 |
+
-0.1549905240535736,
|
| 1807 |
+
-0.16537271440029144,
|
| 1808 |
+
-0.050287213176488876,
|
| 1809 |
+
0.213552787899971,
|
| 1810 |
+
0.6236043572425842,
|
| 1811 |
+
-0.30276042222976685,
|
| 1812 |
+
-0.5958431959152222,
|
| 1813 |
+
0.6351655125617981,
|
| 1814 |
+
0.23172463476657867,
|
| 1815 |
+
0.5608846545219421,
|
| 1816 |
+
0.26491817831993103,
|
| 1817 |
+
-0.316093772649765,
|
| 1818 |
+
-0.1831120401620865,
|
| 1819 |
+
0.8002948760986328,
|
| 1820 |
+
0.04656974598765373,
|
| 1821 |
+
0.2370678186416626,
|
| 1822 |
+
0.22652243077754974,
|
| 1823 |
+
-0.7128554582595825,
|
| 1824 |
+
-0.8337548971176147,
|
| 1825 |
+
-0.16446147859096527,
|
| 1826 |
+
-0.3271506726741791,
|
| 1827 |
+
0.41788023710250854,
|
| 1828 |
+
-0.33075541257858276,
|
| 1829 |
+
-0.6836495995521545,
|
| 1830 |
+
-0.17264102399349213,
|
| 1831 |
+
0.3705328702926636,
|
| 1832 |
+
0.4749191403388977,
|
| 1833 |
+
0.1391599327325821,
|
| 1834 |
+
-0.5449556112289429,
|
| 1835 |
+
-0.5832648873329163,
|
| 1836 |
+
0.3470316231250763,
|
| 1837 |
+
-0.43681544065475464,
|
| 1838 |
+
-0.46869179606437683,
|
| 1839 |
+
0.7697038650512695,
|
| 1840 |
+
0.15680909156799316,
|
| 1841 |
+
-0.5450631380081177,
|
| 1842 |
+
-0.6293807029724121,
|
| 1843 |
+
-0.41992709040641785,
|
| 1844 |
+
-0.5036922693252563,
|
| 1845 |
+
0.5164766311645508,
|
| 1846 |
+
-0.31142181158065796,
|
| 1847 |
+
-0.702892541885376,
|
| 1848 |
+
-0.18341974914073944,
|
| 1849 |
+
-0.4195866286754608,
|
| 1850 |
+
-0.2083660513162613,
|
| 1851 |
+
-0.6964157819747925,
|
| 1852 |
+
0.5260657668113708,
|
| 1853 |
+
0.8384340405464172,
|
| 1854 |
+
-0.2592344582080841,
|
| 1855 |
+
0.3397483229637146,
|
| 1856 |
+
-0.3004448413848877,
|
| 1857 |
+
0.4325181245803833,
|
| 1858 |
+
-0.8016352653503418,
|
| 1859 |
+
-0.43784213066101074,
|
| 1860 |
+
0.5688702464103699,
|
| 1861 |
+
-0.75948166847229,
|
| 1862 |
+
0.6093763113021851,
|
| 1863 |
+
-0.5252845287322998,
|
| 1864 |
+
-0.39608830213546753,
|
| 1865 |
+
0.6188247799873352,
|
| 1866 |
+
0.6929423809051514,
|
| 1867 |
+
-0.7569720149040222,
|
| 1868 |
+
-0.4368495047092438,
|
| 1869 |
+
-0.07049106806516647,
|
| 1870 |
+
0.23626691102981567,
|
| 1871 |
+
0.7666605710983276,
|
| 1872 |
+
-0.5498153567314148,
|
| 1873 |
+
-0.09556187689304352,
|
| 1874 |
+
0.04998994991183281,
|
| 1875 |
+
0.6980904936790466,
|
| 1876 |
+
-0.4719732999801636,
|
| 1877 |
+
0.3808833658695221,
|
| 1878 |
+
0.17173363268375397,
|
| 1879 |
+
0.5301147103309631,
|
| 1880 |
+
0.018489066511392593,
|
| 1881 |
+
0.4967963695526123,
|
| 1882 |
+
-0.35475456714630127,
|
| 1883 |
+
-0.5022993087768555,
|
| 1884 |
+
-0.44733163714408875,
|
| 1885 |
+
0.08119704574346542,
|
| 1886 |
+
0.5238443613052368,
|
| 1887 |
+
-0.12852875888347626,
|
| 1888 |
+
0.6751067042350769,
|
| 1889 |
+
-0.18058136105537415,
|
| 1890 |
+
-0.6614764332771301,
|
| 1891 |
+
0.05523592233657837,
|
| 1892 |
+
0.5554388761520386,
|
| 1893 |
+
0.22215212881565094,
|
| 1894 |
+
0.6175872087478638,
|
| 1895 |
+
0.2960164546966553,
|
| 1896 |
+
-0.19046010076999664,
|
| 1897 |
+
-0.17398317158222198,
|
| 1898 |
+
0.2275778204202652,
|
| 1899 |
+
0.1352202594280243,
|
| 1900 |
+
0.6905826330184937,
|
| 1901 |
+
-0.5913413763046265,
|
| 1902 |
+
0.3991498053073883,
|
| 1903 |
+
-0.7693127393722534,
|
| 1904 |
+
-0.9064828157424927,
|
| 1905 |
+
0.024206487461924553,
|
| 1906 |
+
-0.5105448365211487,
|
| 1907 |
+
0.3440760374069214,
|
| 1908 |
+
0.08142603188753128,
|
| 1909 |
+
-0.7207233905792236,
|
| 1910 |
+
-0.581031858921051,
|
| 1911 |
+
0.6479102969169617,
|
| 1912 |
+
0.04334093630313873,
|
| 1913 |
+
-0.30378004908561707,
|
| 1914 |
+
-0.4127667546272278,
|
| 1915 |
+
0.6746240854263306,
|
| 1916 |
+
0.050040654838085175,
|
| 1917 |
+
-0.3975379467010498,
|
| 1918 |
+
0.26459383964538574,
|
| 1919 |
+
0.6994006037712097,
|
| 1920 |
+
-0.44536566734313965,
|
| 1921 |
+
-0.6420013904571533,
|
| 1922 |
+
0.5272977948188782,
|
| 1923 |
+
-0.4972582757472992,
|
| 1924 |
+
0.30368050932884216,
|
| 1925 |
+
0.05429714173078537,
|
| 1926 |
+
0.283643513917923,
|
| 1927 |
+
-0.34861692786216736,
|
| 1928 |
+
-0.6315703392028809,
|
| 1929 |
+
0.09768600761890411,
|
| 1930 |
+
0.5355572700500488,
|
| 1931 |
+
0.3888274133205414,
|
| 1932 |
+
-0.32823553681373596,
|
| 1933 |
+
0.5622992515563965,
|
| 1934 |
+
0.00037535018054768443,
|
| 1935 |
+
-0.10881635546684265,
|
| 1936 |
+
-0.35476061701774597,
|
| 1937 |
+
0.5007027387619019,
|
| 1938 |
+
0.34218084812164307,
|
| 1939 |
+
0.7894691228866577,
|
| 1940 |
+
0.3980063199996948,
|
| 1941 |
+
-0.48286494612693787,
|
| 1942 |
+
0.6152166128158569,
|
| 1943 |
+
-0.13069315254688263,
|
| 1944 |
+
0.7056953310966492,
|
| 1945 |
+
-0.1718815118074417,
|
| 1946 |
+
0.4852822721004486,
|
| 1947 |
+
-0.23409131169319153,
|
| 1948 |
+
-0.5914760231971741,
|
| 1949 |
+
-0.13249142467975616,
|
| 1950 |
+
-0.2958221137523651,
|
| 1951 |
+
-0.1889641284942627,
|
| 1952 |
+
-0.1702418476343155,
|
| 1953 |
+
-0.6497222185134888,
|
| 1954 |
+
0.43457621335983276,
|
| 1955 |
+
-0.3974471986293793,
|
| 1956 |
+
-0.3153226673603058,
|
| 1957 |
+
-0.27306753396987915,
|
| 1958 |
+
-0.6676968932151794,
|
| 1959 |
+
0.4435681402683258,
|
| 1960 |
+
0.7421004772186279,
|
| 1961 |
+
0.898250937461853,
|
| 1962 |
+
0.5075480341911316,
|
| 1963 |
+
0.34645119309425354,
|
| 1964 |
+
-0.3892960846424103,
|
| 1965 |
+
0.24199649691581726,
|
| 1966 |
+
-0.09604883193969727,
|
| 1967 |
+
-0.6230077147483826,
|
| 1968 |
+
0.004666227847337723,
|
| 1969 |
+
0.35588639974594116,
|
| 1970 |
+
-0.19468386471271515,
|
| 1971 |
+
-0.3568110167980194,
|
| 1972 |
+
0.45404884219169617,
|
| 1973 |
+
-0.3219132721424103,
|
| 1974 |
+
-0.3362879753112793,
|
| 1975 |
+
-0.26973214745521545,
|
| 1976 |
+
-0.31137168407440186,
|
| 1977 |
+
-0.15835611522197723,
|
| 1978 |
+
-0.48432013392448425,
|
| 1979 |
+
0.6654230952262878,
|
| 1980 |
+
0.42798832058906555,
|
| 1981 |
+
-0.42348819971084595,
|
| 1982 |
+
0.5631161332130432,
|
| 1983 |
+
0.4840729236602783,
|
| 1984 |
+
-0.44726112484931946,
|
| 1985 |
+
-0.0321044884622097,
|
| 1986 |
+
0.5132392048835754,
|
| 1987 |
+
-0.0316803939640522,
|
| 1988 |
+
-0.08635670691728592,
|
| 1989 |
+
-0.5747225284576416,
|
| 1990 |
+
0.4643561840057373,
|
| 1991 |
+
0.12942247092723846,
|
| 1992 |
+
-0.5961591005325317,
|
| 1993 |
+
-0.7048725485801697,
|
| 1994 |
+
0.6244539022445679,
|
| 1995 |
+
-0.2646646201610565,
|
| 1996 |
+
0.511993944644928,
|
| 1997 |
+
-0.1782059520483017,
|
| 1998 |
+
-0.476296991109848,
|
| 1999 |
+
0.4509793817996979,
|
| 2000 |
+
0.5829113125801086,
|
| 2001 |
+
0.3998103439807892,
|
| 2002 |
+
0.3810572624206543,
|
| 2003 |
+
0.41784316301345825,
|
| 2004 |
+
0.7890206575393677,
|
| 2005 |
+
-0.43540871143341064,
|
| 2006 |
+
0.3865264356136322,
|
| 2007 |
+
-0.34199434518814087,
|
| 2008 |
+
0.39215153455734253,
|
| 2009 |
+
0.49108052253723145,
|
| 2010 |
+
-0.6903269290924072,
|
| 2011 |
+
-0.43151429295539856,
|
| 2012 |
+
0.41944727301597595,
|
| 2013 |
+
0.4959307909011841,
|
| 2014 |
+
-0.38634493947029114,
|
| 2015 |
+
-0.06019069626927376,
|
| 2016 |
+
-0.6517764329910278,
|
| 2017 |
+
-0.5308097004890442,
|
| 2018 |
+
-0.6533023118972778,
|
| 2019 |
+
0.6312675476074219,
|
| 2020 |
+
-0.7227610945701599,
|
| 2021 |
+
-0.27052104473114014,
|
| 2022 |
+
-0.3082827925682068,
|
| 2023 |
+
-0.10922528058290482,
|
| 2024 |
+
-0.21197618544101715,
|
| 2025 |
+
-0.16172805428504944,
|
| 2026 |
+
-0.5405601859092712,
|
| 2027 |
+
-0.2898384630680084,
|
| 2028 |
+
0.4028785228729248,
|
| 2029 |
+
-0.3429325520992279,
|
| 2030 |
+
0.08492431044578552,
|
| 2031 |
+
0.5002052187919617,
|
| 2032 |
+
-0.3180886209011078,
|
| 2033 |
+
-0.3115167021751404,
|
| 2034 |
+
0.5471441745758057,
|
| 2035 |
+
-0.51177579164505,
|
| 2036 |
+
-0.6650250554084778,
|
| 2037 |
+
0.502768874168396,
|
| 2038 |
+
0.610641598701477,
|
| 2039 |
+
-0.7797952890396118
|
| 2040 |
+
]
|
| 2041 |
+
},
|
| 2042 |
+
"b2": {
|
| 2043 |
+
"shape": [
|
| 2044 |
+
1,
|
| 2045 |
+
32
|
| 2046 |
+
],
|
| 2047 |
+
"data": [
|
| 2048 |
+
0.11029242724180222,
|
| 2049 |
+
-0.08818363398313522,
|
| 2050 |
+
0.21428751945495605,
|
| 2051 |
+
-0.26356834173202515,
|
| 2052 |
+
-0.0757112130522728,
|
| 2053 |
+
0.21244093775749207,
|
| 2054 |
+
0.08072414994239807,
|
| 2055 |
+
-0.15003493428230286,
|
| 2056 |
+
0.34987780451774597,
|
| 2057 |
+
-0.0707574412226677,
|
| 2058 |
+
0.18416622281074524,
|
| 2059 |
+
-0.02180960215628147,
|
| 2060 |
+
0.13338498771190643,
|
| 2061 |
+
0.07643681019544601,
|
| 2062 |
+
0.0541238933801651,
|
| 2063 |
+
-0.2533218264579773,
|
| 2064 |
+
0.12554669380187988,
|
| 2065 |
+
-0.04735559970140457,
|
| 2066 |
+
-0.08126572519540787,
|
| 2067 |
+
-0.008954617194831371,
|
| 2068 |
+
0.24354955554008484,
|
| 2069 |
+
-0.12422681599855423,
|
| 2070 |
+
0.18584653735160828,
|
| 2071 |
+
-0.29332807660102844,
|
| 2072 |
+
-0.1264396607875824,
|
| 2073 |
+
0.03589838370680809,
|
| 2074 |
+
0.20483575761318207,
|
| 2075 |
+
-0.028695637360215187,
|
| 2076 |
+
0.050322018563747406,
|
| 2077 |
+
-0.038248296827077866,
|
| 2078 |
+
-0.028875255957245827,
|
| 2079 |
+
-0.15547749400138855
|
| 2080 |
+
]
|
| 2081 |
+
},
|
| 2082 |
+
"wo": {
|
| 2083 |
+
"shape": [
|
| 2084 |
+
32,
|
| 2085 |
+
22
|
| 2086 |
+
],
|
| 2087 |
+
"data": [
|
| 2088 |
+
0.2762174606323242,
|
| 2089 |
+
0.38260236382484436,
|
| 2090 |
+
0.6634435653686523,
|
| 2091 |
+
0.6160672307014465,
|
| 2092 |
+
0.618087112903595,
|
| 2093 |
+
0.4818056523799896,
|
| 2094 |
+
0.2630511522293091,
|
| 2095 |
+
0.17242300510406494,
|
| 2096 |
+
-0.5038496255874634,
|
| 2097 |
+
0.46820735931396484,
|
| 2098 |
+
-0.5860238075256348,
|
| 2099 |
+
-0.4638080894947052,
|
| 2100 |
+
0.04449983313679695,
|
| 2101 |
+
-0.6682363748550415,
|
| 2102 |
+
0.48581254482269287,
|
| 2103 |
+
-0.6896366477012634,
|
| 2104 |
+
-0.3773996829986572,
|
| 2105 |
+
-0.8340221047401428,
|
| 2106 |
+
-0.46437785029411316,
|
| 2107 |
+
-0.34659188985824585,
|
| 2108 |
+
-0.41334599256515503,
|
| 2109 |
+
-0.5741592049598694,
|
| 2110 |
+
0.540574312210083,
|
| 2111 |
+
0.3167288303375244,
|
| 2112 |
+
-0.5873416066169739,
|
| 2113 |
+
0.5378468632698059,
|
| 2114 |
+
-0.6735031604766846,
|
| 2115 |
+
-0.5706233382225037,
|
| 2116 |
+
-0.7310205101966858,
|
| 2117 |
+
0.15331706404685974,
|
| 2118 |
+
-0.6116790175437927,
|
| 2119 |
+
-0.6461313962936401,
|
| 2120 |
+
0.48966002464294434,
|
| 2121 |
+
-0.41905346512794495,
|
| 2122 |
+
0.5812327861785889,
|
| 2123 |
+
0.47562021017074585,
|
| 2124 |
+
-0.5833849906921387,
|
| 2125 |
+
0.30892935395240784,
|
| 2126 |
+
0.879585862159729,
|
| 2127 |
+
0.7100825309753418,
|
| 2128 |
+
-0.7786852121353149,
|
| 2129 |
+
-0.396296888589859,
|
| 2130 |
+
0.4688151478767395,
|
| 2131 |
+
-0.5761070847511292,
|
| 2132 |
+
0.3663385510444641,
|
| 2133 |
+
0.5172922611236572,
|
| 2134 |
+
0.5905728340148926,
|
| 2135 |
+
-0.4988265335559845,
|
| 2136 |
+
-0.5703363418579102,
|
| 2137 |
+
-0.6751488447189331,
|
| 2138 |
+
0.6445662975311279,
|
| 2139 |
+
-0.4882478713989258,
|
| 2140 |
+
-0.7962093353271484,
|
| 2141 |
+
0.5388670563697815,
|
| 2142 |
+
0.5973828434944153,
|
| 2143 |
+
-0.4852631092071533,
|
| 2144 |
+
0.5018942952156067,
|
| 2145 |
+
0.5644686222076416,
|
| 2146 |
+
0.5871429443359375,
|
| 2147 |
+
-0.6652399301528931,
|
| 2148 |
+
-0.7051059603691101,
|
| 2149 |
+
-0.6356050372123718,
|
| 2150 |
+
0.7077520489692688,
|
| 2151 |
+
-0.6082721948623657,
|
| 2152 |
+
0.5385633111000061,
|
| 2153 |
+
-0.4855056405067444,
|
| 2154 |
+
-0.44983747601509094,
|
| 2155 |
+
-0.4362034201622009,
|
| 2156 |
+
-0.5738614797592163,
|
| 2157 |
+
0.6923324465751648,
|
| 2158 |
+
0.4645172357559204,
|
| 2159 |
+
-0.54719477891922,
|
| 2160 |
+
0.7204819917678833,
|
| 2161 |
+
-0.4316576421260834,
|
| 2162 |
+
0.9733572602272034,
|
| 2163 |
+
0.6341553330421448,
|
| 2164 |
+
-0.3463224470615387,
|
| 2165 |
+
-0.4671844244003296,
|
| 2166 |
+
-0.14754365384578705,
|
| 2167 |
+
0.5878990292549133,
|
| 2168 |
+
0.5936049818992615,
|
| 2169 |
+
-0.3043825626373291,
|
| 2170 |
+
-0.5673109292984009,
|
| 2171 |
+
-0.5464169383049011,
|
| 2172 |
+
-1.4350059032440186,
|
| 2173 |
+
1.1843616962432861,
|
| 2174 |
+
-0.25862279534339905,
|
| 2175 |
+
-0.5993593335151672,
|
| 2176 |
+
-0.4683132767677307,
|
| 2177 |
+
-0.46493440866470337,
|
| 2178 |
+
0.4174375534057617,
|
| 2179 |
+
-0.4334781765937805,
|
| 2180 |
+
-0.36766958236694336,
|
| 2181 |
+
-0.5756783485412598,
|
| 2182 |
+
-0.520487904548645,
|
| 2183 |
+
0.5291165709495544,
|
| 2184 |
+
0.22205358743667603,
|
| 2185 |
+
-0.20053093135356903,
|
| 2186 |
+
-0.7626599073410034,
|
| 2187 |
+
0.5866607427597046,
|
| 2188 |
+
0.5070990920066833,
|
| 2189 |
+
0.4739514887332916,
|
| 2190 |
+
-0.31505128741264343,
|
| 2191 |
+
-0.33632615208625793,
|
| 2192 |
+
0.3349793553352356,
|
| 2193 |
+
0.2755506932735443,
|
| 2194 |
+
0.547707200050354,
|
| 2195 |
+
0.22649769484996796,
|
| 2196 |
+
0.6663766503334045,
|
| 2197 |
+
0.6018823981285095,
|
| 2198 |
+
-0.1206974908709526,
|
| 2199 |
+
0.5885554552078247,
|
| 2200 |
+
0.5397472977638245,
|
| 2201 |
+
0.46453940868377686,
|
| 2202 |
+
0.49745607376098633,
|
| 2203 |
+
0.47549256682395935,
|
| 2204 |
+
-0.39476722478866577,
|
| 2205 |
+
-0.5115877389907837,
|
| 2206 |
+
0.4765133857727051,
|
| 2207 |
+
-0.02468481846153736,
|
| 2208 |
+
0.5047079920768738,
|
| 2209 |
+
-0.36710482835769653,
|
| 2210 |
+
0.5644846558570862,
|
| 2211 |
+
0.3845056891441345,
|
| 2212 |
+
-0.36820632219314575,
|
| 2213 |
+
-0.5722693204879761,
|
| 2214 |
+
-0.7034974098205566,
|
| 2215 |
+
-0.3987295627593994,
|
| 2216 |
+
-0.5897213816642761,
|
| 2217 |
+
-0.6326191425323486,
|
| 2218 |
+
-0.7034371495246887,
|
| 2219 |
+
-0.012065979652106762,
|
| 2220 |
+
-0.8285946846008301,
|
| 2221 |
+
0.8296675682067871,
|
| 2222 |
+
-0.6391251683235168,
|
| 2223 |
+
0.4824085235595703,
|
| 2224 |
+
0.2662737965583801,
|
| 2225 |
+
-0.45178771018981934,
|
| 2226 |
+
0.4167381823062897,
|
| 2227 |
+
0.1888199746608734,
|
| 2228 |
+
0.10366911441087723,
|
| 2229 |
+
-0.13760298490524292,
|
| 2230 |
+
0.3917267620563507,
|
| 2231 |
+
-0.6645610928535461,
|
| 2232 |
+
-0.6286388635635376,
|
| 2233 |
+
0.7123810648918152,
|
| 2234 |
+
-0.36468470096588135,
|
| 2235 |
+
0.5265372395515442,
|
| 2236 |
+
0.6040055155754089,
|
| 2237 |
+
0.5391143560409546,
|
| 2238 |
+
-0.6874354481697083,
|
| 2239 |
+
-0.12013101577758789,
|
| 2240 |
+
0.4214313328266144,
|
| 2241 |
+
0.329968124628067,
|
| 2242 |
+
-0.42050573229789734,
|
| 2243 |
+
-0.2965017855167389,
|
| 2244 |
+
0.43154042959213257,
|
| 2245 |
+
0.22178961336612701,
|
| 2246 |
+
0.6041280031204224,
|
| 2247 |
+
-0.4616892635822296,
|
| 2248 |
+
-0.5610184073448181,
|
| 2249 |
+
0.511191189289093,
|
| 2250 |
+
-0.9847272634506226,
|
| 2251 |
+
-0.2686040997505188,
|
| 2252 |
+
0.4998469352722168,
|
| 2253 |
+
-0.7635945677757263,
|
| 2254 |
+
-0.3490637540817261,
|
| 2255 |
+
0.31444230675697327,
|
| 2256 |
+
-0.27581509947776794,
|
| 2257 |
+
0.12745776772499084,
|
| 2258 |
+
0.463368684053421,
|
| 2259 |
+
0.3285757303237915,
|
| 2260 |
+
1.2063647508621216,
|
| 2261 |
+
0.3136107623577118,
|
| 2262 |
+
0.6877472400665283,
|
| 2263 |
+
0.7344233393669128,
|
| 2264 |
+
0.39539551734924316,
|
| 2265 |
+
0.5607619881629944,
|
| 2266 |
+
-0.46110090613365173,
|
| 2267 |
+
0.385048508644104,
|
| 2268 |
+
-0.6186272501945496,
|
| 2269 |
+
0.7879599332809448,
|
| 2270 |
+
0.43810954689979553,
|
| 2271 |
+
-1.4704221487045288,
|
| 2272 |
+
-0.5251647233963013,
|
| 2273 |
+
0.053348179906606674,
|
| 2274 |
+
0.5798595547676086,
|
| 2275 |
+
-0.3335433900356293,
|
| 2276 |
+
0.7289069890975952,
|
| 2277 |
+
-0.3729146420955658,
|
| 2278 |
+
-0.6326716542243958,
|
| 2279 |
+
0.8238807916641235,
|
| 2280 |
+
0.4038623571395874,
|
| 2281 |
+
0.7858222723007202,
|
| 2282 |
+
0.5091748237609863,
|
| 2283 |
+
-0.1323343813419342,
|
| 2284 |
+
0.4509986340999603,
|
| 2285 |
+
-0.42712271213531494,
|
| 2286 |
+
0.6994235515594482,
|
| 2287 |
+
-0.7509125471115112,
|
| 2288 |
+
-0.5346124768257141,
|
| 2289 |
+
-0.5669982433319092,
|
| 2290 |
+
-0.5477046370506287,
|
| 2291 |
+
0.6296712160110474,
|
| 2292 |
+
0.5847958326339722,
|
| 2293 |
+
-0.8572463393211365,
|
| 2294 |
+
0.26333028078079224,
|
| 2295 |
+
0.5428904294967651,
|
| 2296 |
+
-0.5374228954315186,
|
| 2297 |
+
0.4498865306377411,
|
| 2298 |
+
0.48142313957214355,
|
| 2299 |
+
-0.552471399307251,
|
| 2300 |
+
-0.6603292226791382,
|
| 2301 |
+
1.1879570484161377,
|
| 2302 |
+
-0.3418349623680115,
|
| 2303 |
+
1.0870345830917358,
|
| 2304 |
+
0.3856070637702942,
|
| 2305 |
+
0.3835785388946533,
|
| 2306 |
+
-0.5942299365997314,
|
| 2307 |
+
0.5717557668685913,
|
| 2308 |
+
0.8368513584136963,
|
| 2309 |
+
-0.706018328666687,
|
| 2310 |
+
0.4310198426246643,
|
| 2311 |
+
-0.3431468605995178,
|
| 2312 |
+
0.3705883324146271,
|
| 2313 |
+
0.24579164385795593,
|
| 2314 |
+
0.40529656410217285,
|
| 2315 |
+
-0.7347528338432312,
|
| 2316 |
+
0.47128406167030334,
|
| 2317 |
+
0.40954914689064026,
|
| 2318 |
+
-0.4108256995677948,
|
| 2319 |
+
0.1841387301683426,
|
| 2320 |
+
-0.6659297347068787,
|
| 2321 |
+
0.24402162432670593,
|
| 2322 |
+
0.4651864469051361,
|
| 2323 |
+
-0.6440028548240662,
|
| 2324 |
+
0.16260544955730438,
|
| 2325 |
+
-0.8298006653785706,
|
| 2326 |
+
0.2799663841724396,
|
| 2327 |
+
0.3284505307674408,
|
| 2328 |
+
-0.36959049105644226,
|
| 2329 |
+
0.6910378932952881,
|
| 2330 |
+
0.5328362584114075,
|
| 2331 |
+
0.11063619703054428,
|
| 2332 |
+
-0.4516947269439697,
|
| 2333 |
+
0.670394778251648,
|
| 2334 |
+
-0.4215903580188751,
|
| 2335 |
+
0.31891292333602905,
|
| 2336 |
+
-0.48818227648735046,
|
| 2337 |
+
-0.525229275226593,
|
| 2338 |
+
0.9826000332832336,
|
| 2339 |
+
-0.18492431938648224,
|
| 2340 |
+
-0.45432189106941223,
|
| 2341 |
+
-0.20655077695846558,
|
| 2342 |
+
0.560407280921936,
|
| 2343 |
+
0.4782520830631256,
|
| 2344 |
+
0.6039958596229553,
|
| 2345 |
+
-0.7649849057197571,
|
| 2346 |
+
-0.05115603283047676,
|
| 2347 |
+
-0.036306802183389664,
|
| 2348 |
+
-0.3178698420524597,
|
| 2349 |
+
-0.8242605924606323,
|
| 2350 |
+
-0.43732377886772156,
|
| 2351 |
+
-0.6577175855636597,
|
| 2352 |
+
-0.6005761027336121,
|
| 2353 |
+
-0.42529159784317017,
|
| 2354 |
+
-0.252436101436615,
|
| 2355 |
+
-0.3653200566768646,
|
| 2356 |
+
0.3749310374259949,
|
| 2357 |
+
0.2415284514427185,
|
| 2358 |
+
0.6607235074043274,
|
| 2359 |
+
-0.8916924595832825,
|
| 2360 |
+
0.30440300703048706,
|
| 2361 |
+
-0.5797411799430847,
|
| 2362 |
+
0.4763459861278534,
|
| 2363 |
+
-0.3834957480430603,
|
| 2364 |
+
0.17959997057914734,
|
| 2365 |
+
-0.4806287884712219,
|
| 2366 |
+
-0.3293042480945587,
|
| 2367 |
+
1.4099925756454468,
|
| 2368 |
+
-0.5782971382141113,
|
| 2369 |
+
-0.25100967288017273,
|
| 2370 |
+
0.34332075715065,
|
| 2371 |
+
0.7590599060058594,
|
| 2372 |
+
0.5793614387512207,
|
| 2373 |
+
-0.14703218638896942,
|
| 2374 |
+
0.2382507175207138,
|
| 2375 |
+
-0.6149412393569946,
|
| 2376 |
+
-0.46754541993141174,
|
| 2377 |
+
0.4866132140159607,
|
| 2378 |
+
-0.5945234298706055,
|
| 2379 |
+
0.49302321672439575,
|
| 2380 |
+
-0.49208739399909973,
|
| 2381 |
+
-0.7851443886756897,
|
| 2382 |
+
-0.721621572971344,
|
| 2383 |
+
0.4701803922653198,
|
| 2384 |
+
0.9017214179039001,
|
| 2385 |
+
0.5615847706794739,
|
| 2386 |
+
-0.5120549201965332,
|
| 2387 |
+
-0.5149061679840088,
|
| 2388 |
+
0.5607555508613586,
|
| 2389 |
+
-0.28218767046928406,
|
| 2390 |
+
0.6372897624969482,
|
| 2391 |
+
-0.04090454429388046,
|
| 2392 |
+
0.5986918210983276,
|
| 2393 |
+
1.177694320678711,
|
| 2394 |
+
-0.9514838457107544,
|
| 2395 |
+
0.26694732904434204,
|
| 2396 |
+
-0.4607114791870117,
|
| 2397 |
+
-0.5161164999008179,
|
| 2398 |
+
-0.5676852464675903,
|
| 2399 |
+
0.689904510974884,
|
| 2400 |
+
-0.43909451365470886,
|
| 2401 |
+
0.5715568661689758,
|
| 2402 |
+
0.15583942830562592,
|
| 2403 |
+
0.1759614497423172,
|
| 2404 |
+
0.5622710585594177,
|
| 2405 |
+
-0.5133169293403625,
|
| 2406 |
+
-0.966285228729248,
|
| 2407 |
+
-0.7068552374839783,
|
| 2408 |
+
0.51691734790802,
|
| 2409 |
+
-0.4716677665710449,
|
| 2410 |
+
0.482737272977829,
|
| 2411 |
+
1.1952630281448364,
|
| 2412 |
+
-0.23928700387477875,
|
| 2413 |
+
0.09857846051454544,
|
| 2414 |
+
0.686741054058075,
|
| 2415 |
+
0.9820990562438965,
|
| 2416 |
+
1.288217544555664,
|
| 2417 |
+
-0.8169243931770325,
|
| 2418 |
+
0.17603223025798798,
|
| 2419 |
+
0.5037521719932556,
|
| 2420 |
+
-0.6182132959365845,
|
| 2421 |
+
-0.504029393196106,
|
| 2422 |
+
0.4417513608932495,
|
| 2423 |
+
-0.1985960453748703,
|
| 2424 |
+
0.6795202493667603,
|
| 2425 |
+
0.6448993682861328,
|
| 2426 |
+
-0.5122780799865723,
|
| 2427 |
+
0.6680283546447754,
|
| 2428 |
+
-0.44850480556488037,
|
| 2429 |
+
1.0339990854263306,
|
| 2430 |
+
-0.5934554934501648,
|
| 2431 |
+
-0.37804606556892395,
|
| 2432 |
+
-0.46256497502326965,
|
| 2433 |
+
0.7947261929512024,
|
| 2434 |
+
0.3209127187728882,
|
| 2435 |
+
0.27259036898612976,
|
| 2436 |
+
-0.5537301898002625,
|
| 2437 |
+
-0.65911865234375,
|
| 2438 |
+
-0.8579578995704651,
|
| 2439 |
+
-0.757592499256134,
|
| 2440 |
+
0.1761830598115921,
|
| 2441 |
+
0.5941749215126038,
|
| 2442 |
+
0.3916952311992645,
|
| 2443 |
+
-0.6979409456253052,
|
| 2444 |
+
0.43938183784484863,
|
| 2445 |
+
-0.27733761072158813,
|
| 2446 |
+
0.34475070238113403,
|
| 2447 |
+
-0.3636750280857086,
|
| 2448 |
+
-0.3655831217765808,
|
| 2449 |
+
0.5025510787963867,
|
| 2450 |
+
0.9833573698997498,
|
| 2451 |
+
-0.5371208190917969,
|
| 2452 |
+
0.4600584805011749,
|
| 2453 |
+
0.44406309723854065,
|
| 2454 |
+
0.5689285397529602,
|
| 2455 |
+
-0.4591400921344757,
|
| 2456 |
+
-0.7043213248252869,
|
| 2457 |
+
-0.44484901428222656,
|
| 2458 |
+
-0.29595959186553955,
|
| 2459 |
+
-0.05744972452521324,
|
| 2460 |
+
-0.7198536396026611,
|
| 2461 |
+
-0.37415748834609985,
|
| 2462 |
+
-0.22749324142932892,
|
| 2463 |
+
-0.15711641311645508,
|
| 2464 |
+
0.512513279914856,
|
| 2465 |
+
-0.48238661885261536,
|
| 2466 |
+
0.43338680267333984,
|
| 2467 |
+
0.4921077787876129,
|
| 2468 |
+
0.6738750338554382,
|
| 2469 |
+
1.3007397651672363,
|
| 2470 |
+
0.5449212789535522,
|
| 2471 |
+
-0.5261181592941284,
|
| 2472 |
+
0.9909772276878357,
|
| 2473 |
+
0.4888579845428467,
|
| 2474 |
+
-0.4672129154205322,
|
| 2475 |
+
-0.49559709429740906,
|
| 2476 |
+
0.6408059000968933,
|
| 2477 |
+
0.5489431619644165,
|
| 2478 |
+
-0.8408327102661133,
|
| 2479 |
+
-1.0097509622573853,
|
| 2480 |
+
-0.08235977590084076,
|
| 2481 |
+
-0.5264580249786377,
|
| 2482 |
+
-0.7316493391990662,
|
| 2483 |
+
-0.4777064025402069,
|
| 2484 |
+
-0.37026745080947876,
|
| 2485 |
+
-0.28342539072036743,
|
| 2486 |
+
0.5148628354072571,
|
| 2487 |
+
-0.5813735127449036,
|
| 2488 |
+
-0.5189685225486755,
|
| 2489 |
+
-0.46130526065826416,
|
| 2490 |
+
0.3944005072116852,
|
| 2491 |
+
0.4785750210285187,
|
| 2492 |
+
0.6659310460090637,
|
| 2493 |
+
-0.3814562261104584,
|
| 2494 |
+
0.5811219811439514,
|
| 2495 |
+
-1.3794913291931152,
|
| 2496 |
+
-0.7975471615791321,
|
| 2497 |
+
-0.5317023396492004,
|
| 2498 |
+
-0.40248191356658936,
|
| 2499 |
+
0.6557966470718384,
|
| 2500 |
+
0.3905821144580841,
|
| 2501 |
+
0.3303625285625458,
|
| 2502 |
+
0.4527250826358795,
|
| 2503 |
+
0.5193310379981995,
|
| 2504 |
+
-0.044568002223968506,
|
| 2505 |
+
1.131442904472351,
|
| 2506 |
+
0.21221168339252472,
|
| 2507 |
+
0.5138939023017883,
|
| 2508 |
+
0.6107815504074097,
|
| 2509 |
+
0.5872597694396973,
|
| 2510 |
+
-0.5841915607452393,
|
| 2511 |
+
-0.476718544960022,
|
| 2512 |
+
0.6374842524528503,
|
| 2513 |
+
-1.0065571069717407,
|
| 2514 |
+
-0.36163052916526794,
|
| 2515 |
+
0.573855459690094,
|
| 2516 |
+
0.5805584788322449,
|
| 2517 |
+
-0.4341932535171509,
|
| 2518 |
+
-0.4878757894039154,
|
| 2519 |
+
0.5740911364555359,
|
| 2520 |
+
-0.48466601967811584,
|
| 2521 |
+
-0.7972078919410706,
|
| 2522 |
+
1.0755324363708496,
|
| 2523 |
+
-0.4944220781326294,
|
| 2524 |
+
-0.46047723293304443,
|
| 2525 |
+
-0.2845273017883301,
|
| 2526 |
+
0.10875864326953888,
|
| 2527 |
+
-0.3748782277107239,
|
| 2528 |
+
-1.0652053356170654,
|
| 2529 |
+
0.7138442397117615,
|
| 2530 |
+
-0.07556568831205368,
|
| 2531 |
+
0.4279324412345886,
|
| 2532 |
+
-0.5489216446876526,
|
| 2533 |
+
-0.5482203364372253,
|
| 2534 |
+
0.4148668348789215,
|
| 2535 |
+
0.2537778615951538,
|
| 2536 |
+
-0.5335351824760437,
|
| 2537 |
+
0.6548264026641846,
|
| 2538 |
+
-0.7312013506889343,
|
| 2539 |
+
0.5162219405174255,
|
| 2540 |
+
-0.587507426738739,
|
| 2541 |
+
0.6256941556930542,
|
| 2542 |
+
-0.5618646740913391,
|
| 2543 |
+
0.4995773434638977,
|
| 2544 |
+
0.565326452255249,
|
| 2545 |
+
0.6767951846122742,
|
| 2546 |
+
-0.38121354579925537,
|
| 2547 |
+
-0.28882095217704773,
|
| 2548 |
+
0.09667010605335236,
|
| 2549 |
+
0.6904206275939941,
|
| 2550 |
+
0.7203397154808044,
|
| 2551 |
+
-1.052193284034729,
|
| 2552 |
+
0.5294094681739807,
|
| 2553 |
+
-0.39017772674560547,
|
| 2554 |
+
-0.5623560547828674,
|
| 2555 |
+
-0.6423949003219604,
|
| 2556 |
+
-0.3397647440433502,
|
| 2557 |
+
-0.0691433697938919,
|
| 2558 |
+
0.4959563910961151,
|
| 2559 |
+
-0.5409778952598572,
|
| 2560 |
+
0.2738248407840729,
|
| 2561 |
+
-0.5870262980461121,
|
| 2562 |
+
0.4849012494087219,
|
| 2563 |
+
0.43244343996047974,
|
| 2564 |
+
0.5593093633651733,
|
| 2565 |
+
-0.7735945582389832,
|
| 2566 |
+
0.023031825199723244,
|
| 2567 |
+
-0.6313595175743103,
|
| 2568 |
+
0.6824097037315369,
|
| 2569 |
+
0.5879532694816589,
|
| 2570 |
+
1.1227784156799316,
|
| 2571 |
+
-0.5371152758598328,
|
| 2572 |
+
0.4747001826763153,
|
| 2573 |
+
0.33417966961860657,
|
| 2574 |
+
-0.41958531737327576,
|
| 2575 |
+
0.591909646987915,
|
| 2576 |
+
-0.6244659423828125,
|
| 2577 |
+
0.6524537205696106,
|
| 2578 |
+
-0.5735373497009277,
|
| 2579 |
+
0.6572942733764648,
|
| 2580 |
+
-0.6202780604362488,
|
| 2581 |
+
-0.0754583403468132,
|
| 2582 |
+
0.5355802178382874,
|
| 2583 |
+
-0.5512004494667053,
|
| 2584 |
+
0.6083162426948547,
|
| 2585 |
+
-0.4698520302772522,
|
| 2586 |
+
-0.4684063792228699,
|
| 2587 |
+
0.42200011014938354,
|
| 2588 |
+
0.5226775407791138,
|
| 2589 |
+
0.8250173330307007,
|
| 2590 |
+
0.8414651155471802,
|
| 2591 |
+
-0.851728618144989,
|
| 2592 |
+
0.38968703150749207,
|
| 2593 |
+
-0.6002296805381775,
|
| 2594 |
+
-0.5224602222442627,
|
| 2595 |
+
-0.49654296040534973,
|
| 2596 |
+
-0.5692058205604553,
|
| 2597 |
+
0.4617942273616791,
|
| 2598 |
+
0.5733236074447632,
|
| 2599 |
+
0.5646223425865173,
|
| 2600 |
+
-0.6716178059577942,
|
| 2601 |
+
1.0224409103393555,
|
| 2602 |
+
-0.09524110704660416,
|
| 2603 |
+
0.6074790358543396,
|
| 2604 |
+
0.4464361369609833,
|
| 2605 |
+
-0.6058829426765442,
|
| 2606 |
+
0.6488597393035889,
|
| 2607 |
+
-0.051166534423828125,
|
| 2608 |
+
-0.28485044836997986,
|
| 2609 |
+
-1.1255578994750977,
|
| 2610 |
+
-1.6854982376098633,
|
| 2611 |
+
1.430800199508667,
|
| 2612 |
+
-0.7434956431388855,
|
| 2613 |
+
-0.2788616716861725,
|
| 2614 |
+
0.5903058648109436,
|
| 2615 |
+
0.18630436062812805,
|
| 2616 |
+
0.7093695402145386,
|
| 2617 |
+
-0.8175922632217407,
|
| 2618 |
+
-0.6127452254295349,
|
| 2619 |
+
-0.32356882095336914,
|
| 2620 |
+
-0.5329993367195129,
|
| 2621 |
+
-0.6670728325843811,
|
| 2622 |
+
0.46830451488494873,
|
| 2623 |
+
-0.34746330976486206,
|
| 2624 |
+
0.4621020257472992,
|
| 2625 |
+
0.5941657423973083,
|
| 2626 |
+
-0.5245645046234131,
|
| 2627 |
+
0.48068639636039734,
|
| 2628 |
+
0.4261752963066101,
|
| 2629 |
+
0.5562680959701538,
|
| 2630 |
+
0.5139241814613342,
|
| 2631 |
+
-0.6281471252441406,
|
| 2632 |
+
-0.37956735491752625,
|
| 2633 |
+
0.09982912987470627,
|
| 2634 |
+
0.37919309735298157,
|
| 2635 |
+
0.4715290367603302,
|
| 2636 |
+
-0.5141017436981201,
|
| 2637 |
+
0.807801365852356,
|
| 2638 |
+
0.7183742523193359,
|
| 2639 |
+
0.37379318475723267,
|
| 2640 |
+
0.49484768509864807,
|
| 2641 |
+
-0.5575850605964661,
|
| 2642 |
+
-0.6334258317947388,
|
| 2643 |
+
-0.3973656892776489,
|
| 2644 |
+
0.5574955344200134,
|
| 2645 |
+
0.6527130007743835,
|
| 2646 |
+
0.571622371673584,
|
| 2647 |
+
-0.5989436507225037,
|
| 2648 |
+
-0.8798049092292786,
|
| 2649 |
+
0.16753914952278137,
|
| 2650 |
+
-0.6151334643363953,
|
| 2651 |
+
-0.4558465778827667,
|
| 2652 |
+
-0.3383508026599884,
|
| 2653 |
+
0.5112338066101074,
|
| 2654 |
+
0.6807130575180054,
|
| 2655 |
+
0.4764179587364197,
|
| 2656 |
+
0.6525121927261353,
|
| 2657 |
+
0.0027866645250469446,
|
| 2658 |
+
0.5865671634674072,
|
| 2659 |
+
-0.5713533163070679,
|
| 2660 |
+
-0.5435633659362793,
|
| 2661 |
+
-0.5980391502380371,
|
| 2662 |
+
0.31999897956848145,
|
| 2663 |
+
0.5026710033416748,
|
| 2664 |
+
0.4728953540325165,
|
| 2665 |
+
-0.5805755853652954,
|
| 2666 |
+
0.6091205477714539,
|
| 2667 |
+
0.23990114033222198,
|
| 2668 |
+
-1.4398947954177856,
|
| 2669 |
+
-0.5714873671531677,
|
| 2670 |
+
0.4868257939815521,
|
| 2671 |
+
0.5222137570381165,
|
| 2672 |
+
-0.15680432319641113,
|
| 2673 |
+
0.6000910401344299,
|
| 2674 |
+
-0.42508503794670105,
|
| 2675 |
+
-0.00959792360663414,
|
| 2676 |
+
-0.029155075550079346,
|
| 2677 |
+
-0.1008482575416565,
|
| 2678 |
+
-0.8494348526000977,
|
| 2679 |
+
1.2123634815216064,
|
| 2680 |
+
0.4655742645263672,
|
| 2681 |
+
0.4054800271987915,
|
| 2682 |
+
-0.5789232850074768,
|
| 2683 |
+
-0.448654443025589,
|
| 2684 |
+
0.27178430557250977,
|
| 2685 |
+
0.4194319546222687,
|
| 2686 |
+
-0.19238217175006866,
|
| 2687 |
+
0.05927124619483948,
|
| 2688 |
+
-0.6821643114089966,
|
| 2689 |
+
0.41220661997795105,
|
| 2690 |
+
0.6587613224983215,
|
| 2691 |
+
0.6502217650413513,
|
| 2692 |
+
-0.5879285335540771,
|
| 2693 |
+
-1.168091058731079,
|
| 2694 |
+
-0.3738193213939667,
|
| 2695 |
+
-0.5478828549385071,
|
| 2696 |
+
-0.5600888729095459,
|
| 2697 |
+
0.47108131647109985,
|
| 2698 |
+
0.6038346290588379,
|
| 2699 |
+
0.41559746861457825,
|
| 2700 |
+
0.43140798807144165,
|
| 2701 |
+
0.28290143609046936,
|
| 2702 |
+
0.10957807302474976,
|
| 2703 |
+
1.1261096000671387,
|
| 2704 |
+
0.7557782530784607,
|
| 2705 |
+
-0.09454663842916489,
|
| 2706 |
+
-0.5396714806556702,
|
| 2707 |
+
0.35051873326301575,
|
| 2708 |
+
0.5337030291557312,
|
| 2709 |
+
-0.6197061538696289,
|
| 2710 |
+
0.5249195098876953,
|
| 2711 |
+
0.5282478928565979,
|
| 2712 |
+
-0.4826344847679138,
|
| 2713 |
+
0.4673355519771576,
|
| 2714 |
+
0.3739103376865387,
|
| 2715 |
+
-0.9414332509040833,
|
| 2716 |
+
-0.5626897215843201,
|
| 2717 |
+
-0.5404248237609863,
|
| 2718 |
+
-0.5264711380004883,
|
| 2719 |
+
0.2077837735414505,
|
| 2720 |
+
0.46527746319770813,
|
| 2721 |
+
0.33550122380256653,
|
| 2722 |
+
-0.40758731961250305,
|
| 2723 |
+
-0.6036528944969177,
|
| 2724 |
+
0.26444369554519653,
|
| 2725 |
+
0.46062955260276794,
|
| 2726 |
+
-0.5042088627815247,
|
| 2727 |
+
-0.45936450362205505,
|
| 2728 |
+
0.5368273854255676,
|
| 2729 |
+
-0.4445859491825104,
|
| 2730 |
+
0.13990464806556702,
|
| 2731 |
+
0.392370343208313,
|
| 2732 |
+
-0.5358730554580688,
|
| 2733 |
+
0.6539669632911682,
|
| 2734 |
+
-1.058388352394104,
|
| 2735 |
+
0.44580644369125366,
|
| 2736 |
+
-0.33838632702827454,
|
| 2737 |
+
0.7091957330703735,
|
| 2738 |
+
0.6832798719406128,
|
| 2739 |
+
0.32566845417022705,
|
| 2740 |
+
0.37672311067581177,
|
| 2741 |
+
-0.5974972248077393,
|
| 2742 |
+
-0.7361176013946533,
|
| 2743 |
+
0.3428240418434143,
|
| 2744 |
+
0.8432598114013672,
|
| 2745 |
+
1.0732468366622925,
|
| 2746 |
+
-0.38249415159225464,
|
| 2747 |
+
0.3295719027519226,
|
| 2748 |
+
-0.4954387843608856,
|
| 2749 |
+
-0.4817511737346649,
|
| 2750 |
+
0.06269682198762894,
|
| 2751 |
+
0.5361617803573608,
|
| 2752 |
+
0.5865234732627869,
|
| 2753 |
+
-0.5824471712112427,
|
| 2754 |
+
0.6671242117881775,
|
| 2755 |
+
0.5579132437705994,
|
| 2756 |
+
0.44468265771865845,
|
| 2757 |
+
-0.6306341290473938,
|
| 2758 |
+
0.31353601813316345,
|
| 2759 |
+
0.0050523350946605206,
|
| 2760 |
+
0.68552565574646,
|
| 2761 |
+
0.5105887055397034,
|
| 2762 |
+
-0.6457495093345642,
|
| 2763 |
+
-0.19686691462993622,
|
| 2764 |
+
0.5883159041404724,
|
| 2765 |
+
-0.11447283625602722,
|
| 2766 |
+
-0.5710955262184143,
|
| 2767 |
+
0.8761969804763794,
|
| 2768 |
+
0.6187066435813904,
|
| 2769 |
+
0.1643069088459015,
|
| 2770 |
+
0.505480945110321,
|
| 2771 |
+
-0.12307372689247131,
|
| 2772 |
+
-0.5035899877548218,
|
| 2773 |
+
-0.4392324686050415,
|
| 2774 |
+
-0.4859899878501892,
|
| 2775 |
+
-0.33788636326789856,
|
| 2776 |
+
-0.18072181940078735,
|
| 2777 |
+
-1.148506760597229,
|
| 2778 |
+
0.5270877480506897,
|
| 2779 |
+
-0.5454695224761963,
|
| 2780 |
+
0.4946799576282501,
|
| 2781 |
+
-0.5850204229354858,
|
| 2782 |
+
0.5722922086715698,
|
| 2783 |
+
-0.4286102056503296,
|
| 2784 |
+
-0.5083222985267639,
|
| 2785 |
+
1.3998783826828003,
|
| 2786 |
+
-0.39149075746536255,
|
| 2787 |
+
-0.2195635288953781,
|
| 2788 |
+
0.7510740756988525,
|
| 2789 |
+
0.515981912612915,
|
| 2790 |
+
0.5395689010620117,
|
| 2791 |
+
-0.180013045668602
|
| 2792 |
+
]
|
| 2793 |
+
},
|
| 2794 |
+
"bo": {
|
| 2795 |
+
"shape": [
|
| 2796 |
+
1,
|
| 2797 |
+
22
|
| 2798 |
+
],
|
| 2799 |
+
"data": [
|
| 2800 |
+
0.17882657051086426,
|
| 2801 |
+
0.12335005402565002,
|
| 2802 |
+
0.2260214239358902,
|
| 2803 |
+
0.13428771495819092,
|
| 2804 |
+
0.16737928986549377,
|
| 2805 |
+
0.17964711785316467,
|
| 2806 |
+
0.18897251784801483,
|
| 2807 |
+
-0.3008984923362732,
|
| 2808 |
+
0.108077771961689,
|
| 2809 |
+
-0.00163695914670825,
|
| 2810 |
+
-0.030290693044662476,
|
| 2811 |
+
-0.0816558375954628,
|
| 2812 |
+
0.0860346108675003,
|
| 2813 |
+
0.16864551603794098,
|
| 2814 |
+
-0.06500505656003952,
|
| 2815 |
+
-0.20006951689720154,
|
| 2816 |
+
-0.13271963596343994,
|
| 2817 |
+
-0.12611454725265503,
|
| 2818 |
+
-0.14777983725070953,
|
| 2819 |
+
-0.14544935524463654,
|
| 2820 |
+
-0.10858025401830673,
|
| 2821 |
+
-0.13828061521053314
|
| 2822 |
+
]
|
| 2823 |
+
}
|
| 2824 |
+
}
|
source/icl/OCIR_SCHEMA.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"OCIR finite core","schema_version":"0.2.1","type":"object","additionalProperties":false,"required":["schema_version","schema_sha256","feature_set","program_id","source_sha256","module_graph","typed_blocks","ops","operand_types","shape_constraints","observer_context","provenance_refs","required_effects","limits","numeric_policy","entrypoint","integrity_sha256"],"properties":{"schema_version":{"const":"0.2.1"},"schema_sha256":{"type":"string"},"feature_set":{"type":"array"},"program_id":{"type":"string"},"source_sha256":{"type":"string"},"module_graph":{"type":"array"},"typed_blocks":{"type":"array"},"ops":{"type":"array"},"operand_types":{"type":"array"},"shape_constraints":{"type":"array"},"observer_context":{"type":"object"},"provenance_refs":{"type":"array"},"required_effects":{"type":"array"},"limits":{"type":"object"},"numeric_policy":{"type":"object"},"entrypoint":{"type":"string"},"integrity_sha256":{"type":"string"}},"runtime_validation":"icl.api.validate_ocir additionally validates AST node keys, typed operations, numeric policy, limits and structural depth"}
|
source/icl/TOKEN_VOCAB.json
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "0.2.1",
|
| 3 |
+
"keywords": [
|
| 4 |
+
"else",
|
| 5 |
+
"false",
|
| 6 |
+
"fn",
|
| 7 |
+
"if",
|
| 8 |
+
"import",
|
| 9 |
+
"let",
|
| 10 |
+
"limit",
|
| 11 |
+
"module",
|
| 12 |
+
"return",
|
| 13 |
+
"true",
|
| 14 |
+
"type",
|
| 15 |
+
"var",
|
| 16 |
+
"while"
|
| 17 |
+
],
|
| 18 |
+
"operators": [
|
| 19 |
+
"+",
|
| 20 |
+
"-",
|
| 21 |
+
"*",
|
| 22 |
+
"/",
|
| 23 |
+
"%",
|
| 24 |
+
"==",
|
| 25 |
+
"!=",
|
| 26 |
+
"<",
|
| 27 |
+
"<=",
|
| 28 |
+
">",
|
| 29 |
+
">=",
|
| 30 |
+
"&&",
|
| 31 |
+
"||",
|
| 32 |
+
"!"
|
| 33 |
+
],
|
| 34 |
+
"builtins": [
|
| 35 |
+
"abs",
|
| 36 |
+
"add",
|
| 37 |
+
"approx",
|
| 38 |
+
"approx_value",
|
| 39 |
+
"context",
|
| 40 |
+
"convert_frame",
|
| 41 |
+
"err_int",
|
| 42 |
+
"exact_value",
|
| 43 |
+
"is_some",
|
| 44 |
+
"len",
|
| 45 |
+
"make_witness",
|
| 46 |
+
"matmul",
|
| 47 |
+
"max",
|
| 48 |
+
"min",
|
| 49 |
+
"mul",
|
| 50 |
+
"none_int",
|
| 51 |
+
"normalize",
|
| 52 |
+
"observe_mod",
|
| 53 |
+
"observer",
|
| 54 |
+
"ok",
|
| 55 |
+
"provenance",
|
| 56 |
+
"random_int",
|
| 57 |
+
"recover",
|
| 58 |
+
"recover_without_witness",
|
| 59 |
+
"relu",
|
| 60 |
+
"repr_add",
|
| 61 |
+
"repr_value",
|
| 62 |
+
"represent",
|
| 63 |
+
"request_effect",
|
| 64 |
+
"reshape",
|
| 65 |
+
"softmax",
|
| 66 |
+
"some",
|
| 67 |
+
"sub",
|
| 68 |
+
"sum",
|
| 69 |
+
"tanh",
|
| 70 |
+
"tensor",
|
| 71 |
+
"to_float",
|
| 72 |
+
"unwrap"
|
| 73 |
+
],
|
| 74 |
+
"ast_kinds": [
|
| 75 |
+
"literal",
|
| 76 |
+
"var",
|
| 77 |
+
"binary",
|
| 78 |
+
"unary",
|
| 79 |
+
"call",
|
| 80 |
+
"list",
|
| 81 |
+
"record",
|
| 82 |
+
"tuple",
|
| 83 |
+
"index",
|
| 84 |
+
"field",
|
| 85 |
+
"let",
|
| 86 |
+
"assign",
|
| 87 |
+
"if",
|
| 88 |
+
"while",
|
| 89 |
+
"return",
|
| 90 |
+
"expr"
|
| 91 |
+
],
|
| 92 |
+
"types": [
|
| 93 |
+
"Bool",
|
| 94 |
+
"Int64",
|
| 95 |
+
"Float64",
|
| 96 |
+
"String",
|
| 97 |
+
"List",
|
| 98 |
+
"Tuple",
|
| 99 |
+
"Record",
|
| 100 |
+
"Option",
|
| 101 |
+
"Result",
|
| 102 |
+
"Tensor",
|
| 103 |
+
"Observer",
|
| 104 |
+
"Context",
|
| 105 |
+
"Representation",
|
| 106 |
+
"ProvenanceRef",
|
| 107 |
+
"RecoveryWitness",
|
| 108 |
+
"Capability",
|
| 109 |
+
"Exact",
|
| 110 |
+
"Approx"
|
| 111 |
+
],
|
| 112 |
+
"token_policy": "ASCII identifiers; UTF-8 string content; no invisible controls or unpaired surrogates"
|
| 113 |
+
}
|
source/icl/__init__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Invariant Cognition Language v0.2.1 — NEW_IMPLEMENTATION."""
|
| 2 |
+
__version__='0.2.1'
|
source/icl/__main__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from .cli import main
|
| 2 |
+
raise SystemExit(main())
|
source/icl/api.py
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Public compile/check/run/serialize contract. Never resolves filesystem imports."""
|
| 2 |
+
import copy,hashlib,json,re
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from .frontend import parse,canonical_ast,pretty
|
| 5 |
+
from .checker import check,validate_value
|
| 6 |
+
from .runtime import ICLError,RuntimeContext,canonical,digest,DEFAULT_LIMITS
|
| 7 |
+
from .interpreter import execute_tree
|
| 8 |
+
from .vm import compile_bytecode,execute_bytecode
|
| 9 |
+
SCHEMA_VERSION='0.2.1'
|
| 10 |
+
SCHEMA_PATH=Path(__file__).with_name('OCIR_SCHEMA.json')
|
| 11 |
+
if not SCHEMA_PATH.exists():SCHEMA_PATH=Path(__file__).parent.parent/'OCIR_SCHEMA.json'
|
| 12 |
+
SCHEMA_SHA256=hashlib.sha256(SCHEMA_PATH.read_bytes()).hexdigest()
|
| 13 |
+
FEATURES=['functions','modules','lexical_scope','checked_int64','finite_float64','bounded_loop','list','record','tuple','option','result','tensor','observer','recovery','policy_effect','checkpoint','record_annotations','type_aliases','contextual_empty_lists']
|
| 14 |
+
NUMERIC={'int64':'checked_signed','integer_division':'truncate_toward_zero','float64':'finite_only','atol':1e-6,'rtol':1e-5,'normalize_epsilon':1e-5}
|
| 15 |
+
|
| 16 |
+
def load_program(source,module_map=None):
|
| 17 |
+
modules=module_map or {}
|
| 18 |
+
if not isinstance(modules,dict) or len(modules)>64:raise ICLError('IMPORT','module map must have <=64 entries')
|
| 19 |
+
visiting=set();done={};graph=[];functions=[]
|
| 20 |
+
root=parse(source)
|
| 21 |
+
def visit(p,src,isroot=False):
|
| 22 |
+
nm=p['module']
|
| 23 |
+
if nm in visiting:raise ICLError('IMPORT_CYCLE','cyclic module import')
|
| 24 |
+
if nm in done:return
|
| 25 |
+
visiting.add(nm)
|
| 26 |
+
if len(visiting)>32:raise ICLError('IMPORT_LIMIT','import nesting limit')
|
| 27 |
+
for name in p['imports']:
|
| 28 |
+
if name not in modules:raise ICLError('IMPORT','missing explicit module '+name)
|
| 29 |
+
sub=parse(modules[name])
|
| 30 |
+
if sub['module']!=name:raise ICLError('IMPORT','module declaration mismatch')
|
| 31 |
+
visit(sub,modules[name])
|
| 32 |
+
own={f['name'] for f in p['functions']}
|
| 33 |
+
def rename(v):
|
| 34 |
+
if isinstance(v,dict):
|
| 35 |
+
if v.get('kind')=='call':
|
| 36 |
+
target=v['name']
|
| 37 |
+
if target in own and not isroot:v['name']=nm+'.'+target
|
| 38 |
+
elif '.' in target and target.split('.')[0] not in p['imports']:raise ICLError('IMPORT','qualified call without import')
|
| 39 |
+
for child in v.values():rename(child)
|
| 40 |
+
elif isinstance(v,list):
|
| 41 |
+
for child in v:rename(child)
|
| 42 |
+
rename(p)
|
| 43 |
+
for f in p['functions']:
|
| 44 |
+
if not isroot:f['name']=nm+'.'+f['name']
|
| 45 |
+
functions.append(f)
|
| 46 |
+
graph.append({'module':nm,'imports':p['imports'],'source_sha256':hashlib.sha256(src.encode()).hexdigest()})
|
| 47 |
+
visiting.remove(nm);done[nm]=True
|
| 48 |
+
visit(root,source,True)
|
| 49 |
+
return {'module':root['module'],'imports':root['imports'],'functions':functions},graph
|
| 50 |
+
|
| 51 |
+
def compile_source(source,module_map=None,limits=None,entry='main'):
|
| 52 |
+
p,graph=load_program(source,module_map);c=check(p);ctx=RuntimeContext(limits)
|
| 53 |
+
if entry not in {f['name'] for f in p['functions']}:raise ICLError('NAME','entrypoint missing')
|
| 54 |
+
source_hash=hashlib.sha256(source.encode()).hexdigest()
|
| 55 |
+
ocir={'schema_version':SCHEMA_VERSION,'schema_sha256':SCHEMA_SHA256,'feature_set':list(FEATURES),'program_id':digest({'ast':canonical_ast(p),'modules':graph}),'source_sha256':source_hash,'module_graph':graph,'typed_blocks':p['functions'],'ops':c['ops'],'operand_types':[o['operand_types'] for o in c['ops']],'shape_constraints':c['shape_constraints'],'observer_context':{'mode':'explicit_metadata','implicit_conversion':False},'provenance_refs':[{'source_sha256':g['source_sha256'],'module':g['module'],'status':'COMPILED_LOCAL_SOURCE'} for g in graph],'required_effects':c['effects'],'limits':ctx.limits,'numeric_policy':dict(NUMERIC),'entrypoint':entry}
|
| 56 |
+
ocir['integrity_sha256']=digest(ocir);return ocir
|
| 57 |
+
|
| 58 |
+
def check_source(source,**kwargs):return compile_source(source,**kwargs)
|
| 59 |
+
def canonicalize_source(source):return canonical_ast(parse(source))
|
| 60 |
+
def pretty_source(source):return pretty(parse(source))
|
| 61 |
+
|
| 62 |
+
AST_KEYS={
|
| 63 |
+
'literal':{'kind','value'},'var':{'kind','name'},'binary':{'kind','op','left','right'},'unary':{'kind','op','expr'},'call':{'kind','name','args'},'list':{'kind','items'},'tuple':{'kind','items'},'record':{'kind','fields'},'index':{'kind','target','index'},'field':{'kind','target','name'},'let':{'kind','name','type','mutable','expr'},'assign':{'kind','name','expr'},'return':{'kind','expr'},'expr':{'kind','expr'},'if':{'kind','cond','then','else'},'while':{'kind','cond','limit','body'}}
|
| 64 |
+
def validate_ocir(ocir):
|
| 65 |
+
if not isinstance(ocir,dict):raise ICLError('OCIR_CORRUPT','object required')
|
| 66 |
+
try:
|
| 67 |
+
if ocir.get('schema_version')!=SCHEMA_VERSION or ocir.get('schema_sha256')!=SCHEMA_SHA256:raise ICLError('SCHEMA_INCOMPATIBLE','OCIR schema/hash differs')
|
| 68 |
+
data={k:v for k,v in ocir.items() if k!='integrity_sha256'}
|
| 69 |
+
if digest(data)!=ocir.get('integrity_sha256'):raise ICLError('CHECKSUM','OCIR integrity mismatch')
|
| 70 |
+
required=set(json.loads(SCHEMA_PATH.read_text())['required'])
|
| 71 |
+
if set(ocir)!=required:raise ICLError('OCIR_CORRUPT','unexpected/missing OCIR fields')
|
| 72 |
+
if ocir['numeric_policy']!=NUMERIC or ocir['feature_set']!=FEATURES:raise ICLError('SCHEMA_INCOMPATIBLE','numeric/feature policy differs')
|
| 73 |
+
ctx=RuntimeContext(ocir['limits']);ctx.check_value(ocir)
|
| 74 |
+
count=0
|
| 75 |
+
def walk(v,depth=0):
|
| 76 |
+
nonlocal count
|
| 77 |
+
count+=1
|
| 78 |
+
if count>100000 or depth>128:raise ICLError('OCIR_CORRUPT','AST size/depth limit')
|
| 79 |
+
if isinstance(v,dict):
|
| 80 |
+
if 'kind' in v:
|
| 81 |
+
k=v['kind']
|
| 82 |
+
if k not in AST_KEYS:raise ICLError('UNSUPPORTED_OP','unknown AST opcode')
|
| 83 |
+
if set(v)-{'span','inferred_type'}!=AST_KEYS[k]:raise ICLError('OCIR_CORRUPT','malformed AST operation')
|
| 84 |
+
if k=='binary' and v['op'] not in ('+','-','*','/','%','==','!=','<','<=','>','>=','&&','||'):raise ICLError('UNSUPPORTED_OP','binary opcode')
|
| 85 |
+
if k=='unary' and v['op'] not in ('-','!'):raise ICLError('UNSUPPORTED_OP','unary opcode')
|
| 86 |
+
if k=='while' and (type(v['limit'])!=int or not 0<=v['limit']<=100000):raise ICLError('OCIR_CORRUPT','invalid loop limit')
|
| 87 |
+
for child in v.values():walk(child,depth+1)
|
| 88 |
+
elif isinstance(v,list):
|
| 89 |
+
for child in v:walk(child,depth+1)
|
| 90 |
+
walk(ocir['typed_blocks'])
|
| 91 |
+
p={'module':ocir['module_graph'][-1]['module'],'imports':ocir['module_graph'][-1]['imports'],'functions':copy.deepcopy(ocir['typed_blocks'])};checked=check(p)
|
| 92 |
+
if digest({'ast':canonical_ast(p),'modules':ocir['module_graph']})!=ocir['program_id']:raise ICLError('OCIR_CORRUPT','program identity inconsistent')
|
| 93 |
+
if p['functions']!=ocir['typed_blocks'] or checked['ops']!=ocir['ops'] or checked['effects']!=ocir['required_effects'] or checked['shape_constraints']!=ocir['shape_constraints']:raise ICLError('OCIR_CORRUPT','typed data differs from checker')
|
| 94 |
+
if ocir['operand_types']!=[o['operand_types'] for o in checked['ops']]:raise ICLError('OCIR_CORRUPT','operand types differ')
|
| 95 |
+
if ocir['entrypoint'] not in {f['name'] for f in p['functions']}:raise ICLError('NAME','invalid entrypoint')
|
| 96 |
+
return p
|
| 97 |
+
except ICLError:raise
|
| 98 |
+
except (KeyError,TypeError,ValueError,IndexError,RecursionError,OverflowError) as e:raise ICLError('OCIR_CORRUPT','invalid serialized structure: '+type(e).__name__)
|
| 99 |
+
|
| 100 |
+
def dumps_ocir(ocir):validate_ocir(ocir);return canonical(ocir)
|
| 101 |
+
def loads_ocir(text):
|
| 102 |
+
try:
|
| 103 |
+
if not isinstance(text,str) or len(text.encode())>4000000:raise ICLError('OCIR_CORRUPT','serialized size limit')
|
| 104 |
+
except UnicodeError:raise ICLError('OCIR_CORRUPT','invalid Unicode')
|
| 105 |
+
def pairs(items):
|
| 106 |
+
d={}
|
| 107 |
+
for k,v in items:
|
| 108 |
+
if k in d:raise ICLError('OCIR_CORRUPT','duplicate key')
|
| 109 |
+
d[k]=v
|
| 110 |
+
return d
|
| 111 |
+
try:o=json.loads(text,object_pairs_hook=pairs,parse_constant=lambda x:(_ for _ in ()).throw(ICLError('NONFINITE','JSON nonfinite')))
|
| 112 |
+
except (ValueError,RecursionError):raise ICLError('OCIR_CORRUPT','invalid JSON')
|
| 113 |
+
validate_ocir(o);return o
|
| 114 |
+
|
| 115 |
+
def run_ocir(ocir,args=None,engine='vm',entry=None,policy=None,limits=None,checkpoint=None,stop_after=None):
|
| 116 |
+
p=validate_ocir(ocir);entry=entry or ocir['entrypoint'];args=[] if args is None else args
|
| 117 |
+
requested=RuntimeContext(limits).limits if limits is not None else ocir['limits']
|
| 118 |
+
lim={k:min(requested[k],ocir['limits'][k]) for k in DEFAULT_LIMITS};ctx=RuntimeContext(lim,policy)
|
| 119 |
+
fn=next((f for f in p['functions'] if f['name']==entry),None)
|
| 120 |
+
if fn is None:raise ICLError('NAME','entry missing')
|
| 121 |
+
if not isinstance(args,list) or len(args)!=len(fn['params']):raise ICLError('TYPE','entry argument count')
|
| 122 |
+
for (_,tp),v in zip(fn['params'],args):validate_value(v,tp,ctx)
|
| 123 |
+
if engine=='tree':
|
| 124 |
+
if checkpoint is not None or stop_after is not None:raise ICLError('UNSUPPORTED_OP','tree checkpoint unsupported; VM checkpoint supported')
|
| 125 |
+
return execute_tree(p,entry,args,lim,policy)
|
| 126 |
+
if engine!='vm':raise ICLError('ENGINE','unknown execution engine')
|
| 127 |
+
out=execute_bytecode(compile_bytecode(p),entry,args,lim,policy,checkpoint,stop_after)
|
| 128 |
+
if 'value' in out and out.get('checkpoint') is None:validate_value(out['value'],fn['return_type'],ctx)
|
| 129 |
+
return out
|
| 130 |
+
|
| 131 |
+
def run_source(source,args=None,engine='vm',entry='main',module_map=None,limits=None,policy=None,checkpoint=None,stop_after=None):
|
| 132 |
+
return run_ocir(compile_source(source,module_map,limits,entry),args,engine,entry,policy,limits,checkpoint,stop_after)
|
source/icl/checker.py
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Nominal primitive + structural compound types and conservative effect analysis."""
|
| 2 |
+
import math,re
|
| 3 |
+
from .runtime import ICLError,BUILTINS
|
| 4 |
+
BASIC={'Int64','Float64','Bool','String','Observer','Context','ProvenanceRef','RecoveryWitness','Capability'}
|
| 5 |
+
def split_types(s):
|
| 6 |
+
out=[];start=0;d=0
|
| 7 |
+
for i,c in enumerate(s):
|
| 8 |
+
if c in '[{':d+=1
|
| 9 |
+
elif c in ']}':d-=1
|
| 10 |
+
elif c==',' and d==0:out.append(s[start:i]);start=i+1
|
| 11 |
+
out.append(s[start:]);return out
|
| 12 |
+
|
| 13 |
+
def valid_type(t):
|
| 14 |
+
if not isinstance(t,str) or len(t)>8192:return False
|
| 15 |
+
if t in BASIC:return True
|
| 16 |
+
if t.startswith('Record{') and t.endswith('}'):
|
| 17 |
+
try:
|
| 18 |
+
pairs=[x.split(':',1) for x in split_types(t[7:-1])]
|
| 19 |
+
if not pairs or any(len(x)!=2 for x in pairs):return False
|
| 20 |
+
names=[x[0] for x in pairs]
|
| 21 |
+
return len(set(names))==len(names) and names==sorted(names) and all(re.fullmatch(r'[A-Za-z_][A-Za-z_0-9]*',k) and valid_type(v) for k,v in pairs)
|
| 22 |
+
except (ValueError,RecursionError):return False
|
| 23 |
+
if t.startswith('Tensor['):
|
| 24 |
+
try:d=[int(x) for x in t[7:-1].split(',')];return t.endswith(']') and 1<=len(d)<=3 and all(x>0 for x in d) and math.prod(d)<=4096
|
| 25 |
+
except ValueError:return False
|
| 26 |
+
for g in ('List','Option','Result','Representation','Exact','Approx','Tuple'):
|
| 27 |
+
if t.startswith(g+'[') and t.endswith(']'):
|
| 28 |
+
ts=split_types(t[len(g)+1:-1]);return len(ts)>=1 and all(valid_type(x) for x in ts) and (g=='Tuple' or len(ts)==1)
|
| 29 |
+
return False
|
| 30 |
+
|
| 31 |
+
def shape(t):
|
| 32 |
+
if not t.startswith('Tensor['):raise ICLError('TYPE','Tensor required')
|
| 33 |
+
return [int(x) for x in t[7:-1].split(',')]
|
| 34 |
+
def tt(s):return 'Tensor['+','.join(map(str,s))+']'
|
| 35 |
+
|
| 36 |
+
def check(program):
|
| 37 |
+
fs={};effects=set();ops=[];shapes=[]
|
| 38 |
+
for f in program['functions']:
|
| 39 |
+
if f['name'] in fs or f['name'] in BUILTINS:raise ICLError('NAME','duplicate/reserved function '+f['name'],f.get('span'))
|
| 40 |
+
if not valid_type(f['return_type']):raise ICLError('TYPE','unsupported return type '+f['return_type'])
|
| 41 |
+
if len({n for n,t in f['params']})!=len(f['params']):raise ICLError('NAME','duplicate parameter')
|
| 42 |
+
for n,t in f['params']:
|
| 43 |
+
if not valid_type(t):raise ICLError('TYPE','unsupported parameter type '+t)
|
| 44 |
+
fs[f['name']]=f
|
| 45 |
+
def same(a,b,span=None):
|
| 46 |
+
if a!=b:raise ICLError('TYPE',f'{a} incompatible with {b}',span)
|
| 47 |
+
def ex(x,env,expected=None):
|
| 48 |
+
k=x['kind'];sp=x.get('span')
|
| 49 |
+
if k=='literal':
|
| 50 |
+
v=x['value'];t='Bool' if type(v)==bool else 'Int64' if type(v)==int else 'Float64' if type(v)==float else 'String'
|
| 51 |
+
if type(v)==int and not -(1<<63)<=v<(1<<63):raise ICLError('OVERFLOW','literal outside Int64',sp)
|
| 52 |
+
if type(v)==float and not math.isfinite(v):raise ICLError('NONFINITE','nonfinite literal',sp)
|
| 53 |
+
elif k=='var':
|
| 54 |
+
if x['name'] not in env:raise ICLError('NAME','undefined name '+x['name'],sp)
|
| 55 |
+
t=env[x['name']][0]
|
| 56 |
+
elif k=='unary':
|
| 57 |
+
# Smallest Int64 is expressed by unary minus of its magnitude.
|
| 58 |
+
if x['op']=='-' and x['expr']['kind']=='literal' and type(x['expr']['value'])==int and x['expr']['value']==(1<<63):
|
| 59 |
+
x['expr']['inferred_type']='Int64';t='Int64'
|
| 60 |
+
else:
|
| 61 |
+
a=ex(x['expr'],env);t='Bool' if x['op']=='!' else a
|
| 62 |
+
if x['op']=='!':same(a,'Bool',sp)
|
| 63 |
+
elif a not in ('Int64','Float64'):raise ICLError('TYPE','numeric negation only',sp)
|
| 64 |
+
elif k=='binary':
|
| 65 |
+
a=ex(x['left'],env);b=ex(x['right'],env);same(a,b,sp);op=x['op']
|
| 66 |
+
if op in ('&&','||'):same(a,'Bool',sp);t='Bool'
|
| 67 |
+
elif op in ('==','!='):t='Bool'
|
| 68 |
+
elif op in ('<','<=','>','>='):
|
| 69 |
+
if a not in ('Int64','Float64','String'):raise ICLError('TYPE','ordered scalar required',sp)
|
| 70 |
+
t='Bool'
|
| 71 |
+
else:
|
| 72 |
+
if a not in ('Int64','Float64') and not(op=='+' and a=='String'):raise ICLError('TYPE','numeric arithmetic only',sp)
|
| 73 |
+
t=a
|
| 74 |
+
elif k in ('list','tuple'):
|
| 75 |
+
inner=expected[5:-1] if k=='list' and isinstance(expected,str) and expected.startswith('List[') and valid_type(expected) else None
|
| 76 |
+
ts=[ex(y,env,inner) for y in x['items']]
|
| 77 |
+
if not ts:
|
| 78 |
+
if k=='list' and inner is not None:
|
| 79 |
+
x['inferred_type']=expected
|
| 80 |
+
return expected
|
| 81 |
+
raise ICLError('TYPE','empty list requires a contextual List type',sp)
|
| 82 |
+
if k=='list':
|
| 83 |
+
for a in ts:same(a,ts[0],sp)
|
| 84 |
+
t='List['+ts[0]+']'
|
| 85 |
+
else:t='Tuple['+','.join(ts)+']'
|
| 86 |
+
elif k=='record':t='Record{'+','.join(n+':'+ex(v,env) for n,v in sorted(x['fields'].items()))+'}'
|
| 87 |
+
elif k=='field':
|
| 88 |
+
a=ex(x['target'],env)
|
| 89 |
+
if not a.startswith('Record{'):raise ICLError('TYPE','record required',sp)
|
| 90 |
+
fields=dict(item.split(':',1) for item in split_types(a[7:-1]))
|
| 91 |
+
if x['name'] not in fields:raise ICLError('NAME','no such record field',sp)
|
| 92 |
+
t=fields[x['name']]
|
| 93 |
+
elif k=='index':
|
| 94 |
+
a=ex(x['target'],env);same(ex(x['index'],env),'Int64',sp)
|
| 95 |
+
if a.startswith('List['):t=a[5:-1]
|
| 96 |
+
elif a=='String':t='String'
|
| 97 |
+
elif a.startswith('Tuple['):
|
| 98 |
+
ix=x['index']
|
| 99 |
+
if ix['kind']!='literal' or type(ix['value'])!=int:raise ICLError('TYPE','tuple index must be literal',sp)
|
| 100 |
+
ts=split_types(a[6:-1]);i=ix['value']
|
| 101 |
+
if i<0 or i>=len(ts):raise ICLError('INDEX','tuple index out of range',sp)
|
| 102 |
+
t=ts[i]
|
| 103 |
+
else:raise ICLError('TYPE','indexable value required',sp)
|
| 104 |
+
elif k=='call':
|
| 105 |
+
nm=x['name'];args=x['args']
|
| 106 |
+
expected_args=[t for _,t in fs[nm]['params']] if nm in fs else []
|
| 107 |
+
ts=[ex(y,env,expected_args[i] if i<len(expected_args) else None) for i,y in enumerate(args)]
|
| 108 |
+
def sig(types,ret):
|
| 109 |
+
if len(ts)!=len(types):raise ICLError('TYPE',nm+' arity mismatch',sp)
|
| 110 |
+
for a,b in zip(ts,types):same(a,b,sp)
|
| 111 |
+
return ret
|
| 112 |
+
def ar(n):
|
| 113 |
+
if len(ts)!=n:raise ICLError('TYPE',nm+' arity mismatch',sp)
|
| 114 |
+
if nm in fs:t=sig([v for n,v in fs[nm]['params']],fs[nm]['return_type'])
|
| 115 |
+
elif nm=='len':
|
| 116 |
+
ar(1)
|
| 117 |
+
if ts[0]!='String' and not ts[0].startswith('List['):raise ICLError('TYPE','len list/string',sp)
|
| 118 |
+
t='Int64'
|
| 119 |
+
elif nm in ('abs','min','max'):
|
| 120 |
+
ar(1 if nm=='abs' else 2)
|
| 121 |
+
if ts[0] not in ('Int64','Float64') or len(set(ts))!=1:raise ICLError('TYPE','numeric homogeneous inputs')
|
| 122 |
+
t=ts[0]
|
| 123 |
+
elif nm=='to_float':t=sig(['Int64'],'Float64')
|
| 124 |
+
elif nm=='tensor':
|
| 125 |
+
sig(['List[Float64]','List[Int64]'],'')
|
| 126 |
+
sh=args[1]
|
| 127 |
+
if sh['kind']!='list' or any(y['kind']!='literal' or type(y['value'])!=int for y in sh['items']):raise ICLError('SHAPE','tensor shape must be literal',sp)
|
| 128 |
+
ds=[y['value'] for y in sh['items']];t=tt(ds)
|
| 129 |
+
if not valid_type(t):raise ICLError('SHAPE','invalid tensor shape',sp)
|
| 130 |
+
if args[0]['kind']=='list' and len(args[0]['items'])!=math.prod(ds):raise ICLError('SHAPE','tensor literal data length',sp)
|
| 131 |
+
shapes.append({'op':'tensor','shape':ds})
|
| 132 |
+
elif nm=='matmul':
|
| 133 |
+
ar(2);a=shape(ts[0]);b=shape(ts[1])
|
| 134 |
+
if len(a)!=2 or len(b)!=2 or a[1]!=b[0]:raise ICLError('SHAPE','matmul dimensions',sp)
|
| 135 |
+
t=tt([a[0],b[1]]);shapes.append({'op':'matmul','left':a,'right':b,'output':[a[0],b[1]]})
|
| 136 |
+
elif nm in ('add','sub','mul'):
|
| 137 |
+
ar(2);shape(ts[0]);same(ts[0],ts[1],sp);t=ts[0]
|
| 138 |
+
elif nm in ('relu','tanh','normalize','softmax','sum'):
|
| 139 |
+
ar(1);shape(ts[0]);t='Float64' if nm=='sum' else ts[0]
|
| 140 |
+
elif nm=='reshape':
|
| 141 |
+
ar(2);a=shape(ts[0]);same(ts[1],'List[Int64]')
|
| 142 |
+
if args[1]['kind']!='list' or any(y['kind']!='literal' or type(y['value'])!=int for y in args[1]['items']):raise ICLError('SHAPE','reshape literal shape required')
|
| 143 |
+
b=[y['value'] for y in args[1]['items']];t=tt(b)
|
| 144 |
+
if not valid_type(t) or math.prod(a)!=math.prod(b):raise ICLError('SHAPE','reshape elements differ')
|
| 145 |
+
elif nm in ('some','ok'):ar(1);t=('Option' if nm=='some' else 'Result')+'['+ts[0]+']'
|
| 146 |
+
elif nm=='none_int':t=sig([],'Option[Int64]')
|
| 147 |
+
elif nm=='err_int':t=sig(['String'],'Result[Int64]')
|
| 148 |
+
elif nm in ('unwrap','is_some'):
|
| 149 |
+
ar(1)
|
| 150 |
+
if not ts[0].startswith(('Option[','Result[')):raise ICLError('TYPE','Option/Result required')
|
| 151 |
+
if nm=='is_some' and not ts[0].startswith('Option['):raise ICLError('TYPE','Option required')
|
| 152 |
+
t='Bool' if nm=='is_some' else ts[0][ts[0].index('[')+1:-1]
|
| 153 |
+
elif nm=='observer':t=sig(['String'],'Observer')
|
| 154 |
+
elif nm=='context':t=sig(['String','String'],'Context')
|
| 155 |
+
elif nm=='provenance':t=sig(['String'],'ProvenanceRef')
|
| 156 |
+
elif nm=='represent':ar(4);sig([ts[0],'String','String','String'],'');t='Representation['+ts[0]+']'
|
| 157 |
+
elif nm=='repr_value':
|
| 158 |
+
ar(1)
|
| 159 |
+
if not ts[0].startswith('Representation['):raise ICLError('TYPE','Representation required')
|
| 160 |
+
t=ts[0][15:-1]
|
| 161 |
+
elif nm=='repr_add':
|
| 162 |
+
ar(2);same(ts[0],ts[1])
|
| 163 |
+
if ts[0] not in ('Representation[Int64]','Representation[Float64]'):raise ICLError('TYPE','numeric representations required')
|
| 164 |
+
t=ts[0]
|
| 165 |
+
elif nm=='convert_frame':
|
| 166 |
+
ar(4)
|
| 167 |
+
if ts[0] not in ('Representation[Int64]','Representation[Float64]'):raise ICLError('TYPE','numeric representation required')
|
| 168 |
+
t=sig([ts[0],'String',ts[0][15:-1],'String'],ts[0])
|
| 169 |
+
elif nm=='observe_mod':t=sig(['Int64','Int64','String'],'Representation[Int64]')
|
| 170 |
+
elif nm=='make_witness':t=sig(['Int64','Int64'],'RecoveryWitness')
|
| 171 |
+
elif nm=='recover':t=sig(['Representation[Int64]','RecoveryWitness'],'Exact[Int64]')
|
| 172 |
+
elif nm=='recover_without_witness':t=sig(['Representation[Int64]'],'Exact[Int64]')
|
| 173 |
+
elif nm=='exact_value':
|
| 174 |
+
ar(1)
|
| 175 |
+
if not ts[0].startswith('Exact['):raise ICLError('TYPE','Exact required')
|
| 176 |
+
t=ts[0][6:-1]
|
| 177 |
+
elif nm=='approx':t=sig(['Float64','Float64'],'Approx[Float64]')
|
| 178 |
+
elif nm=='approx_value':t=sig(['Approx[Float64]'],'Float64')
|
| 179 |
+
elif nm=='request_effect':t=sig(['String','String'],'Bool');effects.add('policy_request')
|
| 180 |
+
elif nm=='random_int':t=sig(['Int64'],'Int64');effects.add('prng')
|
| 181 |
+
else:raise ICLError('NAME','unknown function '+nm,sp)
|
| 182 |
+
ops.append({'name':nm,'operand_types':ts,'result_type':t})
|
| 183 |
+
else:raise ICLError('UNSUPPORTED_OP',k,sp)
|
| 184 |
+
x['inferred_type']=t;return t
|
| 185 |
+
def body(ss,outer,ret):
|
| 186 |
+
env=dict(outer);local=set();always=False
|
| 187 |
+
for s in ss:
|
| 188 |
+
k=s['kind'];sp=s.get('span')
|
| 189 |
+
if k=='let':
|
| 190 |
+
if s['name'] in local:raise ICLError('NAME','duplicate local binding',sp)
|
| 191 |
+
t=ex(s['expr'],env,s.get('type'))
|
| 192 |
+
if s.get('type'):
|
| 193 |
+
if not valid_type(s['type']):raise ICLError('TYPE','invalid local type',sp)
|
| 194 |
+
same(t,s['type'],sp)
|
| 195 |
+
env[s['name']]=(t,s['mutable']);local.add(s['name']);s['inferred_type']=t
|
| 196 |
+
elif k=='assign':
|
| 197 |
+
if s['name'] not in env:raise ICLError('NAME','undefined assignment',sp)
|
| 198 |
+
t,mut=env[s['name']]
|
| 199 |
+
if not mut:raise ICLError('IMMUTABLE','cannot assign let/parameter',sp)
|
| 200 |
+
same(ex(s['expr'],env,t),t,sp)
|
| 201 |
+
elif k=='return':same(ex(s['expr'],env,ret),ret,sp);always=True
|
| 202 |
+
elif k=='expr':ex(s['expr'],env)
|
| 203 |
+
elif k=='if':
|
| 204 |
+
same(ex(s['cond'],env),'Bool',sp);a=body(s['then'],env,ret);b=body(s['else'],env,ret);always=always or (a and b)
|
| 205 |
+
elif k=='while':same(ex(s['cond'],env),'Bool',sp);body(s['body'],env,ret)
|
| 206 |
+
else:raise ICLError('UNSUPPORTED_OP',k,sp)
|
| 207 |
+
return always
|
| 208 |
+
for f in program['functions']:
|
| 209 |
+
env={n:(t,False) for n,t in f['params']}
|
| 210 |
+
if not body(f['body'],env,f['return_type']):raise ICLError('RETURN','function must return on every path',f.get('span'))
|
| 211 |
+
return {'program':program,'effects':sorted(effects),'ops':ops,'shape_constraints':shapes}
|
| 212 |
+
|
| 213 |
+
def validate_value(value,t,ctx):
|
| 214 |
+
ctx.check_value(value)
|
| 215 |
+
valid=False
|
| 216 |
+
if t=='Int64':valid=type(value)==int
|
| 217 |
+
elif t=='Float64':valid=type(value)==float
|
| 218 |
+
elif t=='Bool':valid=type(value)==bool
|
| 219 |
+
elif t=='String':valid=type(value)==str
|
| 220 |
+
elif t.startswith('Tensor['):
|
| 221 |
+
from .runtime import validate_tensor
|
| 222 |
+
v=validate_tensor(value,ctx);valid=v['shape']==shape(t)
|
| 223 |
+
elif t.startswith('List['):valid=type(value)==list and all(validate_value(x,t[5:-1],ctx) for x in value)
|
| 224 |
+
elif t.startswith('Tuple['):
|
| 225 |
+
ts=split_types(t[6:-1]);valid=type(value)==list and len(value)==len(ts) and all(validate_value(x,st,ctx) for x,st in zip(value,ts))
|
| 226 |
+
elif t.startswith('Record{'):
|
| 227 |
+
fields=dict(item.split(':',1) for item in split_types(t[7:-1]));valid=isinstance(value,dict) and set(value)==set(fields) and all(validate_value(value[k],st,ctx) for k,st in fields.items())
|
| 228 |
+
elif isinstance(value,dict):
|
| 229 |
+
tag=t.split('[',1)[0];inner=t[t.index('[')+1:-1] if '[' in t else None
|
| 230 |
+
def fields(required):return all(k in value for k in required)
|
| 231 |
+
if tag=='Option':
|
| 232 |
+
valid=value.get('tag')=='None' and value.get('value') is None
|
| 233 |
+
if value.get('tag')=='Some':valid=fields(['value']) and validate_value(value['value'],inner,ctx)
|
| 234 |
+
elif tag=='Result':
|
| 235 |
+
valid=value.get('tag')=='Err' and isinstance(value.get('error'),str)
|
| 236 |
+
if value.get('tag')=='Ok':valid=fields(['value']) and validate_value(value['value'],inner,ctx)
|
| 237 |
+
elif tag=='Representation':
|
| 238 |
+
valid=value.get('tag')==tag and fields(['value','observer','frame','unit','source_hash','provenance']) and all(isinstance(value[k],str) for k in ('observer','frame','unit')) and isinstance(value['provenance'],dict) and (value['source_hash'] is None or isinstance(value['source_hash'],str))
|
| 239 |
+
if valid:valid=validate_value(value['value'],inner,ctx)
|
| 240 |
+
if 'modulus' in value:valid=valid and type(value['modulus'])==int and value['modulus']>0
|
| 241 |
+
elif tag=='Exact':
|
| 242 |
+
valid=value.get('tag')==tag and fields(['value','witness_bytes','scope']) and type(value['witness_bytes'])==int and value['witness_bytes']>=0 and isinstance(value['scope'],str)
|
| 243 |
+
if valid:valid=validate_value(value['value'],inner,ctx)
|
| 244 |
+
elif tag=='Approx':
|
| 245 |
+
valid=value.get('tag')==tag and fields(['value','error_bound']) and type(value['error_bound'])==float and value['error_bound']>=0
|
| 246 |
+
if valid:valid=validate_value(value['value'],inner,ctx)
|
| 247 |
+
elif tag=='Observer':valid=value.get('tag')==tag and isinstance(value.get('id'),str)
|
| 248 |
+
elif tag=='Context':valid=value.get('tag')==tag and isinstance(value.get('frame'),str) and isinstance(value.get('unit'),str)
|
| 249 |
+
elif tag=='ProvenanceRef':valid=value.get('tag')==tag and isinstance(value.get('source_id'),str) and value.get('verified') is False
|
| 250 |
+
elif tag=='RecoveryWitness':
|
| 251 |
+
valid=value.get('tag')==tag and all(type(value.get(k))==int for k in ('quotient','modulus','remainder','payload_bytes')) and value.get('modulus',0)>0 and value.get('payload_bytes',-1)>=0 and isinstance(value.get('sha256'),str)
|
| 252 |
+
elif tag=='Capability':valid=False # no transferable authority values in v0.1
|
| 253 |
+
if not valid:raise ICLError('TYPE','input does not match '+t)
|
| 254 |
+
return True
|
source/icl/cli.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Offline CLI. JSON diagnostics on stderr, successful JSON on stdout."""
|
| 2 |
+
import argparse,json,sys
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from . import __version__
|
| 5 |
+
from .api import compile_source,run_source,run_ocir,loads_ocir,dumps_ocir,SCHEMA_SHA256
|
| 6 |
+
from .runtime import ICLError,digest
|
| 7 |
+
|
| 8 |
+
def read(path,max_bytes=4000000):
|
| 9 |
+
p=Path(path)
|
| 10 |
+
if p.is_symlink() or any(parent.is_symlink() for parent in p.parents):raise ICLError('PATH','symlinks are not accepted')
|
| 11 |
+
if not p.is_file():raise ICLError('PATH','regular file required')
|
| 12 |
+
if p.stat().st_size>max_bytes:raise ICLError('SOURCE_LIMIT','file size exceeded')
|
| 13 |
+
try:return p.read_text(encoding='utf-8')
|
| 14 |
+
except (UnicodeError,OSError):raise ICLError('PATH','UTF-8 file unavailable')
|
| 15 |
+
def js(text):
|
| 16 |
+
try:return json.loads(text,parse_constant=lambda x:(_ for _ in ()).throw(ValueError(x)))
|
| 17 |
+
except (ValueError,RecursionError):raise ICLError('JSON','invalid finite JSON argument')
|
| 18 |
+
def output(obj):print(json.dumps(obj,ensure_ascii=False,allow_nan=False,sort_keys=True))
|
| 19 |
+
def main(argv=None):
|
| 20 |
+
parser=argparse.ArgumentParser(prog='icl',description='Invariant Cognition Language finite core, offline v0.1')
|
| 21 |
+
parser.add_argument('--version',action='version',version=__version__)
|
| 22 |
+
subs=parser.add_subparsers(dest='command',required=True)
|
| 23 |
+
for name in ('check','run','compile'):
|
| 24 |
+
p=subs.add_parser(name);p.add_argument('source');p.add_argument('--module-map',help='JSON file mapping module names to source text');p.add_argument('--entry',default='main');p.add_argument('--json',action='store_true',help='JSON is also the default output')
|
| 25 |
+
p.add_argument('--max-steps',type=int)
|
| 26 |
+
if name=='run':
|
| 27 |
+
p.add_argument('--args',default='[]',help='JSON argument array');p.add_argument('--engine',choices=['vm','tree'],default='vm');p.add_argument('--policy',help='Separate trusted host policy JSON file');p.add_argument('--trace',action='store_true');p.add_argument('--stop-after',type=int);p.add_argument('--checkpoint-out')
|
| 28 |
+
if name=='compile':p.add_argument('-o','--output',required=True)
|
| 29 |
+
p=subs.add_parser('inspect');p.add_argument('ocir');p.add_argument('--json',action='store_true')
|
| 30 |
+
p=subs.add_parser('replay');p.add_argument('ocir');p.add_argument('checkpoint');p.add_argument('--args',default='[]');p.add_argument('--policy');p.add_argument('--json',action='store_true');p.add_argument('--trace',action='store_true')
|
| 31 |
+
p=subs.add_parser('test');p.add_argument('--json',action='store_true')
|
| 32 |
+
a=parser.parse_args(argv)
|
| 33 |
+
try:
|
| 34 |
+
if a.command in ('check','run','compile'):
|
| 35 |
+
source=read(a.source,1000000);modules=js(read(a.module_map)) if a.module_map else None;limits={'max_steps':a.max_steps} if a.max_steps is not None else None
|
| 36 |
+
ocir=compile_source(source,modules,limits,a.entry)
|
| 37 |
+
if a.command=='check':output({'status':'PASS','schema_sha256':SCHEMA_SHA256,'program_id':ocir['program_id'],'required_effects':ocir['required_effects']});return 0
|
| 38 |
+
if a.command=='compile':
|
| 39 |
+
Path(a.output).write_text(dumps_ocir(ocir)+'\n',encoding='utf-8');output({'status':'PASS','output':a.output,'sha256':ocir['integrity_sha256']});return 0
|
| 40 |
+
policy=js(read(a.policy)) if a.policy else None
|
| 41 |
+
r=run_ocir(ocir,js(a.args),a.engine,policy=policy,stop_after=a.stop_after)
|
| 42 |
+
if a.checkpoint_out and r.get('checkpoint'):Path(a.checkpoint_out).write_text(json.dumps(r['checkpoint'],sort_keys=True),encoding='utf-8')
|
| 43 |
+
elif a.command=='inspect':
|
| 44 |
+
o=loads_ocir(read(a.ocir));output({'schema_version':o['schema_version'],'schema_sha256':o['schema_sha256'],'program_id':o['program_id'],'entrypoint':o['entrypoint'],'functions':[f['name'] for f in o['typed_blocks']],'required_effects':o['required_effects'],'limits':o['limits'],'integrity':'PASS'});return 0
|
| 45 |
+
elif a.command=='replay':
|
| 46 |
+
o=loads_ocir(read(a.ocir));r=run_ocir(o,js(a.args),policy=js(read(a.policy)) if a.policy else None,checkpoint=js(read(a.checkpoint)))
|
| 47 |
+
else:
|
| 48 |
+
fixtures=[('arithmetic','module t; fn main() -> Int64 { return 7 * 6; }',42),('branch','module t; fn main() -> Int64 { if true { return 1; } else { return 0; } }',1),('function','module t; fn f(x:Int64)->Int64{return x*x;} fn main()->Int64{return f(9);}',81)]
|
| 49 |
+
results=[]
|
| 50 |
+
for name,s,v in fixtures:
|
| 51 |
+
vals=[run_source(s,engine=e)['value'] for e in ('tree','vm')];results.append({'name':name,'passed':vals==[v,v]})
|
| 52 |
+
passed=all(x['passed'] for x in results);output({'status':'PASS' if passed else 'FAIL','tests':results});return 0 if passed else 1
|
| 53 |
+
if not a.trace and 'trace' in r:r['trace_sha256']=digest(r['trace']);r['trace_events']=len(r.pop('trace'))
|
| 54 |
+
output({'status':'PAUSED' if r.get('checkpoint') else 'PASS',**r});return 0
|
| 55 |
+
except ICLError as e:
|
| 56 |
+
print(json.dumps({'status':'ERROR','diagnostic':e.as_dict()},ensure_ascii=False),file=sys.stderr);return 2
|
| 57 |
+
except (OSError,UnicodeError) as e:
|
| 58 |
+
print(json.dumps({'status':'ERROR','diagnostic':{'code':'IO','message':str(e)}}),file=sys.stderr);return 3
|
| 59 |
+
if __name__=='__main__':raise SystemExit(main())
|
source/icl/frontend.py
ADDED
|
@@ -0,0 +1,208 @@
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""ICL 0.1 hand-written lexer/parser. No host language parsing or evaluation."""
|
| 2 |
+
import bisect, json, re, unicodedata
|
| 3 |
+
from .runtime import ICLError
|
| 4 |
+
|
| 5 |
+
KEYWORDS={'module','import','fn','let','var','if','else','while','limit','return','true','false','type'}
|
| 6 |
+
class Parser:
|
| 7 |
+
def __init__(self,source):
|
| 8 |
+
if not isinstance(source,str) or len(source.encode())>1000000: raise ICLError('SOURCE_LIMIT','source must be UTF-8 text <= 1MB')
|
| 9 |
+
for c in source:
|
| 10 |
+
if unicodedata.category(c) in ('Cf','Cs') or (ord(c)<32 and c not in '\n\r\t'): raise ICLError('LEX','invisible/control character forbidden')
|
| 11 |
+
self.source=source; self.tokens=[]; self.i=0; self.depth=0; self.aliases={}
|
| 12 |
+
self.newlines=[-1]+[i for i,c in enumerate(source) if c=='\n']
|
| 13 |
+
pattern=re.compile(r'(?P<space>\s+)|(?P<comment>//[^\n]*)|(?P<string>"(?:[^"\\\n]|\\["\\/bfnrt]|\\u[0-9a-fA-F]{4})*")|(?P<float>\d+\.\d+(?:[eE][+-]?\d+)?|\d+[eE][+-]?\d+)|(?P<int>\d+)|(?P<id>[A-Za-z_][A-Za-z_0-9]*)|(?P<op>->|==|!=|<=|>=|&&|\|\||[{}()\[\],;:.+*/%<>=!\-])')
|
| 14 |
+
p=0
|
| 15 |
+
while p<len(source):
|
| 16 |
+
m=pattern.match(source,p)
|
| 17 |
+
if not m: raise ICLError('LEX',f'unexpected character {source[p]!r}',self.span(p))
|
| 18 |
+
if m.lastgroup in ('int','float') and len(m.group())>128:
|
| 19 |
+
raise ICLError('NUMBER_LIMIT','numeric token exceeds 128 characters',self.span(p))
|
| 20 |
+
if m.lastgroup not in ('space','comment'): self.tokens.append((m.lastgroup,m.group(),self.span(p)))
|
| 21 |
+
p=m.end()
|
| 22 |
+
if len(self.tokens)>100000: raise ICLError('SOURCE_LIMIT','too many tokens')
|
| 23 |
+
self.tokens.append(('eof','<eof>',self.span(len(source))))
|
| 24 |
+
def span(self,p):
|
| 25 |
+
line=bisect.bisect_left(self.newlines,p)
|
| 26 |
+
return {'line':line,'column':p-self.newlines[line-1],'offset':p}
|
| 27 |
+
def peek(self,v=None): return self.tokens[self.i][1] if v is None else self.tokens[self.i][1]==v
|
| 28 |
+
def take(self,v=None):
|
| 29 |
+
if self.i>=len(self.tokens) or self.tokens[self.i][0]=='eof':
|
| 30 |
+
raise ICLError('PARSE','unexpected end of source',self.tokens[-1][2])
|
| 31 |
+
t=self.tokens[self.i]
|
| 32 |
+
if v is not None and t[1]!=v: raise ICLError('PARSE',f'expected {v}, got {t[1]}',t[2])
|
| 33 |
+
self.i+=1; return t
|
| 34 |
+
def ident(self):
|
| 35 |
+
t=self.take()
|
| 36 |
+
if t[0]!='id' or t[1] in KEYWORDS: raise ICLError('PARSE','identifier expected',t[2])
|
| 37 |
+
return t[1]
|
| 38 |
+
def typ(self):
|
| 39 |
+
name=self.ident()
|
| 40 |
+
if name in self.aliases:
|
| 41 |
+
if self.peek('['):
|
| 42 |
+
raise ICLError('TYPE','type alias cannot take arguments')
|
| 43 |
+
return self.aliases[name]
|
| 44 |
+
if name=='Record' and self.peek('{'):
|
| 45 |
+
self.take('{'); fields={}
|
| 46 |
+
if self.peek('}'):raise ICLError('TYPE','empty record annotation is unsupported')
|
| 47 |
+
while True:
|
| 48 |
+
field=self.ident()
|
| 49 |
+
if field in fields:raise ICLError('TYPE','duplicate record type field')
|
| 50 |
+
self.take(':'); fields[field]=self.typ()
|
| 51 |
+
if not self.peek(','):break
|
| 52 |
+
self.take(',')
|
| 53 |
+
self.take('}')
|
| 54 |
+
return 'Record{'+','.join(k+':'+v for k,v in sorted(fields.items()))+'}'
|
| 55 |
+
if self.peek('['):
|
| 56 |
+
self.take(); args=[]
|
| 57 |
+
if not self.peek(']'):
|
| 58 |
+
while True:
|
| 59 |
+
args.append(self.take()[1] if self.tokens[self.i][0]=='int' else self.typ())
|
| 60 |
+
if not self.peek(','): break
|
| 61 |
+
self.take(',')
|
| 62 |
+
self.take(']'); name+='['+','.join(args)+']'
|
| 63 |
+
return name
|
| 64 |
+
def parse(self):
|
| 65 |
+
self.take('module'); module=self.ident(); self.take(';'); imports=[]; funcs=[]
|
| 66 |
+
while self.peek('import'):
|
| 67 |
+
self.take(); imports.append(self.ident()); self.take(';')
|
| 68 |
+
while self.peek('type'):
|
| 69 |
+
self.take('type'); alias=self.ident()
|
| 70 |
+
if alias in self.aliases or alias in {'Int64','Float64','Bool','String','Record','Tensor','List','Result','Option','Observer','Context','ProvenanceRef','RecoveryWitness','Capability','Tuple','Exact','Approx','Representation'}:
|
| 71 |
+
raise ICLError('TYPE','duplicate or reserved type alias')
|
| 72 |
+
self.take('='); target=self.typ(); self.take(';')
|
| 73 |
+
from .checker import valid_type
|
| 74 |
+
if not valid_type(target):raise ICLError('TYPE','alias must resolve to an already defined type')
|
| 75 |
+
self.aliases[alias]=target
|
| 76 |
+
while not self.peek('<eof>'):
|
| 77 |
+
sp=self.take('fn')[2]; name=self.ident(); self.take('('); params=[]
|
| 78 |
+
if not self.peek(')'):
|
| 79 |
+
while True:
|
| 80 |
+
nm=self.ident(); self.take(':'); params.append([nm,self.typ()])
|
| 81 |
+
if not self.peek(','): break
|
| 82 |
+
self.take(',')
|
| 83 |
+
self.take(')'); self.take('->'); ret=self.typ(); funcs.append({'name':name,'params':params,'return_type':ret,'body':self.block(),'span':sp})
|
| 84 |
+
if not funcs: raise ICLError('PARSE','module requires function')
|
| 85 |
+
return {'module':module,'imports':imports,'functions':funcs}
|
| 86 |
+
def block(self):
|
| 87 |
+
self.take('{'); body=[]
|
| 88 |
+
while not self.peek('}'):
|
| 89 |
+
if self.peek('<eof>'): raise ICLError('PARSE','unterminated block')
|
| 90 |
+
body.append(self.stmt())
|
| 91 |
+
self.take('}'); return body
|
| 92 |
+
def stmt(self):
|
| 93 |
+
sp=self.tokens[self.i][2]; v=self.peek()
|
| 94 |
+
if v in ('let','var'):
|
| 95 |
+
self.take(); nm=self.ident(); tp=None
|
| 96 |
+
if self.peek(':'): self.take();tp=self.typ()
|
| 97 |
+
self.take('='); ex=self.expr();self.take(';');return {'kind':'let','name':nm,'type':tp,'mutable':v=='var','expr':ex,'span':sp}
|
| 98 |
+
if v=='return':
|
| 99 |
+
self.take();ex=self.expr();self.take(';');return {'kind':'return','expr':ex,'span':sp}
|
| 100 |
+
if v=='if':
|
| 101 |
+
self.take();co=self.expr();yes=self.block();no=[]
|
| 102 |
+
if self.peek('else'):self.take();no=self.block()
|
| 103 |
+
return {'kind':'if','cond':co,'then':yes,'else':no,'span':sp}
|
| 104 |
+
if v=='while':
|
| 105 |
+
self.take();co=self.expr();self.take('limit');t=self.take()
|
| 106 |
+
if t[0]!='int' or not 0<=int(t[1])<=100000:raise ICLError('PARSE','loop limit must be literal 0..100000',t[2])
|
| 107 |
+
return {'kind':'while','cond':co,'limit':int(t[1]),'body':self.block(),'span':sp}
|
| 108 |
+
if self.tokens[self.i][0]=='id' and self.tokens[self.i+1][1]=='=':
|
| 109 |
+
nm=self.ident();self.take('=');ex=self.expr();self.take(';');return {'kind':'assign','name':nm,'expr':ex,'span':sp}
|
| 110 |
+
ex=self.expr();self.take(';');return {'kind':'expr','expr':ex,'span':sp}
|
| 111 |
+
PREC={'||':1,'&&':2,'==':3,'!=':3,'<':4,'>':4,'<=':4,'>=':4,'+':5,'-':5,'*':6,'/':6,'%':6}
|
| 112 |
+
def expr(self,p=0):
|
| 113 |
+
self.depth+=1
|
| 114 |
+
if self.depth>150:raise ICLError('PARSE_DEPTH','expression nesting exceeds 150')
|
| 115 |
+
try:
|
| 116 |
+
t=self.take();sp=t[2];v=t[1]
|
| 117 |
+
if v=='-' and self.tokens[self.i][0]=='int' and self.tokens[self.i][1]==str(1<<63):
|
| 118 |
+
self.take();left={'kind':'literal','value':-(1<<63),'span':sp}
|
| 119 |
+
elif v in ('!','-'):left={'kind':'unary','op':v,'expr':self.expr(7),'span':sp}
|
| 120 |
+
elif t[0] in ('int','float','string') or v in ('true','false'):
|
| 121 |
+
val=json.loads(v) if t[0]=='string' else float(v) if t[0]=='float' else int(v) if t[0]=='int' else v=='true'
|
| 122 |
+
if isinstance(val,str) and any(unicodedata.category(c)=='Cs' for c in val):raise ICLError('LEX','unpaired Unicode surrogate forbidden',sp)
|
| 123 |
+
left={'kind':'literal','value':val,'span':sp}
|
| 124 |
+
elif v=='(':
|
| 125 |
+
left=self.expr()
|
| 126 |
+
if self.peek(','):
|
| 127 |
+
items=[left]
|
| 128 |
+
while self.peek(','):self.take();items.append(self.expr())
|
| 129 |
+
left={'kind':'tuple','items':items,'span':sp}
|
| 130 |
+
self.take(')')
|
| 131 |
+
elif v=='[':
|
| 132 |
+
items=[]
|
| 133 |
+
if not self.peek(']'):
|
| 134 |
+
while True:
|
| 135 |
+
items.append(self.expr())
|
| 136 |
+
if not self.peek(','):break
|
| 137 |
+
self.take(',')
|
| 138 |
+
self.take(']');left={'kind':'list','items':items,'span':sp}
|
| 139 |
+
elif v=='{':
|
| 140 |
+
fields={}
|
| 141 |
+
if not self.peek('}'):
|
| 142 |
+
while True:
|
| 143 |
+
k=self.ident()
|
| 144 |
+
if k in fields:raise ICLError('PARSE','duplicate field')
|
| 145 |
+
self.take(':');fields[k]=self.expr()
|
| 146 |
+
if not self.peek(','):break
|
| 147 |
+
self.take(',')
|
| 148 |
+
self.take('}');left={'kind':'record','fields':fields,'span':sp}
|
| 149 |
+
elif t[0]=='id' and v not in KEYWORDS:left={'kind':'var','name':v,'span':sp}
|
| 150 |
+
else:raise ICLError('PARSE','expression expected',sp)
|
| 151 |
+
while True:
|
| 152 |
+
if self.peek('('):
|
| 153 |
+
if left['kind'] not in ('var','field'):raise ICLError('PARSE','calls require named function',sp)
|
| 154 |
+
name=left['name'] if left['kind']=='var' else left['target']['name']+'.'+left['name'] if left['target']['kind']=='var' else None
|
| 155 |
+
if name is None:raise ICLError('PARSE','invalid call target',sp)
|
| 156 |
+
self.take();args=[]
|
| 157 |
+
if not self.peek(')'):
|
| 158 |
+
while True:
|
| 159 |
+
args.append(self.expr())
|
| 160 |
+
if not self.peek(','):break
|
| 161 |
+
self.take(',')
|
| 162 |
+
self.take(')');left={'kind':'call','name':name,'args':args,'span':sp};continue
|
| 163 |
+
if self.peek('['):
|
| 164 |
+
self.take();ix=self.expr();self.take(']');left={'kind':'index','target':left,'index':ix,'span':sp};continue
|
| 165 |
+
if self.peek('.'):
|
| 166 |
+
self.take();nm=self.ident();left={'kind':'field','target':left,'name':nm,'span':sp};continue
|
| 167 |
+
op=self.peek();prec=self.PREC.get(op,-1)
|
| 168 |
+
if prec<p:break
|
| 169 |
+
self.take();right=self.expr(prec+1);left={'kind':'binary','op':op,'left':left,'right':right,'span':sp}
|
| 170 |
+
return left
|
| 171 |
+
finally:self.depth-=1
|
| 172 |
+
|
| 173 |
+
def parse(source):
|
| 174 |
+
try:return Parser(source).parse()
|
| 175 |
+
except RecursionError:raise ICLError('PARSE_DEPTH','parser recursion limit')
|
| 176 |
+
except IndexError:raise ICLError('PARSE','unexpected end of source')
|
| 177 |
+
except (ValueError,OverflowError):raise ICLError('LEX','invalid or oversized literal')
|
| 178 |
+
|
| 179 |
+
def canonical_ast(node):
|
| 180 |
+
if isinstance(node,dict):return {k:canonical_ast(v) for k,v in sorted(node.items()) if k not in ('span','inferred_type','effects')}
|
| 181 |
+
if isinstance(node,list):return [canonical_ast(v) for v in node]
|
| 182 |
+
return node
|
| 183 |
+
|
| 184 |
+
def pretty(program):
|
| 185 |
+
def e(x):
|
| 186 |
+
k=x['kind']
|
| 187 |
+
if k=='literal':return json.dumps(x['value'],ensure_ascii=False)
|
| 188 |
+
if k=='var':return x['name']
|
| 189 |
+
if k=='binary':return '('+e(x['left'])+' '+x['op']+' '+e(x['right'])+')'
|
| 190 |
+
if k=='unary':return '('+x['op']+e(x['expr'])+')'
|
| 191 |
+
if k=='call':return x['name']+'('+', '.join(e(a) for a in x['args'])+')'
|
| 192 |
+
if k in ('list','tuple'):return ('[' if k=='list' else '(')+', '.join(e(a) for a in x['items'])+(']' if k=='list' else ')')
|
| 193 |
+
if k=='record':return '{'+', '.join(n+': '+e(a) for n,a in x['fields'].items())+'}'
|
| 194 |
+
if k=='index':return e(x['target'])+'['+e(x['index'])+']'
|
| 195 |
+
if k=='field':return e(x['target'])+'.'+x['name']
|
| 196 |
+
raise ICLError('UNSUPPORTED_OP',k)
|
| 197 |
+
def b(ss):
|
| 198 |
+
out=[]
|
| 199 |
+
for s in ss:
|
| 200 |
+
k=s['kind']
|
| 201 |
+
if k=='let':out.append(('var ' if s['mutable'] else 'let ')+s['name']+(':'+s['type'] if s.get('type') else '')+' = '+e(s['expr'])+';')
|
| 202 |
+
elif k=='assign':out.append(s['name']+' = '+e(s['expr'])+';')
|
| 203 |
+
elif k=='return':out.append('return '+e(s['expr'])+';')
|
| 204 |
+
elif k=='expr':out.append(e(s['expr'])+';')
|
| 205 |
+
elif k=='if':out.append('if '+e(s['cond'])+' { '+b(s['then'])+' } else { '+b(s['else'])+' }')
|
| 206 |
+
elif k=='while':out.append('while '+e(s['cond'])+' limit '+str(s['limit'])+' { '+b(s['body'])+' }')
|
| 207 |
+
return ' '.join(out)
|
| 208 |
+
return 'module '+program['module']+';\n'+''.join('import '+m+';\n' for m in program['imports'])+'\n'.join('fn '+f['name']+'('+', '.join(n+': '+t for n,t in f['params'])+') -> '+f['return_type']+' { '+b(f['body'])+' }' for f in program['functions'])+'\n'
|
source/icl/interpreter.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Independent recursive tree evaluator: no bytecode compiler or VM calls."""
|
| 2 |
+
from .runtime import ICLError,RuntimeContext,checked_binary,checked_unary,builtin,BUILTINS,digest
|
| 3 |
+
from .checker import validate_value
|
| 4 |
+
class Returned(Exception):
|
| 5 |
+
def __init__(self,value):self.value=value
|
| 6 |
+
class Scope:
|
| 7 |
+
def __init__(self,parent=None):self.parent=parent;self.values={}
|
| 8 |
+
def get(self,name):
|
| 9 |
+
if name in self.values:return self.values[name]
|
| 10 |
+
if self.parent is not None:return self.parent.get(name)
|
| 11 |
+
raise ICLError('NAME','undefined '+name)
|
| 12 |
+
def set(self,name,val):
|
| 13 |
+
if name in self.values:self.values[name]=val
|
| 14 |
+
elif self.parent is not None:self.parent.set(name,val)
|
| 15 |
+
else:raise ICLError('NAME','undefined assignment '+name)
|
| 16 |
+
|
| 17 |
+
def execute_tree(program,entry='main',args=None,limits=None,policy=None):
|
| 18 |
+
ctx=RuntimeContext(limits,policy);fs={f['name']:f for f in program['functions']};depth=0
|
| 19 |
+
def ex(x,scope):
|
| 20 |
+
chain=[];cur=scope
|
| 21 |
+
while cur is not None:chain.append(cur.values);cur=cur.parent
|
| 22 |
+
ctx.step('tree.'+x['kind'],inputs={'scope':chain,'prng':ctx.prng})
|
| 23 |
+
event=ctx.trace[-1]
|
| 24 |
+
try:
|
| 25 |
+
value=_ex(x,scope);event['output_hash']=digest(value);event['state_ref']=event['output_hash'];return value
|
| 26 |
+
except ICLError as error:event['error_code']=error.code;raise
|
| 27 |
+
def _ex(x,scope):
|
| 28 |
+
k=x['kind']
|
| 29 |
+
if k=='literal':return x['value']
|
| 30 |
+
if k=='var':return scope.get(x['name'])
|
| 31 |
+
if k=='unary':return checked_unary(x['op'],ex(x['expr'],scope))
|
| 32 |
+
if k=='binary':
|
| 33 |
+
a=ex(x['left'],scope)
|
| 34 |
+
if x['op']=='&&' and a is False:return False
|
| 35 |
+
if x['op']=='||' and a is True:return True
|
| 36 |
+
return ctx.check_value(checked_binary(x['op'],a,ex(x['right'],scope)))
|
| 37 |
+
if k=='call':
|
| 38 |
+
aa=[ex(v,scope) for v in x['args']]
|
| 39 |
+
return ctx.check_value(builtin(x['name'],aa,ctx) if x['name'] in BUILTINS else call(x['name'],aa))
|
| 40 |
+
if k in ('list','tuple'):return ctx.check_value([ex(v,scope) for v in x['items']])
|
| 41 |
+
if k=='record':return ctx.check_value({n:ex(x['fields'][n],scope) for n in sorted(x['fields'])})
|
| 42 |
+
if k=='index':
|
| 43 |
+
a=ex(x['target'],scope);i=ex(x['index'],scope)
|
| 44 |
+
if i<0 or i>=len(a):raise ICLError('BOUNDS','index out of bounds')
|
| 45 |
+
return a[i]
|
| 46 |
+
if k=='field':return ex(x['target'],scope)[x['name']]
|
| 47 |
+
raise ICLError('UNSUPPORTED_OP',k)
|
| 48 |
+
def block(ss,parent):
|
| 49 |
+
scope=Scope(parent)
|
| 50 |
+
for s in ss:
|
| 51 |
+
k=s['kind'];ctx.step('tree.'+k)
|
| 52 |
+
if k=='let':scope.values[s['name']]=ex(s['expr'],scope)
|
| 53 |
+
elif k=='assign':scope.set(s['name'],ex(s['expr'],scope))
|
| 54 |
+
elif k=='return':raise Returned(ex(s['expr'],scope))
|
| 55 |
+
elif k=='expr':ex(s['expr'],scope)
|
| 56 |
+
elif k=='if':block(s['then'] if ex(s['cond'],scope) else s['else'],scope)
|
| 57 |
+
elif k=='while':
|
| 58 |
+
count=0
|
| 59 |
+
while ex(s['cond'],scope):
|
| 60 |
+
if count>=s['limit']:raise ICLError('LOOP_LIMIT','declared iteration bound exceeded')
|
| 61 |
+
count+=1;block(s['body'],scope)
|
| 62 |
+
else:raise ICLError('UNSUPPORTED_OP',k)
|
| 63 |
+
def call(name,aa):
|
| 64 |
+
nonlocal depth
|
| 65 |
+
if name not in fs:raise ICLError('NAME','entry/function missing '+name)
|
| 66 |
+
f=fs[name]
|
| 67 |
+
if len(aa)!=len(f['params']):raise ICLError('TYPE','function argument count')
|
| 68 |
+
depth+=1
|
| 69 |
+
if depth>ctx.limits['max_stack']:raise ICLError('STACK_LIMIT','call stack budget')
|
| 70 |
+
env=Scope()
|
| 71 |
+
for (n,t),v in zip(f['params'],aa):validate_value(v,t,ctx);env.values[n]=v
|
| 72 |
+
try:block(f['body'],env)
|
| 73 |
+
except Returned as r:validate_value(r.value,f['return_type'],ctx);return r.value
|
| 74 |
+
finally:depth-=1
|
| 75 |
+
raise ICLError('RETURN','function reached end')
|
| 76 |
+
try:value=call(entry,args or [])
|
| 77 |
+
except RecursionError:raise ICLError('STACK_LIMIT','host recursion boundary reached')
|
| 78 |
+
ctx.check_value(value)
|
| 79 |
+
return {'value':value,'trace':ctx.trace,'effects':ctx.effects,'steps':ctx.steps}
|
source/icl/legacy_afc.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Bounded AFC Phase-I finite-state recovery algorithm transfer.
|
| 2 |
+
|
| 3 |
+
Port source: INVARIANT_FINAL_PHASE_I, source/src/science.py:afc_finite_limits.
|
| 4 |
+
Finite arithmetic only (2..10 bits). Does NOT demonstrate physical/hardware
|
| 5 |
+
reversibility, zero dissipation, clinical effectiveness, or general laws.
|
| 6 |
+
"""
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
from typing import Any
|
| 10 |
+
|
| 11 |
+
CLAIM_BOUNDARY = (
|
| 12 |
+
"Elementary finite-state injectivity and recovery examples with explicit "
|
| 13 |
+
"side-information cost. Not a universal physical law, erasure-free hardware "
|
| 14 |
+
"demonstration, clinical validation, or independent venture-domain experiments."
|
| 15 |
+
)
|
| 16 |
+
ORIGINAL_PHASE_I_ZIP_SHA256 = "469f3eedb6c26f601dc2357f029364a2b3974cfbd3d937385d1dfe5c2840231e"
|
| 17 |
+
ORIGINAL_RESULT_MEMBER_SHA256 = "02167c798d3f2e56fed9e9c0966f6ab3a151bd4e5e4747a5e6ed40472c844f2e"
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def _bits(bits: int) -> int:
|
| 21 |
+
if type(bits) is not int or not 2 <= bits <= 10:
|
| 22 |
+
raise ValueError("AFC_FINITE_BITS_2_TO_10_ONLY")
|
| 23 |
+
return bits
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def encode_permutation(x: int, bits: int) -> int:
|
| 27 |
+
"""Exactly follows original fixed finite permutation y=(5x+3) mod 2^bits."""
|
| 28 |
+
n = 1 << _bits(bits)
|
| 29 |
+
if type(x) is not int or not 0 <= x < n:
|
| 30 |
+
raise ValueError("AFC_FINITE_INPUT_OUT_OF_RANGE")
|
| 31 |
+
return (5*x+3) % n
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def decode_permutation(y: int, bits: int) -> int:
|
| 35 |
+
n = 1 << _bits(bits)
|
| 36 |
+
if type(y) is not int or not 0 <= y < n:
|
| 37 |
+
raise ValueError("AFC_FINITE_INPUT_OUT_OF_RANGE")
|
| 38 |
+
return ((y-3)*pow(5,-1,n)) % n
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def quotient(x: int, bits: int) -> int:
|
| 42 |
+
n = 1 << _bits(bits)
|
| 43 |
+
if type(x) is not int or not 0 <= x < n:
|
| 44 |
+
raise ValueError("AFC_FINITE_INPUT_OUT_OF_RANGE")
|
| 45 |
+
kept = max(1,bits//2)
|
| 46 |
+
return x % (1 << kept)
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def recover_from_quotient(q: int, side: int, bits: int) -> int:
|
| 50 |
+
"""Original quotient + REQUIRED side-information; no silent recovery guess."""
|
| 51 |
+
_bits(bits)
|
| 52 |
+
kept = max(1,bits//2)
|
| 53 |
+
if type(q) is not int or not 0 <= q < (1 << kept):
|
| 54 |
+
raise ValueError("AFC_QUOTIENT_OUT_OF_RANGE")
|
| 55 |
+
if type(side) is not int or not 0 <= side < (1 << (bits-kept)):
|
| 56 |
+
raise ValueError("AFC_SIDE_INFORMATION_REQUIRED_OR_INVALID")
|
| 57 |
+
return q + (1 << kept) * side
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def finite_report(bits: int) -> dict[str, Any]:
|
| 61 |
+
"""Bounded deterministic report with original Phase-I field names."""
|
| 62 |
+
_bits(bits)
|
| 63 |
+
n = 1 << bits
|
| 64 |
+
kept = max(1, bits//2)
|
| 65 |
+
fibers: dict[int,list[int]] = {}
|
| 66 |
+
perm=[]
|
| 67 |
+
for x in range(n):
|
| 68 |
+
perm.append(encode_permutation(x,bits))
|
| 69 |
+
fibers.setdefault(quotient(x,bits),[]).append(x)
|
| 70 |
+
inv_exact=all(decode_permutation(y,bits)==x for x,y in enumerate(perm))
|
| 71 |
+
side_exact=all(recover_from_quotient(quotient(x,bits),x//(1<<kept),bits)==x for x in range(n))
|
| 72 |
+
witness=next(v[:2] for v in fibers.values() if len(v)>1)
|
| 73 |
+
return {
|
| 74 |
+
'bits':bits,'states':n,'permutation_inverse_exact':inv_exact,
|
| 75 |
+
'retained_bits':kept,'lost_bits':bits-kept,
|
| 76 |
+
'best_uniform_exact_recovery_probability_without_side_information':len(fibers)/n,
|
| 77 |
+
'collision_witness':witness,
|
| 78 |
+
'side_information_bits_needed_for_full_uniform_recovery':bits-kept,
|
| 79 |
+
'recovery_with_quotient_side_information_exact':side_exact,
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def product_diagnostic(bits: int) -> dict[str, Any]:
|
| 84 |
+
"""Read-only local product feature. The scientific claim remains scope-limited."""
|
| 85 |
+
return {
|
| 86 |
+
'schema':'invariant-os-afc-finite-diagnostic/4',
|
| 87 |
+
'experiment':'afc_finite_limits',
|
| 88 |
+
'research_programme':'AFC',
|
| 89 |
+
'implementation':'DIRECT_FINITE_ALGORITHM_PORT',
|
| 90 |
+
'scientific_validation':'SOURCE_BOUNDED_FINITE_ONLY',
|
| 91 |
+
'source_zip_sha256':ORIGINAL_PHASE_I_ZIP_SHA256,
|
| 92 |
+
'source_result_sha256':ORIGINAL_RESULT_MEMBER_SHA256,
|
| 93 |
+
'result':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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Primitive numeric/metadata registry shared by independent execution engines.
|
| 2 |
+
No I/O, FFI, shell, eval or dynamic import is exposed by the language.
|
| 3 |
+
"""
|
| 4 |
+
import hashlib,json,math,operator
|
| 5 |
+
|
| 6 |
+
class ICLError(Exception):
|
| 7 |
+
def __init__(self,code,message,span=None):
|
| 8 |
+
self.code=code;self.message=message;self.span=span
|
| 9 |
+
super().__init__(f'{code}: {message}')
|
| 10 |
+
def as_dict(self):return {'code':self.code,'message':self.message,'span':self.span}
|
| 11 |
+
|
| 12 |
+
def canonical(x):return json.dumps(x,sort_keys=True,separators=(',',':'),ensure_ascii=False,allow_nan=False)
|
| 13 |
+
def digest(x):return hashlib.sha256(canonical(x).encode()).hexdigest()
|
| 14 |
+
DEFAULT_LIMITS={'max_steps':100000,'max_stack':128,'max_items':100000,'max_output':1000000,'max_tensor':4096}
|
| 15 |
+
class RuntimeContext:
|
| 16 |
+
def __init__(self,limits=None,policy=None):
|
| 17 |
+
self.limits=dict(DEFAULT_LIMITS)
|
| 18 |
+
if limits:
|
| 19 |
+
for k,v in limits.items():
|
| 20 |
+
if k not in self.limits or type(v)!=int or v<1 or v>DEFAULT_LIMITS[k]:raise ICLError('RESOURCE_POLICY','limits may only reduce defaults')
|
| 21 |
+
self.limits[k]=v
|
| 22 |
+
self.policy={} if policy is None else policy
|
| 23 |
+
if not isinstance(self.policy,dict):raise ICLError('RESOURCE_POLICY','policy must be object')
|
| 24 |
+
for action,permission in self.policy.items():
|
| 25 |
+
if not isinstance(action,str) or not isinstance(permission,dict) or set(permission)-{'allow','human_required','human_approved'}:raise ICLError('RESOURCE_POLICY','invalid policy descriptor')
|
| 26 |
+
if any(type(v)!=bool for v in permission.values()):raise ICLError('RESOURCE_POLICY','policy flags require strict booleans')
|
| 27 |
+
self.steps=0;self.trace=[];self.effects=[];self.prng=1
|
| 28 |
+
def step(self,op='',inputs=None,output=None):
|
| 29 |
+
self.steps+=1
|
| 30 |
+
if self.steps>self.limits['max_steps']:raise ICLError('FUEL_EXHAUSTED','step budget exceeded')
|
| 31 |
+
self.trace.append({'run_id':'deterministic','step':self.steps,'op_id':op,'input_hash':digest(inputs),'output_hash':digest(output),'state_ref':None,'effect_request':None,'effect_decision':None,'recovery_ref':None,'error_code':None,'clock_mode':'logical'})
|
| 32 |
+
def check_value(self,value):
|
| 33 |
+
count=0
|
| 34 |
+
def walk(v,depth=0):
|
| 35 |
+
nonlocal count
|
| 36 |
+
count+=1
|
| 37 |
+
if depth>128 or count>self.limits['max_items']:raise ICLError('MEMORY_LIMIT','value size/depth limit')
|
| 38 |
+
if isinstance(v,(list,tuple)):
|
| 39 |
+
for x in v:walk(x,depth+1)
|
| 40 |
+
elif isinstance(v,dict):
|
| 41 |
+
for x in v.values():walk(x,depth+1)
|
| 42 |
+
elif isinstance(v,float) and not math.isfinite(v):raise ICLError('NONFINITE','NaN/Inf forbidden')
|
| 43 |
+
elif type(v)==int and not -(1<<63)<=v<(1<<63):raise ICLError('OVERFLOW','Int64 overflow')
|
| 44 |
+
elif isinstance(v,str) and len(v.encode())>self.limits['max_output']:raise ICLError('OUTPUT_LIMIT','string too large')
|
| 45 |
+
walk(value)
|
| 46 |
+
if len(canonical(value).encode())>self.limits['max_output']:raise ICLError('OUTPUT_LIMIT','serialized value too large')
|
| 47 |
+
return value
|
| 48 |
+
|
| 49 |
+
def checked_num(v):
|
| 50 |
+
if type(v)==int and not -(1<<63)<=v<(1<<63):raise ICLError('OVERFLOW','Int64 overflow')
|
| 51 |
+
if isinstance(v,float) and not math.isfinite(v):raise ICLError('NONFINITE','NaN/Inf forbidden')
|
| 52 |
+
return v
|
| 53 |
+
|
| 54 |
+
def checked_binary(op,a,b):
|
| 55 |
+
if op in ('&&','||'):
|
| 56 |
+
if type(a)!=bool or type(b)!=bool:raise ICLError('TYPE','Bool operands required')
|
| 57 |
+
return a and b if op=='&&' else a or b
|
| 58 |
+
if op in ('==','!='):
|
| 59 |
+
if type(a)!=type(b):raise ICLError('TYPE','same types required')
|
| 60 |
+
return a==b if op=='==' else a!=b
|
| 61 |
+
if op in ('<','<=','>','>='):
|
| 62 |
+
if type(a) not in (int,float,str) or type(a)!=type(b):raise ICLError('TYPE','homogeneous ordered scalar operands required')
|
| 63 |
+
return {'<':operator.lt,'<=':operator.le,'>':operator.gt,'>=':operator.ge}[op](a,b)
|
| 64 |
+
if op=='+' and type(a)==type(b)==str:return a+b
|
| 65 |
+
if type(a) not in (int,float) or type(a)!=type(b):raise ICLError('TYPE','homogeneous numeric operands required')
|
| 66 |
+
if op in ('/','%') and b==0:raise ICLError('DIVISION_BY_ZERO','zero divisor')
|
| 67 |
+
if op=='+':v=a+b
|
| 68 |
+
elif op=='-':v=a-b
|
| 69 |
+
elif op=='*':v=a*b
|
| 70 |
+
elif op=='/':v=(abs(a)//abs(b))*(-1 if (a<0)!=(b<0) else 1) if type(a)==int else a/b
|
| 71 |
+
elif op=='%':v=a-((abs(a)//abs(b))*(-1 if (a<0)!=(b<0) else 1))*b if type(a)==int else math.fmod(a,b)
|
| 72 |
+
else:raise ICLError('UNSUPPORTED_OP',op)
|
| 73 |
+
return checked_num(v)
|
| 74 |
+
def checked_unary(op,a):
|
| 75 |
+
if op=='!' and type(a)==bool:return not a
|
| 76 |
+
if op=='-' and type(a) in (int,float):return checked_num(-a)
|
| 77 |
+
raise ICLError('TYPE','invalid unary operand')
|
| 78 |
+
|
| 79 |
+
def tensor(data,shape,ctx):
|
| 80 |
+
if not isinstance(shape,list) or not 1<=len(shape)<=3 or any(type(x)!=int or x<1 for x in shape):raise ICLError('SHAPE','rank 1..3, positive dimensions required')
|
| 81 |
+
n=math.prod(shape)
|
| 82 |
+
if n>ctx.limits['max_tensor']:raise ICLError('TENSOR_LIMIT','tensor element limit')
|
| 83 |
+
if not isinstance(data,list) or n!=len(data):raise ICLError('SHAPE','data length mismatch')
|
| 84 |
+
if any(type(x)!=float or not math.isfinite(x) for x in data):raise ICLError('TYPE','finite Float64 tensor data required')
|
| 85 |
+
return {'shape':shape[:],'data':data[:]}
|
| 86 |
+
def istensor(x):return isinstance(x,dict) and set(x)=={'shape','data'}
|
| 87 |
+
def validate_tensor(x,ctx):
|
| 88 |
+
if not istensor(x):raise ICLError('TYPE','Tensor required')
|
| 89 |
+
return tensor(x['data'],x['shape'],ctx)
|
| 90 |
+
|
| 91 |
+
def _builtin(name,args,ctx):
|
| 92 |
+
def n(count):
|
| 93 |
+
if len(args)!=count:raise ICLError('TYPE',f'{name} expects {count} arguments')
|
| 94 |
+
if name=='len':n(1);return len(args[0])
|
| 95 |
+
if name=='abs':n(1);return checked_num(abs(args[0]))
|
| 96 |
+
if name in ('min','max'):n(2);return min(args) if name=='min' else max(args)
|
| 97 |
+
if name=='to_float':n(1);return float(args[0])
|
| 98 |
+
if name=='tensor':n(2);return tensor(args[0],args[1],ctx)
|
| 99 |
+
if name in ('matmul','add','sub','mul'):
|
| 100 |
+
n(2);a,b=[validate_tensor(x,ctx) for x in args]
|
| 101 |
+
if name=='matmul':
|
| 102 |
+
if len(a['shape'])!=2 or len(b['shape'])!=2 or a['shape'][1]!=b['shape'][0]:raise ICLError('SHAPE','matmul dimensions')
|
| 103 |
+
m,k=a['shape'];_,p=b['shape']
|
| 104 |
+
if m*p>ctx.limits['max_tensor']:raise ICLError('TENSOR_LIMIT','matmul output exceeds tensor limit before allocation')
|
| 105 |
+
return tensor([float(sum(a['data'][i*k+t]*b['data'][t*p+j] for t in range(k))) for i in range(m) for j in range(p)],[m,p],ctx)
|
| 106 |
+
if a['shape']!=b['shape']:raise ICLError('SHAPE','elementwise shapes differ')
|
| 107 |
+
op={'add':operator.add,'sub':operator.sub,'mul':operator.mul}[name]
|
| 108 |
+
return tensor([op(x,y) for x,y in zip(a['data'],b['data'])],a['shape'],ctx)
|
| 109 |
+
if name in ('relu','tanh','normalize','softmax'):
|
| 110 |
+
n(1);a=validate_tensor(args[0],ctx);d=a['data'];w=a['shape'][-1]
|
| 111 |
+
if name=='relu':d=[max(0.0,x) for x in d]
|
| 112 |
+
elif name=='tanh':d=[math.tanh(x) for x in d]
|
| 113 |
+
else:
|
| 114 |
+
out=[]
|
| 115 |
+
for j in range(0,len(d),w):
|
| 116 |
+
r=d[j:j+w]
|
| 117 |
+
if name=='softmax':z=[math.exp(x-max(r)) for x in r];s=sum(z);out.extend(x/s for x in z)
|
| 118 |
+
else:
|
| 119 |
+
mean=checked_num(sum(r)/w)
|
| 120 |
+
var=checked_num(sum((x-mean)**2 for x in r)/w)
|
| 121 |
+
out.extend((x-mean)/math.sqrt(var+1e-5) for x in r)
|
| 122 |
+
d=out
|
| 123 |
+
return tensor(d,a['shape'],ctx)
|
| 124 |
+
if name=='reshape':n(2);a=validate_tensor(args[0],ctx);return tensor(a['data'],args[1],ctx)
|
| 125 |
+
if name=='sum':n(1);a=validate_tensor(args[0],ctx);return checked_num(float(sum(a['data'])))
|
| 126 |
+
if name=='some':n(1);return {'tag':'Some','value':args[0]}
|
| 127 |
+
if name=='none_int':n(0);return {'tag':'None','value':None}
|
| 128 |
+
if name=='ok':n(1);return {'tag':'Ok','value':args[0]}
|
| 129 |
+
if name=='err_int':n(1);return {'tag':'Err','error':args[0]}
|
| 130 |
+
if name=='unwrap':
|
| 131 |
+
n(1);a=args[0]
|
| 132 |
+
if a.get('tag') not in ('Some','Ok'):raise ICLError('UNWRAP','empty/Err cannot unwrap')
|
| 133 |
+
return a['value']
|
| 134 |
+
if name=='is_some':n(1);return args[0]['tag']=='Some'
|
| 135 |
+
if name=='observer':n(1);return {'tag':'Observer','id':args[0]}
|
| 136 |
+
if name=='context':n(2);return {'tag':'Context','frame':args[0],'unit':args[1]}
|
| 137 |
+
if name=='provenance':n(1);return {'tag':'ProvenanceRef','source_id':args[0],'verified':False}
|
| 138 |
+
if name=='represent':
|
| 139 |
+
n(4);v,o,f,u=args
|
| 140 |
+
return {'tag':'Representation','value':v,'observer':o,'frame':f,'unit':u,'source_hash':digest(v),'provenance':{'status':'LOCAL_COMPUTATION','claim':'hash_is_integrity_only'}}
|
| 141 |
+
if name=='repr_value':n(1);return args[0]['value']
|
| 142 |
+
if name=='repr_add':
|
| 143 |
+
n(2);a,b=args
|
| 144 |
+
for field,code in [('observer','OBSERVER_MISMATCH'),('frame','FRAME_MISMATCH'),('unit','UNIT_MISMATCH')]:
|
| 145 |
+
if a[field]!=b[field]:raise ICLError(code,field+' mismatch; explicit conversion required')
|
| 146 |
+
return builtin('represent',[checked_binary('+',a['value'],b['value']),a['observer'],a['frame'],a['unit']],ctx)
|
| 147 |
+
if name=='convert_frame':
|
| 148 |
+
n(4);r,new,offset,protocol=args
|
| 149 |
+
if protocol!='affine_translation_v1':raise ICLError('NEEDS_EVIDENCE','unregistered transform protocol')
|
| 150 |
+
out=builtin('represent',[checked_binary('+',r['value'],offset),r['observer'],new,r['unit']],ctx)
|
| 151 |
+
out['provenance']={'source_hash':digest(r),'protocol':protocol,'offset':offset};return out
|
| 152 |
+
if name=='observe_mod':
|
| 153 |
+
n(3);x,m,o=args
|
| 154 |
+
if m<=0:raise ICLError('DOMAIN','positive modulus required')
|
| 155 |
+
r=builtin('represent',[x%m,o,'scalar','dimensionless'],ctx);r['modulus']=m;r['source_hash']=None;r['ambiguous']=True;return r
|
| 156 |
+
if name=='make_witness':
|
| 157 |
+
n(2);x,m=args
|
| 158 |
+
if m<=0:raise ICLError('DOMAIN','positive modulus required')
|
| 159 |
+
payload={'tag':'RecoveryWitness','quotient':x//m,'modulus':m,'remainder':x%m};payload['sha256']=digest(payload);payload['payload_bytes']=len(canonical(payload).encode());return payload
|
| 160 |
+
if name=='recover':
|
| 161 |
+
n(2);r,w=args
|
| 162 |
+
if w.get('tag')!='RecoveryWitness':raise ICLError('WITNESS_MISSING','witness required')
|
| 163 |
+
p={k:w[k] for k in ('tag','quotient','modulus','remainder')}
|
| 164 |
+
if digest(p)!=w.get('sha256'):raise ICLError('WITNESS_CORRUPT','witness checksum')
|
| 165 |
+
if r.get('modulus')!=w['modulus'] or r['value']!=w['remainder']:raise ICLError('WITNESS_CORRUPT','witness measurement mismatch')
|
| 166 |
+
return {'tag':'Exact','value':checked_num(w['quotient']*w['modulus']+w['remainder']),'witness_bytes':w['payload_bytes'],'scope':'declared_integer_modulo_protocol'}
|
| 167 |
+
if name=='recover_without_witness':n(1);raise ICLError('NON_IDENTIFIABLE','measurement has multiple compatible sources')
|
| 168 |
+
if name=='exact_value':n(1);return args[0]['value']
|
| 169 |
+
if name=='approx':
|
| 170 |
+
n(2)
|
| 171 |
+
if args[1]<0:raise ICLError('DOMAIN','nonnegative error bound required')
|
| 172 |
+
return {'tag':'Approx','value':args[0],'error_bound':args[1]}
|
| 173 |
+
if name=='approx_value':n(1);return args[0]['value']
|
| 174 |
+
if name=='request_effect':
|
| 175 |
+
n(2);action,payload=args;permission=ctx.policy.get(action,{})
|
| 176 |
+
allowed=action=='journal' and permission.get('allow') is True
|
| 177 |
+
if permission.get('human_required') is True and permission.get('human_approved') is not True:allowed=False;code='HUMAN_APPROVAL_REQUIRED'
|
| 178 |
+
else:code='EFFECT_DENIED'
|
| 179 |
+
event={'action':action,'payload_hash':digest(payload),'decision':'ALLOWED_LOCAL_JOURNAL' if allowed else 'DENIED','external_executed':False}
|
| 180 |
+
ctx.effects.append(event)
|
| 181 |
+
if not allowed:raise ICLError(code,'trusted host policy denied action')
|
| 182 |
+
return True
|
| 183 |
+
if name=='random_int':
|
| 184 |
+
n(1)
|
| 185 |
+
if args[0]<=0:raise ICLError('DOMAIN','positive PRNG range')
|
| 186 |
+
ctx.prng=(1103515245*ctx.prng+12345)%(1<<31);return ctx.prng%args[0]
|
| 187 |
+
raise ICLError('NAME','unknown builtin '+name)
|
| 188 |
+
|
| 189 |
+
def builtin(name,args,ctx):
|
| 190 |
+
"""Convert host primitive failures into bounded language diagnostics."""
|
| 191 |
+
try:return _builtin(name,args,ctx)
|
| 192 |
+
except (OverflowError,ZeroDivisionError):
|
| 193 |
+
raise ICLError('NONFINITE','numeric primitive overflow or undefined finite result') from None
|
| 194 |
+
except (TypeError,ValueError,KeyError,IndexError,AttributeError):
|
| 195 |
+
raise ICLError('TYPE','malformed primitive input for '+str(name)) from None
|
| 196 |
+
|
| 197 |
+
BUILTINS={'len','abs','min','max','to_float','tensor','matmul','add','sub','mul','relu','tanh','normalize','softmax','reshape','sum','some','none_int','ok','err_int','unwrap','is_some','observer','context','provenance','represent','repr_value','repr_add','convert_frame','observe_mod','make_witness','recover','recover_without_witness','exact_value','approx','approx_value','request_effect','random_int'}
|
source/icl/vm.py
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""ICL bytecode compiler and independent stack interpreter.
|
| 2 |
+
|
| 3 |
+
This backend shares scalar arithmetic, builtins, and resource accounting with
|
| 4 |
+
the tree interpreter; it does not call the tree interpreter or execute Python
|
| 5 |
+
source. Checkpoint hashes detect accidental modification, not adversarial
|
| 6 |
+
forgery: they are unkeyed checksums and confer no trust or authority.
|
| 7 |
+
"""
|
| 8 |
+
from __future__ import annotations
|
| 9 |
+
|
| 10 |
+
import hashlib
|
| 11 |
+
import json
|
| 12 |
+
import math
|
| 13 |
+
from copy import deepcopy
|
| 14 |
+
|
| 15 |
+
from .runtime import ICLError, RuntimeContext, builtin, checked_binary, checked_unary, DEFAULT_LIMITS
|
| 16 |
+
from .checker import valid_type, validate_value
|
| 17 |
+
|
| 18 |
+
BYTECODE_SCHEMA = "icl-bytecode/1"
|
| 19 |
+
CHECKPOINT_SCHEMA = "icl-vm-checkpoint/1"
|
| 20 |
+
OPCODES = {"PUSH", "LOAD", "LET", "STORE", "POP", "BINARY", "UNARY", "CALL",
|
| 21 |
+
"LIST", "TUPLE", "RECORD", "INDEX", "FIELD", "JUMP", "JUMP_FALSE",
|
| 22 |
+
"LOOP_RESET", "LOOP_GUARD", "ENTER_SCOPE", "EXIT_SCOPE", "RETURN"}
|
| 23 |
+
_DEFAULT_LIMITS = dict(DEFAULT_LIMITS)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def _fail(code, message, span=None):
|
| 27 |
+
code = {"E_BYTECODE": "BYTECODE_CORRUPT", "E_CHECKPOINT": "CHECKPOINT_CORRUPT",
|
| 28 |
+
"E_LIMIT": "MEMORY_LIMIT", "E_NUMERIC": "NONFINITE", "E_VALUE": "TYPE",
|
| 29 |
+
"E_TYPE": "TYPE", "E_ENTRY": "NAME", "E_NAME": "NAME", "E_ARITY": "TYPE",
|
| 30 |
+
"E_IMMUTABLE": "IMMUTABLE", "E_INDEX": "BOUNDS", "E_FIELD": "TYPE"}.get(code, code)
|
| 31 |
+
raise ICLError(code, message, span)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def _canonical(value):
|
| 35 |
+
try:
|
| 36 |
+
return json.dumps(value, sort_keys=True, separators=(",", ":"),
|
| 37 |
+
ensure_ascii=False, allow_nan=False)
|
| 38 |
+
except (TypeError, ValueError, RecursionError):
|
| 39 |
+
_fail("E_BYTECODE", "Value is not finite canonical JSON")
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def _hash(value):
|
| 43 |
+
return hashlib.sha256(_canonical(value).encode("utf-8")).hexdigest()
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def compile_bytecode(program):
|
| 47 |
+
"""Lower a checked ICL AST to a JSON-serializable instruction stream."""
|
| 48 |
+
functions = {}
|
| 49 |
+
for function in program.get("functions", []):
|
| 50 |
+
name = function["name"]
|
| 51 |
+
if name in functions:
|
| 52 |
+
_fail("E_BYTECODE", "Duplicate function: " + name)
|
| 53 |
+
code = []
|
| 54 |
+
loop_sequence = [0]
|
| 55 |
+
|
| 56 |
+
def emit(op, span=None, **kwargs):
|
| 57 |
+
index = len(code)
|
| 58 |
+
code.append({"op": op, **kwargs, "span": span or function.get("span")})
|
| 59 |
+
return index
|
| 60 |
+
|
| 61 |
+
def expr(node):
|
| 62 |
+
kind = node["kind"]
|
| 63 |
+
span = node.get("span")
|
| 64 |
+
if kind == "literal":
|
| 65 |
+
emit("PUSH", span, value=node["value"])
|
| 66 |
+
elif kind == "var":
|
| 67 |
+
emit("LOAD", span, name=node["name"])
|
| 68 |
+
elif kind == "binary":
|
| 69 |
+
# Preserve short-circuit evaluation without calling AST eval.
|
| 70 |
+
if node["op"] in ("&&", "and"):
|
| 71 |
+
expr(node["left"])
|
| 72 |
+
branch = emit("JUMP_FALSE", span, target=0)
|
| 73 |
+
expr(node["right"])
|
| 74 |
+
finish = emit("JUMP", span, target=0)
|
| 75 |
+
code[branch]["target"] = len(code)
|
| 76 |
+
emit("PUSH", span, value=False)
|
| 77 |
+
code[finish]["target"] = len(code)
|
| 78 |
+
elif node["op"] in ("||", "or"):
|
| 79 |
+
expr(node["left"])
|
| 80 |
+
branch = emit("JUMP_FALSE", span, target=0)
|
| 81 |
+
emit("PUSH", span, value=True)
|
| 82 |
+
finish = emit("JUMP", span, target=0)
|
| 83 |
+
code[branch]["target"] = len(code)
|
| 84 |
+
expr(node["right"])
|
| 85 |
+
code[finish]["target"] = len(code)
|
| 86 |
+
else:
|
| 87 |
+
expr(node["left"])
|
| 88 |
+
expr(node["right"])
|
| 89 |
+
emit("BINARY", span, operator=node["op"])
|
| 90 |
+
elif kind == "unary":
|
| 91 |
+
operand = node["expr"]
|
| 92 |
+
if node["op"] == "-" and operand["kind"] == "literal" and type(operand["value"]) is int and operand["value"] == 1 << 63:
|
| 93 |
+
emit("PUSH", span, value=-(1 << 63))
|
| 94 |
+
else:
|
| 95 |
+
expr(operand)
|
| 96 |
+
emit("UNARY", span, operator=node["op"])
|
| 97 |
+
elif kind == "call":
|
| 98 |
+
for argument in node["args"]:
|
| 99 |
+
expr(argument)
|
| 100 |
+
emit("CALL", span, name=node["name"], argc=len(node["args"]))
|
| 101 |
+
elif kind in ("list", "tuple"):
|
| 102 |
+
for item in node["items"]:
|
| 103 |
+
expr(item)
|
| 104 |
+
emit(kind.upper(), span, count=len(node["items"]))
|
| 105 |
+
elif kind == "record":
|
| 106 |
+
ordered_fields = sorted(node["fields"])
|
| 107 |
+
for name in ordered_fields:
|
| 108 |
+
expr(node["fields"][name])
|
| 109 |
+
emit("RECORD", span, fields=ordered_fields)
|
| 110 |
+
elif kind == "index":
|
| 111 |
+
expr(node["target"])
|
| 112 |
+
expr(node["index"])
|
| 113 |
+
emit("INDEX", span)
|
| 114 |
+
elif kind == "field":
|
| 115 |
+
expr(node["target"])
|
| 116 |
+
emit("FIELD", span, name=node["name"])
|
| 117 |
+
else:
|
| 118 |
+
_fail("E_BYTECODE", "Unsupported expression: " + str(kind), span)
|
| 119 |
+
|
| 120 |
+
def statements(nodes, scoped=False):
|
| 121 |
+
if scoped:
|
| 122 |
+
emit("ENTER_SCOPE")
|
| 123 |
+
for node in nodes:
|
| 124 |
+
kind, span = node["kind"], node.get("span")
|
| 125 |
+
if kind == "let":
|
| 126 |
+
expr(node["expr"])
|
| 127 |
+
emit("LET", span, name=node["name"], mutable=node.get("mutable", False))
|
| 128 |
+
elif kind == "assign":
|
| 129 |
+
expr(node["expr"])
|
| 130 |
+
emit("STORE", span, name=node["name"])
|
| 131 |
+
elif kind == "return":
|
| 132 |
+
expr(node["expr"]) if node.get("expr") is not None else emit("PUSH", span, value=None)
|
| 133 |
+
emit("RETURN", span)
|
| 134 |
+
elif kind == "expr":
|
| 135 |
+
expr(node["expr"])
|
| 136 |
+
emit("POP", span)
|
| 137 |
+
elif kind == "if":
|
| 138 |
+
expr(node["cond"])
|
| 139 |
+
branch = emit("JUMP_FALSE", span, target=0)
|
| 140 |
+
statements(node["then"], scoped=True)
|
| 141 |
+
finish = emit("JUMP", span, target=0)
|
| 142 |
+
code[branch]["target"] = len(code)
|
| 143 |
+
statements(node.get("else", []), scoped=True)
|
| 144 |
+
code[finish]["target"] = len(code)
|
| 145 |
+
elif kind == "while":
|
| 146 |
+
loop_sequence[0] += 1
|
| 147 |
+
key = str(loop_sequence[0])
|
| 148 |
+
emit("LOOP_RESET", span, key=key)
|
| 149 |
+
start = len(code)
|
| 150 |
+
expr(node["cond"])
|
| 151 |
+
branch = emit("JUMP_FALSE", span, target=0)
|
| 152 |
+
emit("LOOP_GUARD", span, key=key, limit=node["limit"])
|
| 153 |
+
statements(node["body"], scoped=True)
|
| 154 |
+
emit("JUMP", span, target=start)
|
| 155 |
+
code[branch]["target"] = len(code)
|
| 156 |
+
else:
|
| 157 |
+
_fail("E_BYTECODE", "Unsupported statement: " + str(kind), span)
|
| 158 |
+
if scoped:
|
| 159 |
+
emit("EXIT_SCOPE")
|
| 160 |
+
|
| 161 |
+
# Parameters occupy the call frame; the function body is a child lexical
|
| 162 |
+
# scope, matching the source rule that a body local may shadow a parameter.
|
| 163 |
+
statements(function["body"], scoped=True)
|
| 164 |
+
emit("PUSH", value=None)
|
| 165 |
+
emit("RETURN")
|
| 166 |
+
functions[name] = {"params": function["params"], "return_type": function["return_type"],
|
| 167 |
+
"code": code}
|
| 168 |
+
result = {"schema": BYTECODE_SCHEMA, "module": program.get("module", "main"), "functions": functions}
|
| 169 |
+
validate_bytecode(result)
|
| 170 |
+
return result
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
def _integer(value, lower=0, upper=10000000):
|
| 174 |
+
return type(value) is int and lower <= value <= upper
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
def _validate_bytecode_impl(bytecode):
|
| 178 |
+
"""Fail closed on malformed code before executing any instruction."""
|
| 179 |
+
if not isinstance(bytecode, dict) or bytecode.get("schema") != BYTECODE_SCHEMA:
|
| 180 |
+
_fail("E_BYTECODE", "Unsupported bytecode schema")
|
| 181 |
+
if len(_canonical(bytecode)) > 20000000:
|
| 182 |
+
_fail("E_BYTECODE", "Bytecode exceeds serialized size limit")
|
| 183 |
+
functions = bytecode.get("functions")
|
| 184 |
+
if not isinstance(functions, dict) or not functions or len(functions) > 10000:
|
| 185 |
+
_fail("E_BYTECODE", "Invalid function table")
|
| 186 |
+
for name, function in functions.items():
|
| 187 |
+
if not isinstance(name, str) or not name or not isinstance(function, dict):
|
| 188 |
+
_fail("E_BYTECODE", "Invalid function descriptor")
|
| 189 |
+
params, code = function.get("params"), function.get("code")
|
| 190 |
+
if not isinstance(params, list) or any(not isinstance(p, (list, tuple)) or len(p) != 2
|
| 191 |
+
or not isinstance(p[0], str) or not isinstance(p[1], str) for p in params):
|
| 192 |
+
_fail("E_BYTECODE", "Invalid parameter table")
|
| 193 |
+
if len({p[0] for p in params}) != len(params):
|
| 194 |
+
_fail("E_BYTECODE", "Duplicate parameter")
|
| 195 |
+
if any(not valid_type(p[1]) for p in params) or not isinstance(function.get("return_type"), str) or not valid_type(function["return_type"]):
|
| 196 |
+
_fail("E_BYTECODE", "Invalid function type signature")
|
| 197 |
+
if not isinstance(code, list) or not code or len(code) > 1000000:
|
| 198 |
+
_fail("E_BYTECODE", "Invalid instruction stream")
|
| 199 |
+
for instruction in code:
|
| 200 |
+
if not isinstance(instruction, dict) or not isinstance(instruction.get("op"), str) or instruction["op"] not in OPCODES:
|
| 201 |
+
_fail("E_BYTECODE", "Unknown or malformed opcode")
|
| 202 |
+
op = instruction["op"]
|
| 203 |
+
if op in {"LOAD", "LET", "STORE", "CALL", "FIELD"} and not isinstance(instruction.get("name"), str):
|
| 204 |
+
_fail("E_BYTECODE", "Invalid identifier operand")
|
| 205 |
+
if op == "PUSH" and "value" not in instruction:
|
| 206 |
+
_fail("E_BYTECODE", "Missing literal operand")
|
| 207 |
+
if op == "LET" and type(instruction.get("mutable")) is not bool:
|
| 208 |
+
_fail("E_BYTECODE", "Invalid mutability operand")
|
| 209 |
+
if op in {"LIST", "TUPLE"} and not _integer(instruction.get("count")):
|
| 210 |
+
_fail("E_BYTECODE", "Invalid collection size")
|
| 211 |
+
if op == "CALL" and not _integer(instruction.get("argc")):
|
| 212 |
+
_fail("E_BYTECODE", "Invalid argument count")
|
| 213 |
+
if op == "RECORD" and (not isinstance(instruction.get("fields"), list)
|
| 214 |
+
or any(not isinstance(k, str) for k in instruction["fields"])
|
| 215 |
+
or len(instruction["fields"]) != len(set(instruction["fields"]))):
|
| 216 |
+
_fail("E_BYTECODE", "Invalid record fields")
|
| 217 |
+
if op in {"JUMP", "JUMP_FALSE"} and not _integer(instruction.get("target"), 0, len(code) - 1):
|
| 218 |
+
_fail("E_BYTECODE", "Jump target outside instruction stream")
|
| 219 |
+
if op == "BINARY" and (not isinstance(instruction.get("operator"), str) or instruction["operator"] not in {"+", "-", "*", "/", "%", "==", "!=", "<", "<=", ">", ">=", "&&", "||"}):
|
| 220 |
+
_fail("E_BYTECODE", "Invalid binary operator")
|
| 221 |
+
if op == "UNARY" and (not isinstance(instruction.get("operator"), str) or instruction["operator"] not in {"-", "!"}):
|
| 222 |
+
_fail("E_BYTECODE", "Invalid unary operator")
|
| 223 |
+
if op in {"LOOP_RESET", "LOOP_GUARD"} and not isinstance(instruction.get("key"), str):
|
| 224 |
+
_fail("E_BYTECODE", "Invalid loop key")
|
| 225 |
+
if op == "LOOP_GUARD" and not _integer(instruction.get("limit"), 0):
|
| 226 |
+
_fail("E_BYTECODE", "Invalid loop limit")
|
| 227 |
+
return True
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
def validate_bytecode(bytecode):
|
| 231 |
+
"""Validate untrusted JSON data and expose only deterministic ICL errors."""
|
| 232 |
+
try:
|
| 233 |
+
return _validate_bytecode_impl(bytecode)
|
| 234 |
+
except ICLError:
|
| 235 |
+
raise
|
| 236 |
+
except (TypeError, KeyError, IndexError, ValueError, AttributeError, RecursionError):
|
| 237 |
+
raise ICLError("BYTECODE_CORRUPT", "Malformed bytecode descriptor") from None
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
def _normalized_limits(limits):
|
| 241 |
+
result = dict(_DEFAULT_LIMITS)
|
| 242 |
+
if limits:
|
| 243 |
+
for key, value in limits.items():
|
| 244 |
+
if key not in result or not _integer(value, 1, result[key]):
|
| 245 |
+
_fail("RESOURCE_POLICY", "Invalid resource limit: " + str(key))
|
| 246 |
+
result[key] = value
|
| 247 |
+
return result
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
def _validate_value(value, limits, depth=0, budget=None):
|
| 251 |
+
if budget is None:
|
| 252 |
+
budget = [limits["max_items"]]
|
| 253 |
+
budget[0] -= 1
|
| 254 |
+
if budget[0] < 0 or depth > 128:
|
| 255 |
+
_fail("E_LIMIT", "Value exceeds collection or nesting limit")
|
| 256 |
+
if type(value) is int and not -(1 << 63) <= value < (1 << 63):
|
| 257 |
+
_fail("OVERFLOW", "Int64 overflow")
|
| 258 |
+
if value is None or type(value) in (bool, int):
|
| 259 |
+
return
|
| 260 |
+
if type(value) is float:
|
| 261 |
+
if not math.isfinite(value):
|
| 262 |
+
_fail("E_NUMERIC", "Non-finite floating-point value")
|
| 263 |
+
return
|
| 264 |
+
if isinstance(value, str):
|
| 265 |
+
if len(value) > limits["max_output"]:
|
| 266 |
+
_fail("E_LIMIT", "String exceeds output limit")
|
| 267 |
+
return
|
| 268 |
+
if isinstance(value, (list, tuple)):
|
| 269 |
+
for item in value:
|
| 270 |
+
_validate_value(item, limits, depth + 1, budget)
|
| 271 |
+
return
|
| 272 |
+
if isinstance(value, dict) and all(isinstance(k, str) for k in value):
|
| 273 |
+
for item in value.values():
|
| 274 |
+
_validate_value(item, limits, depth + 1, budget)
|
| 275 |
+
return
|
| 276 |
+
_fail("E_VALUE", "Unsupported runtime value")
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
def _new_frame(name, args, functions, ctx):
|
| 280 |
+
params = functions[name]["params"]
|
| 281 |
+
if len(args) != len(params):
|
| 282 |
+
_fail("E_ARITY", "Wrong argument count for " + name)
|
| 283 |
+
for (_, typ), value in zip(params, args):
|
| 284 |
+
validate_value(value, typ, ctx)
|
| 285 |
+
scope = {"locals": {p[0]: deepcopy(v) for p, v in zip(params, args)},
|
| 286 |
+
"mutable": {p[0]: False for p in params}}
|
| 287 |
+
return {"function": name, "pc": 0, "scopes": [scope], "stack": [], "loops": {}}
|
| 288 |
+
|
| 289 |
+
|
| 290 |
+
def _execute_bytecode(bytecode, entry="main", args=None, limits=None, policy=None,
|
| 291 |
+
checkpoint=None, stop_after=None):
|
| 292 |
+
"""Execute, pause, or resume verified bytecode. No ambient I/O is available."""
|
| 293 |
+
validate_bytecode(bytecode)
|
| 294 |
+
functions = bytecode["functions"]
|
| 295 |
+
limits = _normalized_limits(limits)
|
| 296 |
+
# Authority always comes from this trusted host argument, including replay.
|
| 297 |
+
# A checkpoint is data with an unkeyed checksum, never an authorization token.
|
| 298 |
+
policy = {} if policy is None else policy
|
| 299 |
+
if not isinstance(policy, dict):
|
| 300 |
+
_fail("RESOURCE_POLICY", "Host policy must be an object")
|
| 301 |
+
if stop_after is not None and not _integer(stop_after, 0):
|
| 302 |
+
_fail("E_LIMIT", "stop_after must be a nonnegative integer")
|
| 303 |
+
if checkpoint is not None:
|
| 304 |
+
if not isinstance(checkpoint, dict) or checkpoint.get("schema") != CHECKPOINT_SCHEMA:
|
| 305 |
+
_fail("E_CHECKPOINT", "Unsupported checkpoint schema")
|
| 306 |
+
payload = {k: v for k, v in checkpoint.items() if k != "integrity"}
|
| 307 |
+
if checkpoint.get("integrity") != _hash(payload) or checkpoint.get("bytecode_hash") != _hash(bytecode):
|
| 308 |
+
_fail("E_CHECKPOINT", "Checkpoint integrity or bytecode identity mismatch")
|
| 309 |
+
if len(_canonical(checkpoint)) > 20000000:
|
| 310 |
+
_fail("E_CHECKPOINT", "Checkpoint too large")
|
| 311 |
+
previous_limits = _normalized_limits(checkpoint.get("limits"))
|
| 312 |
+
limits = {k: min(v, previous_limits[k]) for k, v in limits.items()}
|
| 313 |
+
prior_policy = checkpoint.get("policy")
|
| 314 |
+
if policy != prior_policy:
|
| 315 |
+
_fail("E_CHECKPOINT", "Replay requires an independently supplied identical host policy")
|
| 316 |
+
ctx = RuntimeContext(limits=limits, policy=policy)
|
| 317 |
+
if checkpoint is None:
|
| 318 |
+
if entry not in functions:
|
| 319 |
+
_fail("E_ENTRY", "Unknown entry function: " + entry)
|
| 320 |
+
args = [] if args is None else args
|
| 321 |
+
if not isinstance(args, list):
|
| 322 |
+
_fail("E_ARITY", "Entry arguments must be a list")
|
| 323 |
+
_validate_value(args, limits)
|
| 324 |
+
frames = [_new_frame(entry, args, functions, ctx)]
|
| 325 |
+
else:
|
| 326 |
+
frames = deepcopy(checkpoint.get("frames"))
|
| 327 |
+
steps, trace, effects = checkpoint.get("steps"), checkpoint.get("trace"), checkpoint.get("effects")
|
| 328 |
+
if not _integer(steps, 0, limits["max_steps"]) or not isinstance(trace, list) or not isinstance(effects, list):
|
| 329 |
+
_fail("E_CHECKPOINT", "Malformed checkpoint accounting")
|
| 330 |
+
if not isinstance(frames, list) or not frames or len(frames) > limits["max_stack"]:
|
| 331 |
+
_fail("E_CHECKPOINT", "Malformed checkpoint frame stack")
|
| 332 |
+
for frame in frames:
|
| 333 |
+
if not isinstance(frame, dict) or frame.get("function") not in functions:
|
| 334 |
+
_fail("E_CHECKPOINT", "Unknown checkpoint function")
|
| 335 |
+
if not _integer(frame.get("pc"), 0, len(functions[frame["function"]]["code"]) - 1):
|
| 336 |
+
_fail("E_CHECKPOINT", "Invalid checkpoint instruction pointer")
|
| 337 |
+
if not isinstance(frame.get("scopes"), list) or not frame["scopes"] or not isinstance(frame.get("stack"), list):
|
| 338 |
+
_fail("E_CHECKPOINT", "Invalid checkpoint values")
|
| 339 |
+
if len(frame["scopes"]) > limits["max_steps"] + 1:
|
| 340 |
+
_fail("E_CHECKPOINT", "Too many lexical scopes")
|
| 341 |
+
for scope in frame["scopes"]:
|
| 342 |
+
if not isinstance(scope, dict) or not isinstance(scope.get("locals"), dict) or not isinstance(scope.get("mutable"), dict) or set(scope["mutable"]) != set(scope["locals"]) or any(type(v) is not bool for v in scope["mutable"].values()):
|
| 343 |
+
_fail("E_CHECKPOINT", "Invalid checkpoint mutability table")
|
| 344 |
+
_validate_value(scope["locals"], limits)
|
| 345 |
+
if not isinstance(frame.get("loops"), dict) or any(not _integer(v) for v in frame["loops"].values()):
|
| 346 |
+
_fail("E_CHECKPOINT", "Invalid checkpoint loop counters")
|
| 347 |
+
_validate_value(frame["stack"], limits)
|
| 348 |
+
ctx.steps, ctx.trace, ctx.effects = steps, deepcopy(trace), deepcopy(effects)
|
| 349 |
+
if not _integer(checkpoint.get("prng"), 0, (1 << 31) - 1):
|
| 350 |
+
_fail("E_CHECKPOINT", "Invalid checkpoint PRNG state")
|
| 351 |
+
ctx.prng = checkpoint["prng"]
|
| 352 |
+
start_steps = ctx.steps
|
| 353 |
+
|
| 354 |
+
def result(value, paused=False):
|
| 355 |
+
output = {"value": value, "trace": ctx.trace, "effects": ctx.effects,
|
| 356 |
+
"steps": ctx.steps, "halted": not paused}
|
| 357 |
+
if paused:
|
| 358 |
+
payload = {"schema": CHECKPOINT_SCHEMA, "bytecode_hash": _hash(bytecode),
|
| 359 |
+
"frames": deepcopy(frames), "steps": ctx.steps, "trace": deepcopy(ctx.trace),
|
| 360 |
+
"effects": deepcopy(ctx.effects), "limits": limits, "policy": ctx.policy,
|
| 361 |
+
"prng": ctx.prng}
|
| 362 |
+
payload["integrity"] = _hash(payload)
|
| 363 |
+
output["checkpoint"] = payload
|
| 364 |
+
return output
|
| 365 |
+
|
| 366 |
+
while frames:
|
| 367 |
+
if stop_after is not None and ctx.steps - start_steps >= stop_after:
|
| 368 |
+
return result(None, True)
|
| 369 |
+
if len(frames) > limits["max_stack"]:
|
| 370 |
+
_fail("STACK_LIMIT", "VM call stack limit exceeded")
|
| 371 |
+
frame = frames[-1]
|
| 372 |
+
code = functions[frame["function"]]["code"]
|
| 373 |
+
if not 0 <= frame["pc"] < len(code):
|
| 374 |
+
_fail("E_BYTECODE", "Instruction pointer outside function")
|
| 375 |
+
instruction = code[frame["pc"]]
|
| 376 |
+
input_state = {"frames": frames, "prng": ctx.prng}
|
| 377 |
+
trace_index = len(ctx.trace)
|
| 378 |
+
effects_before = len(ctx.effects)
|
| 379 |
+
ctx.step("BC:" + instruction["op"], inputs=input_state)
|
| 380 |
+
frame["pc"] += 1
|
| 381 |
+
op, span, stack = instruction["op"], instruction.get("span"), frame["stack"]
|
| 382 |
+
|
| 383 |
+
def finish_trace(return_value=None, returning=False):
|
| 384 |
+
state = {"frames": frames, "prng": ctx.prng}
|
| 385 |
+
if returning:
|
| 386 |
+
state["return_value"] = return_value
|
| 387 |
+
event = ctx.trace[trace_index]
|
| 388 |
+
event["output_hash"] = _hash(state)
|
| 389 |
+
event["state_ref"] = event["output_hash"]
|
| 390 |
+
if len(ctx.effects) > effects_before:
|
| 391 |
+
effect = ctx.effects[-1]
|
| 392 |
+
event["effect_request"] = {"action": effect["action"], "payload_hash": effect["payload_hash"]}
|
| 393 |
+
event["effect_decision"] = effect["decision"]
|
| 394 |
+
|
| 395 |
+
def pop(count=1):
|
| 396 |
+
if len(stack) < count:
|
| 397 |
+
_fail("E_BYTECODE", "Operand stack underflow", span)
|
| 398 |
+
if count == 0:
|
| 399 |
+
return []
|
| 400 |
+
values = stack[-count:]
|
| 401 |
+
del stack[-count:]
|
| 402 |
+
return values
|
| 403 |
+
|
| 404 |
+
if op == "PUSH":
|
| 405 |
+
stack.append(deepcopy(instruction["value"]))
|
| 406 |
+
elif op == "LOAD":
|
| 407 |
+
name = instruction["name"]
|
| 408 |
+
scope = next((s for s in reversed(frame["scopes"]) if name in s["locals"]), None)
|
| 409 |
+
if scope is None:
|
| 410 |
+
_fail("E_NAME", "Undefined variable: " + name, span)
|
| 411 |
+
stack.append(deepcopy(scope["locals"][name]))
|
| 412 |
+
elif op == "LET":
|
| 413 |
+
name = instruction["name"]
|
| 414 |
+
scope = frame["scopes"][-1]
|
| 415 |
+
if name in scope["locals"]:
|
| 416 |
+
_fail("E_NAME", "Duplicate local declaration: " + name, span)
|
| 417 |
+
scope["locals"][name] = pop()[0]
|
| 418 |
+
scope["mutable"][name] = instruction["mutable"]
|
| 419 |
+
elif op == "STORE":
|
| 420 |
+
name = instruction["name"]
|
| 421 |
+
scope = next((s for s in reversed(frame["scopes"]) if name in s["locals"]), None)
|
| 422 |
+
if scope is None:
|
| 423 |
+
_fail("E_NAME", "Undefined variable: " + name, span)
|
| 424 |
+
if not scope["mutable"][name]:
|
| 425 |
+
_fail("E_IMMUTABLE", "Cannot assign immutable variable: " + name, span)
|
| 426 |
+
scope["locals"][name] = pop()[0]
|
| 427 |
+
elif op == "ENTER_SCOPE":
|
| 428 |
+
frame["scopes"].append({"locals": {}, "mutable": {}})
|
| 429 |
+
elif op == "EXIT_SCOPE":
|
| 430 |
+
if len(frame["scopes"]) <= 1:
|
| 431 |
+
_fail("E_BYTECODE", "Cannot exit function root scope", span)
|
| 432 |
+
frame["scopes"].pop()
|
| 433 |
+
elif op == "POP":
|
| 434 |
+
pop()
|
| 435 |
+
elif op == "BINARY":
|
| 436 |
+
a, b = pop(2)
|
| 437 |
+
stack.append(checked_binary(instruction["operator"], a, b))
|
| 438 |
+
elif op == "UNARY":
|
| 439 |
+
stack.append(checked_unary(instruction["operator"], pop()[0]))
|
| 440 |
+
elif op == "CALL":
|
| 441 |
+
arguments = pop(instruction["argc"])
|
| 442 |
+
name = instruction["name"]
|
| 443 |
+
if name in functions:
|
| 444 |
+
if len(frames) >= limits["max_stack"]:
|
| 445 |
+
_fail("STACK_LIMIT", "VM call stack limit exceeded", span)
|
| 446 |
+
frames.append(_new_frame(name, arguments, functions, ctx))
|
| 447 |
+
else:
|
| 448 |
+
stack.append(builtin(name, arguments, ctx))
|
| 449 |
+
elif op in {"LIST", "TUPLE"}:
|
| 450 |
+
values = pop(instruction["count"])
|
| 451 |
+
stack.append(values)
|
| 452 |
+
elif op == "RECORD":
|
| 453 |
+
stack.append(dict(zip(instruction["fields"], pop(len(instruction["fields"])))))
|
| 454 |
+
elif op == "INDEX":
|
| 455 |
+
target, index = pop(2)
|
| 456 |
+
if not isinstance(target, (list, tuple, str)) or type(index) is not int or not 0 <= index < len(target):
|
| 457 |
+
_fail("E_INDEX", "Invalid or out-of-range index", span)
|
| 458 |
+
stack.append(target[index])
|
| 459 |
+
elif op == "FIELD":
|
| 460 |
+
target = pop()[0]
|
| 461 |
+
if not isinstance(target, dict) or instruction["name"] not in target:
|
| 462 |
+
_fail("E_FIELD", "Missing record field: " + instruction["name"], span)
|
| 463 |
+
stack.append(target[instruction["name"]])
|
| 464 |
+
elif op == "JUMP":
|
| 465 |
+
frame["pc"] = instruction["target"]
|
| 466 |
+
elif op == "JUMP_FALSE":
|
| 467 |
+
condition = pop()[0]
|
| 468 |
+
if type(condition) is not bool:
|
| 469 |
+
_fail("E_TYPE", "Branch condition must be Bool", span)
|
| 470 |
+
if not condition:
|
| 471 |
+
frame["pc"] = instruction["target"]
|
| 472 |
+
elif op == "LOOP_RESET":
|
| 473 |
+
frame["loops"][instruction["key"]] = 0
|
| 474 |
+
elif op == "LOOP_GUARD":
|
| 475 |
+
key = instruction["key"]
|
| 476 |
+
if key not in frame["loops"]:
|
| 477 |
+
_fail("E_BYTECODE", "Loop guard without reset", span)
|
| 478 |
+
frame["loops"][key] += 1
|
| 479 |
+
if frame["loops"][key] > instruction["limit"]:
|
| 480 |
+
_fail("LOOP_LIMIT", "Bounded loop limit exceeded", span)
|
| 481 |
+
elif op == "RETURN":
|
| 482 |
+
value = pop()[0]
|
| 483 |
+
validate_value(value, functions[frame["function"]]["return_type"], ctx)
|
| 484 |
+
if stack:
|
| 485 |
+
_fail("E_BYTECODE", "Unbalanced operand stack at return", span)
|
| 486 |
+
frames.pop()
|
| 487 |
+
if not frames:
|
| 488 |
+
_validate_value(value, limits)
|
| 489 |
+
finish_trace(value, returning=True)
|
| 490 |
+
return result(value)
|
| 491 |
+
frames[-1]["stack"].append(value)
|
| 492 |
+
if len(stack) > limits["max_items"]:
|
| 493 |
+
_fail("E_LIMIT", "VM operand stack limit exceeded", span)
|
| 494 |
+
if stack:
|
| 495 |
+
_validate_value(stack[-1], limits)
|
| 496 |
+
ctx.check_value(stack[-1])
|
| 497 |
+
finish_trace()
|
| 498 |
+
_fail("E_BYTECODE", "VM terminated without return")
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def execute_bytecode(bytecode, entry="main", args=None, limits=None, policy=None,
|
| 502 |
+
checkpoint=None, stop_after=None):
|
| 503 |
+
"""Public fail-closed boundary; malformed data cannot escape as host errors."""
|
| 504 |
+
try:
|
| 505 |
+
return _execute_bytecode(bytecode, entry, args, limits, policy, checkpoint, stop_after)
|
| 506 |
+
except ICLError:
|
| 507 |
+
raise
|
| 508 |
+
except (TypeError, KeyError, IndexError, ValueError, OverflowError, ZeroDivisionError, AttributeError) as error:
|
| 509 |
+
raise ICLError("TYPE", "Malformed bytecode operand or primitive argument: " + type(error).__name__) from None
|
| 510 |
+
except RecursionError:
|
| 511 |
+
raise ICLError("STACK_LIMIT", "Bytecode structure exceeds host recursion limit") from None
|
source/icl_native/__init__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""ICL R5 bounded learned action compiler, not a general language model."""
|
| 2 |
+
__version__ = '0.1.0-r5'
|
source/icl_native/common.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
import hashlib,json,math,os
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from typing import Any
|
| 5 |
+
ROOT=Path(__file__).resolve().parents[2]
|
| 6 |
+
INTENTS=['increase','decrease','scale','floor','ceiling','magnitude','repeat','translate','restore','remember','recall','journal','conditional','record_add','list_add','axis_reverse']
|
| 7 |
+
FLAGS=['observer_match','frame_match','unit_match','witness_present','witness_valid','memory_present','journal_allowed','condition']
|
| 8 |
+
ERRORS=['OBSERVER_MISMATCH','FRAME_MISMATCH','UNIT_MISMATCH','NON_IDENTIFIABLE','WITNESS_CORRUPT','MEMORY_MISSING','EFFECT_DENIED']
|
| 9 |
+
ACTIONS=['ADD','SUB','MUL','MAX','MIN','ABS','REPEAT','TRANSLATE','RESTORE','STORE','RECALL','JOURNAL','RECORD_ADD','LIST_ADD','NEGATE']+ERRORS
|
| 10 |
+
FEATURE_NAMES=['intent:'+s for s in INTENTS]+['flag:'+s for s in FLAGS]+['nuisance:'+s for s in ['value','arg','modulus','parity','residue3','residue5']]
|
| 11 |
+
D=len(FEATURE_NAMES);K=len(ACTIONS);H=32
|
| 12 |
+
|
| 13 |
+
def canonical(x:Any)->str:return json.dumps(x,ensure_ascii=False,sort_keys=True,separators=(',',':'),allow_nan=False)
|
| 14 |
+
def digest(x:Any)->str:return hashlib.sha256(canonical(x).encode()).hexdigest()
|
| 15 |
+
def sha(p:Path)->str:return hashlib.sha256(p.read_bytes()).hexdigest()
|
| 16 |
+
def dump(p:Path,x:Any)->None:p.parent.mkdir(parents=True,exist_ok=True);p.write_text(json.dumps(x,ensure_ascii=False,indent=2,allow_nan=False)+'\n')
|
| 17 |
+
def strict_load(p:Path,max_bytes:int=8_000_000)->Any:
|
| 18 |
+
if p.stat().st_size>max_bytes:raise ValueError('INPUT_SIZE_LIMIT')
|
| 19 |
+
def pairs(xs):
|
| 20 |
+
d={}
|
| 21 |
+
for k,v in xs:
|
| 22 |
+
if k in d:raise ValueError('DUPLICATE_JSON_KEY')
|
| 23 |
+
d[k]=v
|
| 24 |
+
return d
|
| 25 |
+
def finite_float(s):
|
| 26 |
+
x=float(s)
|
| 27 |
+
if not math.isfinite(x):raise ValueError('NONFINITE')
|
| 28 |
+
return x
|
| 29 |
+
return json.loads(p.read_text(),object_pairs_hook=pairs,parse_float=finite_float,parse_constant=lambda _:(_ for _ in ()).throw(ValueError('NONFINITE')))
|
| 30 |
+
|
| 31 |
+
def validate_step(s:dict)->None:
|
| 32 |
+
if type(s)!=dict or set(s)!={'intent','arg','modulus','flags'}:raise ValueError('STEP_SCHEMA')
|
| 33 |
+
if s['intent'] not in INTENTS:raise ValueError('UNSUPPORTED_INTENT')
|
| 34 |
+
if type(s['arg'])!=int or not -3<=s['arg']<=3:raise ValueError('ARG_RANGE')
|
| 35 |
+
if type(s['modulus'])!=int or not 2<=s['modulus']<=11:raise ValueError('MODULUS_RANGE')
|
| 36 |
+
if type(s['flags'])!=dict or set(s['flags'])!=set(FLAGS) or any(type(v)!=bool for v in s['flags'].values()):raise ValueError('FLAGS_SCHEMA')
|
| 37 |
+
|
| 38 |
+
def features(s:dict,x:int,memory_present:bool)->list[float]:
|
| 39 |
+
f=dict(s['flags']);f['memory_present']=memory_present
|
| 40 |
+
return [float(s['intent']==i) for i in INTENTS]+[float(f[k]) for k in FLAGS]+[math.tanh(x/50),s['arg']/3,s['modulus']/11,float(x%2),x%3/2,x%5/4]
|
| 41 |
+
|
| 42 |
+
def oracle_action(s:dict,memory_present:bool)->str:
|
| 43 |
+
"""Supervision ONLY. Never called by production prediction or its encoder."""
|
| 44 |
+
i=s['intent'];f=s['flags']
|
| 45 |
+
if i=='translate':
|
| 46 |
+
for flag,err in [('observer_match','OBSERVER_MISMATCH'),('frame_match','FRAME_MISMATCH'),('unit_match','UNIT_MISMATCH')]:
|
| 47 |
+
if not f[flag]:return err
|
| 48 |
+
if i=='restore':
|
| 49 |
+
if not f['witness_present']:return 'NON_IDENTIFIABLE'
|
| 50 |
+
if not f['witness_valid']:return 'WITNESS_CORRUPT'
|
| 51 |
+
if i=='recall' and not memory_present:return 'MEMORY_MISSING'
|
| 52 |
+
if i=='journal' and not f['journal_allowed']:return 'EFFECT_DENIED'
|
| 53 |
+
if i=='conditional':return 'ADD' if f['condition'] else 'SUB'
|
| 54 |
+
return {'increase':'ADD','decrease':'SUB','scale':'MUL','floor':'MAX','ceiling':'MIN','magnitude':'ABS','repeat':'REPEAT','translate':'TRANSLATE','restore':'RESTORE','remember':'STORE','recall':'RECALL','journal':'JOURNAL','record_add':'RECORD_ADD','list_add':'LIST_ADD','axis_reverse':'NEGATE'}[i]
|
| 55 |
+
|
| 56 |
+
def scalar_reference(action:str,x:int,a:int,memory:int|None)->tuple[int,int|None]:
|
| 57 |
+
"""Independent finite arithmetic oracle, used only by datasets/evaluation."""
|
| 58 |
+
if action in ERRORS:return x,memory
|
| 59 |
+
if action in ('ADD','TRANSLATE','RECORD_ADD','LIST_ADD'):x+=a
|
| 60 |
+
elif action=='SUB':x-=a
|
| 61 |
+
elif action=='MUL':x*=a
|
| 62 |
+
elif action=='MAX':x=max(x,a)
|
| 63 |
+
elif action=='MIN':x=min(x,a)
|
| 64 |
+
elif action=='ABS':x=abs(x)
|
| 65 |
+
elif action=='REPEAT':x+=3*a
|
| 66 |
+
elif action=='NEGATE':x=-x
|
| 67 |
+
elif action=='STORE':memory=x
|
| 68 |
+
elif action=='RECALL':
|
| 69 |
+
if memory is None:raise ValueError('MEMORY_MISSING')
|
| 70 |
+
x=memory
|
| 71 |
+
elif action not in ('RESTORE','JOURNAL'):raise ValueError('UNSUPPORTED_ACTION')
|
| 72 |
+
if not -(1<<63)<=x<(1<<63):raise OverflowError('INT64')
|
| 73 |
+
return x,memory
|
| 74 |
+
|
| 75 |
+
def target_steps(plan:dict):
|
| 76 |
+
x=plan['initial'];mem=plan['memory'];allfeat=[];labels=[];states=[];first_error=None;prefix=True
|
| 77 |
+
for i,s in enumerate(plan['steps']):
|
| 78 |
+
a=oracle_action(s,mem is not None);allfeat.append(features(s,x,mem is not None));labels.append(ACTIONS.index(a));states.append(x)
|
| 79 |
+
if a in ERRORS:
|
| 80 |
+
if first_error is None:first_error=(i,a)
|
| 81 |
+
else:x,mem=scalar_reference(a,x,s['arg'],mem)
|
| 82 |
+
# Actual program stops at its first error. Labels after it are auxiliary independent local supervision only.
|
| 83 |
+
if first_error:return allfeat,labels,{'tag':'Err','error':first_error[1]},first_error[0]+1,states
|
| 84 |
+
return allfeat,labels,{'tag':'Ok','value':x},len(labels),states
|
source/icl_native/emitter.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Deterministic, audited ICL code emitter. Syntax is supplied here, not learned.
|
| 2 |
+
No oracle/ground-truth label is imported. Model actions alone select operations.
|
| 3 |
+
"""
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
import json
|
| 6 |
+
from .common import ACTIONS,ERRORS,validate_step
|
| 7 |
+
HEADER='''module native_plan;
|
| 8 |
+
type Pair = Record{delta:Int64,value:Int64};
|
| 9 |
+
fn record_sum(p:Pair)->Int64 {return p.value+p.delta;}
|
| 10 |
+
fn main(initial:Int64, initial_memory:Int64)->Result[Int64] {
|
| 11 |
+
var x = initial; var memo = initial_memory;
|
| 12 |
+
'''
|
| 13 |
+
|
| 14 |
+
def emit(plan:dict,actions:list[str])->str:
|
| 15 |
+
if len(actions)!=len(plan['steps']) or not 1<=len(actions)<=32:raise ValueError('ACTION_LENGTH')
|
| 16 |
+
parts=[HEADER]
|
| 17 |
+
for j,(s,action) in enumerate(zip(plan['steps'],actions)):
|
| 18 |
+
validate_step(s)
|
| 19 |
+
if action not in ACTIONS:raise ValueError('ACTION_UNKNOWN')
|
| 20 |
+
a=s['arg'];lit=str(a);f=s['flags']
|
| 21 |
+
if action in ERRORS:
|
| 22 |
+
parts.append('return err_int('+json.dumps(action)+');');break
|
| 23 |
+
if action=='ADD':code=f'x=x+({lit});'
|
| 24 |
+
elif action=='SUB':code=f'x=x-({lit});'
|
| 25 |
+
elif action=='MUL':code=f'x=x*({lit});'
|
| 26 |
+
elif action=='MAX':code=f'x=max(x,({lit}));'
|
| 27 |
+
elif action=='MIN':code=f'x=min(x,({lit}));'
|
| 28 |
+
elif action=='ABS':code='x=abs(x);'
|
| 29 |
+
elif action=='NEGATE':code='x=-x;'
|
| 30 |
+
elif action=='REPEAT':code=f'var k{j}=0; while k{j}<3 limit 3 {{x=x+({lit}); k{j}=k{j}+1;}}'
|
| 31 |
+
elif action=='STORE':code='memo=x;'
|
| 32 |
+
elif action=='RECALL':code='x=memo;'
|
| 33 |
+
elif action=='JOURNAL':code=f'let permitted{j}=request_effect("journal","step_{j}");'
|
| 34 |
+
elif action=='RECORD_ADD':code=f'x=record_sum({{delta:({lit}),value:x}});'
|
| 35 |
+
elif action=='LIST_ADD':code=f'let items{j}=[x,({lit})]; x=items{j}[0]+items{j}[1];'
|
| 36 |
+
elif action=='TRANSLATE':
|
| 37 |
+
ob='main' if f['observer_match'] else 'other';fr='scalar' if f['frame_match'] else 'other';un='unit' if f['unit_match'] else 'other'
|
| 38 |
+
code=f'let left{j}=represent(x,"main","scalar","unit"); let right{j}=represent(({lit}),"{ob}","{fr}","{un}"); x=repr_value(repr_add(left{j},right{j}));'
|
| 39 |
+
elif action=='RESTORE':
|
| 40 |
+
# Synthetic known-state roundtrip: witness is made from x, not recovered from unknown data.
|
| 41 |
+
# The wrapper checks supplied boolean scenario conditions, NOT an external witness signature.
|
| 42 |
+
code=f'let r{j}=observe_mod(x,{s["modulus"]},"main"); let w{j}=make_witness(x,{s["modulus"]}); x=exact_value(recover(r{j},w{j}));'
|
| 43 |
+
else:raise ValueError('UNSUPPORTED_ACTION')
|
| 44 |
+
parts.append(code)
|
| 45 |
+
parts.append('return ok(x); }')
|
| 46 |
+
return '\n'.join(parts)+'\n'
|
source/icl_native/execution.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Pure deterministic control/verification. No trained model or teaching oracle here.
|
| 2 |
+
These functions supply exact execution, not learned state prediction."""
|
| 3 |
+
from .common import ERRORS,validate_step
|
| 4 |
+
from .emitter import emit
|
| 5 |
+
from icl.runtime import checked_binary,checked_unary,ICLError
|
| 6 |
+
from icl.api import compile_source,run_ocir
|
| 7 |
+
|
| 8 |
+
def validate_plan(p):
|
| 9 |
+
if type(p)!=dict or set(p)!={'initial','memory','steps'}:raise ValueError('PLAN_SCHEMA')
|
| 10 |
+
if type(p['initial'])!=int or not -100000<=p['initial']<=100000:raise ValueError('INITIAL_RANGE')
|
| 11 |
+
if p['memory'] is not None and (type(p['memory'])!=int or not -100000<=p['memory']<=100000):raise ValueError('MEMORY_RANGE')
|
| 12 |
+
if type(p['steps'])!=list or not 1<=len(p['steps'])<=32:raise ValueError('STEP_LIMIT')
|
| 13 |
+
for s in p['steps']:validate_step(s)
|
| 14 |
+
|
| 15 |
+
def protocol_guard(action,s,memory,journal_permission):
|
| 16 |
+
"""Trusted wrapper check; NEVER modifies a prediction or grants capability."""
|
| 17 |
+
f=s['flags']
|
| 18 |
+
if action=='TRANSLATE':
|
| 19 |
+
for field,error in [('observer_match','OBSERVER_MISMATCH'),('frame_match','FRAME_MISMATCH'),('unit_match','UNIT_MISMATCH')]:
|
| 20 |
+
if not f[field]:return error
|
| 21 |
+
if action=='RESTORE':
|
| 22 |
+
if not f['witness_present']:return 'NON_IDENTIFIABLE'
|
| 23 |
+
if not f['witness_valid']:return 'WITNESS_CORRUPT'
|
| 24 |
+
if action=='RECALL' and memory is None:return 'MEMORY_MISSING'
|
| 25 |
+
if action=='JOURNAL' and (journal_permission is not True or f['journal_allowed'] is not True):return 'EFFECT_DENIED'
|
| 26 |
+
return None
|
| 27 |
+
|
| 28 |
+
def advance_runtime(action,x,a,memory):
|
| 29 |
+
"""Normative runtime state transition using checked ICL primitives, not labels."""
|
| 30 |
+
if action in ('ADD','TRANSLATE','RECORD_ADD','LIST_ADD'):x=checked_binary('+',x,a)
|
| 31 |
+
elif action=='SUB':x=checked_binary('-',x,a)
|
| 32 |
+
elif action=='MUL':x=checked_binary('*',x,a)
|
| 33 |
+
elif action=='MAX':x=max(x,a)
|
| 34 |
+
elif action=='MIN':x=min(x,a)
|
| 35 |
+
elif action=='ABS':x=checked_unary('-',x) if x<0 else x
|
| 36 |
+
elif action=='NEGATE':x=checked_unary('-',x)
|
| 37 |
+
elif action=='REPEAT':
|
| 38 |
+
for _ in range(3):x=checked_binary('+',x,a)
|
| 39 |
+
elif action=='STORE':memory=x
|
| 40 |
+
elif action=='RECALL':
|
| 41 |
+
if memory is None:raise ValueError('MEMORY_MISSING')
|
| 42 |
+
x=memory
|
| 43 |
+
elif action not in ('RESTORE','JOURNAL'):raise ValueError('ACTION_UNKNOWN')
|
| 44 |
+
return x,memory
|
| 45 |
+
|
| 46 |
+
def vm_verify(plan,pred,journal_permission=False,engine='vm'):
|
| 47 |
+
if pred['guard_rejection'] is not None:return {'executed':False,'reason':'INDEPENDENT_GUARD_REJECTED','raw_prediction_preserved':True}
|
| 48 |
+
actions=pred['actions']+[ERRORS[0]]*(len(plan['steps'])-len(pred['actions']))
|
| 49 |
+
src=emit(plan,actions);ocir=compile_source(src)
|
| 50 |
+
out=run_ocir(ocir,args=[plan['initial'],plan['memory'] or 0],engine=engine,policy={'journal':{'allow':journal_permission is True}})
|
| 51 |
+
return {'executed':True,'source_program':src,'ocir':ocir,'result':out,'runtime_consistency':out['value']==pred['composed_result']}
|
| 52 |
+
|
source/icl_native/offline_infer.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Standard-library inference with real trained weights evaluated by the ICL VM.
|
| 2 |
+
No Torch, NumPy, network API, label oracle or training object is needed.
|
| 3 |
+
The native model selects finite semantic opcodes, not unrestricted source text.
|
| 4 |
+
"""
|
| 5 |
+
from __future__ import annotations
|
| 6 |
+
import argparse,copy,json,math,sys
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
from .common import ACTIONS,ERRORS,FEATURE_NAMES,features,strict_load,dump,sha,canonical
|
| 9 |
+
from .execution import validate_plan,protocol_guard,advance_runtime,vm_verify
|
| 10 |
+
from icl.api import run_ocir,loads_ocir,SCHEMA_VERSION,SCHEMA_SHA256
|
| 11 |
+
from icl.runtime import ICLError
|
| 12 |
+
import icl
|
| 13 |
+
SHAPES={'w1':[30,32],'b1':[1,32],'w2':[32,32],'b2':[1,32],'wo':[32,22],'bo':[1,22]}
|
| 14 |
+
class OfflineModel:
|
| 15 |
+
def __init__(self,path:Path):
|
| 16 |
+
if not path.is_dir():raise ValueError('MODEL_NOT_LOADED')
|
| 17 |
+
man=strict_load(path/'manifest.json',200000)
|
| 18 |
+
if man.get('schema')!='ICL_R5_OFFLINE_BUNDLE/1' or set(man.get('files',{}))!={'weights.json','compiled_model.ocir','model.icl','model_config.json'}:raise ValueError('BUNDLE_SCHEMA')
|
| 19 |
+
for n,m in man['files'].items():
|
| 20 |
+
p=path/n
|
| 21 |
+
if p.is_symlink() or not p.is_file() or p.stat().st_size!=m['bytes'] or p.stat().st_size>2_000_000 or sha(p)!=m['sha256']:raise ValueError('MODEL_INTEGRITY')
|
| 22 |
+
core=Path(icl.__file__).parent
|
| 23 |
+
if set(man['runtime_file_hashes'])!={'__init__.py','__main__.py','api.py','checker.py','cli.py','frontend.py','interpreter.py','legacy_afc.py','runtime.py','vm.py','OCIR_SCHEMA.json','TOKEN_VOCAB.json'}:raise ValueError('RUNTIME_LOCK_SCHEMA')
|
| 24 |
+
if any(sha(core/n)!=h for n,h in man['runtime_file_hashes'].items()):raise ValueError('RUNTIME_INCOMPATIBLE')
|
| 25 |
+
cfg=strict_load(path/'model_config.json');self.cfg=cfg
|
| 26 |
+
if cfg['actions']!=ACTIONS or cfg['feature_names']!=FEATURE_NAMES or cfg['schema_version']!=SCHEMA_VERSION or cfg['schema_sha256']!=SCHEMA_SHA256:raise ValueError('MODEL_CONTRACT')
|
| 27 |
+
self.weights=strict_load(path/'weights.json',500000)
|
| 28 |
+
if set(self.weights)!=set(SHAPES):raise ValueError('WEIGHT_KEYS')
|
| 29 |
+
for k,v in self.weights.items():
|
| 30 |
+
if set(v)!={'shape','data'} or v['shape']!=SHAPES[k] or len(v['data'])!=math.prod(SHAPES[k]) or any(type(x) not in (float,int) or not math.isfinite(x) for x in v['data']):raise ValueError('WEIGHT_SHAPE_OR_FINITE')
|
| 31 |
+
self.graph=loads_ocir((path/'compiled_model.ocir').read_text())
|
| 32 |
+
def logits(self,row):
|
| 33 |
+
if len(row)!=30 or any(not math.isfinite(v) for v in row):raise ValueError('FEATURE_INPUT')
|
| 34 |
+
out=run_ocir(self.graph,args=[{'shape':[1,30],'data':row}]+[self.weights[k] for k in SHAPES],engine='vm')
|
| 35 |
+
return out['value']['data']
|
| 36 |
+
def predict(self,plan,journal_permission=False):
|
| 37 |
+
validate_plan(plan);x=plan['initial'];mem=plan['memory'];actions=[];conf=[];guard=None;result=None;attempts=0;allow=0
|
| 38 |
+
for j,s0 in enumerate(plan['steps']):
|
| 39 |
+
s=copy.deepcopy(s0);s['flags']['journal_allowed']=journal_permission is True and s['flags']['journal_allowed'] is True
|
| 40 |
+
logits=self.logits(features(s,x,mem is not None));m=max(logits);den=sum(math.exp(v-m) for v in logits);a=max(range(len(logits)),key=lambda k:logits[k]);act=ACTIONS[a]
|
| 41 |
+
actions.append(act);conf.append(math.exp(logits[a]-m)/den)
|
| 42 |
+
if act in ERRORS:result={'tag':'Err','error':act};break
|
| 43 |
+
if act=='JOURNAL':attempts+=1
|
| 44 |
+
err=protocol_guard(act,s0,mem,journal_permission)
|
| 45 |
+
if err:guard={'step':j,'reason':err};result={'tag':'Err','error':err};break
|
| 46 |
+
try:x,mem=advance_runtime(act,x,s0['arg'],mem)
|
| 47 |
+
except (ICLError,OverflowError,ValueError) as e:
|
| 48 |
+
reason=getattr(e,'code',str(e));guard={'step':j,'reason':reason};result={'tag':'Err','error':reason};break
|
| 49 |
+
if act=='JOURNAL':allow+=1
|
| 50 |
+
return {'actions':actions,'confidence':min(conf) if conf else 0.0,'composed_result':result or {'tag':'Ok','value':x},'guard_rejection':guard,'journal_attempts':attempts,'journal_allow_decisions':allow,'execution_scope':'host simulation until vm_verify executes the candidate'}
|
| 51 |
+
def main(argv=None):
|
| 52 |
+
p=argparse.ArgumentParser();p.add_argument('--model',type=Path,required=True);p.add_argument('--request',type=Path,required=True);p.add_argument('--output',type=Path);p.add_argument('--permit-local-journal',action='store_true');a=p.parse_args(argv)
|
| 53 |
+
try:
|
| 54 |
+
m=OfflineModel(a.model);req=strict_load(a.request,100000);pred=m.predict(req,a.permit_local_journal);v=vm_verify(req,pred,a.permit_local_journal)
|
| 55 |
+
answer={'schema':'ICL_R5_PRODUCT_RESULT/1','model_seed':m.cfg['seed'],'proposal':pred,'verification':v,'scope':'finite structured intent -> learned opcode -> deterministic ICL code and VM','learned':'opcode and finite error-class decision','not_learned':'source syntax, composition control, exact arithmetic, authoritative permission, persistent memory','confidence_is_uncalibrated':True,'tensor_backend':'ICL VM pure Python float64','third_party_weights_used':False}
|
| 56 |
+
if a.output:dump(a.output,answer)
|
| 57 |
+
print(canonical(answer));return 0
|
| 58 |
+
except Exception as e:
|
| 59 |
+
print(canonical({'status':'ERROR','error_type':type(e).__name__,'reason':str(e)}),file=sys.stderr);return 2
|
| 60 |
+
if __name__=='__main__':raise SystemExit(main())
|
validate.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
import sys,json
|
| 3 |
+
R=Path(__file__).resolve().parent;sys.path.insert(0,str(R/'source'))
|
| 4 |
+
from icl_native.offline_infer import OfflineModel
|
| 5 |
+
from icl_native.execution import vm_verify
|
| 6 |
+
m=OfflineModel(R/'model');checks=[]
|
| 7 |
+
for name,expected in [('demo',{'tag':'Ok','value':-4}),('denied_journal',{'tag':'Err','error':'EFFECT_DENIED'}),('missing_witness',{'tag':'Err','error':'NON_IDENTIFIABLE'}),('wrong_observer',{'tag':'Err','error':'OBSERVER_MISMATCH'}),('missing_memory',{'tag':'Err','error':'MEMORY_MISSING'})]:
|
| 8 |
+
p=json.loads((R/'examples'/f'{name}.json').read_text());pr=m.predict(p);v=vm_verify(p,pr);assert v['executed'] and v['runtime_consistency'] and v['result']['value']==expected;checks.append({'case':name,'result':v['result']['value']})
|
| 9 |
+
assert 'torch' not in sys.modules and 'numpy' not in sys.modules
|
| 10 |
+
print(json.dumps({'status':'PASS','checks':checks,'n_checks':len(checks),'model_seed':17,'runtime':'Python standard library and bundled ICL VM','scope':'Five source examples, not a rerun of training/evaluation'},indent=2))
|