Skip to content

feat(lint): strict ABL M6 slice 1: CL003 signature-mismatch and CL004 unresolved-call - #244

Merged
evanbrobertson merged 5 commits into
masterfrom
feat/strict-m6
Oct 16, 2026
Merged

evanbrobertson merged 5 commits into
masterfrom
feat/strict-m6

Conversation

@evanbrobertson

Copy link
Copy Markdown
Contributor

Strict ABL M6, slice 1: CL003 signature-mismatch and CL004 unresolved-call (group strict.calls, preview, Warning, opt-in).

  • Semantics: docs/design/strict-analysis-open-questions.md §10, with confidence marks: how RUN matches arguments to parameters (positional; INPUT / OUTPUT / INPUT-OUTPUT; TABLE, TABLE-HANDLE, DATASET, DATASET-HANDLE and BUFFER parameters; APPEND, BY-REFERENCE, BIND; data-type conversions; compile-time vs run-time errors), internal vs external vs IN h, ASYNCHRONOUS and PERSISTENT SET.
  • Index: oxabl_semantic reads the parameter lists of procedures; WorkspaceIndex gains signature and workspace_defines_procedure (both with default None = Unknown, so additive), answered by the batch index and the daemon.
  • CL004 unresolved-call: a static RUN name whose target the call graph says is not found; never for dynamic, handle, unexpanded or ambiguous targets, and not where LINT0001 already reports the target.
  • CL003 signature-mismatch: for a resolved static RUN, the argument count, each argument's mode, and the data type where both sides are known. Unknown types never make a finding.
  • calls_corpus example; README rows; doc examples.

Corpus (two private trees): CL003 163 / 25, CL004 16 / 9; 0 wrong in 65 triaged findings. Default oxabl check output byte-identical; nothing runs with the group off. The §10.1 matching rules are Recalled / Inferred and still need a check against a licensed compiler.

cargo test --workspace (3,830), clippy -D warnings, fmt, wasm check.

Add ProgramSignatures, the parameters a file's main block and its internal
procedures define, with their mode, kind and primitive type. A list is
Unknown when an include, an &IF or a loop may change it.

WorkspaceIndex gains two queries with defaults that answer Unknown:
signature (the list of a program or one of its procedures) and
workspace_defines_procedure (whether a file of the workspace defines a
procedure of that name). run_miss_is_reported and run_target_climbs_out
expose the rule that LINT0001 keeps for a missing RUN target.
BatchIndex reads the parameter lists of a file when a rule first asks, from
the expanded text when an include may hold a parameter, and marks a list that
an include supplies. The daemon answers the same question with one tracked
query per file that registers the include files it read.

SharedProducers and a seeded BatchIndex also list the procedure names of the
workspace, read once on the first question, following the include files that
the files name. A run that asks neither reads nothing.
CL003 compares the arguments of a static RUN with the parameters of a
callee that is known whole: the count, the kind (TABLE, BUFFER, DATASET), the
mode, an expression passed as OUTPUT, and a handle against a type it does not
convert to. CL004 reports a RUN of a name that is neither a procedure of the
file, nor a program on the search paths, nor a procedure that any file of the
workspace defines. LINT0001 keeps the targets that name a file, so no RUN is
reported twice.

Both are preview rules in the opt-in strict.calls group, Warning, and
compute nothing with the group off.
Section 10 of the strict-analysis open questions marks how RUN matches
arguments to parameters, which RUN targets the rules judge, where a
parameter list comes from, and how CL004 divides the missing-target cases
with LINT0001. The calls_corpus example counts both rules per directory.
@evanbrobertson
evanbrobertson merged commit 16f4256 into master Oct 16, 2026
9 checks passed
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