The syntactic analyses of Annex A.1: what a statement assigns, what it
binds, what it captures, and where its free variables are.
A port of the reference's aux.py, function for function, so that the two
can be read side by side. Two things carry over deliberately:
- Sets are sorted. The reference uses Python's set and then min
or sorted wherever the choice is observable, so no order is ever
accidental. Sorted sets here make that structural rather than a habit.
- A mutual region is formed on the fly. statements groups a run of
consecutive defs into one item, and nothing in the tree records it.
The evaluator groups the same way, from the same function.