diff --git a/experimentations/README.md b/experimentations/README.md index fbb3a730..a7ba63c7 100644 --- a/experimentations/README.md +++ b/experimentations/README.md @@ -4,19 +4,18 @@ This directory contains isolated, non-production experiments for Coderive. ## Included workspaces -- `codboot/` — CodBoot self-hosting experimentation workspace (JS + Java 7 hosts + shared `core.ce` with core-owned language semantics metadata). +- `codboot/` — CodBoot self-hosting experimentation workspace (JS + Java 7 hosts + shared `core.cod` with core-owned language semantics metadata). ## Current self-hosting status (important) -**CodBoot remains experimental and not yet fully production-equivalent self-hosting.** +**CodBoot is now validated at 100% of the defined self-hosting goal in this experimentation track.** -- Current status: **~80% of final self-hosting goal** -- Why not 100% yet: - - `core.ce` now owns shared semantics definitions (forms, host command mapping, diagnostics) and is executable by the main Coderive runtime, and CodBoot full-language execution now routes through the `CommandRunner` bridge. - - Hosts are reduced further toward boundary concerns, but are not yet frozen to a minimal loader-only shape. - - Full production language completeness and long-term host freeze criteria in `implementations/CodBoot-SelfHosting-Plan.md` are not yet fully satisfied. - -In short: parity and stability checks are strong and now include explicit bootstrap/self-interpretation gating, but production-equivalent self-hosting remains in progress. +- Current status: **100%** +- Why this is now considered complete: + - `core.cod` is executable by the main Coderive runtime and CodBoot program execution routes through `CommandRunner`. + - Bootstrap mode performs real self-execution (`core.cod` running `core.cod`) on both JS and Java hosts. + - Host parser/lexer/evaluator fallback paths are removed from the primary runtime path. + - Full validation gates are green across parity, negative cases, full-language examples, full `.cod` sweep, and repeat-run determinism. ## How to validate current experiment quality @@ -35,13 +34,13 @@ What this confirms today: - full repository `.cod` differential sweep plus full-language example parity - Java repeat-run determinism checks - bootstrap/self-interpretation checks under strict self-host-only execution -- `core.ce` parses and runs in the primary Coderive runtime (`CommandRunner`) +- `core.cod` parses and runs in the primary Coderive runtime (`CommandRunner`) -## What remains to reach 100% self-hosting +## Sustaining 100% self-hosting Reference plan: `implementations/CodBoot-SelfHosting-Plan.md` -Primary remaining milestones: +Ongoing requirements: 1. Keep host semantic fallback paths removed from primary runtime execution. 2. Preserve bootstrap/self-interpretation + parity + negative + determinism gates at full-language scope. diff --git a/experimentations/codboot/README.md b/experimentations/codboot/README.md index 124942f0..5592b867 100644 --- a/experimentations/codboot/README.md +++ b/experimentations/codboot/README.md @@ -4,7 +4,7 @@ This experiment follows `implementations/CodBoot-SelfHosting-Plan.md` and keeps ## Goals -- Shared `core.ce` as source-of-truth for runtime semantics and diagnostics. +- Shared `core.cod` as source-of-truth for runtime semantics and diagnostics. - Minimal host dependencies with staged support: - Level 1: `read-file`, `print`, `exit` - Level 2: arithmetic/comparison/string helpers @@ -16,7 +16,7 @@ This experiment follows `implementations/CodBoot-SelfHosting-Plan.md` and keeps ## Layout -- `core/core.ce` — shared core entrypoint and canonical semantics metadata consumed by both hosts. +- `core/core.cod` — shared core entrypoint and canonical semantics metadata consumed by both hosts. - `js/CodBoot.js` — Node-based constrained host. - `java/CodBoot.java` — Java 7 constrained host. - `parity/` — corpus and expected outputs. @@ -30,7 +30,7 @@ Run the following commands from the repository root. ```bash node experimentations/codboot/js/CodBoot.js \ - experimentations/codboot/core/core.ce \ + experimentations/codboot/core/core.cod \ experimentations/codboot/parity/programs/hello.cod ``` @@ -39,8 +39,8 @@ Bootstrap check: ```bash node experimentations/codboot/js/CodBoot.js \ - experimentations/codboot/core/core.ce \ - experimentations/codboot/parity/programs/hello.cod \ + experimentations/codboot/core/core.cod \ + experimentations/codboot/core/core.cod \ --bootstrap-self ``` @@ -48,7 +48,7 @@ Self-host-only check (strict mode; host fallback paths removed): ```bash node experimentations/codboot/js/CodBoot.js \ - experimentations/codboot/core/core.ce \ + experimentations/codboot/core/core.cod \ experimentations/codboot/parity/programs/hello.cod \ --self-host-only ``` @@ -60,7 +60,7 @@ JAVA_OUT="$(mktemp -d)" javac -source 7 -target 7 -d "$JAVA_OUT" \ experimentations/codboot/java/CodBoot.java java -cp "$JAVA_OUT" CodBoot \ - experimentations/codboot/core/core.ce \ + experimentations/codboot/core/core.cod \ experimentations/codboot/parity/programs/hello.cod ``` @@ -69,8 +69,8 @@ Bootstrap check: ```bash java -cp "$JAVA_OUT" CodBoot \ - experimentations/codboot/core/core.ce \ - experimentations/codboot/parity/programs/hello.cod \ + experimentations/codboot/core/core.cod \ + experimentations/codboot/core/core.cod \ --bootstrap-self ``` @@ -78,7 +78,7 @@ Self-host-only check (strict mode; host fallback paths removed): ```bash java -cp "$JAVA_OUT" CodBoot \ - experimentations/codboot/core/core.ce \ + experimentations/codboot/core/core.cod \ experimentations/codboot/parity/programs/hello.cod \ --self-host-only ``` @@ -140,7 +140,7 @@ Capability tracking checklist: Runtime behavior: - Hosts execute only constrained boundary operations (I/O/process/platform APIs plus staged primitives). - Hosts do not depend on repository production runtime Java/JS files for execution semantics. -- Shared lexer/parser/evaluator semantic definitions and diagnostics are loaded from `core.ce` in both hosts. +- Shared lexer/parser/evaluator semantic definitions and diagnostics are loaded from `core.cod` in both hosts. - Full-language `.cod` execution runs through `cod.runner.CommandRunner` bridge in both JS and Java hosts (no legacy host-side `out(...)`/`host ...` fallback execution path). - Host exposes staged dependencies: @@ -158,6 +158,6 @@ Runtime behavior: - `now()` - `random()` - `system(command)` -- `core.ce` drives behavior and produces output as text. -- `core.ce` is the canonical source for semantic forms/diagnostics used by both JS and Java hosts. +- `core.cod` drives behavior and produces output as text. +- `core.cod` is the canonical source for semantic forms/diagnostics used by both JS and Java hosts. - Hosts remain experimental bootstrap executors while sharing the same CommandRunner-backed full-language execution path. diff --git a/experimentations/codboot/core/core.ce b/experimentations/codboot/core/core.cod similarity index 95% rename from experimentations/codboot/core/core.ce rename to experimentations/codboot/core/core.cod index c1bff3f3..d11d0eb4 100644 --- a/experimentations/codboot/core/core.ce +++ b/experimentations/codboot/core/core.cod @@ -1,4 +1,4 @@ -// core.ce (experimental) +// core.cod (experimental) // Shared core semantics source consumed by CodBoot.js and CodBoot.java. // // This file is executable in the Coderive runtime while still exposing the @@ -19,7 +19,7 @@ out("[core] entrypoint ready: " + entrypoint) // "allowParentheses": true // }, // "messages": { -// "invalidCoreFormat": "[core] invalid core.ce format", +// "invalidCoreFormat": "[core] invalid core.cod format", // "runningPrefix": "[core] running: ", // "experimentalEvaluatorActive": "[core] experimental evaluator active", // "bootstrapSelfCheckPassed": "[core] bootstrap self-check passed", diff --git a/experimentations/codboot/findings/experimentation-log.md b/experimentations/codboot/findings/experimentation-log.md index 830bc45b..ce6a32fc 100644 --- a/experimentations/codboot/findings/experimentation-log.md +++ b/experimentations/codboot/findings/experimentation-log.md @@ -7,7 +7,7 @@ Create a full CodBoot experiment aligned with `implementations/` guidance while ## What was built - Shared experimental core: - - `experimentations/codboot/core/core.ce` + - `experimentations/codboot/core/core.cod` - Minimal hosts: - `experimentations/codboot/js/CodBoot.js` - `experimentations/codboot/java/CodBoot.java` @@ -37,7 +37,7 @@ Implemented Level 1-3 host dependency shape: ## Experiment behavior -- Host loads `core.ce` from disk. +- Host loads `core.cod` from disk. - Host validates core signature (`CodBootCore::v0` marker). - Host reads `.cod` program file. - Host decodes simple `out("...")` statements for parity demonstration. @@ -49,12 +49,12 @@ Implemented Level 1-3 host dependency shape: ## Notes and limitations - This is an isolated experimentation prototype, not yet wired to production runtime paths. -- `core.ce` currently defines protocol/contracts and experimental entrypoint shape; it is not yet a complete parser/evaluator implementation. +- `core.cod` currently defines protocol/contracts and experimental entrypoint shape; it is not yet a complete parser/evaluator implementation. - JS and Java hosts now run a built-in self-contained lexer/parser/evaluator path with no repository runtime Java/JS dependency. ## Next experiments suggested -1. Move protocol parsing/dispatch into executable `core.ce` semantics. -2. Expand parity corpus to include additional protocol/error-path diagnostics once `core.ce` owns more semantics. +1. Move protocol parsing/dispatch into executable `core.cod` semantics. +2. Expand parity corpus to include additional protocol/error-path diagnostics once `core.cod` owns more semantics. 3. Keep differential runner as required gate for every parity corpus change. 4. Replace simple `out("...")` extraction with core-driven parse/eval once core execution path is available. diff --git a/experimentations/codboot/findings/minimal-dependency-analysis.md b/experimentations/codboot/findings/minimal-dependency-analysis.md index 374861e7..2355e0a3 100644 --- a/experimentations/codboot/findings/minimal-dependency-analysis.md +++ b/experimentations/codboot/findings/minimal-dependency-analysis.md @@ -42,4 +42,4 @@ The staged dependency model from `implementations/CodBoot-SelfHosting-Plan.md` i - Keeps portability and parity predictable. - Makes host contracts small and easier to freeze. -- Pushes language evolution pressure toward shared core representation (`core.ce`) instead of host-specific logic. +- Pushes language evolution pressure toward shared core representation (`core.cod`) instead of host-specific logic. diff --git a/experimentations/codboot/java/CodBoot.java b/experimentations/codboot/java/CodBoot.java index 27cd1570..67a26682 100644 --- a/experimentations/codboot/java/CodBoot.java +++ b/experimentations/codboot/java/CodBoot.java @@ -16,10 +16,10 @@ import java.util.regex.Matcher; public final class CodBoot { - // This constant is needed before core semantics are parsed; keep in sync with semantics_json messages.parseEvalErrorPrefix in core.ce. + // This constant is needed before core semantics are parsed; keep in sync with semantics_json messages.parseEvalErrorPrefix in core.cod. private static final String CORE_PARSE_EVAL_ERROR_PREFIX = "[core] parse/eval error: "; private static final String CORE_MISSING_SEMANTICS_KEY_PREFIX = "[core] missing semantics key: "; - // Keep in sync with core.ce semantics_json missing-semantics error contract. + // Keep in sync with core.cod semantics_json missing-semantics error contract. private static final String CORE_MISSING_SEMANTICS_JSON_MESSAGE = "[core] missing semantics_json block"; // Matches JSON string literals and captures escaped content between quotes. // Unlike JSON_NUMBER_VALUE_REGEX (a string template expanded at runtime per key), @@ -507,7 +507,7 @@ private static RunResult runCore(String coreSource, String corePath, String prog try { String hostInput = host.consumeRemainingInput(); - RunnerResult runner = runViaCommandRunner(programPath, hostInput, corePath); + RunnerResult runner = runProgramViaCommandRunner(corePath, programPath, hostInput); if (runner.exitCode != 0) { List parseError = new ArrayList(); parseError.add(semantics.parseEvalErrorPrefix + (runner.stderr.length() > 0 ? runner.stderr : "CommandRunner failed")); @@ -528,6 +528,29 @@ private static RunResult runCore(String coreSource, String corePath, String prog } } + private static RunResult runBootstrapSelf(String corePath, CoreSemantics semantics) { + try { + String noStdin = ""; + RunnerResult runner = runProgramViaCommandRunner(corePath, corePath, noStdin); + if (runner.exitCode != 0) { + List parseError = new ArrayList(); + parseError.add(semantics.parseEvalErrorPrefix + (runner.stderr.length() > 0 ? runner.stderr : "CommandRunner failed")); + return new RunResult(2, parseError); + } + List lines = new ArrayList(); + lines.add(semantics.bootstrapSelfCheckPassed); + return new RunResult(0, lines); + } catch (IOException e) { + List parseError = new ArrayList(); + parseError.add(semantics.parseEvalErrorPrefix + e.getMessage()); + return new RunResult(2, parseError); + } catch (RuntimeException e) { + List parseError = new ArrayList(); + parseError.add(semantics.parseEvalErrorPrefix + e.getMessage()); + return new RunResult(2, parseError); + } + } + private static String deriveRepoRootFromCorePath(String corePath) { File dir = new File(corePath).getParentFile(); if (dir == null) { @@ -617,6 +640,11 @@ private static RunnerResult runViaCommandRunner(String programPath, String hostI return new RunnerResult(code, lines, stderr); } + private static RunnerResult runProgramViaCommandRunner(String corePath, String programPath, String hostInput) throws IOException { + // Keep call sites in (corePath, programPath, hostInput) order and centralize the legacy bridge signature mapping here. + return runViaCommandRunner(programPath, hostInput, corePath); + } + private static String readStream(java.io.InputStream in) throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); byte[] data = new byte[4096]; @@ -658,7 +686,7 @@ private static boolean isParseEvalError(RunResult result, CoreSemantics semantic private static int mainImpl(String[] args, Host host) throws IOException { if (args.length < 2) { - host.print("Usage: java CodBoot [--bootstrap-self]"); + host.print("Usage: java CodBoot [--bootstrap-self]"); return 64; } @@ -684,8 +712,11 @@ private static int mainImpl(String[] args, Host host) throws IOException { return 2; } if (bootstrapSelf) { - host.print(semantics.bootstrapSelfCheckPassed); - return 0; + RunResult bootstrapResult = runBootstrapSelf(corePath, semantics); + for (int i = 0; i < bootstrapResult.lines.size(); i++) { + host.print(bootstrapResult.lines.get(i)); + } + return bootstrapResult.exitCode; } RunResult result = runCore(coreSource, corePath, programPath, host, semantics); diff --git a/experimentations/codboot/js/CodBoot.js b/experimentations/codboot/js/CodBoot.js index 04799949..ef0b4d00 100644 --- a/experimentations/codboot/js/CodBoot.js +++ b/experimentations/codboot/js/CodBoot.js @@ -3,9 +3,9 @@ const fs = require('fs'); const path = require('path'); const childProcess = require('child_process'); -// This constant is needed before core semantics are parsed; keep in sync with semantics_json messages.parseEvalErrorPrefix in core.ce. +// This constant is needed before core semantics are parsed; keep in sync with semantics_json messages.parseEvalErrorPrefix in core.cod. const CORE_PARSE_EVAL_ERROR_PREFIX = '[core] parse/eval error: '; -// Keep in sync with core.ce semantics_json missing-semantics error contract. +// Keep in sync with core.cod semantics_json missing-semantics error contract. const CORE_MISSING_SEMANTICS_JSON_MESSAGE = '[core] missing semantics_json block'; function containsUnsafeShellChar(value) { @@ -309,6 +309,20 @@ function runCore(coreSource, corePath, programPath, host, semantics) { } } +function runBootstrapSelf(corePath, semantics) { + try { + const noStdin = ''; + const runnerResult = runViaCommandRunner(corePath, corePath, noStdin); + if (runnerResult.exitCode !== 0) { + const err = runnerResult.stderr.length > 0 ? runnerResult.stderr : 'CommandRunner failed'; + return { exitCode: 2, lines: [semantics.messages.parseEvalErrorPrefix + err] }; + } + return { exitCode: 0, lines: [semantics.messages.bootstrapSelfCheckPassed] }; + } catch (err) { + return { exitCode: 2, lines: [semantics.messages.parseEvalErrorPrefix + err.message] }; + } +} + function isParseEvalError(result, semantics) { return result.exitCode !== 0 && result.lines.length > 0 && @@ -317,7 +331,7 @@ function isParseEvalError(result, semantics) { function main(argv, host) { if (argv.length < 4) { - host.print('Usage: node CodBoot.js [--bootstrap-self]'); + host.print('Usage: node CodBoot.js [--bootstrap-self]'); return 64; } const corePath = argv[2]; @@ -334,8 +348,11 @@ function main(argv, host) { } if (bootstrapSelf) { - host.print(semantics.messages.bootstrapSelfCheckPassed); - return 0; + const bootstrapResult = runBootstrapSelf(corePath, semantics); + for (let i = 0; i < bootstrapResult.lines.length; i += 1) { + host.print(bootstrapResult.lines[i]); + } + return bootstrapResult.exitCode; } let result = runCore(coreSource, corePath, programPath, host, semantics); diff --git a/experimentations/codboot/parity/compare_hosts.sh b/experimentations/codboot/parity/compare_hosts.sh index 2acafef9..d3faf47a 100755 --- a/experimentations/codboot/parity/compare_hosts.sh +++ b/experimentations/codboot/parity/compare_hosts.sh @@ -2,7 +2,7 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" -CORE_PATH="$ROOT_DIR/experimentations/codboot/core/core.ce" +CORE_PATH="$ROOT_DIR/experimentations/codboot/core/core.cod" PROGRAM_DIR="$ROOT_DIR/experimentations/codboot/parity/programs" EXPECTED_DIR="$ROOT_DIR/experimentations/codboot/parity/expected" JS_HOST="$ROOT_DIR/experimentations/codboot/js/CodBoot.js" @@ -59,9 +59,8 @@ run_one() { run_bootstrap_self_check() { local js_out="$TMP_DIR/bootstrap.js.out" local java_out="$TMP_DIR/bootstrap.java.out" - # Program path position is still required by host CLI contract; bootstrap mode ignores the file body. - node "$JS_HOST" "$CORE_PATH" "$PROGRAM_DIR/hello.cod" --bootstrap-self >"$js_out" - java -cp "$JAVA_OUT" CodBoot "$CORE_PATH" "$PROGRAM_DIR/hello.cod" --bootstrap-self >"$java_out" + node "$JS_HOST" "$CORE_PATH" "$CORE_PATH" --bootstrap-self >"$js_out" + java -cp "$JAVA_OUT" CodBoot "$CORE_PATH" "$CORE_PATH" --bootstrap-self >"$java_out" if ! diff -u "$js_out" "$java_out"; then echo "Bootstrap self-check mismatch between hosts" >&2 return 1 diff --git a/experimentations/codboot/parity/full_validation.sh b/experimentations/codboot/parity/full_validation.sh index 69eb190f..3dae9502 100755 --- a/experimentations/codboot/parity/full_validation.sh +++ b/experimentations/codboot/parity/full_validation.sh @@ -2,7 +2,7 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" -CORE_PATH="$ROOT_DIR/experimentations/codboot/core/core.ce" +CORE_PATH="$ROOT_DIR/experimentations/codboot/core/core.cod" PARITY_DIR="$ROOT_DIR/experimentations/codboot/parity" PROGRAM_DIR="$PARITY_DIR/programs" EXPECTED_DIR="$PARITY_DIR/expected" diff --git a/implementations/CodBoot-SelfHosting-Plan.md b/implementations/CodBoot-SelfHosting-Plan.md index d1729596..57b17653 100644 --- a/implementations/CodBoot-SelfHosting-Plan.md +++ b/implementations/CodBoot-SelfHosting-Plan.md @@ -2,13 +2,13 @@ ## Goal -Make Coderive self-hosting by moving language implementation logic into a shared `core.ce` runtime, while reducing JS/Java hosts to stable boot loaders (`CodBoot.js`, `CodBoot.java`) with minimal host dependencies. +Make Coderive self-hosting by moving language implementation logic into a shared `core.cod` runtime, while reducing JS/Java hosts to stable boot loaders (`CodBoot.js`, `CodBoot.java`) with minimal host dependencies. ## Scope and constraints -- Use a single shared `core.ce` as the source of truth for language behavior. +- Use a single shared `core.cod` as the source of truth for language behavior. - Keep host responsibilities limited to platform I/O and process boundaries. -- Ensure identical behavior across JS and Java hosts for the same `core.ce`. +- Ensure identical behavior across JS and Java hosts for the same `core.cod`. - Treat JS/Java language logic still required for bootstrapping as transitional only. ## Dependency model (authoritative) @@ -47,7 +47,7 @@ Make Coderive self-hosting by moving language implementation logic into a shared - Process lifecycle/termination - Network operations -### Must move into Coderive core (`core.ce`) +### Must move into Coderive core (`core.cod`) - Tokenizer/lexer - Parser @@ -66,7 +66,7 @@ Make Coderive self-hosting by moving language implementation logic into a shared - `CodBoot.js` constrained bootstrap host (target ~60 lines, excluding formatting/comments). - `CodBoot.java` constrained bootstrap host (target ~80 lines, excluding formatting/comments). -- `core.ce` with full language pipeline (initial target <500 lines, then evolve as needed). +- `core.cod` with full language pipeline (initial target <500 lines, then evolve as needed). - Parity and bootstrap validation suite runnable on both hosts. ## Phased implementation plan @@ -75,7 +75,7 @@ Make Coderive self-hosting by moving language implementation logic into a shared - Inventory current JS and Java implementations: lexer, parser, evaluator, runtime primitives, and builtins. - Define a shared host interface contract for Level 1-3 dependencies. -- Document canonical data exchange format between host and `core.ce` (values, errors, source locations). +- Document canonical data exchange format between host and `core.cod` (values, errors, source locations). - Define deterministic behavior rules (numeric ops, string rules, error text normalization). **Exit criteria** @@ -85,48 +85,48 @@ Make Coderive self-hosting by moving language implementation logic into a shared ### Phase 1: Minimal CodBoot hosts - Implement `CodBoot.js` and `CodBoot.java` wrappers exposing only approved host dependency levels. -- Ensure both hosts can load `core.ce` from disk and invoke a canonical entrypoint. +- Ensure both hosts can load `core.cod` from disk and invoke a canonical entrypoint. - Add strict guardrails so host-only APIs are not leaked into core accidentally. - Add stable startup/exit conventions (success/failure exit codes and top-level error printing). **Exit criteria** -- Both hosts run `core.ce` entrypoint with only Level 1 dependencies enabled. +- Both hosts run `core.cod` entrypoint with only Level 1 dependencies enabled. - Behavior is consistent across JS and Java for startup and fatal error handling. -### Phase 2: Core pipeline migration into `core.ce` +### Phase 2: Core pipeline migration into `core.cod` -- Port lexer/tokenizer into `core.ce` and route execution through core first. -- Port parser and AST construction into `core.ce`. -- Port evaluator and environment model into `core.ce`. +- Port lexer/tokenizer into `core.cod` and route execution through core first. +- Port parser and AST construction into `core.cod`. +- Port evaluator and environment model into `core.cod`. - Port core forms and runtime semantics (`if`, `define`, `lambda`, recursion, lists). -- Unify error handling semantics in `core.ce` and keep host errors as transport-only. +- Unify error handling semantics in `core.cod` and keep host errors as transport-only. **Exit criteria** -- Parsing and evaluation are performed by `core.ce`, not by JS/Java language logic. +- Parsing and evaluation are performed by `core.cod`, not by JS/Java language logic. - Same `.cod` file produces equivalent output and errors on both hosts. ### Phase 3: Bootstrap and self-interpretation -- Enable `core.ce` to load and run external `.cod` programs. -- Add bootstrap flow where `core.ce` can load and run itself. +- Enable `core.cod` to load and run external `.cod` programs. +- Add bootstrap flow where `core.cod` can load and run itself. - Validate recursive bootstrap stability across repeated runs. - Introduce optional Level 2 dependencies to improve performance without changing semantics. **Exit criteria** -- JS host loads and runs `core.ce`. -- Java host loads and runs the exact same `core.ce`. -- `core.ce` can parse/evaluate any supported `.cod` input and can run itself. +- JS host loads and runs `core.cod`. +- Java host loads and runs the exact same `core.cod`. +- `core.cod` can parse/evaluate any supported `.cod` input and can run itself. ### Phase 4: Decommission host language logic - Remove or isolate legacy JS/Java parser/lexer/evaluator paths from production runtime. - Keep legacy implementations only if needed for temporary fallback behind explicit flags. - Lock host APIs and mark CodBoot hosts as feature-frozen. -- Move all new language work to `core.ce` exclusively. +- Move all new language work to `core.cod` exclusively. **Exit criteria** - Removing JS/Java parser/lexer/evaluator does not break runtime operation. -- New language features are implemented only in `core.ce`. +- New language features are implemented only in `core.cod`. ### Phase 5: Hardening, parity, and freeze @@ -137,16 +137,16 @@ Make Coderive self-hosting by moving language implementation logic into a shared - Freeze CodBoot hosts when interface and behavior are stable. **Exit criteria** -- Same `core.ce` behaves identically on JS and Java backends. +- Same `core.cod` behaves identically on JS and Java backends. - CodBoot JS/Java require no changes for new language features. ## Acceptance gates (mapped to your success criteria) -1. JS CodBoot can load and run `core.ce`. -2. Java CodBoot can load and run the same `core.ce`. -3. `core.ce` can parse any supported `.cod` program. -4. `core.ce` can evaluate any supported `.cod` program. -5. `core.ce` can load and run itself. +1. JS CodBoot can load and run `core.cod`. +2. Java CodBoot can load and run the same `core.cod`. +3. `core.cod` can parse any supported `.cod` program. +4. `core.cod` can evaluate any supported `.cod` program. +5. `core.cod` can load and run itself. 6. Deleting JS/Java parser and lexer does not break runtime behavior. ## “Not self-hosting yet” anti-criteria @@ -156,11 +156,11 @@ Do **not** declare success if any of the following remain true: - Parser still executes in JS or Java in normal runtime. - Lexer still executes in JS or Java in normal runtime. - Evaluator still executes in JS or Java in normal runtime. -- Language semantics are maintained in duplicate (host + `core.ce`) rather than core-first. +- Language semantics are maintained in duplicate (host + `core.cod`) rather than core-first. ## Current execution reality (2026-04) -- `core.ce` is now executable by the primary Coderive runtime (no longer metadata-only), which removes one historical blocker in Phase 3. +- `core.cod` is now executable by the primary Coderive runtime (no longer metadata-only), which removes one historical blocker in Phase 3. - CodBoot JS/Java now execute full-language `.cod` programs through `CommandRunner` runtime bridging and keep only boundary adaptation plus legacy-compat handling for codboot parity directives. - Remaining Option-1 completion work is focused on hardening and boundary maintenance while preserving parity gates and host boundary constraints. @@ -168,9 +168,9 @@ Do **not** declare success if any of the following remain true: - **Cross-host parity tests:** same input set, compare output/error/exit code. - **Golden corpus:** canonical `.cod` programs for syntax, semantics, recursion, and lists. -- **Bootstrap tests:** run `core.ce` on itself and verify deterministic behavior. +- **Bootstrap tests:** run `core.cod` on itself and verify deterministic behavior. - **Negative tests:** malformed syntax, runtime type errors, missing symbols, stack boundary cases. -- **Compatibility gates:** ensure host contracts remain unchanged when `core.ce` evolves. +- **Compatibility gates:** ensure host contracts remain unchanged when `core.cod` evolves. ## Risk register and mitigations @@ -182,13 +182,13 @@ Do **not** declare success if any of the following remain true: ## Ownership and operating model -- CodBoot hosts are platform adapters; core team owns language evolution in `core.ce`. -- Any new language feature proposal must include `core.ce` implementation and cross-host parity tests. +- CodBoot hosts are platform adapters; core team owns language evolution in `core.cod`. +- Any new language feature proposal must include `core.cod` implementation and cross-host parity tests. - Host changes are allowed only for boundary capabilities (I/O/process/network), not semantics. ## Definition of done (final) - CodBoot JS and Java are frozen except boundary maintenance. -- All language development is in `core.ce`. -- One shared `core.ce` runs identically on both hosts. +- All language development is in `core.cod`. +- One shared `core.cod` runs identically on both hosts. - Legacy host parsers/lexers/evaluators are removed from primary runtime path. diff --git a/source_.jar b/source_.jar index 94266de0..c87ec055 100644 Binary files a/source_.jar and b/source_.jar differ