We present stack graphs, an extension of Visser et al.’s scope graphs framework. Stack graphs power Precise Code Navigation at GitHub, allowing users to navigate name binding references both within and across repositories. Like scope graphs, stack graphs encode the name binding information about a program in a graph structure, in which paths represent valid name bindings. Resolving a reference to its definition is then implemented with a simple path-finding search.
GitHub hosts millions of repositories, containing petabytes of total code, implemented in hundreds of different programming languages, and receiving thousands of pushes per minute. To support this scale, we ensure that the graph construction and path-finding judgments are file-incremental: for each source file, we create an isolated subgraph without any knowledge of, or visibility into, any other file in the program. This lets us eliminate the storage and compute costs of reanalyzing file versions that we have already seen. Since most commits change a small fraction of the files in a repository, this greatly amortizes the operational costs of indexing large, frequently changed repositories over time. To handle type-directed name lookups (which require “pausing” the current lookup to resolve another name), our name resolution algorithm maintains a stack of the currently paused (but still pending) lookups. Stack graphs can be constructed via a purely syntactic analysis of the program’s source code, using a new declarative graph construction language. This means that we can extract name binding information for every repository without any per-package configuration, and without having to invoke an arbitrary, untrusted, package-specific build process.
Wed 5 AprDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
16:00 - 17:30 | Session 4: Scopes & TypesEelco Visser Commemorative Symposium at Theatre Hall Chair(s): Yannis Smaragdakis University of Athens | ||
16:00 10mTalk | Scope Graphs: The Story so Far Eelco Visser Commemorative Symposium DOI Pre-print File Attached | ||
16:10 10mTalk | Dependently Typed Languages in Statix Eelco Visser Commemorative Symposium Jonathan Brouwer TU Delft, Jesper Cockx Delft University of Technology, Aron Zwaan Delft University of Technology Link to publication DOI | ||
16:20 10mTalk | Stack graphs: Name Resolution at Scale Eelco Visser Commemorative Symposium DOI Pre-print | ||
16:30 10mTalk | Using Spoofax to Support Online Code Navigation Eelco Visser Commemorative Symposium Peter D. Mosses Delft University of Technology DOI File Attached | ||
16:40 10mTalk | Renamingless Capture-Avoiding Substitution for Definitional Interpreters Eelco Visser Commemorative Symposium Casper Bach Poulsen Delft University of Technology DOI Pre-print | ||
16:50 10mTalk | Reasoning About Paths in the Interface Graph Eelco Visser Commemorative Symposium Michael Greenberg Stevens Institute of Technology Link to publication DOI | ||
17:00 10mTalk | Type Theory as a Language Workbench Eelco Visser Commemorative Symposium Jan de Muijnck-Hughes University of Glasgow, Guillaume Allais University of St Andrews, Edwin Brady University of St Andrews, UK Pre-print | ||
17:10 10mTalk | A Simply Numbered Lambda Calculus Eelco Visser Commemorative Symposium Friedrich Steimann Fernuniversität in Hagen Link to publication DOI | ||
17:20 10mOther | Session closing Eelco Visser Commemorative Symposium |