A Language Independent Task Engine for Incremental Name and Type Analysis

  • Guido H. Wachsmuth
  • Gabriël D. P. Konat
  • Vlad A. Vergu
  • Danny M. Groenewegen
  • Eelco Visser
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8225)


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.


Type Analysis Incremental Analysis Java Virtual Machine Partial Index Dependent Task 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    van den Brand, M.G.J.: PREGMATIC - a generator for incremental programming environments. Ph.D. thesis, University Nijmegen (1992)Google Scholar
  2. 2.
    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)MathSciNetGoogle Scholar
  3. 3.
    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)Google Scholar
  4. 4.
    Ekman, T., Hedin, G.: The jastadd system - modular extensible compiler construction. SCP 69(1-3), 14–26 (2007)MathSciNetzbMATHGoogle Scholar
  5. 5.
    Erdweg, S., Rendel, T., Kástner, C., Ostermann, K.: Sugarj: Library-based syntactic language extensibility. In: OOPSLA, pp. 391–406 (2011)Google Scholar
  6. 6.
    Eysholdt, M., Behrens, H.: Xtext: implement your language faster than the quick and dirty way. In: OOPSLA, pp. 307–309 (2010)Google Scholar
  7. 7.
    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)Google Scholar
  8. 8.
    Hedin, G.: Incremental static-semantic analysis for object-oriented languages using door attribute grammars. In: SAGA, pp. 374–379 (1991)Google Scholar
  9. 9.
    Hedin, G.: Incremental Semantic Analysis. Ph.D. thesis (1992)Google Scholar
  10. 10.
    Hedin, G.: Reference attributed grammars. Informatica SI 24(3) (2000)Google Scholar
  11. 11.
    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)zbMATHGoogle Scholar
  12. 12.
    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)Google Scholar
  13. 13.
    Kastens, U.: Ordered attributed grammars. ACTA 13, 229–256 (1980)MathSciNetzbMATHGoogle Scholar
  14. 14.
    Kats, L.C.L., Visser, E.: The Spoofax language workbench: rules for declarative specification of languages and IDEs. In: OOPSLA, pp. 444–463 (2010)Google Scholar
  15. 15.
    Knuth, D.E.: Semantics of context-free languages. MST 2(2), 127–145 (1968)MathSciNetzbMATHGoogle Scholar
  16. 16.
    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)CrossRefGoogle Scholar
  17. 17.
    Krishnamurthi, S.: Programming Languages: Application and Interpretation (2007)Google Scholar
  18. 18.
    Meulen, E.A.V.D.: Incremental Rewriting. Ph.D. thesis, University of Amsterdam (1994)Google Scholar
  19. 19.
    Pennings, M.C.: Generating incremental attribute evaluators. Ph.D. thesis, Computer Science, Utrecht University (November 1994)Google Scholar
  20. 20.
    Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)Google Scholar
  21. 21.
    Poetzsch-Heffter, A.: Programming language specification and prototyping using the max system. In: PLIPL, pp. 137–150 (1993)Google Scholar
  22. 22.
    Reps, T.W.: Optimal-time incremental semantic analysis for syntax-directed editors. In: POPL, pp. 169–176 (1982)Google Scholar
  23. 23.
    Reps, T.W.: Generating language-based environments. Massachusetts Institute of Technology, Cambridge (1984)Google Scholar
  24. 24.
    Reps, T.W., Teitelbaum, T., Demers, A.J.: Incremental context-dependent analysis for language-based editors. TOPLAS 5(3), 449–477 (1983)CrossRefGoogle Scholar
  25. 25.
    Swierstra, S.D., Vogt, H.: Higher order attribute grammars. In: SAGA. pp. 256–296 (1991)Google Scholar
  26. 26.
    Söderberg, E.: Contributions to the Construction of Extensible Semantic Editors. Ph.D. thesis (2012)Google Scholar
  27. 27.
    Söderberg, E., Hedin, G.: A comparative study of incremental attribute grammar solutions to name resolution (2012)Google Scholar
  28. 28.
    Vogt, H., Swierstra, S.D., Kuiper, M.F.: Higher-order attribute grammars. In: PLDI, pp. 131–145 (1989)Google Scholar
  29. 29.
    Vogt, H., Swierstra, S.D., Kuiper, M.F.: Efficient incremental evaluation of higher order attribute grammars. In: PLIPL, pp. 231–242 (1991)Google Scholar
  30. 30.
    Völter, M., Solomatov, K.: Language modularization and composition with projectional language workbenches illustrated with MPS. In: SLE (2010)Google Scholar
  31. 31.
    Yeh, D.: On incremental evaluation of ordered attribute grammars. BIT 23(3), 308–320 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
  32. 32.
    Yeh, D., Kastens, U.: Improvements of an incremental evaluation algorithm for ordered attribute grammars. SIGPLAN 23(12), 45–50 (1988)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2013

Authors and Affiliations

  • Guido H. Wachsmuth
    • 1
    • 2
  • Gabriël D. P. Konat
    • 1
  • Vlad A. Vergu
    • 1
  • Danny M. Groenewegen
    • 1
  • Eelco Visser
    • 1
  1. 1.Delft University of TechnologyThe Netherlands
  2. 2.Oracle LabsRedwood CityUSA

Personalised recommendations