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 provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
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)