Skip to content

Commit f1e5661

Browse files
committed
docs(ts): replace CodeQL references with planned Jelly enrichment
CodeQL was removed from the analyzer. Reframe the level-2 dataflow enrichment as planned work backed by Jelly (cs-au-dk/jelly), and note that -a 2 currently produces the same call graph as -a 1. Scrubs the Call graph, schema example, Performance, and Current maturity sections.
1 parent 8746dad commit f1e5661

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

src/content/docs/backends/codeanalyzer-ts.mdx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ Before parsing, the analyzer ensures `node_modules` is present (via `npm install
2828
### Symbol table (Level 1 default)
2929
Walks the ts-morph AST and indexes all declarations (classes, methods, interfaces, enums, type aliases, namespaces, functions) into a flat `symbol_table` keyed by project-relative file paths.
3030

31-
### Call graph (Level 1 + Level 2)
32-
- **Level 1 (default)**: ts-morph's TypeChecker resolves each call site to its declared-type target (exact for static dispatch), plus RTA-style subtype expansion, polymorphic calls on interface/abstract receivers also emit edges to every instantiated concrete override. Provenance: `tsc`.
33-
- **Level 2**: CodeQL enrichment adds dynamic-dispatch and dataflow edges the checker cannot reach (currently stubbed; wired in `src/semantic_analysis/codeql/`).
31+
### Call graph
32+
ts-morph's TypeChecker resolves each call site to its declared-type target (exact for static dispatch), plus RTA-style subtype expansion: polymorphic calls on interface/abstract receivers also emit edges to every instantiated concrete override. Provenance: `tsc`.
33+
34+
<Aside type="tip" title="Planned: dataflow enrichment">
35+
A future enrichment pass will add the dynamic-dispatch and dataflow edges the type checker cannot reach, using [**Jelly**](https://github.com/cs-au-dk/jelly) (a static call-graph analyzer for JavaScript/TypeScript). It is not yet implemented; the analyzer accepts `-a 2` today but produces the same call graph as `-a 1`.
36+
</Aside>
3437

35-
Both maintain the no-dangling-edges invariant: every call-graph edge endpoint is a real `Callable.signature`.
38+
The call graph maintains the no-dangling-edges invariant: every edge endpoint is a real `Callable.signature`.
3639

3740
## Installing
3841

@@ -254,7 +257,7 @@ The `call_graph` is an array of edges (`TSCallEdge`) in identity-only form: each
254257
target: "src/db.Database.fetchById",
255258
type: "CALL_DEP",
256259
weight: 1,
257-
provenance: ["tsc"], // "tsc" | "codeql" | other
260+
provenance: ["tsc"], // "tsc" today; "jelly" once dataflow enrichment lands
258261
tags: { "ts.dispatch": "rta" } // RTA subtype expansion tag
259262
}
260263
```
@@ -337,16 +340,16 @@ Use `--lazy` (default) to reuse the cache, or `--target-files <list>` to update
337340
## Performance notes
338341

339342
- **Symbol table build**: O(n) in source lines; ts-morph's parse is linear
340-
- **Call graph build (level 1)**: O(c) in call sites; the checker resolution is constant-time per site
341-
- **CodeQL enrichment (level 2)**: Stubbed; will depend on CodeQL database construction time
343+
- **Call graph build**: O(c) in call sites; the checker resolution is constant-time per site
344+
- **Dataflow enrichment (planned, Jelly)**: not yet implemented; cost will depend on Jelly's analysis time
342345

343346
For large projects (>100k LOC), expect analysis to take seconds to tens of seconds.
344347

345348
## Current maturity
346349

347350
- **Symbol table**: Stable; all TypeScript node kinds supported
348-
- **Call graph (level 1)**: Stable; tsc resolution + RTA expansion proven correct
349-
- **Call graph (level 2)**: Stubbed; infrastructure in place for CodeQL enrichment
351+
- **Call graph**: Stable; tsc resolution + RTA expansion proven correct
352+
- **Dataflow enrichment (Jelly)**: Planned; not yet implemented
350353
- **Python SDK integration**: In progress
351354

352355
## See also

0 commit comments

Comments
 (0)