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.
Keywords
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
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)
Andersen, O.: Program Analysis and Specialization for the C Programming Language. Ph.D. thesis, University of Copenhagen, Copenhagen, Denmark (1994)
Banzi, M.: Getting Started with Arduino. Make: Books, vol. 11 (2008)
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)
Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1075–1075. Springer, Heidelberg (2003)
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)
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)
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)
Daniel, P., Friedman, M.W., Haynes, C.T.: Essentials of Programming Languages, 2nd edn. MIT Press, Cambridge (2001)
Eclipse, http://www.eclipse.org/
Eclipse Java Development Tools, http://www.eclipse.org/jdt/
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)
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)
Fowler, M.: Refactoring. Improving the Design of Existing Code. Addison-Wesley (1999)
Greenhouse, A., Boyland, J.: An Object-Oriented Effects System. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 668–668. Springer, Heidelberg (1999)
Hedin, G.: Incremental Semantic Analysis. Ph.D. thesis, Lund University, Lund, Sweden (1992)
Heering, J., Klint, P., Rekers, J.: Lazy and incremental program generation. ACM Trans. Program. Lang. Syst. 16(3), 1010–1023 (1994)
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)
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)
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)
Kushner, D.: The Making of Arduino. IEEE Spectrum, 1–2 (2011)
Maddox, W.H.: Incremental static semantic analysis. Ph.D. thesis, University of California at Berkeley, Berkeley, CA, USA (1998), uMI Order No. GAX98-03284
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)
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)
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
Nielson, F., Nielson, H.R., Hankin, C.: Principles of program analysis. Springer (2005)
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)
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)
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)
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)
Reps, T., Teitelbaum, T., Demers, A.: Incremental context-dependent analysis for language-based editors. ACM Trans. Program. Lang. Syst. 5(3), 449–477 (1983)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)