Skip to content

Add text patterns, eager queries, and language correctness fixes - #14

Merged
bytetroll merged 6 commits into
masterfrom
codex/patterns-and-queries
Oct 26, 2026
Merged

bytetroll merged 6 commits into
masterfrom
codex/patterns-and-queries

Conversation

@bytetroll

@bytetroll bytetroll commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Ny and Matrix now support eager array queries and readable text patterns through the shared semantic core and runtime. Queries provide filtering, stable ordering, pagination and scalar/text/tuple projection, with Matrix-authored count/any/first/last/single terminals. nil.std.text provides bounded regex compilation, matching, captures and byte spans, plus whole-match collection, splitting and literal replacement. Extracted matches can feed directly into collected queries. VS Code highlighting, snippets and scoped query completion are included.

Prose declarations and conventional regex notation use one byte-pattern profile. Collection helpers preserve empty-match progression, propagate later search errors and reject excess matches/output without returning partial success. Replacement preflights output size and uses balanced concatenation. Query clauses enforce ownership invariants across repeated row evaluation.

The language bug pass fixes accepted unfinished comments/bodies, multiplication after multiline grouped expressions, missing argument checks, ignored built-in arguments, and native allocation/enum construction failures. Argument checking resolves generic receivers, method parameters and structural callback signatures while preserving supported numeric conversions. Allocation aliases and generic element types survive lowering. Concrete enum context reaches positional constructors and ordinary calls; array layouts remain invariant even with checking disabled. Earlier fixes also preserve nested enum payload context and indexed text element types.

Validation at clean commit b7eb2a9:

  • All 508 CTests passed; all 16 logical standard-library modules strictly checked.
  • 1,136 installed SDK consumer executions passed with source and binary libraries, covering interpreter, JIT, AOT and standalone assembler/linker routes.
  • New focused contracts include 221 comment/block rejection and compatibility checks, plus 144 argument/type checks. Regression fixtures cover allocation, grouped expressions, constructors, calls and independent native array-layout rejection.
  • A copied SDK passed all 81 real VS Code extension-host checks.
  • Sealed SDK capability evidence retains 29 fixture proofs across 174 execution routes. The earlier pattern-engine validation includes 320 contracts and 73,656 deterministic comparison cases under ASan/UBSan; that engine is unchanged by this bug pass.

NIL-0016 and findings F56–F66 document the supported scope and follow-ups: eager scalar/text/tuple arrays, byte-oriented regex, 4096 collected matches and 1 MiB replacement output. Grouping/joins/lazy queries, Unicode/dialect adapters and replacement templates remain follow-ups. Binary-only libraries type-check and execute but currently lack completion/semantic symbols; the shipped source-backed SDK editor workflow passes. Remaining call-checking gaps include enum constructor payload validation and calls on non-function values; native indirect calls remain incomplete.

The qualified SDK is activated locally with its previous generation preserved. rc-checks is technical SDK qualification, not a v1 release declaration.

@bytetroll bytetroll changed the title Add shared text patterns and eager queries for Ny and Matrix Add text patterns, eager queries, and language correctness fixes Oct 26, 2026
@bytetroll
bytetroll marked this pull request as ready for review October 26, 2026 20:42
Base automatically changed from codex/native-runtime-parity to master October 26, 2026 20:47
@bytetroll
bytetroll merged commit 32de637 into master Oct 26, 2026
6 checks passed
@bytetroll
bytetroll deleted the codex/patterns-and-queries branch October 26, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant