Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
feat(cobol): keep PERFORM inside its program and bind CALL, LINK and XCTL to PROGRAM-IDs (#4437)
Raghav Chamadiyae61937592f06
diff --git a/docs/layers/LANGUAGE_SUPPORT.md b/docs/layers/LANGUAGE_SUPPORT.mdindex 8504a935a..5c7819c0d 100644--- a/docs/layers/LANGUAGE_SUPPORT.md+++ b/docs/layers/LANGUAGE_SUPPORT.md@@ -83,7 +83,9 @@ procedure fragment. `COPY` and `EXEC SQL INCLUDE` members resolve to thenearest copybook with that name; system copybooks such as `DFHAID` stay external.`EXEC CICS LINK` and `XCTL` link to their program when it is a literal or aconstant moved into the program variable; any other target shows as a-`cics-dynamic:` reference rather than a guess.+`cics-dynamic:` reference rather than a guess. A `PERFORM` binds only within+its program and the copybooks it copies; `CALL`, `LINK` and `XCTL` bind to a+unique PROGRAM-ID.Apex (`.cls`, `.trigger`, `.apex`) is parsed for symbols, heritage and calls,resolved case-insensitively within each sfdx project's namespace; its dead-codefindings are review-only. Apex test coverage from the Salesforce CLI is read as adiff --git a/packages/core/src/repowise/core/ingestion/call_cobol.py b/packages/core/src/repowise/core/ingestion/call_cobol.pynew file mode 100644index 000000000..2723d883e--- /dev/null+++ b/packages/core/src/repowise/core/ingestion/call_cobol.py@@ -0,0 +1,54 @@+"""COBOL call binding mixed into ``CallResolver``.++COBOL names are scoped differently from every other language here: a+``PERFORM`` reaches only a paragraph of its own program, including the+paragraphs a copybook it copies brings in, while ``CALL``, ``LINK`` and+``XCTL`` name a program by its PROGRAM-ID. A data item is never a target, and+neither is another program's paragraph.+"""++from __future__ import annotations++from .models import CallSite+from .resolved_call import ResolvedCall++_PROCEDURE_KINDS = frozenset({"function"})+_PROGRAM_KINDS = frozenset({"module"})+++class CobolCallsMixin:+ def _resolve_cobol_call(+ self, file_path: str, call: CallSite, caller_id: str+ ) -> ResolvedCall | None:+ name = call.target_name+ if call.program_call:+ return self._cobol_program(name, call, caller_id)+ own = self._cobol_symbol(file_path, name, _PROCEDURE_KINDS)+ if own is not None:+ return (+ None+ if own == caller_id+ else ResolvedCall(caller_id, own, 0.95, call.line, "same_file")+ )+ for copied in sorted(self._import_targets.get(file_path, ())): # type: ignore[attr-defined]+ hit = self._cobol_symbol(copied, name, _PROCEDURE_KINDS)+ if hit is not None:+ return ResolvedCall(caller_id, hit, 0.90, call.line, "import_scoped")+ return None++ def _cobol_program(self, name: str, call: CallSite, caller_id: str) -> ResolvedCall | None:+ programs = [+ sym_id+ for sym_id in self._global_symbols.get(name, ()) # type: ignore[attr-defined]+ if self._symbols_by_id[sym_id].kind in _PROGRAM_KINDS # type: ignore[attr-defined]+ and self._symbols_by_id[sym_id].language == "cobol" # type: ignore[attr-defined]+ ]+ if len(programs) != 1 or programs[0] == caller_id:+ return None+ return ResolvedCall(caller_id, programs[0], 0.50, call.line, "global_unique")++ def _cobol_symbol(self, file_path: str, name: str, kinds: frozenset[str]) -> str | None:+ sym_id = self._file_symbols.get(file_path, {}).get(name) # type: ignore[attr-defined]+ if sym_id is None or self._symbols_by_id[sym_id].kind not in kinds: # type: ignore[attr-defined]+ return None+ return sym_iddiff --git a/packages/core/src/repowise/core/ingestion/call_resolver.py b/packages/core/src/repowise/core/ingestion/call_resolver.pyindex 2382ac6fc..406115bbe 100644--- a/packages/core/src/repowise/core/ingestion/call_resolver.py+++ b/packages/core/src/repowise/core/ingestion/call_resolver.py@@ -37,6 +37,7 @@ from .call_barrel_forwarding import ( # noqa: F401_flattened_wildcard_source,_renames_on_the_way,)+from .call_cobol import CobolCallsMixinfrom .call_inheritance import ( # noqa: F401_EXTERNAL_PREFIX,_MAX_ANCESTOR_EXPAND_DEPTH,@@ -279,6 +280,7 @@ def _same_translation_unit(decl_file: str, def_file: str) -> bool:class CallResolver(+ CobolCallsMixin,LanguageStrategiesMixin,ReceiverTypingMixin,OverloadSelectionMixin,@@ -872,6 +874,8 @@ class CallResolver(assert caller_id is not Nonelanguage = self._language_of(file_path) or ""+ if language == "cobol":+ return self._resolve_cobol_call(file_path, call, caller_id)receiver_call = call.receiver_callif _is_super_call(call, language):return self._with_props(self._super_call(call, caller_id), call)diff --git a/packages/core/src/repowise/core/ingestion/cobol/facts.py b/packages/core/src/repowise/core/ingestion/cobol/facts.pyindex 7d4991229..81d357f3f 100644--- a/packages/core/src/repowise/core/ingestion/cobol/facts.py+++ b/packages/core/src/repowise/core/ingestion/cobol/facts.py@@ -45,6 +45,7 @@ def cobol_call_sites(source: bytes, symbols: list[Symbol]) -> list[CallSite]:caller_symbol_id=_find_enclosing_symbol(transfer.line, ranges),line=transfer.line,argument_count=None,+ program_call=True,)for transfer in program_transfers(code_view(source))for target in transfer.targetsdiff --git a/packages/core/src/repowise/core/ingestion/models.py b/packages/core/src/repowise/core/ingestion/models.pyindex 3d6e578b9..46c52efe9 100644--- a/packages/core/src/repowise/core/ingestion/models.py+++ b/packages/core/src/repowise/core/ingestion/models.py@@ -369,6 +369,8 @@ class CallSite:# Handed straight to a task scheduler (``asyncio.create_task(f())``): it runs# later, beside its caller, so the caller neither waits for it nor repeats it.spawned: bool = False+ # COBOL ``CALL`` / ``LINK`` / ``XCTL``: names a PROGRAM-ID, never a paragraph.+ program_call: bool = False# Java: each argument's type where it is a literal (``"String"``, ``"int"``,# ``"null"``), else None; None overall when no argument is one.argument_types: tuple[str | None, ...] | None = Nonediff --git a/packages/core/src/repowise/core/ingestion/parser/calls.py b/packages/core/src/repowise/core/ingestion/parser/calls.pyindex cc0237651..2fe0c5c00 100644--- a/packages/core/src/repowise/core/ingestion/parser/calls.py+++ b/packages/core/src/repowise/core/ingestion/parser/calls.py@@ -381,6 +381,7 @@ def _call_from_match(# Ceiling: schedulers matched by name, the task followed within its# own function only (see ``python_tasks``).spawned=language == "python" and is_fire_and_forget(site_node, src),+ program_call=language == "cobol" and site_node.type == "call_statement",)return (site_node.start_byte, site_node.end_byte, target_name), calldiff --git a/packages/core/src/repowise/core/ingestion/queries/cobol.scm b/packages/core/src/repowise/core/ingestion/queries/cobol.scmindex ca83b2f2a..8db237d93 100644--- a/packages/core/src/repowise/core/ingestion/queries/cobol.scm+++ b/packages/core/src/repowise/core/ingestion/queries/cobol.scm@@ -32,9 +32,10 @@(call_statementx: (string) @call.target) @call.site-; PERFORM paragraph/section calls are same-file procedure edges.+; PERFORM paragraph/section calls; of ``PERFORM A THRU B`` only A, where it enters.(perform_statement_call_procprocedure: (perform_procedure+ .(label(qualified_word(WORD) @call.target)))) @call.sitediff --git a/tests/unit/ingestion/parser/golden/apex.json b/tests/unit/ingestion/parser/golden/apex.jsonindex d930caaff..f208fcbde 100644--- a/tests/unit/ingestion/parser/golden/apex.json+++ b/tests/unit/ingestion/parser/golden/apex.json@@ -357,6 +357,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -372,6 +373,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["name"@@ -389,6 +391,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["name"@@ -406,6 +409,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -421,6 +425,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -436,6 +441,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -451,6 +457,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["acc"@@ -468,6 +475,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -483,6 +491,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -498,6 +507,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": ["String"],@@ -515,6 +525,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -682,6 +693,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -697,6 +709,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -712,6 +725,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -956,6 +970,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -971,6 +986,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": ["Integer",null@@ -992,6 +1008,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": ["Integer",null@@ -1013,6 +1030,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": ["Integer",null@@ -1034,6 +1052,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1049,6 +1068,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": [null,"String"@@ -1067,6 +1087,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1082,6 +1103,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": ["Integer",null@@ -1103,6 +1125,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": ["Integer",null@@ -1124,6 +1147,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1139,6 +1163,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": ["Integer",null@@ -1160,6 +1185,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1175,6 +1201,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1657,6 +1684,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1672,6 +1700,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["item"@@ -3390,6 +3419,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["i"@@ -3407,6 +3437,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["req"@@ -3424,6 +3455,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3439,6 +3471,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["i"@@ -3456,6 +3489,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["i"@@ -3473,6 +3507,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3488,6 +3523,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["a"@@ -3505,6 +3541,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3520,6 +3557,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3535,6 +3573,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3550,6 +3589,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": [null,"Boolean"@@ -3571,6 +3611,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["a"@@ -3588,6 +3629,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3603,6 +3645,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3618,6 +3661,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3633,6 +3677,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["objectName"@@ -3650,6 +3695,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3665,6 +3711,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -3680,6 +3727,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["t"diff --git a/tests/unit/ingestion/parser/golden/cpp.json b/tests/unit/ingestion/parser/golden/cpp.jsonindex 110abe528..f62d6eb17 100644--- a/tests/unit/ingestion/parser/golden/cpp.json+++ b/tests/unit/ingestion/parser/golden/cpp.json@@ -78,6 +78,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -93,6 +94,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -108,6 +110,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -123,6 +126,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -138,6 +142,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -153,6 +158,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -168,6 +174,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -183,6 +190,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -198,6 +206,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -213,6 +222,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -228,6 +238,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -243,6 +254,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -258,6 +270,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -273,6 +286,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -288,6 +302,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -303,6 +318,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -318,6 +334,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -333,6 +350,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -641,6 +659,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -656,6 +675,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -671,6 +691,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/csharp.json b/tests/unit/ingestion/parser/golden/csharp.jsonindex 2bd809140..7e2f3bd2e 100644--- a/tests/unit/ingestion/parser/golden/csharp.json+++ b/tests/unit/ingestion/parser/golden/csharp.json@@ -395,6 +395,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -410,6 +411,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -425,6 +427,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -440,6 +443,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -609,6 +613,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -624,6 +629,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -639,6 +645,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -654,6 +661,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -669,6 +677,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -684,6 +693,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -699,6 +709,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -714,6 +725,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -729,6 +741,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -744,6 +757,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -759,6 +773,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -774,6 +789,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -789,6 +805,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -804,6 +821,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -819,6 +837,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -834,6 +853,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -849,6 +869,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -864,6 +885,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/dart.json b/tests/unit/ingestion/parser/golden/dart.jsonindex d6065a19d..31a0710d2 100644--- a/tests/unit/ingestion/parser/golden/dart.json+++ b/tests/unit/ingestion/parser/golden/dart.json@@ -653,6 +653,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -668,6 +669,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -683,6 +685,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -698,6 +701,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -713,6 +717,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -728,6 +733,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/go.json b/tests/unit/ingestion/parser/golden/go.jsonindex 62a37050e..509f8e8aa 100644--- a/tests/unit/ingestion/parser/golden/go.json+++ b/tests/unit/ingestion/parser/golden/go.json@@ -515,6 +515,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -530,6 +531,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -545,6 +547,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -560,6 +563,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -575,6 +579,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -590,6 +595,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -605,6 +611,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -620,6 +627,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -635,6 +643,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/java.json b/tests/unit/ingestion/parser/golden/java.jsonindex ad96ebfc7..524542d28 100644--- a/tests/unit/ingestion/parser/golden/java.json+++ b/tests/unit/ingestion/parser/golden/java.json@@ -579,6 +579,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["id"@@ -596,6 +597,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["id"@@ -613,6 +615,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -628,6 +631,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["p"@@ -645,6 +649,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["id"@@ -662,6 +667,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -677,6 +683,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": ["String"],@@ -694,6 +701,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": ["String"],@@ -711,6 +719,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": ["id"@@ -732,6 +741,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/javascript.json b/tests/unit/ingestion/parser/golden/javascript.jsonindex 640984d9c..105b46d27 100644--- a/tests/unit/ingestion/parser/golden/javascript.json+++ b/tests/unit/ingestion/parser/golden/javascript.json@@ -198,6 +198,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -213,6 +214,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -228,6 +230,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -243,6 +246,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -258,6 +262,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -273,6 +278,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -288,6 +294,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -303,6 +310,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -318,6 +326,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -333,6 +342,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -348,6 +358,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -363,6 +374,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -378,6 +390,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -402,6 +415,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -417,6 +431,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -432,6 +447,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -447,6 +463,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -462,6 +479,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -477,6 +495,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/kotlin.json b/tests/unit/ingestion/parser/golden/kotlin.jsonindex bb0a6a6d6..6de44a7f2 100644--- a/tests/unit/ingestion/parser/golden/kotlin.json+++ b/tests/unit/ingestion/parser/golden/kotlin.json@@ -78,6 +78,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -93,6 +94,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -108,6 +110,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -123,6 +126,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -138,6 +142,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -153,6 +158,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -168,6 +174,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -183,6 +190,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -198,6 +206,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -213,6 +222,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -228,6 +238,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -243,6 +254,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -258,6 +270,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -273,6 +286,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -288,6 +302,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -303,6 +318,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -318,6 +334,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -333,6 +350,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/pascal.json b/tests/unit/ingestion/parser/golden/pascal.jsonindex 0bdb65299..7af536fd1 100644--- a/tests/unit/ingestion/parser/golden/pascal.json+++ b/tests/unit/ingestion/parser/golden/pascal.json@@ -131,6 +131,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/php.json b/tests/unit/ingestion/parser/golden/php.jsonindex 9501408ab..dfdd2d932 100644--- a/tests/unit/ingestion/parser/golden/php.json+++ b/tests/unit/ingestion/parser/golden/php.json@@ -126,6 +126,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -141,6 +142,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -156,6 +158,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -171,6 +174,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -186,6 +190,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -201,6 +206,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -216,6 +222,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -733,6 +740,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1047,6 +1055,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1062,6 +1071,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1077,6 +1087,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1092,6 +1103,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1107,6 +1119,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/python.json b/tests/unit/ingestion/parser/golden/python.jsonindex ea107592e..0aeea9b37 100644--- a/tests/unit/ingestion/parser/golden/python.json+++ b/tests/unit/ingestion/parser/golden/python.json@@ -171,6 +171,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -186,6 +187,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -201,6 +203,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -216,6 +219,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -541,6 +545,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1357,6 +1362,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1372,6 +1378,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1387,6 +1394,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1402,6 +1410,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1417,6 +1426,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1432,6 +1442,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1447,6 +1458,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1462,6 +1474,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1481,6 +1494,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1496,6 +1510,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1511,6 +1526,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1526,6 +1542,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1541,6 +1558,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1560,6 +1578,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1575,6 +1594,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1590,6 +1610,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1609,6 +1630,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1951,6 +1973,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1966,6 +1989,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/ruby.json b/tests/unit/ingestion/parser/golden/ruby.jsonindex 492ed1cd7..11c11ad35 100644--- a/tests/unit/ingestion/parser/golden/ruby.json+++ b/tests/unit/ingestion/parser/golden/ruby.json@@ -126,6 +126,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -141,6 +142,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -156,6 +158,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -171,6 +174,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -186,6 +190,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -201,6 +206,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -216,6 +222,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -863,6 +870,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -878,6 +886,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -893,6 +902,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -908,6 +918,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -923,6 +934,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -938,6 +950,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1297,6 +1310,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1312,6 +1326,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1327,6 +1342,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1342,6 +1358,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1357,6 +1374,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1372,6 +1390,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1387,6 +1406,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1402,6 +1422,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1417,6 +1438,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1432,6 +1454,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1447,6 +1470,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1462,6 +1486,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1477,6 +1502,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1492,6 +1518,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1507,6 +1534,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1522,6 +1550,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1537,6 +1566,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1552,6 +1582,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1567,6 +1598,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1582,6 +1614,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1597,6 +1630,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1612,6 +1646,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1627,6 +1662,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1642,6 +1678,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1657,6 +1694,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1672,6 +1710,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1687,6 +1726,7 @@"supplied_props": null,"bare_name_fallback": true,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1702,6 +1742,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1717,6 +1758,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/rust.json b/tests/unit/ingestion/parser/golden/rust.jsonindex d79ecb7e3..a1789467e 100644--- a/tests/unit/ingestion/parser/golden/rust.json+++ b/tests/unit/ingestion/parser/golden/rust.json@@ -557,6 +557,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -572,6 +573,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -587,6 +589,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -602,6 +605,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -617,6 +621,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -632,6 +637,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -647,6 +653,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -662,6 +669,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -677,6 +685,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -692,6 +701,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -707,6 +717,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -722,6 +733,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -737,6 +749,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -772,6 +785,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -787,6 +801,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/scala.json b/tests/unit/ingestion/parser/golden/scala.jsonindex 2d5da7362..f3d06903b 100644--- a/tests/unit/ingestion/parser/golden/scala.json+++ b/tests/unit/ingestion/parser/golden/scala.json@@ -175,6 +175,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -190,6 +191,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -205,6 +207,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -220,6 +223,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1354,6 +1358,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1369,6 +1374,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1384,6 +1390,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1399,6 +1406,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1414,6 +1422,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1429,6 +1438,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1444,6 +1454,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1459,6 +1470,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1474,6 +1486,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1489,6 +1502,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/shell.json b/tests/unit/ingestion/parser/golden/shell.jsonindex 1b8c37425..90650ed0e 100644--- a/tests/unit/ingestion/parser/golden/shell.json+++ b/tests/unit/ingestion/parser/golden/shell.json@@ -78,6 +78,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -93,6 +94,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -108,6 +110,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -225,6 +228,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -240,6 +244,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -346,6 +351,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -361,6 +367,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -376,6 +383,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -391,6 +399,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -434,6 +443,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -503,6 +513,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/golden/typescript.json b/tests/unit/ingestion/parser/golden/typescript.jsonindex 01eff4ef2..e3eb12cac 100644--- a/tests/unit/ingestion/parser/golden/typescript.json+++ b/tests/unit/ingestion/parser/golden/typescript.json@@ -75,6 +75,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -94,6 +95,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -109,6 +111,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -128,6 +131,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -143,6 +147,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -162,6 +167,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -177,6 +183,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -196,6 +203,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -211,6 +219,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -230,6 +239,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -245,6 +255,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -264,6 +275,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -279,6 +291,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -298,6 +311,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -313,6 +327,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -332,6 +347,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -347,6 +363,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -366,6 +383,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -381,6 +399,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -400,6 +419,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -415,6 +435,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -434,6 +455,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -449,6 +471,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -468,6 +491,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -483,6 +507,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -502,6 +527,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -517,6 +543,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -536,6 +563,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -551,6 +579,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -570,6 +599,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -585,6 +615,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -604,6 +635,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -619,6 +651,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -638,6 +671,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -653,6 +687,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -672,6 +707,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -969,6 +1005,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1332,6 +1369,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1347,6 +1385,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1362,6 +1401,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1762,6 +1802,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null},@@ -1777,6 +1818,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -1969,6 +2011,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}@@ -2295,6 +2338,7 @@"supplied_props": null,"bare_name_fallback": false,"spawned": false,+ "program_call": false,"argument_types": null,"argument_names": null}diff --git a/tests/unit/ingestion/parser/test_cobol.py b/tests/unit/ingestion/parser/test_cobol.pyindex c319cab15..5f6b26cbc 100644--- a/tests/unit/ingestion/parser/test_cobol.py+++ b/tests/unit/ingestion/parser/test_cobol.py@@ -120,3 +120,105 @@ class TestCobolCalls:"""result = parser.parse_file(_cobol("dynamic.cbl"), source)assert result.calls == []+++class TestCobolCallScope:+ """A PERFORM stays in its program and its copybooks; a CALL names a PROGRAM-ID."""++ @staticmethod+ def _resolve(parser: ASTParser, files: dict[str, bytes], imports: dict[str, set[str]]):+ parsed = {path: parser.parse_file(_cobol(path), source) for path, source in files.items()}+ resolver = CallResolver(parsed, {path: imports.get(path, set()) for path in parsed})+ caller = next(iter(files))+ return {(e.callee_id, e.origin) for e in resolver.resolve_file(caller, parsed[caller].calls)}++ def test_a_perform_never_binds_to_another_programs_paragraph(self, parser: ASTParser) -> None:+ caller = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. A.+ PROCEDURE DIVISION.+ MAIN-PARA.+ PERFORM 1000-EXIT.+"""+ other = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. B.+ PROCEDURE DIVISION.+ 1000-EXIT.+ EXIT.+"""+ assert self._resolve(parser, {"a.cbl": caller, "b.cbl": other}, {}) == set()++ def test_a_perform_reaches_a_paragraph_its_copybook_brings_in(self, parser: ASTParser) -> None:+ caller = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. A.+ PROCEDURE DIVISION.+ MAIN-PARA.+ PERFORM STORE-PFKEY THRU STORE-PFKEY-EXIT.+ COPY CSSTRPFY.+"""+ copybook = b""" * COMMON CODE+ *+ STORE-PFKEY.+ CONTINUE.+ STORE-PFKEY-EXIT.+ EXIT.+"""+ edges = self._resolve(+ parser, {"a.cbl": caller, "CSSTRPFY.cpy": copybook}, {"a.cbl": {"CSSTRPFY.cpy"}}+ )+ # The THRU end is part of the range, not a second target.+ assert edges == {("CSSTRPFY.cpy::STORE-PFKEY", "import_scoped")}++ def test_a_call_binds_to_the_program_not_a_same_named_data_item(+ self, parser: ASTParser+ ) -> None:+ caller = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. LGACDB01.+ DATA DIVISION.+ WORKING-STORAGE SECTION.+ 77 LGACDB02 PIC X(8) VALUE 'LGACDB02'.+ PROCEDURE DIVISION.+ MAIN-PARA.+ EXEC CICS LINK PROGRAM(LGACDB02) END-EXEC.+ CALL 'LGACDB02'.+"""+ callee = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. LGACDB02.+ PROCEDURE DIVISION.+ MAIN-PARA.+ GOBACK.+"""+ edges = self._resolve(parser, {"lgacdb01.cbl": caller, "lgacdb02.cbl": callee}, {})+ assert edges == {("lgacdb02.cbl::LGACDB02", "global_unique")}++ def test_a_call_skips_a_same_named_paragraph(self, parser: ASTParser) -> None:+ caller = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. A.+ PROCEDURE DIVISION.+ MAIN-PARA.+ CALL 'B'.+ B.+ EXIT.+"""+ callee = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. B.+ PROCEDURE DIVISION.+ MAIN-PARA.+ GOBACK.+"""+ edges = self._resolve(parser, {"a.cbl": caller, "b.cbl": callee}, {})+ assert edges == {("b.cbl::B", "global_unique")}++ def test_an_unresolved_perform_never_binds_to_a_program(self, parser: ASTParser) -> None:+ caller = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. A.+ PROCEDURE DIVISION.+ MAIN-PARA.+ PERFORM B.+"""+ callee = b""" IDENTIFICATION DIVISION.+ PROGRAM-ID. B.+ PROCEDURE DIVISION.+ MAIN-PARA.+ GOBACK.+"""+ assert self._resolve(parser, {"a.cbl": caller, "b.cbl": callee}, {}) == set()