run_datalog
Query the codebase graph with Datalog to find transitive calls, imports, dependencies, hubs, orphans, and circular dependencies using preloaded predicates and custom rules.
Instructions
Run a logic query over the codebase graph. Standard library predicates are pre-loaded (do not redefine them):
calls_transitive(X, Y) : X transitively calls Y
imports_transitive(X, Y) : X transitively imports Y
depends_transitive(X, Y) : X transitively depends on Y
same_community(X, Y) : X and Y are in the same Louvain cluster
is_hub(X) : X has > 15 connections
is_orphan(X) : X has no incoming/outgoing edges
circular_dependency(X, Y) : X and Y call each other
bypasses_layer(X, Y, Z) : X depends on Z, bypassing intermediary Y Base EDB relations: node, calls, imports, contains, inherits, implements, degree, edge. Supports user rules (:-), goals (?-), facts, and negation (not). Budget-bounded (max 10,000 steps).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Datalog program text. Supports goals (?-), user rules (:-), facts, and negation (not). Standard library predicates are pre-loaded. | |
| step_budget | No | Maximum solver steps before the query is bounded (default 1000, clamped to 100 through 10000). |