Skip to content

Classify wrapper call-args by their Doxygen @param documentation#66

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/boundargs-documented-param-classification
Jul 17, 2026
Merged

Classify wrapper call-args by their Doxygen @param documentation#66
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/boundargs-documented-param-classification

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The bound-literal pass reports a wrapper call argument as unclassified drift when it is a bare identifier that is neither caller-sourced (PG_GETARG or an =-assigned local), an out-param, nor a literal. That heuristic misses a local filled by reference (int count; temparr_extract(array, &count)) or by a macro (INPUT_AGG_TRANS_STATE(fcinfo, state, ...)): the identifier names a real MEOS parameter the wrapper derives, not a literal to bind.

Those parameters are documented systematically in the MEOS Doxygen — @param[in] count, @param[in,out] state — so the classifier consumes that signal. extract_param_names gathers every @param-documented parameter name (scanned from the same source root merge_outparams uses), and the bound-literal pass skips a bare-identifier argument bound to a documented parameter. Drift is confined to a genuinely undocumented parameter — the exceptional case worth inspecting.

With this signal the catalog regen reports zero unclassified wrapper args. The arguments it covers — count in tsequence_make, tsequenceset_make, tsequenceset_make_gaps and temporal_merge_array; count1/count2 in mindistance_tgeoarr_tgeoarr; state in the tcount transition functions — are recognised as documented parameters, and the bound-literal count is unchanged.

Two regression tests cover the documented-parameter (skip) and undocumented-parameter (drift) paths.

The bound-literal pass reports a wrapper call argument as unclassified drift
when it is a bare identifier that is neither caller-sourced (PG_GETARG or an
=-assigned local), an out-param, nor a literal. That heuristic misses a local
filled by reference (`int count; temparr_extract(array, &count)`) or by a macro
(`INPUT_AGG_TRANS_STATE(fcinfo, state, ...)`): the identifier names a real MEOS
parameter the wrapper derives, not a literal to bind.

Those parameters are documented systematically in the MEOS Doxygen —
`@param[in] count`, `@param[in,out] state` — so consume that. extract_param_names
gathers every @param-documented parameter name, and the bound-literal pass skips
a bare-identifier argument bound to a documented parameter. Drift is then
confined to a genuinely undocumented parameter, the exceptional case worth
inspecting.

Regenerating the catalog now reports zero unclassified wrapper args (previously
eight: count in tsequence_make, tsequenceset_make, tsequenceset_make_gaps and
temporal_merge_array; count1 and count2 in mindistance_tgeoarr_tgeoarr; state in
the tcount transition functions), with the bound-literal count unchanged.
@estebanzimanyi
estebanzimanyi merged commit ccc6d6d into MobilityDB:master Jul 17, 2026
2 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