Skip to content

[Query] Abstract Interpretation

github-actions[bot] edited this page Nov 8, 2026 · 1 revision

Generated from 'wiki-query.ts' on 2026-11-08, 09:20:49 UTC (v2.17.4), do not edit directly.

Abstract Interpretation Query [overview]

Returns the abstract values inferred for every expression or at specific locations.
This query is requested with the type absint.
Run in the REPL: :query @absint <inference> [(<crit>;...)] <code | file://path>

This query infers all shapes of dataframes within the code using abstract interpretation. For example, you can use:

[ { "type": "absint",   "inference": "df-shape" } ]

Results (prettified and summarized):

Query: absint (3 ms)
   ╰ $7: (colnames: [{"id"}, {}], cols: [1, 1], rows: [3, 3])
   ╰ $14: (colnames: [{"id"}, {}], cols: [1, 1], rows: [0, 3])
   ╰ $0: (colnames: [{"id"}, {}], cols: [1, 1], rows: [0, 3])

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).

{"absint":{".meta":{},"result":{"domain":{"colnames":{"must":[],"may":"top"},"cols":[0,null],"rows":[0,null]}}},".meta":{}}
Original Code
df <- data.frame(id = 1:3) |>
  filter(df, FALSE)

The query optionally also accepts slice criteria to narrow the results to specific nodes. For example:

[ { "type": "absint",   "inference": "df-shape",   "criteria": [ "1@df",    "1@data.frame" ] } ]

(This can be shortened to @absint (1@df;1@data.frame) "df <- data.frame(id = 1:3) |>\n filter(df, FALSE)" when used with the REPL command :query).

Results (prettified and summarized):

Query: absint (4 ms)
   ╰ 1@df: (colnames: [{"id"}, {}], cols: [1, 1], rows: [0, 3])
   ╰ 1@data.frame: (colnames: [{"id"}, {}], cols: [1, 1], rows: [3, 3])

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).

{"absint":{".meta":{},"result":[["1@df",{"colnames":{"must":["id"],"may":[]},"cols":[1,1],"rows":[0,3]}],["1@data.frame",{"colnames":{"must":["id"],"may":[]},"cols":[1,1],"rows":[3,3]}]]},".meta":{}}
Original Code
df <- data.frame(id = 1:3) |>
  filter(df, FALSE)
Implementation Details

The Abstract Interpretation Query is executed by executeAbsintQuery.

Clone this wiki locally

⌂ 换网址