Repository navigation
8 2 specification and limits documentation
Source: https://deepwiki.com/PonvasanthPon/TransCompilator/8-2-specification-and-limits-documentation
Relevant source files
The following files were used as context for generating this wiki page:
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
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.
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:
-
No per-verb synonym lists in
tc-syntaxortc-semantics; verb meaning is derived from generated WordNet/VerbNet lexicon tables docs/TC_ENGLISH_SPEC.md:44-46. -
No library hacks in Rust; heap operations, lists, strings, and maps remain Phase 4
std/responsibilities docs/TC_ENGLISH_SPEC.md:46-48. - No prose noun blacklists; narrative omission is determined by grammar, tense, and computational evidence docs/TC_ENGLISH_SPEC.md:48-50.
Every accepted word belongs to one of four finite buckets:
-
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. - 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.
- 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.
-
User identifiers and literals: Case-insensitive identifiers, case-sensitive string/byte literals, signed/unsigned numeric literals (
0x,0b,0o,f32,f64), booleans (true/false), andnulldocs/TC_ENGLISH_SPEC.md:92-100.
Sources: docs/TC_ENGLISH_SPEC.md:13-100 docs/TC_ENGLISH_SPEC.md:13-100
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.
- 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.
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
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
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
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.
-
LIM-P5-001/LIM-CONV-001(FlatFor everyloop): Requires an inline body or indented block; rejected with a clean lowering error docs/PHASE5_LIMITS.md:3, docs/CONVERGENCE_LIMITS.md:7-22. -
LIM-P5-002/LIM-CONV-002(Nested phrase argument): Phrase expressions used directly as arguments of another phrase are not recursively phrase-resolved; they must be bound to aLetfirst docs/PHASE5_LIMITS.md:4, docs/CONVERGENCE_LIMITS.md:24-37. -
LIM-P5-003/LIM-CONV-003(Long sentences): Very long fixed sentences trigger clean unsupported diagnostics without panicking Link Grammar docs/PHASE5_LIMITS.md:5, docs/CONVERGENCE_LIMITS.md:39-50. -
LIM-P5-004/LIM-CONV-004(Editor interpreter budget): The editor parity runner enforces a 10,000,000-step reference interpreter budget (CLI uses 50,000,000), returning anINTERPRETER FAILEDresult rather than hanging docs/PHASE5_LIMITS.md:6, docs/CONVERGENCE_LIMITS.md:52-56. -
LIM-P5-005/LIM-CONV-005(StrMapkeys):StrMapstores caller-ownedTcStringpointers; keys must remain valid until the map is freed docs/PHASE5_LIMITS.md:7, docs/CONVERGENCE_LIMITS.md:58-62. -
LIM-CONV-006(Verb/noun identifier collision): Bare identifiers that match open-class VerbNet verbs inside arithmetic expressions fail loudly and requireLetbindings docs/CONVERGENCE_LIMITS.md:64-79. -
LIM-CONV-007(Expression nesting cap): Parenthesized expression nesting is capped at 32 groups (tc-semantics), throwing an explicit nesting error before Rust stack overflow occurs docs/CONVERGENCE_LIMITS.md:81-94.
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
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
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 (
lddreports not a dynamic executable, 0INTERP) 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
The TransCompilator Project