Skip to main content

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

  • 983 Accesses

Abstract

In recent years, Integrated Development Environments (IDEs) have risen from nicety to an essential part of most programming language tool-chains. Indeed, they are widely seen as critical to the widespread adoption of a new programming language. This is due in part to the emergence of a higher-level dialogue between a developer and his code, made possible by advanced tooling that aids in navigating, understanding, and manipulating code. In turn, much of this advanced tooling relies heavily on various forms of static analysis.

Unfortunately, many practitioners of static analysis methods are not well skilled in incorporating their analyses into an IDE context. The result is often high-powered tools that lack key usability characteristics, and thus fall short of their potential to assist developers.

This tutorial attempts to help bridge the skill gap by describing several applications of static analysis within an IDE setting. We describe the computation and presentation of type hierarchy information, data flow information in the form of def/use chains, the use of a type inferencing engine to detect type-related code ”smells”, and the use of memory effects analysis to determine the safety of certain parallelization-related refactorings.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Allen, R., Callahan, D., Kennedy, K.: Automatic decomposition of scientific programs for parallel execution. In: Proceedings of the 14th ACM Symposium on Principles of Programming Languages, POPL 1987, pp. 63–76. ACM Press (1987)

    Google Scholar 

  2. Andersen, O.: Program Analysis and Specialization for the C Programming Language. Ph.D. thesis, University of Copenhagen, Copenhagen, Denmark (1994)

    Google Scholar 

  3. Banzi, M.: Getting Started with Arduino. Make: Books, vol. 11 (2008)

    Google Scholar 

  4. Berndl, M., Lhoták, O., Qian, F., Hendren, L., Umanee, N.: Points-to analysis using bdds. In: Proceedings of the 2003 ACM Conference on Programming Language Design and Implementation, PLDI 2003, pp. 103–114. ACM, New York (2003)

    Google Scholar 

  5. Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1075–1075. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  6. Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming 72(1-2), 52–70 (2008)

    Article  MathSciNet  Google Scholar 

  7. Charles, P., Fuhrer, R.M., Sutton Jr., S.M., Duesterwald, E., Vinju, J.J.: Accelerating the creation of customized, language-specific IDEs in Eclipse. In: OOPSLA, pp. 191–206 (2009)

    Google Scholar 

  8. Charles, P., Grothoff, C., Saraswat, V., Donawa, C., Kielstra, A., Ebcioglu, K., von Praun, C., Sarkar, V.: X10: an object-oriented approach to non-uniform cluster computing. SIGPLAN Not. 40, 519–538 (2005)

    Article  Google Scholar 

  9. Daniel, P., Friedman, M.W., Haynes, C.T.: Essentials of Programming Languages, 2nd edn. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  10. Eclipse, http://www.eclipse.org/

  11. Eclipse Java Development Tools, http://www.eclipse.org/jdt/

  12. Ekman, T., Hedin, G.: The jastadd extensible java compiler. In: Proceedings of the 2007 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 2007, pp. 1–18. ACM, New York (2007)

    Google Scholar 

  13. Fink, S.J., Knobe, K., Sarkar, V.: Unified Analysis of Array and Object References in Strongly Typed Languages. In: Palsberg, J. (ed.) SAS 2000. LNCS, vol. 1824, pp. 155–174. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  14. Fowler, M.: Refactoring. Improving the Design of Existing Code. Addison-Wesley (1999)

    Google Scholar 

  15. Greenhouse, A., Boyland, J.: An Object-Oriented Effects System. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 668–668. Springer, Heidelberg (1999)

    Google Scholar 

  16. Hedin, G.: Incremental Semantic Analysis. Ph.D. thesis, Lund University, Lund, Sweden (1992)

    Google Scholar 

  17. Heering, J., Klint, P., Rekers, J.: Lazy and incremental program generation. ACM Trans. Program. Lang. Syst. 16(3), 1010–1023 (1994)

    Article  Google Scholar 

  18. Heintze, N., Tardieu, O.: Ultra-fast aliasing analysis using cla: a million lines of c code in a second. In: Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, PLDI 2001, pp. 254–263. ACM, New York (2001)

    Chapter  Google Scholar 

  19. Kats, L.C.L., Visser, E.: The Spoofax language workbench. Rules for declarative specification of languages and IDEs. In: Rinard, M. (ed.) Proceedings of the 2010 ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010, Reno, NV, USA, pp. 444–463 (October 2010)

    Google Scholar 

  20. Klint, P., van der Storm, T., Vinju, J.J.: Rascal: A domain specific language for source code analysis and manipulation. In: Ninth IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM), pp. 168–177. IEEE Computer Society (2009)

    Google Scholar 

  21. Kushner, D.: The Making of Arduino. IEEE Spectrum, 1–2 (2011)

    Google Scholar 

  22. Maddox, W.H.: Incremental static semantic analysis. Ph.D. thesis, University of California at Berkeley, Berkeley, CA, USA (1998), uMI Order No. GAX98-03284

    Google Scholar 

  23. McKinley, K.S., Carr, S., Tseng, C.W.: Improving data locality with loop transformations. ACM Transactions on Programming Languages and Systems 18(4), 424–453 (1996)

    Article  Google Scholar 

  24. Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to analysis for java. ACM Trans. Softw. Eng. Methodol. 14(1), 1–41 (2005)

    Article  Google Scholar 

  25. Morgenthaler, J.D.: Static analysis for a software transformation tool. Ph.D. thesis, University of California at San Diego, La Jolla, CA, USA (1998), uMI Order No. GAX98-04509

    Google Scholar 

  26. Nielson, F., Nielson, H.R., Hankin, C.: Principles of program analysis. Springer (2005)

    Google Scholar 

  27. Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  28. Palsberg, J., Schwartzbach, M.I.: Object-oriented type inference. In: Conference Proceedings on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA 1991, pp. 146–161. ACM, New York (1991)

    Google Scholar 

  29. Pouchet, L.N., Bastoul, C., Cohen, A., Cavazos, J.: Iterative optimization in the polyhedral model: part II, Multidimensional Time. Conference on Programming Language Design and Implementation 43(6), 90–100 (2008)

    Google Scholar 

  30. Pouchet, L.N., Bondhugula, U., Bastoul, C., Cohen, A., Ramanujam, J., Sadayappan, P., Vasilache, N.: Loop transformations: convexity, pruning and optimization. In: Proceedings of the 38th Annual ACM Symposium on Principles of Programming Languages, POPL 2011, vol. 46, pp. 549–562. ACM (2011)

    Google Scholar 

  31. Reps, T., Teitelbaum, T., Demers, A.: Incremental context-dependent analysis for language-based editors. ACM Trans. Program. Lang. Syst. 5(3), 449–477 (1983)

    Article  Google Scholar 

  32. Steensgaard, B.: Points-to analysis in almost linear time. In: Proceedings of the 23rd ACM Symposium on Principles of Programming Languages, POPL 1996, pp. 32–41. ACM, New York (1996)

    Google Scholar 

  33. Tip, F., Fuhrer, R.M., Kieżun, A., Ernst, M.D., Balaban, I., Sutter, B.D.: Refactoring using type constraints. ACM Trans. Program. Lang. Syst. 33, 9:1–9:47 (2011)

    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-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Fuhrer, R.M. (2013). Leveraging Static Analysis in an IDE. In: Lämmel, R., Saraiva, J., Visser, J. (eds) Generative and Transformational Techniques in Software Engineering IV. GTTSE 2011. Lecture Notes in Computer Science, vol 7680. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35992-7_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-35992-7_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-35991-0

  • Online ISBN: 978-3-642-35992-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics