Skip to content

Add CallGraphFromTo query for all supported languages #164

@data-douser

Description

@data-douser

Scope

Add CallGraphFromTo transitive call reachability query for all 8 CallGraph-supporting languages (cpp, csharp, go, java, javascript, python, ruby, swift).

Files

  • server/ql/*/tools/src/CallGraphFromTo/CallGraphFromTo.ql — query implementation (8 files)
  • server/ql/*/tools/src/CallGraphFromTo/CallGraphFromTo.md — documentation (8 files)
  • server/ql/*/tools/test/CallGraphFromTo/ — tests + expected output (24 files)
  • server/ql/go/tools/src/PrintAST/PrintAST.ql — fix for Go PrintAST
  • server/ql/java/tools/src/PrintCFG/PrintCFG.ql — fix for Java PrintCFG
  • server/src/lib/cli-tool-registry.ts — external predicate handling for CallGraphFromTo

Independence

✅ The .ql queries, .md docs, and test files are fully independent. The external predicate wiring in cli-tool-registry.ts also touches server code but is a small, focused change.

Notes

  • Uses calls* transitive closure with both sourceFunction and targetFunction external predicates
  • All 8 languages compile and pass unit tests
  • External predicate handling also fixed to work with direct query paths (not just queryName)

Parent: #163

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions