Skip to content

8 2 specification and limits documentation

TransCompilator edited this page Nov 26, 2026 · 1 revision

8.2 Specification and Limits Documentation

Source: https://deepwiki.com/PonvasanthPon/TransCompilator/8-2-specification-and-limits-documentation

Specification and Limits Documentation

Relevant source files

The following files were used as context for generating this wiki page:

Purpose and Scope

This document specifies the technical boundaries, language specifications, coverage metrics, and architectural limits governing tc_r1 (TransCompilator). It consolidates specifications and audit findings found across the documentation workspace, including docs/TC_ENGLISH_SPEC.md, docs/CORE_LIMITS.md, docs/PHASE5_LIMITS.md, docs/CONVERGENCE_LIMITS.md, and the coverage audit artifacts (docs/COVERAGE_AUDIT.md). These artifacts define the deterministic bounds of the zero-ML, offline English compilation pipeline, ensuring that unsupported constructs fail loudly rather than failing silently or triggering panics.

Sources: docs/TC_ENGLISH_SPEC.md:1-10 docs/TC_ENGLISH_SPEC.md:1-10, docs/CORE_LIMITS.md:1-4 docs/CORE_LIMITS.md:1-4, docs/COVERAGE_AUDIT.md:1-25 docs/COVERAGE_AUDIT.md:1-25


1. The English Language Specification (TC_ENGLISH_SPEC.md)

tc_r1 compiles structured English directly into a typed Core-7 AST, verifies it, lowers it to Core-7 IR, and emits static zero-libc ELF64 binaries for Linux x86-64 docs/TC_ENGLISH_SPEC.md:13-18.

The Irreducibility Rule and Anti-Hardcoding Bans

If a feature can be implemented cleanly in tc itself without modifying the compiler core, it belongs in the standard library (std/). Phase 3.6 introduces zero new IR opcodes and zero new library services docs/TC_ENGLISH_SPEC.md:20-22. The architecture enforces three anti-hardcoding bans:

  1. No per-verb synonym lists in tc-syntax or tc-semantics; verb meaning is derived from generated WordNet/VerbNet lexicon tables docs/TC_ENGLISH_SPEC.md:44-46.
  2. No library hacks in Rust; heap operations, lists, strings, and maps remain Phase 4 std/ responsibilities docs/TC_ENGLISH_SPEC.md:46-48.
  3. No prose noun blacklists; narrative omission is determined by grammar, tense, and computational evidence docs/TC_ENGLISH_SPEC.md:48-50.

The Four-Bucket Vocabulary Model

Every accepted word belongs to one of four finite buckets:

  1. Structural control anchors: Reserved lowercase words introducing control flow or declarations (import, struct, union, global, function, phrase, if, else, while, loop, return, syscall, create, make, end, stop) docs/TC_ENGLISH_SPEC.md:61-71.
  2. Closed-class English function words: 279 generated words across eight categories driving article stripping, prepositions, passive detection, and negation docs/TC_ENGLISH_SPEC.md:78-84.
  3. Open-class computational verbs: 786 WordNet 2025 hypernym entries, 10,845 VerbNet 3.4 semantic-predicate frames, and 103 irregular lemmas docs/TC_ENGLISH_SPEC.md:86-90.
  4. User identifiers and literals: Case-insensitive identifiers, case-sensitive string/byte literals, signed/unsigned numeric literals (0x, 0b, 0o, f32, f64), booleans (true/false), and null docs/TC_ENGLISH_SPEC.md:92-100.

Sources: docs/TC_ENGLISH_SPEC.md:13-100 docs/TC_ENGLISH_SPEC.md:13-100


2. Coverage and Grammar-Orthogonality Audit

The coverage audit (docs/COVERAGE_AUDIT.md) tracks grammar orthogonality across the entire supported lexicon. Valid English can fail in three bounded, honest categories: non-computational meaning routed to COMMENT_OMITTED or UNSUPPORTED, unmapped computational verbs failing loudly, and documented architectural limits docs/COVERAGE_AUDIT.md:5-20.

Lexicon Metrics

  • WordNet corpus: 135,969 entries / 107,519 synsets; 772 computational rows (769 verbs, 2 adjectives, 1 noun), yielding 723 unique computational lemmas and 517 unique synset IDs docs/COVERAGE_AUDIT.md:28-34.
  • VerbNet 3.4: 609 harvested classes/subclasses (329 XML files), 10,845 frames, 1,492 unique verbs, 1,490 executable frames, 6 narrative/comment frames, and 9,349 unsupported frames with zero type errors or panics docs/COVERAGE_AUDIT.md:113-124.

Diagram: Natural Language Space to Code Entity Space (Frontend Lexicon Resolution)

graph TD
    subgraph Natural_Language_Space["Natural Language Space"]
        NL1["English Sentence Input"]
        NL2["Open-Class Verb / Phrase"]
    end

    subgraph Code_Entity_Space["Code Entity Space"]
        TC1["crates/tc-syntax/src/tokenizer.rs"]
        TC2["crates/tc-lexicon/src/lib.rs"]
        TC3["crates/tc-semantics/src/intent.rs"]
        TC4["crates/tc-semantics/src/lower/"]
    end

    NL1 --> TC1
    TC1 --> TC2
    TC2 --> TC3
    TC3 --> TC4
    TC3 -- "Classify EXEC / COMMENT_OMITTED / UNSUPPORTED" --> TC4

    style Natural_Language_Space fill:none,stroke:#000,stroke-width:2px
    style Code_Entity_Space fill:none,stroke:#000,stroke-width:2px
Loading

Sources: docs/COVERAGE_AUDIT.md:1-35 docs/COVERAGE_AUDIT.md:1-35, docs/COVERAGE_AUDIT.md:111-124 docs/COVERAGE_AUDIT.md:111-124


3. Core Limits Catalog (CORE_LIMITS.md)

Verified architectural boundaries ensure that pathological inputs fail with clean diagnostics rather than panicking or segmenting memory docs/CORE_LIMITS.md:1-4.

ID Layer Title / Summary Build Exit Repro Path
LIM-CORE-001 LANGUAGE Reserved control keyword cannot be used as a VerbNet predicate verb. 1 battletest_core/corpora/tier_c10/limits/lim_control_keyword.tc docs/CORE_LIMITS.md:5-11
LIM-CORE-002 SCOPE Human gender anaphora, cataphora, and world-knowledge bridging are out of scope (COMMENT_OMITTED or UNRESOLVED_ANAPHOR). 0 battletest_core/corpora/tier_c10/limits/lim_cross_sentence_anaphora.tc docs/CORE_LIMITS.md:13-20
LIM-CORE-003 LANGUAGE Single-expression complexity is capped at 1024 parser charges to prevent native stack exhaustion. 1 battletest_core/corpora/tier_c10/limits/lim_expression_budget.tc docs/CORE_LIMITS.md:22-27
LIM-CORE-004 UPSTREAM Link Grammar produces no linkage for a 300-word sentence; falls back to COMMENT_OMITTED. 0 battletest_core/corpora/tier_c10/limits/lim_long_sentence.tc docs/CORE_LIMITS.md:29-35
LIM-CORE-005 SCOPE Threads and OS/UI/library services are outside the executable Core-7 English surface (UNSUPPORTED). 1 battletest_core/corpora/tier_c10/limits/lim_out_of_scope_thread.tc docs/CORE_LIMITS.md:37-43
LIM-CORE-006 LANGUAGE Recursive aggregate values have no finite System V layout; rejected by the type checker. 1 battletest_core/corpora/tier_c10/limits/lim_recursive_struct.tc docs/CORE_LIMITS.md:45-51
LIM-CORE-007 LANGUAGE Type nesting is capped at 64 levels to prevent stack exhaustion in generic/array parsing. 1 battletest_core/corpora/tier_c10/limits/lim_type_nesting.tc docs/CORE_LIMITS.md:53-59

Sources: docs/CORE_LIMITS.md:1-60 docs/CORE_LIMITS.md:1-59


4. Phase 5 and Convergence Limits (PHASE5_LIMITS.md, CONVERGENCE_LIMITS.md)

Additional boundaries identified during the Phase 5 and five-round convergence campaigns protect against malformed constructs, infinite recursion, and memory corruption docs/PHASE5_LIMITS.md:1-7, docs/CONVERGENCE_LIMITS.md:1-96.

Diagram: Natural Language Space to Code Entity Space (Diagnostic Routing & Limits)

graph TD
    subgraph Natural_Language_Space["Natural Language Space"]
        NL_LIM["Adversarial / Out-of-Spec Input"]
    end

    subgraph Code_Entity_Space["Code Entity Space"]
        CE1["crates/tc-syntax/src/lib.rs"]
        CE2["crates/tc-semantics/src/lower/"]
        CE3["crates/tc-typeck/src/lib.rs"]
        CE4["crates/tc-cli/src/main.rs"]
    end

    NL_LIM --> CE1
    CE1 --> CE2
    CE2 --> CE3
    CE3 -- "Exceeds Limits / Unmapped" --> CE4
    CE4 -- "Clean Structured Diagnostic (Exit 1)" --> CLI_OUT["Terminal Output"]

    style Natural_Language_Space fill:none,stroke:#000,stroke-width:2px
    style Code_Entity_Space fill:none,stroke:#000,stroke-width:2px
Loading

Sources: docs/PHASE5_LIMITS.md:1-8 docs/PHASE5_LIMITS.md:1-7, docs/CONVERGENCE_LIMITS.md:1-96 docs/CONVERGENCE_LIMITS.md:1-96


5. Campaign Final Reports and Verification Summaries

The reliability and conformance of tc_r1 are backed by rigorous battle-test campaigns:

  • Phase 3.5 Core Foundation: 10 tiers, 446 adversarial programs, 2,000 differential fuzz tests, and 25 bugs fixed with zero panics or silent drops docs/CORE_BATTLETEST_FINAL_REPORT.md:1-30.
  • Phase 5 Production Hardening: 12 tiers, 560 hand-written programs, 5,000 fuzz seeds, 4 production bugs fixed, and static zero-libc ELF64 validation (ldd reports not a dynamic executable, 0 INTERP) docs/PHASE5_BATTLETEST_FINAL_REPORT.md:1-33.
  • Zero-Bug Convergence: 5 disjoint rounds, 640 fresh programs across 8 English variety bands, 15,000 fuzz seeds, 7 bugs fixed, and 663 regression tests passing docs/CONVERGENCE_FINAL_REPORT.md:1-45.

Sources: docs/CORE_BATTLETEST_FINAL_REPORT.md:1-30 docs/CORE_BATTLETEST_FINAL_REPORT.md:1-30, docs/PHASE5_BATTLETEST_FINAL_REPORT.md:1-33 docs/PHASE5_BATTLETEST_FINAL_REPORT.md:1-33, docs/CONVERGENCE_FINAL_REPORT.md:1-45 docs/CONVERGENCE_FINAL_REPORT.md:1-45


Clone this wiki locally