Skip to main content

A Language Independent Task Engine for Incremental Name and Type Analysis

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8225))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. van den Brand, M.G.J.: PREGMATIC - a generator for incremental programming environments. Ph.D. thesis, University Nijmegen (1992)

    Google Scholar 

  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)

    MathSciNet  Google Scholar 

  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. Ekman, T., Hedin, G.: The jastadd system - modular extensible compiler construction. SCP 69(1-3), 14–26 (2007)

    MathSciNet  MATH  Google Scholar 

  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. Eysholdt, M., Behrens, H.: Xtext: implement your language faster than the quick and dirty way. In: OOPSLA, pp. 307–309 (2010)

    Google Scholar 

  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. Hedin, G.: Incremental static-semantic analysis for object-oriented languages using door attribute grammars. In: SAGA, pp. 374–379 (1991)

    Google Scholar 

  9. Hedin, G.: Incremental Semantic Analysis. Ph.D. thesis (1992)

    Google Scholar 

  10. Hedin, G.: Reference attributed grammars. Informatica SI 24(3) (2000)

    Google Scholar 

  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)

    MATH  Google Scholar 

  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. Kastens, U.: Ordered attributed grammars. ACTA 13, 229–256 (1980)

    MathSciNet  MATH  Google Scholar 

  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. Knuth, D.E.: Semantics of context-free languages. MST 2(2), 127–145 (1968)

    MathSciNet  MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  17. Krishnamurthi, S.: Programming Languages: Application and Interpretation (2007)

    Google Scholar 

  18. Meulen, E.A.V.D.: Incremental Rewriting. Ph.D. thesis, University of Amsterdam (1994)

    Google Scholar 

  19. Pennings, M.C.: Generating incremental attribute evaluators. Ph.D. thesis, Computer Science, Utrecht University (November 1994)

    Google Scholar 

  20. Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)

    Google Scholar 

  21. Poetzsch-Heffter, A.: Programming language specification and prototyping using the max system. In: PLIPL, pp. 137–150 (1993)

    Google Scholar 

  22. Reps, T.W.: Optimal-time incremental semantic analysis for syntax-directed editors. In: POPL, pp. 169–176 (1982)

    Google Scholar 

  23. Reps, T.W.: Generating language-based environments. Massachusetts Institute of Technology, Cambridge (1984)

    Google Scholar 

  24. Reps, T.W., Teitelbaum, T., Demers, A.J.: Incremental context-dependent analysis for language-based editors. TOPLAS 5(3), 449–477 (1983)

    Article  Google Scholar 

  25. Swierstra, S.D., Vogt, H.: Higher order attribute grammars. In: SAGA. pp. 256–296 (1991)

    Google Scholar 

  26. Söderberg, E.: Contributions to the Construction of Extensible Semantic Editors. Ph.D. thesis (2012)

    Google Scholar 

  27. Söderberg, E., Hedin, G.: A comparative study of incremental attribute grammar solutions to name resolution (2012)

    Google Scholar 

  28. Vogt, H., Swierstra, S.D., Kuiper, M.F.: Higher-order attribute grammars. In: PLDI, pp. 131–145 (1989)

    Google Scholar 

  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. Völter, M., Solomatov, K.: Language modularization and composition with projectional language workbenches illustrated with MPS. In: SLE (2010)

    Google Scholar 

  31. Yeh, D.: On incremental evaluation of ordered attribute grammars. BIT 23(3), 308–320 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  32. Yeh, D., Kastens, U.: Improvements of an incremental evaluation algorithm for ordered attribute grammars. SIGPLAN 23(12), 45–50 (1988)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics