Skip to content

[Query] Happens Before

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.

Happens-Before Query [overview]

Check whether one normalized AST node happens before another in the CFG.
This query is requested with the type happens-before.

With this query you can analyze the control flow graph:

Using the example code:

x <- 1
y <- 2

the following query returns that the first assignment happens always before the other:

[ { "type": "happens-before",   "a": "1@x",   "b": "2@y" } ]

Results (prettified and summarized):

Query: happens-before (5 ms)
   ╰ 1@x happens before 2@y: always

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

{"happens-before":{".meta":{},"results":{"1@x<2@y":"always"}},".meta":{}}
Original Code
x <- 1
y <- 2
Implementation Details

The Happens-Before Query is executed by executeHappensBefore.

Clone this wiki locally

⌂ 换网址