You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pushes canonical .omc compatibility from 4 known-good files to 21/30 in
a sampled sweep (70%). Targeted at real-world programs from the Python
omnicc tree at Sovereign_Lattice/omninet_package/.
## Lexer / Parser
- Triple-quoted """multi-line""" string literals.
- Bare-string statement (docstring) at top-of-function position. Optional
trailing `;`. Python idiom.
- `//` line comments and `/* block */` comments alongside the canonical `#`.
- Fixed-size array declaration `h[256] amplitudes;` lowers to
`arr_new(256, 0)`.
- Parameterized pragmas: `@unroll:16`, `@threads:64`, `@cache:L1` on both
the line-prefix `@pragma[name]` and postfix `@name` forms.
- `import core;` / `import core as c;` / `load "path";` at the parse
level. Module resolution is a no-op for now — this just unblocks
parsing of files that lead with import statements.
## Stdlib (~25 new)
Math / constants:
tau, phi_inv, phi_sq, phi_squared, sqrt_2, sqrt_5, ln_2,
pow_int, square, cube, factorial (lenient on negatives),
sign, is_prime (6k±1 trial division),
even/is_even/odd/is_odd,
polymorphic min(a,b) / min(arr) and max.
φ-stdlib (matching Phase 6 std/*.omc surface):
fib (alias for fibonacci),
classify_resonance (returns int 0-3 bucket),
filter_by_resonance(arr, threshold),
ensure_clean(v) — pass through if not Singularity, else fold,
cleanup_array(arr) — drop Singularity elements,
collapse(amp, phase),
harmonic_interfere(a, b), interfere(a, b) — harmonic mean,
measure_coherence(a, b) — resonance-difference,
arr_fold_elements(arr) — sum of Fibonacci-snapped elements.
Safe arithmetic (Singularity-tolerant):
safe_add, safe_sub, safe_mul — fold any Singularity input through
Fibonacci snap before operating.
## Compatibility milestone
Six canonical files now run end-to-end on Rust OMC:
miner_nuclear.omc, test_phase7_features.omc, test_phase8_arrays.omc,
test_array.omc, phi_field_llm.omc, hbit_hardware_overlay.omc.
A 30-file sweep moved from 16 → 21 passing.
Remaining gaps cluster in:
- Bitwise ops (& | ^ << >>) — needed by crypto.omc
- Block-style calls (parallel_for_threads(n) { ... }) — nuclear_optimization.omc
- File I/O (file_write, etc.) — test_file_io.omc
- Module-aware imports (resolving `wave` as a callable namespace)
All deferred to their own phases.
## Tests
111 still passing. Nothing regressed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Docstring statements: bare string at statement position is a no-op (Python idiom). Semicolon optional.
13
+
- C-style `//` line comments and `/* block */` comments (alongside the canonical `#`).
14
+
- Fixed-size array declaration `h[256] amplitudes;` lowers to `arr_new(256, 0)`.
15
+
- Parameterized pragmas: `@unroll:16`, `@threads:64`, `@cache:L1` etc., on both the line-prefix and postfix forms.
16
+
-`import core;` and `import core as c;` statements at the parse level. `load "path";` accepted too. Module resolution is currently a no-op; this just unblocks parsing.
-**Safe arithmetic:**`safe_add`, `safe_sub`, `safe_mul` (fold any Singularity input through Fibonacci snap before operating).
22
+
23
+
**Compatibility milestone:**
24
+
6 canonical files now run end-to-end on Rust OMC: `miner_nuclear.omc`, `test_phase7_features.omc`, `test_phase8_arrays.omc`, `test_array.omc`, `phi_field_llm.omc`, `hbit_hardware_overlay.omc`. The 30-file sweep moved from 16 → 21 passing. Remaining gaps cluster in: bitwise ops (`& | ^ << >>`), block-style calls (`parallel_for_threads(n) { block }`), file I/O, and module-aware imports — all roadmap-significant items deferred to their own phases.
25
+
7
26
### Added (Phase D: stdlib expansion to match canonical surface, 2026-05-13)
8
27
Built out ~35 missing standard-library functions to close the gap with the canonical Python `omnicc/` interpreter at `Sovereign_Lattice/omninet_package/`.
0 commit comments