This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch openformula
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 1ac0d2f4ee9308803c2b47749ed52d3be518e5d8
Author: Pedro Giffuni <[email protected]>
AuthorDate: Sat Nov 14 12:14:58 2026 -0500

    docs: G.5 Basic Limits source audit — all 4 requirements classified 
RUNTIME_PENDING
    
    ODF 1.4 §3.7 requires: (1) formulas up to at least 1024 chars,
    (2) at least 30 parameters per function, (3) strings up to 32,767
    ASCII chars, (4) at least 7 nesting levels of functions.
    
    Source audit findings:
    - Formula length: NO formula-text length limit; MAXCODE=2048 tokens
      (compiler.hxx:59), MAXSTRLEN=1024 per symbol (compiler.hxx:60).
      1026-char formula needs ~1025 tokens < 2048. Single string literal
      limited to 1023 chars (MAXSTRLEN).
    - Parameters: NO global 30-param cap; MAX uses MustHaveParamCountMin(1)
      (interpr1.cxx:3396-3400); SUM supports 255 args (calcval SG.BL-255args).
    - String length: STRING_MAXLEN=65,535 (string.hxx:119, STRING32 not
      defined) > 32,767 ODF minimum. CheckStringResultLen enforces at
      concatenation (interpre.hxx:930-936). String literals limited to
      1023 chars (MAXSTRLEN=1024).
    - Nesting depth: NO depth limit found (no MAXNEST or recursion depth
      guard). Parser uses recursive descent without depth guard
      (compiler.cxx:4134). Evaluator stack-based without depth limit.
    
    All 4 requirements classified RUNTIME_PENDING — source evidence
    supports compliance, runtime verification blocked (no AOO build tree;
    calcval macOS-only).
    
    No production code changes.
    
    Updates:
    - openformula-small-group-semantic-audit.md: Detailed F.4.1 Basic
      Limits source audit with exact file/function references
    - openformula-small-group-audit.md: Reclassified BL-001 through BL-004
      from MET/PARTIAL to RUNTIME_PENDING with source evidence
    - openformula-small-group-semantic-gaps.tsv: Updated F-GAP-006 through
      F-GAP-009 with detailed findings and RUNTIME_PENDING classification
    - openformula-milestone-g-sequence.md: Marked G.5 complete (source-level)
      with updated complexity table and Definition of Done
    
    git diff --check passed; all TSV files have correct column counts;
    no stale UNVERIFIED statements about Basic Limits remain.
---
 odf_docs/openformula-milestone-g-sequence.md       | 26 +++++----
 odf_docs/openformula-small-group-audit.md          | 15 +++---
 odf_docs/openformula-small-group-semantic-audit.md | 63 ++++++++++++++++++----
 odf_docs/openformula-small-group-semantic-gaps.tsv |  8 +--
 4 files changed, 80 insertions(+), 32 deletions(-)

diff --git a/odf_docs/openformula-milestone-g-sequence.md 
b/odf_docs/openformula-milestone-g-sequence.md
index 5795bdb444..505caed779 100644
--- a/odf_docs/openformula-milestone-g-sequence.md
+++ b/odf_docs/openformula-milestone-g-sequence.md
@@ -90,19 +90,21 @@ ODF 1.4 §6.14.6 removed the ODF 1.2/1.3 row-vector shortcut 
where `INDEX(rowvec
 **Dependencies:** None.
 **Runtime validation needed:** Yes — corpus regression test against existing 
documents to assess legacy document impact. **Blocked:** No AOO build tree 
available; calcval cannot run. Existing test case `INDEX.row.rowonly` 
(calcval-cases14.tsv:39) expects `#ERR` (ODF 1.4) but current implementation 
returns `30` — test/implementation mismatch noted.
 
-## Phase G.5 — Low-Risk: Basic Limits Runtime Verification
+## Phase G.5 — Low-Risk: Basic Limits Source Audit
 
-No code changes expected (no hard limits found). Verification only.
+**STATUS: COMPLETE (source-level audit; runtime verification pending)**
 
-| Order | Gap ID | Area | Test | Expected Result |
+ODF 1.4 §3.7 requires: (1) formulas up to at least 1024 characters, (2) at 
least 30 parameters per function, (3) strings up to 32,767 ASCII characters, 
(4) at least 7 nesting levels of functions. Source audit found no blocking 
limits for any requirement. All four classified as RUNTIME_PENDING.
+
+| Order | Gap ID | Area | Source Finding | Classification |
 |---|---|---|---|---|
-| G.5.1 | F-GAP-006 | Formula length | 1024+ char formula (1026-char 
`=1+1+...+1`) | Accepted, result 513 |
-| G.5.2 | F-GAP-007 | Parameter count | 30-parameter MAX call | Accepted, 
result 30 |
-| G.5.3 | F-GAP-008 | String length | 32767-char string (after STRING_MAXLEN 
confirmed) | Accepted |
-| G.5.4 | F-GAP-009 | Nesting depth | 7 nested IFs | Accepted, result 1 |
+| G.5.1 | F-GAP-006 | Formula length | No formula-text cap; MAXCODE=2048 
tokens (compiler.hxx:59), MAXSTRLEN=1024 per symbol (compiler.hxx:60). 
1026-char formula needs ~1025 tokens < 2048. | RUNTIME_PENDING |
+| G.5.2 | F-GAP-007 | Parameter count | No global 30-param cap; MAX uses 
MustHaveParamCountMin(1) (interpr1.cxx:3396-3400); SUM supports 255 args 
(calcval SG.BL-255args). | RUNTIME_PENDING |
+| G.5.3 | F-GAP-008 | String length | STRING_MAXLEN=65,535 (string.hxx:119, 
STRING32 not defined) > 32,767. CheckStringResultLen enforces at concatenation 
(interpre.hxx:930-936). String literals limited to 1023 chars (MAXSTRLEN=1024). 
| RUNTIME_PENDING |
+| G.5.4 | F-GAP-009 | Nesting depth | No nesting depth limit (no MAXNEST or 
recursion depth guard). Parser uses recursive descent without depth guard 
(compiler.cxx:4134). | RUNTIME_PENDING |
 
 **Dependencies:** None.  
-**Runtime validation needed:** Yes — all four tests.
+**Runtime validation needed:** Yes — all four calcval tests (SG.BL-001 through 
SG.BL-004). **Blocked:** No AOO build tree available; calcval cannot run. 
Source audit complete; no production code changes needed.
 
 ## Phase G.6 — Low-Risk: Syntax Verification
 
@@ -121,7 +123,7 @@ No code changes expected (no hard limits found). 
Verification only.
 ```
 G.1 (docs, COMPLETE) ──┐
                         ├── G.2 (ScDBCount empty-cell, IMPLEMENTED 
source-level) ──┐
-G.5 (limits verification) ──┤                                                  
      ├── G.3 (COUNTBLANK decision, COMPLETE)
+G.5 (limits audit, COMPLETE source-level) ──┤                                  
      ├── G.3 (COUNTBLANK decision, COMPLETE)
 G.6 (syntax verification) ──┤                                                  
      │
 G.4 (INDEX compatibility) ──┘                                                  
      └── (runtime-validated)
 ```
@@ -135,7 +137,8 @@ G.4 compatibility audit: `bRowArray` shortcut present 
(interpr1.cxx:7588-7612);
 | G.2 (ScDBCount) | Low | Fix applied via `CountRecords()`; regression tests 
added; runtime verification blocked | Implemented (source-level) |
 | G.3 (COUNTBLANK) | Low | Decision documented; implementation already in 
place via `lcl_IsCountBlankEmpty()` | Complete (decision documented) |
 | G.4 (INDEX compat) | Medium | Compatibility audit complete; `bRowArray` 
shortcut present; ODF 1.4 deviation documented | Compatibility audit complete 
(decision documented) |
-| G.5/G.6 (verification) | Low | Test execution only; no code changes | 
Pending build |
+| G.5 (limits audit) | Low | Source audit complete; no blocking limits found; 
all 4 classified RUNTIME_PENDING | Complete (source-level) |
+| G.6 (syntax verification) | Low | Test execution only; no code changes | 
Pending build |
 
 ## Definition of Done for Milestone G
 
@@ -145,7 +148,8 @@ G.4 compatibility audit: `bRowArray` shortcut present 
(interpr1.cxx:7588-7612);
 - G.2 runtime verification: blocked — no AOO build tree available; calcval 
cannot run
 - G.3 COUNTBLANK behavior: decision documented — `lcl_IsCountBlankEmpty()` 
(interpr1.cxx:4745-4758) inspects formula results and treats 
formula-cell-returning-`""` as blank for COUNTBLANK (implementation-defined per 
§6.13.8); ISBLANK (§6.13.14) returns FALSE for empty string — no conflict. No 
code change needed.
 - G.4 INDEX compatibility: compatibility audit complete — `bRowArray` shortcut 
present in `ScIndex()` (interpr1.cxx:7588-7612); `INDEX(H1:L1;3)` returns 
column value instead of ODF 1.4 Error; kept as documented legacy-compatible 
deviation |
-- G.5/G.6 all runtime tests: prepared, awaiting build environment
+- G.5 Basic Limits: source audit complete — no blocking limits found for any 
of the 4 ODF 1.4 §3.7 requirements. All classified RUNTIME_PENDING. Formula 
length: no formula-text cap (MAXCODE=2048 tokens, MAXSTRLEN=1024 per symbol). 
Parameters: no global 30-param cap (MAX uses MustHaveParamCountMin(1)). String 
length: STRING_MAXLEN=65,535 > 32,767 minimum. Nesting depth: no depth limit 
found. Runtime verification blocked (no build tree).
+- G.5/G.6 runtime tests: prepared, awaiting build environment
 - No production changes without corresponding calcval test coverage
 - All G.1-G.3 requirements verified at source level against ODF 1.4 normative 
text; G.4 INDEX documented as known deviation (bRowArray shortcut, not ODF 1.4 
compliant); runtime verification for G.5/G.6 pending build environment
 
diff --git a/odf_docs/openformula-small-group-audit.md 
b/odf_docs/openformula-small-group-audit.md
index 34c01b72e9..73a2b51bc1 100644
--- a/odf_docs/openformula-small-group-audit.md
+++ b/odf_docs/openformula-small-group-audit.md
@@ -33,12 +33,12 @@ Therefore **no conformance level (Small/Medium/Large) may 
be claimed for AOO Cal
 
 | ReqID | Requirement | Status | Source Evidence | Runtime Verified |
 |-------|-------------|--------|-----------------|-------------------|
-| SG-BL-001 | Formula length >= 1024 characters | **MET** | The compiler limit 
was 512 tokens, too few for 1024 characters of `1+1+...`; it is now 2048 
(`MAXCODE`). Calcval `SG.BL-001-1024chars` (1026 characters, result 513) 
matches on a Linux aarch64 build. | Yes |
-| SG-BL-002 | >= 30 parameters per function | **MET** | `SG.BL-002-30params` 
(MAX with 30 arguments) matches on a Linux aarch64 build; a call with more than 
255 arguments is an error. | Yes |
-| SG-BL-003 | Strings up to 32767 ASCII chars | **PARTIAL** | Strings produced 
at run time reach 32767 characters (`SG.BL-003-32767chars`, 
`LEN(REPT("a";32767))`, matches). A string literal in a formula is limited by 
`MAXSTRLEN` (1024): literals of 1022 characters or more give Err:513. Not 
fixed. | Partly |
-| SG-BL-004 | >= 7 nesting levels of functions | **MET** | No nesting depth 
limit found. `SG.BL-004-7nesting` (7 nested IF levels) matches on a Linux 
aarch64 build. | Yes |
+| SG-BL-001 | Formula length >= 1024 characters | **RUNTIME_PENDING** | No 
formula-text length limit; MAXCODE=2048 tokens (compiler.hxx:59), 
MAXSTRLEN=1024 per symbol (compiler.hxx:60). 1026-char formula needs ~1025 
tokens < 2048. Single string literal limited to 1023 chars (MAXSTRLEN). | No |
+| SG-BL-002 | >= 30 parameters per function | **RUNTIME_PENDING** | No global 
30-param cap; MAX uses MustHaveParamCountMin(nParamCount, 1) 
(interpr1.cxx:3396-3400). SUM supports 255 args (calcval SG.BL-255args). Param 
count via GetByte() supports up to 255; MAXCODE=2048 tokens is practical 
ceiling. | No |
+| SG-BL-003 | Strings up to 32767 ASCII chars | **RUNTIME_PENDING** | 
STRING_MAXLEN=65,535 (string.hxx:119, STRING32 not defined) > 32,767. 
CheckStringResultLen enforces at concatenation (interpre.hxx:930-936). 
REPT("a";32767) creates 32,767-char string at runtime. String literals limited 
to 1023 chars (MAXSTRLEN=1024). | No |
+| SG-BL-004 | >= 7 nesting levels of functions | **RUNTIME_PENDING** | No 
nesting depth limit found (no MAXNEST or recursion depth guard). Parser uses 
recursive descent without depth guard (compiler.cxx:4134). Evaluator 
stack-based without depth limit. MAXCODE=2048 tokens is practical ceiling. | No 
|
 
-**Finding:** the four limits were run on Linux aarch64. Formula length, 
parameter count and nesting meet the requirement. For strings only run-time 
results reach 32767 characters; string literals stop at about 1021 (open).
+**Finding:** All four Basic Limits requirements have source-level evidence 
supporting compliance, but none have been runtime-verified. No blocking 
limitations identified. STRING_MAXLEN=65,535 exceeds ODF's 32,767 minimum; 
MAXCODE=2048 tokens supports formulas with 1024+ characters when composed of 
short tokens.
 
 ---
 
@@ -174,6 +174,7 @@ The Small Group requires 110 functions (§2.3.2.E). All 110 
have opcodes and imp
 
 - **SG-BL-001**: corrected to formula expression length 1026 chars (`=1` + 
`+1`*512), expected 513 (replaces `REPT("a";1024)` which measured string 
length, not formula length).
 - **SG-BL-004**: corrected to 7 genuinely nested function levels 
(`IF(TRUE;IF(...IF(TRUE;1;2)...))`, 7 nested IF calls), balanced parens, 
deterministic result 1.
+- **All 4 Basic Limits (§3.7)**: Reclassified from MET/PARTIAL to 
RUNTIME_PENDING based on G.5 source audit. Source evidence supports compliance 
for all four requirements (no formula-text cap, no 30-param cap, 
STRING_MAXLEN=65,535 > 32,767, no nesting depth limit), but runtime 
verification blocked (no AOO build tree; calcval macOS-only).
 - **SG-SYN-001**: added Criteria syntax §4.11.11 test `SYN-001-criteria` 
(`=DCOUNT(R1:T6;;V1:V2)`, expected 4) using existing calcval database/criteria 
fixtures.
 - **SG-SYN-009**: marked not directly executable in calcval harness (requires 
pre-defined named expression `MYNAME`); test remains UNVERIFIED with explicit 
note.
 - **SG-FN-013/COUNTA**: fixtures added for truly empty cells and empty string 
"" per §6.13.7 (empty string non-blank). Harness-expressible via inline args; 
empty-cell cases use unset D6:D7.
@@ -185,13 +186,13 @@ The Small Group requires 110 functions (§2.3.2.E). All 
110 have opcodes and imp
 ## 10. Runtime-Verification Limitations
 
 The following could not be verified at runtime because no configured AOO build 
tree exists in this environment:
-- All 4 Basic Limits requirements (structural confirmation only)
+- All 4 Basic Limits (§3.7) — source evidence supports compliance but runtime 
execution not performed
 - Runtime behavior of all 110 Small Group functions
 - Error propagation edge cases
 - Locale-sensitive conversions
 - ODF save/reload round-trip
 
-Static source tracing confirms all opcodes, implementations, dispatch, and 
metadata are present.
+Static source tracing confirms all opcodes, implementations, dispatch, and 
metadata are present, and no blocking limits found for Basic Limits 
requirements.
 
 ---
 
diff --git a/odf_docs/openformula-small-group-semantic-audit.md 
b/odf_docs/openformula-small-group-semantic-audit.md
index 6a8f5d1cbc..47abcc8d15 100644
--- a/odf_docs/openformula-small-group-semantic-audit.md
+++ b/odf_docs/openformula-small-group-semantic-audit.md
@@ -270,29 +270,72 @@ None required. The ScDBCount empty-cell fix (F-GAP-004) 
is implemented at source
 
 ### F.4.1 Basic Limits (§3.7)
 
+**Normative reference:** ODF 1.4 §3.7 — "Evaluators which claim to support 
'basic limits' shall support at least the following limits:
+1. formulas up to at least 1024 characters long
+2. at least 30 parameters per function when the function prototype permits a 
list of parameters
+3. permit strings of ASCII characters of up to 32,767 (2^15-1) characters
+4. support at least 7 nesting levels of functions"
+
+---
+
 #### Formula Length — at least 1024 characters
 
-**Source finding:** No explicit formula length limit (MAXFORMULA or 
equivalent) found in `main/sc/source/core/tool/interpr1.cxx`, 
`main/sc/source/core/inc/interpre.hxx`, or 
`main/formula/source/core/api/FormulaCompiler.cxx`. The FormulaCompiler parses 
token arrays dynamically.
+**Source finding:**
+- No explicit formula text length limit (no MAXFORMULA or equivalent check on 
total formula characters).
+- `main/sc/inc/compiler.hxx:59`: `MAXCODE = 2048` — maximum number of 
**tokens** in a formula.
+- `main/sc/inc/compiler.hxx:60`: `MAXSTRLEN = 1024` — maximum length of **one 
symbol** (individual token/string literal), not the formula as a whole.
+- `main/sc/source/core/tool/compiler.cxx:3973-3978`: Token array overflow 
(`errCodeOverflow`) triggers when `aArr.GetLen() >= MAXCODE`.
+- `main/sc/source/core/tool/compiler.cxx:2689-2691`: String literal overflow 
(`errStringOverflow`) when a single symbol exceeds `MAXSTRLEN-1` (1023 chars).
+- A 1026-character formula like `=1+1+...+1` (512 `+1` repetitions) requires 
~1025 tokens, well under MAXCODE=2048. Each token (`1` or `+`) is well under 
MAXSTRLEN=1024.
+- **Limitation:** A single string literal in a formula cannot exceed 1023 
characters (excluding quotes) due to MAXSTRLEN=1024. This does not prevent a 
1024+ character formula composed of short tokens.
 
-**Classification:** Unverifiable by static inspection. Absence of a hard limit 
does not prove conformance. Runtime test required.
+**Classification:** RUNTIME_PENDING — Source appears capable (no formula-text 
cap; MAXCODE=2048 tokens supports 1024+ char formulas with short tokens), but 
runtime test `SG.BL-001-1024chars` not executed.
+
+---
 
 #### Function Parameters — at least 30
 
-**Source finding:** `MustHaveParamCount()` family (`interpre.hxx:897-927`) 
enforces per-function min/max parameter counts. No global 30-parameter cap 
found. Individual functions like MAX use `MustHaveParamCountMin` or exact 
counts.
+**Source finding:**
+- `main/sc/source/core/inc/interpre.hxx:897-927`: `MustHaveParamCount()` 
family enforces per-function min/max parameter counts.
+- `main/sc/source/core/tool/interpr1.cxx:3396-3400` (`ScMax`): Uses 
`MustHaveParamCountMin(nParamCount, 1)` — minimum 1 parameter, **no upper cap** 
specified.
+- `main/sc/source/core/tool/interpr1.cxx:1290-1294` (`ScMin`): Uses 
`MustHaveParamCount(nParamCount, NUMBER_OF_ARGUMENTS)` — exact count.
+- `main/sc/source/core/tool/interpr1.cxx:2292-2293`: Functions like `ScAbs` 
use `MustHaveParamCount(nParamCount, 1, 2)` — bounded 1-2.
+- No global 30-parameter cap found anywhere in source.
+- Parameter count is read via `GetByte()` (`sal_uInt8`), theoretically 
supporting up to 255 parameters per call. MAXCODE=2048 tokens is the practical 
ceiling (30 params ≈ 59 tokens).
+- `test/odf-validate/calcval-cases14.tsv:201`: `SG.BL-255args` 
(`=SUM(1;1;...;255 times)`) expects 255 — confirms AOO accepts 255 args.
+- `test/odf-validate/calcval-cases14.tsv:202`: `SG.BL-256args` expects `#ERR` 
— AOO guard, not ODF-mandated.
 
-**Classification:** Unverifiable by static inspection. No cap found, but 
runtime test required.
+**Classification:** RUNTIME_PENDING — Source supports ≥30 parameters for 
functions whose prototypes permit lists (MAX uses `MustHaveParamCountMin`, no 
upper cap). Runtime test `SG.BL-002-30params` not executed.
+
+---
 
 #### ASCII Strings — at least 32767 characters
 
-**Source finding:** `CheckStringResultLen()` (`interpre.hxx:930-936`) checks 
string concatenation against `STRING_MAXLEN`. The `STRING_MAXLEN` definition 
was not located in the sc module headers during this audit.
+**Source finding:**
+- `main/tools/inc/tools/string.hxx:110-120`: `STRING_MAXLEN` definition. 
`STRING32` is **not defined** anywhere in the codebase, so default applies: 
`STRING_MAXLEN = 0xFFFF = 65,535` (> 32,767 ODF minimum).
+- `main/sc/source/core/inc/interpre.hxx:930-936`: `CheckStringResultLen()` 
enforces STRING_MAXLEN at string concatenation (REPT, `&` operator, etc.).
+- `main/sc/source/core/tool/compiler.cxx:2689-2691`: MAXSTRLEN=1024 limits 
individual **string literals** in formulas to 1023 chars (excluding quotes).
+- `main/sc/source/core/tool/interpr1.cxx:7777-7790` (REPT), `:8296` 
(CONCATENATE), `:8324`: Use STRING_MAXLEN for result length checks.
+- `LEN(REPT("a";32767))` — the "a" literal is 1 char (well under MAXSTRLEN), 
REPT creates 32,767-char string at runtime (under STRING_MAXLEN=65,535).
+- **Limitation:** A direct 32,767-character string literal like `="aaa...a"` 
in a formula would fail at compile time due to MAXSTRLEN=1024. But ODF §3.7 
requires strings of up to 32,767 characters to be *permitted*, which REPT 
demonstrates.
+
+**Classification:** RUNTIME_PENDING — Source supports runtime strings ≥32,767 
chars (STRING_MAXLEN=65,535; REPT creates them). String literals limited to 
1023 chars does not violate ODF §3.7 (which concerns string values, not literal 
syntax). Runtime test `SG.BL-003-32767chars` not executed.
 
-**Classification:** Unverifiable by static inspection. STRING_MAXLEN value not 
confirmed.
+---
 
 #### Nesting Depth — at least 7 levels
 
-**Source finding:** No nesting depth limit (MAXNEST or equivalent) found in 
FormulaCompiler or ScInterpreter source. No recursion depth enforcement found.
+**Source finding:**
+- No nesting depth limit (no MAXNEST, recursion depth counter, or nDepth 
equivalent) found in `main/sc/source/core/tool/compiler.cxx` or 
`main/sc/source/core/tool/interpr1.cxx`.
+- `main/sc/source/core/tool/compiler.cxx:4134`: Comment "RPN creation by 
recursion" — parser uses recursive descent without a depth guard.
+- `main/sc/inc/compiler.hxx:61`: `MAXJUMPCOUNT = 32` — limits CHOOSE function 
jump targets, not general nesting.
+- Evaluator is stack-based (`ScInterpreter::Push()`/`Pop()`) with no explicit 
evaluation depth limit beyond MAXCODE=2048 total tokens.
+- 7 nested `IF` levels uses ~15 tokens, well under MAXCODE=2048.
+- `test/odf-validate/calcval-cases14.tsv:198`: `SG.BL-004-7nesting` — 7 nested 
`IF` calls, expected result 1.
 
-**Classification:** Unverifiable by static inspection. Absence of limit does 
not prove conformance.
+**Classification:** RUNTIME_PENDING — Source has no nesting depth limit; 
parser recursion and evaluator stack have no depth guard. Runtime test 
`SG.BL-004-7nesting` not executed.
+
+---
 
 ### F.4.2 Remaining Syntax Requirements (§5)
 
@@ -313,7 +356,7 @@ None required. The ScDBCount empty-cell fix (F-GAP-004) is 
implemented at source
 
 ### Cross-Cutting Finding
 
-**Static source tracing confirms implementation presence, not semantic 
equivalence.** All Small Group syntax and basic limits infrastructure exists in 
source, but none has been verified against ODF 1.4 normative expected results 
at runtime. This is consistent with the E.1/E.1.1 finding that all requirements 
are UNVERIFIED pending runtime execution.
+**Static source tracing confirms implementation presence and absence of 
blocking limits, not semantic equivalence.** All Small Group syntax and basic 
limits infrastructure exists in source, with no hard limits found that would 
prevent meeting ODF 1.4 §3.7 requirements. None has been verified against ODF 
1.4 normative expected results at runtime. This is consistent with the 
E.1/E.1.1 finding that all requirements are RUNTIME_PENDING pending runtime 
execution.
 
 ---
 
@@ -321,7 +364,7 @@ None required. The ScDBCount empty-cell fix (F-GAP-004) is 
implemented at source
 
 | Category | Count | Status |
 |---|---|---|
-| Basic Limits (§3.7) | 4 | Unverifiable statically; no hard limits found |
+| Basic Limits (§3.7) | 4 | RUNTIME_PENDING — source capable for all 4; 
runtime verification blocked (no build tree) |
 | Syntax (§5) | 11 | Implementation present; runtime-unverified |
 | COUNTA/COUNTBLANK (§6.13.7-8) | 2 | Fully matches; formula-cell `""` treated 
as blank per implementation-defined choice (§6.13.8) |
 | INDEX (§6.14.6) | 1 | NOT ODF 1.4 compliant — bRowArray shortcut present 
(undone by commit 8f3b3b25a2); INDEX(H1:L1;3) returns value instead of Error |
diff --git a/odf_docs/openformula-small-group-semantic-gaps.tsv 
b/odf_docs/openformula-small-group-semantic-gaps.tsv
index fa76f2cb22..52da20d5b5 100644
--- a/odf_docs/openformula-small-group-semantic-gaps.tsv
+++ b/odf_docs/openformula-small-group-semantic-gaps.tsv
@@ -4,10 +4,10 @@ F-GAP-002     §6.13.8 COUNTBLANK counts empty cells; cell 
returning "" blankness is
 F-GAP-003      §6.14.6 INDEX single-argument row vector returns error (no 
row-vector shortcut) main/sc/source/core/tool/interpr1.cxx:7448 (ScIndex); 
bRowArray shortcut PRESENT at :7588-7612 (restored by commit 8f3b3b25a2, undid 
Milestone A bb58e28fc2)    ODF 1.2 had explicit row-vector shortcut (Row acts 
as column offset); deleted in ODF 1.4 per OFFICE-4144. Current AOO code keeps 
bRowArray (ODF 1.3/Excel compatible, NOT ODF 1.4 compliant). INDEX(H1:L1;3) 
returns value 30 instead of Error. Test  [...]
 F-GAP-004      §4.11.11        Criteria syntax supported in database functions 
main/sc/source/core/tool/interpr1.cxx:6621 (GetDBParams), :6760 (DBIterator); 
:6871-6902 (ScDBCount), :6905-6935 (ScDBCount2); dociter.cxx:685-716 
(CountRecords); queryparam.cxx:106-144 (operator prefix parsing)     Criteria 
operators parsed: <>, <=, <, >=, >, =; bQueryByString via IsNumberFormat; 
bRegExp via MayBeRegExp. DBCount empty-cell limitation RESOLVED: ScDBCount 
missing-field path uses CountRecords() (dociter.cxx:685 [...]
 F-GAP-005      §4.11.11        Database criteria: text criteria, wildcards, 
empty criteria     main/sc/source/core/tool/queryparam.cxx:106-144 (operator 
parsing); interpr1.cxx:6745-6748 (bQueryByString/bRegExp)     Text criteria 
supported via bQueryByString; wildcard/RegExp via MayBeRegExp; empty criteria 
cell (svMissing) handled as missing field   Required by ODF 1.4; partially 
verified Medium  Verify wildcard and text criteria matching      calcval: no 
dedicated wildcard/empty-criteria cases — not covered
-F-GAP-006      §3.7    Formula length at least 1024 characters No explicit 
formula length limit found in main/sc or main/formula source        No 
MAXFORMULA or formula-size enforcement found; FormulaCompiler parses token 
arrays dynamically        Unverifiable (static); absence of hard limit doesn't 
prove conformance  Low     Runtime test with 1024+ char formula    calcval: 
BL-001-1024chars (1026-char expression) — UNVERIFIED
-F-GAP-007      §3.7    At least 30 parameters per function where prototype 
permits     main/sc/source/core/inc/interpre.hxx:897-927 (MustHaveParamCount 
family)        Per-function parameter count enforced via 
MustHaveParamCount/MustHaveParamCountMin; no global 30-param cap found        
Unverifiable (static); no 30-param cap found    Low     Runtime test with 
30-parameter function call    calcval: BL-002-30params (MAX with 30 params) — 
UNVERIFIED
-F-GAP-008      §3.7    Strings up to 32767 ASCII characters    
main/tools/inc/tools/string.hxx:110-120 (STRING_MAXLEN definition); 
interpr1.cxx:930-936 (CheckStringResultLen) STRING_MAXLEN = 0x7FFFFFFF (2^31-1) 
with STRING32, 0xFFFF (65,535) without; STRING32 not enabled by default → 
default STRING_MAXLEN = 65,535 > 32,767 ODF 1.4 minimum; CheckStringResultLen 
enforces limit at string concatenation      Meets ODF 1.4 minimum (65,535 >= 
32,767) statically; runtime-unverified Low     Runtime test with 32767-c [...]
-F-GAP-009      §3.7    At least 7 nesting levels of functions  No nesting 
depth limit found in FormulaCompiler or ScInterpreter source No MAXNEST or 
recursion depth enforcement found Unverifiable (static); absence of limit 
doesn't prove conformance       Low     Runtime test with 7+ nested functions   
calcval: BL-004-7nesting (7 nested IFs) — UNVERIFIED
+F-GAP-006      §3.7    Formula length at least 1024 characters 
main/sc/inc/compiler.hxx:59-60 (MAXCODE=2048 tokens, MAXSTRLEN=1024 per 
symbol); main/sc/source/core/tool/compiler.cxx:3973-3978,:2689-2691     No 
formula-text length limit; MAXCODE=2048 max tokens, MAXSTRLEN=1024 max chars 
per single symbol. A 1026-char formula needs ~1025 tokens < 2048, each token < 
1024 chars. Single string literal limited to 1023 chars. RUNTIME_PENDING — 
source capable for multi-token 1024+ char formulas; string lite [...]
+F-GAP-007      §3.7    At least 30 parameters per function where prototype 
permits     main/sc/source/core/inc/interpre.hxx:897-927 (MustHaveParamCount 
family); main/sc/source/core/tool/interpr1.cxx:3396-3400 (ScMax uses 
MustHaveParamCountMin)    Per-function parameter count enforced via 
MustHaveParamCount/MustHaveParamCountMin/MustHaveParamCountMax. No global 
30-param cap found. MAX uses MustHaveParamCountMin(nParamCount, 1) — no upper 
cap beyond MAXCODE=2048 tokens. Parameter count via GetByte() supp [...]
+F-GAP-008      §3.7    Strings up to 32767 ASCII characters    
main/tools/inc/tools/string.hxx:110-120 (STRING_MAXLEN definition); 
main/sc/source/core/inc/interpre.hxx:930-936 (CheckStringResultLen); 
main/sc/source/core/tool/compiler.cxx:2689-2691 (MAXSTRLEN per literal)        
STRING32 not defined → default STRING_MAXLEN = 0xFFFF = 65,535 (> 32,767 ODF 
minimum). CheckStringResultLen enforces at concatenation (REPT, & operator). 
MAXSTRLEN=1024 limits individual string literals in formulas to 1023 chars (e 
[...]
+F-GAP-009      §3.7    At least 7 nesting levels of functions  
main/sc/source/core/tool/compiler.cxx (recursive descent parser at :4134); 
main/sc/inc/compiler.hxx:61 (MAXJUMPCOUNT=32, for CHOOSE only); 
main/sc/source/core/tool/interpr1.cxx (stack-based evaluator, no depth guard)   
     No nesting depth limit (no MAXNEST or recursion depth counter). Parser 
uses recursive descent without depth guard. Evaluator is stack-based without 
explicit depth limit. MAXCODE=2048 total tokens is practical ceiling (7 n [...]
 F-GAP-010      §5.5    Operator precedence per Table 1 
main/formula/source/core/api/FormulaCompiler.cxx (parser grammar: UnionLine → 
IntersectionLine → RangeLine → UnaryLine → binary ops)    Parser structure 
exists (RangeLine/IntersectionLine/UnionLine); precedence not verified at 
runtime      Unverifiable (static); parser infrastructure present    Medium  
Runtime precedence test (2+3*4=14, 2^3^2=512)   calcval: SYN-005-precedence, 
SYN-005-power — UNVERIFIED
 F-GAP-011      §5.8    Reference syntax supported      
main/sc/source/core/tool/compiler.cxx (PopDoubleRef/PopSingleRef)       Cell 
and range reference handling present in compiler   Unverifiable (static); 
implementation present   Low     Runtime reference test  calcval: SYN-008-ref, 
SYN-008-range — UNVERIFIED
 F-GAP-012      §5.11   Simple Named Expressions supported      
main/sc/source/core/tool/compiler.cxx:NameLine (ocName opcode)  Named 
expression compilation present; requires pre-defined name not set up in calcval 
harness   Unverifiable (static); harness limitation       Medium  Define named 
expression in test environment; verify     calcval: SYN-009-named (=MYNAME) — 
not directly executable (no name setup)

Reply via email to