A Framework for CFG-Based Static Program Analysis of Ada Programs

  • Raul Fechete
  • Georg Kienesberger
  • Johann Blieberger
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5026)

Abstract

The control flow graph is the basis for many code optimisation and analysis techniques. We introduce a new framework for the construction of powerful CFG-based representations of arbitrary Ada programs. The generated data holds extensive information about the original Ada source, such as visibility, package structure and type definitions and provides means for complete interprocedural analysis. We use ASIS-for-GNAT as an interface to the Ada environment and extract the needed information in a single traversal of the provided syntax trees. In addition, further refinement of the resulting data structures is done.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Allen, F.E.: Control flow analysis. In: Proceedings of a symposium on Compiler optimization, pp. 1–19 (1970)Google Scholar
  2. 2.
    Ryder, B.G., Paull, M.C.: Elimination algorithms for data flow analysis. ACM Comput. Surv. 18(3), 277–316 (1986)CrossRefGoogle Scholar
  3. 3.
    Fahringer, T., Scholz, B.: A unified symbolic evaluation framework for parallelizing compilers. IEEE Trans. Parallel Distrib. Syst. 11(11), 1105–1125 (2000)CrossRefGoogle Scholar
  4. 4.
    Blieberger, J.: Data-flow frameworks for worst-case execution time analysis. Real-Time Syst. 22(3), 183–227 (2002)MATHCrossRefGoogle Scholar
  5. 5.
    Allen, F.E., Cocke, J.: A program data flow analysis procedure. Commun. ACM 19(3), 137 (1976)MATHCrossRefGoogle Scholar
  6. 6.
    Sreedhar, V.C., Gao, G.R., Lee, Y.F.: A new framework for elimination-based data flow analysis using dj graphs. ACM TOPLAS 20(2), 388–435 (1998)CrossRefGoogle Scholar
  7. 7.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers. Addison-Wesley, Reading (1986)Google Scholar
  8. 8.
    International Organization for Standardization: ISO/IEC 15291:1999: Information technology — Programming languages — Ada Semantic Interface Specification (ASIS). ISO, Geneva, Switzerland (1999)Google Scholar
  9. 9.
    AdaCore: ASIS-for-GNAT User’s Guide. Revision 41863 (January 2007)Google Scholar
  10. 10.
    Sedgewick, R.: Algorithms, 2nd edn. Addison-Wesley, Reading (1988)Google Scholar
  11. 11.
    Gansner, E.R., North, S.C.: An open graph visualization system and its applications to software engineering. Software — Practice and Experience 30(11), 1203–1233 (2000)MATHCrossRefGoogle Scholar
  12. 12.
    Fechete, R., Kienesberger, G.: Generating control flow graphs for Ada programs. Technical Report 183/1-139, Institute for Computer-Aided Automation, TU Vienna, Treitlstr. 1-3, A-1040 Vienna, Austria (September 2007)Google Scholar
  13. 13.
    Ramalingam, G.: Identifying loops in almost linear time. ACM Trans. Program. Lang. Syst. 21(2), 175–188 (1999)CrossRefMathSciNetGoogle Scholar
  14. 14.
    Andrews, G.R.: Concurrent programming: principles and practice. Benjamin-Cummings Publishing Co. Inc., Redwood City (1991)Google Scholar
  15. 15.
    Blieberger, J., Burgstaller, B., Scholz, B.: Busy wait analysis. In: Reliable Software Technologies - Ada-Europe, pp. 142–152 (2003)Google Scholar
  16. 16.
    Schonberg, D.: On-the-fly detection of access anomalies. In: PLDI 1989: Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation, pp. 285–297. ACM Press, New York (1989)CrossRefGoogle Scholar
  17. 17.
    Burgstaller, B., Blieberger, J., Mittermayr, R.: Static Detection of Access Anomalies in Ada95. In: Pinho, L.M., González Harbour, M. (eds.) Ada-Europe 2006. LNCS, vol. 4006, pp. 40–55. Springer, Heidelberg (2006)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Raul Fechete
    • 1
  • Georg Kienesberger
    • 1
  • Johann Blieberger
    • 1
  1. 1.Institute for Computer-Aided AutomationTU ViennaViennaAustria

Personalised recommendations