You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: src/content/docs/backends/codeanalyzer-ts.mdx
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,14 @@ Before parsing, the analyzer ensures `node_modules` is present (via `npm install
28
28
### Symbol table (Level 1 default)
29
29
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.
30
30
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`.
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>
34
37
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`.
36
39
37
40
## Installing
38
41
@@ -254,7 +257,7 @@ The `call_graph` is an array of edges (`TSCallEdge`) in identity-only form: each
254
257
target: "src/db.Database.fetchById",
255
258
type: "CALL_DEP",
256
259
weight: 1,
257
-
provenance: ["tsc"], // "tsc" | "codeql" | other
260
+
provenance: ["tsc"], // "tsc" today; "jelly" once dataflow enrichment lands
258
261
tags: { "ts.dispatch": "rta" } // RTA subtype expansion tag
259
262
}
260
263
```
@@ -337,16 +340,16 @@ Use `--lazy` (default) to reuse the cache, or `--target-files <list>` to update
337
340
## Performance notes
338
341
339
342
-**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
342
345
343
346
For large projects (>100k LOC), expect analysis to take seconds to tens of seconds.
344
347
345
348
## Current maturity
346
349
347
350
-**Symbol table**: Stable; all TypeScript node kinds supported
0 commit comments