Repository navigation
[Query] Dataflow Lens
Generated from 'wiki-query.ts' on 2026-11-08, 08:41:45 UTC (v2.17.4), do not edit directly.
Dataflow Lens Query [overview]
Returns a simplified view on the dataflow graph, reduced to definitions, uses, and calls.
This query is requested with the type dataflow-lens.
The Dataflow Query hands you the complete dataflow graph, which is precise but quickly grows too large to read. The dataflow lens returns a reduced view of that same graph, keeping only what is usually interesting when looking at it by hand:
- only vertices tagged as a use, a variable definition, a function definition, or a function call (value vertices are dropped),
- without the environment captured at each vertex (control dependencies are kept),
- and without the vertices for plain operators and keywords (
<-,=,+,|>,if,function, ...).
Edges survive only if both of their endpoints do. The query takes no further arguments.
f <- function(a) a + 1
x <- 1
y <- f(x)
print(y)[ { "type": "dataflow-lens" } ](This can be shortened to @dataflow-lens when used with the REPL command :query).
Results (prettified and summarized):
Query: dataflow-lens (18 ms)
╰ Simplified Graph
Show Detailed Results as Json
The analysis ran (including parsing and normalization and the query) within the generation environment.
The JSON contains the ids of the nodes in question (see the Interface wiki page).
As the code is pretty long, we inhibit pretty printing and syntax highlighting (JSON, hiding built-in):
{"dataflow-lens":{".meta":{},"simplifiedGraph":{"rootVertices":[0,9,14,16,12,19,21],"vertexInformation":[[0,{"tag":"vdef","id":0,"source":[7]}],[9,{"tag":"vdef","id":9,"source":[10]}],[14,{"tag":"use","id":14,"cds":[{"id":16,"when":true,"byPromise":true}]}],[16,{"tag":"fcall","id":16,"environment":{"current":{"id":1947,"parent":"<BuiltInEnvironment>","memory":[],"globalEnv":true},"level":0},"name":"f","onlyBuiltin":false,"args":[{"nodeId":14,"type":32}],"origin":["function"]}],[12,{"tag":"vdef","id":12,"source":[16]}],[19,{"tag":"use","id":19}],[21,{"tag":"fcall","id":21,"name":"print","onlyBuiltin":true,"args":[{"nodeId":19,"type":32}],"origin":["builtin:d"]}]],"edgeInformation":[[14,[[9,{"types":1}],[16,{"types":4096}]]],[16,[[14,{"types":65}],[0,{"types":1}],[12,{"types":4096}]]],[12,[[16,{"types":2}]]],[21,[[19,{"types":73}]]],[19,[[12,{"types":1}],[21,{"types":4096}]]]],"_unknownSideEffects":[]}},".meta":{}}
Note
This is a presentation aid, not a semantic one: the reduced graph is not a sound basis for slicing. Use the Dataflow Query if you need the complete graph, or the Dataflow Cluster Query if you want the graph partitioned instead of shrunk.
Implementation Details
The Dataflow Lens Query is executed by executeDataflowLensQuery.
Currently maintained by Florian Sihler and Oliver Gerstl at Ulm University
Email | GitHub | Penguins | Portfolio
- 🧑💻 Developer Onboarding
- 💻 Setup
- 👓 Overview
- 🪟 Interfacing with flowR
- 🌋 Core
- 🧹 Testing & Linting (Benchmark Page)
⁉️ FAQ- ℹ️ Extra Information