Scheduling the Construction and Interrogation of Scope Graphs Using Attribute Grammars
Recognizing that name binding is often done in an ad-hoc manner, Visser and his colleagues introduced scope graphs as a uniform representation of a program’s static binding structure along with a generic means for interrogating that representation to resolve name references to their declarations. A challenge arises in scheduling the construction and querying actions so that a name resolution is not performed before all requisite information for that resolution is added to the scope graph. Visser et al. introduced a notion of weakly critical edges to constrain the order in which name resolution queries are performed to a correct one, but this has been found to be somewhat restrictive.
Visser et al. also introduced Statix, a constraint solving language for scope graph-based name resolution. We show that specifications written in an annotated version of Statix can be translated into reference attribute grammars, and that the order in which equations are solved under demand driven evaluation provides a valid order for solving constraints in Statix. This formalizes what has been folklore in the attribute grammar community for some time, that scope graphs are naturally specified in reference attributes grammars.
Thu 12 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 12:30 | SLE Session 1: Parsing and Attribute GrammarsSLE 2025 at M 001 Chair(s): Georg Hinkel RheinMain University of Applied Sciences, Wiesbaden, Germany | ||
11:00 22mTalk | Handling Grammar Cycles in the 1997 Standard ML Definition SLE 2025 Elizabeth Scott Royal Holloway University of London, Adrian Johnstone Royal Holloway University of London, UK Pre-print | ||
11:22 22mTalk | Property-based Testing of Attribute Grammars SLE 2025 José Nuno Macedo University of Minho, Marcos Viera University of the Republic, Uruguay, João Saraiva HASLab/INESC TEC, University of Minho | ||
11:45 22mTalk | Scheduling the Construction and Interrogation of Scope Graphs Using Attribute Grammars SLE 2025 Luke Bessant University of Minnesota, Twin Cities, Eric Van Wyk University of Minnesota, Twin Cities Pre-print | ||
12:07 22mTalk | Boosting Parallel Parsing through Cyclic Operator Precedence Grammars SLE 2025 Michele Chiari TU Wien, Michele Giornetta Politecnico di Milano, Dino Mandrioli Politecnico di Milano, Matteo Pradella Politecnico di Milano, Italy Pre-print |