Skip to content

Statix — Static Semantics

Statix is a meta-language for the specification of static semantics in Spoofax.

How-tos Reference Sources


Statix specifications are organised in modules. In Statix, programs, types and all other data are represented using terms. Type-checking a program is performed by solving a set of constraints over terms. In addition to these built-in constraints, specification writers can define their own constraints.

Type-checking is closely related to, and strongly intertwined with, name resolution. For that reason, Statix has built-in support for modelling name binding patterns in the form of scope graphs. During type-checking, names can be resolved using queries.

When transforming programs using in Stratego, Statix specifications can be executed, and the results accesssed using the Stratego API for Statix.

Statix has a special test format, which can be used for isolating issues in a specification, or in the Statix ecosystem.


Readers with little or no familiarity with Statix are recommended to read the Language Concepts section first.


The sources of the different Statix components can be found at:

Last update: May 31, 2024
Created: May 31, 2024