iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: https://unpaywall.org/10.1007/S10703-012-0171-3
InterAspect: aspect-oriented instrumentation with GCC | Formal Methods in System Design Skip to main content
Log in

InterAspect: aspect-oriented instrumentation with GCC

  • Published:
Formal Methods in System Design Aims and scope Submit manuscript

Abstract

We present the InterAspect instrumentation framework for GCC, a widely used compiler infrastructure. The addition of plug-in support in the latest release of GCC makes it an attractive platform for runtime instrumentation, as GCC plug-ins can directly add instrumentation by transforming the compiler’s intermediate representation. Such transformations, however, require expert knowledge of GCC internals. InterAspect addresses this situation by allowing instrumentation plug-ins to be developed using the familiar vocabulary of Aspect-Oriented Programming: pointcuts, join points, and advice functions. Moreover, InterAspect uses specific information about each join point in a pointcut, possibly including results of static analysis, to support powerful customized instrumentation. We describe the InterAspect API and present several examples that illustrate its practical utility as a runtime-verification platform. We also introduce a tracecut system that uses InterAspect to construct program monitors that are formally specified as regular expressions.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27

Similar content being viewed by others

References

  1. GCC 4.5 release series changes, new features, and fixes. http://gcc.gnu.org/gcc-4.5/changes.html

  2. BCEL. http://jakarta.apache.org/bcel

  3. ACC. http://research.msrg.utoronto.ca/ACC

  4. Adams B, Herzeel C, Gybels K (2008) cHALO, stateful aspects in C. In: ACP4IS ’08: Proceedings of the 2008 AOSD workshop on aspects, components, and patterns for infrastructure software, New York, NY, USA. ACM, New York, pp 1–6

    Chapter  Google Scholar 

  5. Allan C, Avgustinov P, Christensen AS, Hendren L, Kuzins S, Lhoták O, de Moor O, Sereni D, Sittamplan G, Tibble J (2005) Adding trace matching with free variables to AspectJ. In: Proceedings of the 20th annual ACM SIGPLAN conference on object-oriented programming, systems, languages and applications (OOPSLA’05). ACM Press, New York

    Google Scholar 

  6. Arachne. www.emn.fr/x-info/arachne

  7. Aspicere. http://sailhome.cs.queensu.ca/~bram/aspicere

  8. Avgustinov P, Christensen AS, Hendren L, Kuzins S, Lhoták J, Lhoták O, de Moor O, Sereni D, Sittampalam G, Tibble J (2005) Abc: An extensible AspectJ compiler. In: Proceedings of the fourth international conference on aspect-oriented software development. ACM Press, New York

    Google Scholar 

  9. Bodden E, Havelund K (2008) Racer: Effective race detection using AspectJ. In: Proceedings of the ACM/SIGSOFT international symposium on software testing and analysis (ISSTA). ACM, New York, pp 155–165

    Google Scholar 

  10. Callanan S, Dean DJ, Zadok E (2007) Extending GCC with modular GIMPLE optimizations. In: Proceedings of the 2007 GCC developers’ summit, Ottawa, Canada, July, pp 31–37

    Google Scholar 

  11. Chen F, Roşu G (2007) MOP: an efficient and generic runtime verification framework. In: Proceedings of the 22nd annual ACM SIGPLAN conference on object-oriented programming, systems, languages and applications (OOPSLA’07)

    Google Scholar 

  12. Chiba S (1995) A metaobject protocol for C++. In: Proceedings of the ACM conference on object-oriented programming systems, languages, and applications, October, pp 285–299

    Google Scholar 

  13. Chiba S (2000) Load-time structural reflection in Java. In: Proceedings of the 14th European conference on object-oriented programming. LNCS, vol 1850. Springer, Berlin, pp 313–336

    Google Scholar 

  14. Coady Y, Kiczales G, Feeley M, Smolyn G (2001) Using AspectC to improve the modularity of path-specific customization in operating system code. In: Proceedings of the 9th ACM SIGSOFT symposium on the foundations of software engineering (FSE), pp 88–98

    Google Scholar 

  15. Douence R, Fritz T, Loriant N, Menaud J-M, Ségura-Devillechaise M, Südholt M (2005) An expressive aspect language for system applications with Arachne. In: Proceedings of the 4th international conference on aspect-oriented software development (AOSD). ACM Press, New York

    Google Scholar 

  16. Eclipse Foundation T AspectJ. www.eclipse.org/aspectj

  17. Fei L, Midkiff SP (2005) Artemis: Practical runtime monitoring of applications for errors. Tech Rep TR-ECE-05-02, Electrical and Computer Engineering, Purdue University. docs.lib.purdue.edu/ecetr/4/

  18. AT&T Research Labs. Graphviz, 2009. www.graphviz.org

  19. Huang X, Seyster J, Callanan S, Dixit K, Grosu R, Smolka SA, Stoller SD, Zadok E (2012) Software monitoring with controllable overhead. Int J Softw Tools Technol Transf 14(3):327–347

    Article  Google Scholar 

  20. InterAspect. www.fsl.cs.stonybrook.edu/interaspect

  21. Kiczales G, Hilsdale E, Hugunin J, Kersten M, Palm J, Griswold WG (2001) An overview of AspectJ. In: Proceedings of the 15th European conference on object-oriented programming. LNCS, vol 2072, pp 327–355

    Google Scholar 

  22. Kneschke J (2009) Lighttpd. www.lighttpd.net/

  23. Meredith PO, Jin D, Griffith D, Chen F, Roşu G (2011) An overview of the MOP runtime verification framework. Int J Softw Tech Technol Transf, to appear

  24. Necula GC, McPeak S, Rahul SP, Weimer W (2002) CIL: Intermediate language and tools for analysis and transformation of C programs. In: Proceedings of the 11th international conference on compiler construction. Springer, Berlin, pp 213–228

    Google Scholar 

  25. Nicoara A, Alonso G, Roscoe T (2008) Controlled, systematic, and efficient code replacement for running Java programs. In: Proceedings of the ACM EuroSys conference, Glasgow, Scotland, UK, April

    Google Scholar 

  26. Objective Caml. http://caml.inria.fr/index.en.html

  27. Poskanzer J (2006) http_load. http://www.acme.com/software/http_load/

  28. Rohlik O, Pasetti A, Cechticky V, Birrer I (2004) Implementing adaptability in embedded software through aspect oriented programming. IEEE Mechatron Robot 85–90

  29. Seyster J, Dixit K, Huang X, Grosu R, Havelund K, Smolka SA, Stoller SD, Zadok E (2010) Aspect-oriented instrumentation with GCC. In: Proc. of the 1st international conference on runtime verification (RV), November. Lecture Notes in Computer Science. Springer, Berlin

    Google Scholar 

  30. Spinczyk O, Lohmann D (2007) The design and implementation of AspectC++. Knowl-Based Syst 20(7):636–651

    Article  Google Scholar 

  31. Valgrind. http://valgrind.org

  32. Walker R, Viggers K (2004) Implementing protocols via declarative event patterns. In: Taylor R, Dwyer M (eds) ACM Sigsoft 12th international symposium on foundations of software engineering (FSE-12). ACM Press, New York, pp 159–169

    Google Scholar 

Download references

Acknowledgements

We thank the anonymous reviewers for their valuable comments. Part of the research described herein was carried out at the Jet Propulsion Laboratory (JP), California Institute of Technology, under a contract with the National Aeronautics and Space Administration. Research described here was supported in part by AFOSR Grant FA9550-09-1-0481, NSF Grants CCF-0926190, CCF-0613913, CNS-0831298, and CNS-0509230, and ONR Grants N00014-07-1-0928 and N00014-09-1-0651.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Justin Seyster.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Seyster, J., Dixit, K., Huang, X. et al. InterAspect: aspect-oriented instrumentation with GCC. Form Methods Syst Des 41, 295–320 (2012). https://doi.org/10.1007/s10703-012-0171-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10703-012-0171-3

Keywords

Navigation