Abstract
IDEs depend on incremental name and type analysis for responsive feedback for large projects. In this paper, we present a language-independent approach for incremental name and type analysis. Analysis consists of two phases. The first phase analyzes lexical scopes and binding instances and creates deferred analysis tasks. A task captures a single name resolution or type analysis step. Tasks might depend on other tasks and are evaluated in the second phase. Incrementality is supported on file and task level. When a file changes, only this file is recollected and only those tasks are reevaluated, which are affected by the changes in the collected data. The analysis does neither re-parse nor re-traverse unchanged files, even if they are affected by changes in other files. We implemented the approach as part of the Spoofax Language Workbench and evaluated it for the WebDSL web programming language.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
van den Brand, M.G.J.: PREGMATIC - a generator for incremental programming environments. Ph.D. thesis, University Nijmegen (1992)
Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation. SCPĀ 72(1-2), 52ā70 (2008)
Demers, A.J., Reps, T.W., Teitelbaum, T.: Incremental evaluation for attribute grammars with application to syntax-directed editors. In: POPL, pp. 105ā116 (1981)
Ekman, T., Hedin, G.: The jastadd system - modular extensible compiler construction. SCPĀ 69(1-3), 14ā26 (2007)
Erdweg, S., Rendel, T., KĆ”stner, C., Ostermann, K.: Sugarj: Library-based syntactic language extensibility. In: OOPSLA, pp. 391ā406 (2011)
Eysholdt, M., Behrens, H.: Xtext: implement your language faster than the quick and dirty way. In: OOPSLA, pp. 307ā309 (2010)
Groenewegen, D.M., Hemel, Z., Kats, L.C.L., Visser, E.: WebDSL: a domain-specific language for dynamic web applications. In: OOPSLA, pp. 779ā780 (2008)
Hedin, G.: Incremental static-semantic analysis for object-oriented languages using door attribute grammars. In: SAGA, pp. 374ā379 (1991)
Hedin, G.: Incremental Semantic Analysis. Ph.D. thesis (1992)
Hedin, G.: Reference attributed grammars. Informatica SIĀ 24(3) (2000)
Hemel, Z., Groenewegen, D.M., Kats, L.C.L., Visser, E.: Static consistency checking of web applications with WebDSL. JSCĀ 46(2), 150ā182 (2011)
Johnson, G.F., Fischer, C.N.: A meta-language and system for nonlocal incremental attribute evaluation in language-based editors. In: POPL, pp. 141ā151 (1985)
Kastens, U.: Ordered attributed grammars. ACTAĀ 13, 229ā256 (1980)
Kats, L.C.L., Visser, E.: The Spoofax language workbench: rules for declarative specification of languages and IDEs. In: OOPSLA, pp. 444ā463 (2010)
Knuth, D.E.: Semantics of context-free languages. MSTĀ 2(2), 127ā145 (1968)
Konat, G., Kats, L., Wachsmuth, G., Visser, E.: Declarative name binding and scope rules. In: Czarnecki, K., Hedin, G. (eds.) SLE 2012. LNCS, vol.Ā 7745, pp. 311ā331. Springer, Heidelberg (2013)
Krishnamurthi, S.: Programming Languages: Application and Interpretation (2007)
Meulen, E.A.V.D.: Incremental Rewriting. Ph.D. thesis, University of Amsterdam (1994)
Pennings, M.C.: Generating incremental attribute evaluators. Ph.D. thesis, Computer Science, Utrecht University (November 1994)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Poetzsch-Heffter, A.: Programming language specification and prototyping using the max system. In: PLIPL, pp. 137ā150 (1993)
Reps, T.W.: Optimal-time incremental semantic analysis for syntax-directed editors. In: POPL, pp. 169ā176 (1982)
Reps, T.W.: Generating language-based environments. Massachusetts Institute of Technology, Cambridge (1984)
Reps, T.W., Teitelbaum, T., Demers, A.J.: Incremental context-dependent analysis for language-based editors. TOPLASĀ 5(3), 449ā477 (1983)
Swierstra, S.D., Vogt, H.: Higher order attribute grammars. In: SAGA. pp. 256ā296 (1991)
Sƶderberg, E.: Contributions to the Construction of Extensible Semantic Editors. Ph.D. thesis (2012)
Sƶderberg, E., Hedin, G.: A comparative study of incremental attribute grammar solutions to name resolution (2012)
Vogt, H., Swierstra, S.D., Kuiper, M.F.: Higher-order attribute grammars. In: PLDI, pp. 131ā145 (1989)
Vogt, H., Swierstra, S.D., Kuiper, M.F.: Efficient incremental evaluation of higher order attribute grammars. In: PLIPL, pp. 231ā242 (1991)
Vƶlter, M., Solomatov, K.: Language modularization and composition with projectional language workbenches illustrated with MPS. In: SLE (2010)
Yeh, D.: On incremental evaluation of ordered attribute grammars. BITĀ 23(3), 308ā320 (1983)
Yeh, D., Kastens, U.: Improvements of an incremental evaluation algorithm for ordered attribute grammars. SIGPLANĀ 23(12), 45ā50 (1988)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
Ā© 2013 Springer International Publishing Switzerland
About this paper
Cite this paper
Wachsmuth, G.H., Konat, G.D.P., Vergu, V.A., Groenewegen, D.M., Visser, E. (2013). A Language Independent Task Engine for Incremental Name and Type Analysis. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds) Software Language Engineering. SLE 2013. Lecture Notes in Computer Science, vol 8225. Springer, Cham. https://doi.org/10.1007/978-3-319-02654-1_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-02654-1_15
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-02653-4
Online ISBN: 978-3-319-02654-1
eBook Packages: Computer ScienceComputer Science (R0)