skip to main content
research-article

Monitoring aspects for the customization of automatically generated code for big-step models

Published:22 October 2011Publication History
Skip Abstract Section

Abstract

The output of a code generator is assumed to be correct and not usually intended to be read or modified; yet programmers are often interested in this, e.g., to monitor a system property. Here, we consider code customization for a family of code generators associated with big-step executable modelling languages (e.g., statecharts). We introduce a customization language that allows us to express customization scenarios for the generated code independently of a specific big-step execution semantics. These customization scenarios are all different forms of runtime monitors, which lend themselves to a principled, uniform implementation for observation and code extension. A monitor is given in terms of the enabledness and execution of the transitions of a model and a reachability relation between two states of the execution of the model during a big step. For each monitor, we generate the aspect code that is incorporated into the output of a code generator to implement the monitor at the generated-code level. Thus, we provide means for code analysis through using the vocabulary of a model, rather than the detail of the generated code. Our technique not only requires the code generators to reveal only limited information about their code generation mechanisms, but also keeps the structure of the generated code intact. We demonstrate how various useful properties of a model, or a language, can be checked using our monitors.

References

  1. G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold, "An overview of AspectJ," in ECOOP'01, no. 2072 in LNCS, pp. 327--353, Springer, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Prout, J. M. Atlee, N. A. Day, and P. Shaker, "Semantically configurable code generation," in MoDELS'08, vol. 5301 of LNCS, pp. 705--720, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Esmaeilsabzali, N. A. Day, J. M. Atlee, and J. Niu, "Deconstructing the semantics of big-step modelling languages," Requirements Engineering, vol. 15, no. 2, pp. 235--265, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Harel, "Statecharts: A visual formalism for complex systems," Science of Computer Programming, vol. 8, no. 3, pp. 231--274, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. von der Beeck, "A comparison of Statecharts variants," in FTRTFT'94, vol. 863 of LNCS, pp. 128--148, Springer, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Esmaeilsabzali and N. A. Day, "Prescriptive semantics for big-step modelling languages," in FASE'10, vol. 6013 of LNCS, pp. 158--172, Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Pnueli and M. Shalev, "What is in a step: On the semantics of statecharts," in TACS, vol. 526 of LNCS, pp. 244--264, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Pnueli, "The temporal logic of programs," in Proceedings of the 18th IEEE Symposium on the Foundations of Computer Science (FOCS-77), pp. 46--57, IEEE Computer Society Press, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. R. Burch and D. L. Dill, "Automatic verification of pipelined microprocessor control," in CAV'94, vol. 818 of LNCS, pp. 68--80, Springer, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. G. J. Holzmann, R. Joshi, and A. Groce, "Model driven code checking," Automated Software Engineering, vol. 15, no. 3--4, pp. 283--297, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Holzmann, "Reliable software development: Analysis-aware design," in TACAS'11, vol. 6605 of LNCS, pp. 1--2, Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Gray, T. Bapty, S. Neema, D. C. Schmidt, A. S. Gokhale, and B. Natarajan, "An approach for supporting aspect-oriented domain modeling," in GPCE'03, vol. 2830 of LNCS, pp. 151--168, Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Kellens, K. Mens, J. Brichau, and K. Gybels, "Managing the evolution of aspect-oriented software with model-based pointcuts," in ECOOP'06, vol. 4067 of LNCS, pp. 501--525, Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. K. C. Kang, S. G. Cohen, J. A. Hess, W. E. Novak, and A. S. Peterson, "Feature-oriented domain analysis (FODA) feasibility study," Tech. Rep. Carnegie Mellon University/SEI-90-TR-21, SEI, Carnegie Mellon University, 1990.Google ScholarGoogle ScholarCross RefCross Ref
  15. S. Esmaeilsabzali and N. A. Day, "Semantic quality attributes for big-step modelling languages," in FASE'11, vol. 6603 of LNCS, pp. 65--80, Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Drusinsky, "The temporal rover and the atg rover," in SPIN Model Checking and Software Verification, vol. 1885 of LNCS, pp. 323--330, Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. K. Havelund and G. Roşu, "Monitoring Java programs with Java PathExplorer," in RV'01, vol. 55 of Electronic Notes in Theoretical Computer Science, pp. 1--18, Elsevier, 2001.Google ScholarGoogle Scholar
  18. C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble, "Adding trace matching with free variables to AspectJ," in OOPSLA'05, pp. 345--364, ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. F. Chen and G. Rosu, "Mop: an efficient and generic runtime verification framework," in OOPSLA'07, pp. 569--588, ACM Press, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. V. Stolz and E. Bodden, "Temporal assertions using AspectJ," Electronic Notes in Theoretical Computer Science, vol. 144, no. 4, pp. 109--124, 2006. RV'05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. E. Bodden, P. Lam, and L. Hendren, "Clara: A framework for partially evaluating finite-state runtime monitors ahead of time," in RV'10, vol. 6418 of LNCS, pp. 183--197, Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. K. Havelund, "Runtime verification of C programs," in TestCom/FATES'08, vol. 5047 of LNCS, pp. 7--22, Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Seyster, K. Dixit, X. Huang, R. Grosu, K. Havelund, S. A. Smolka, S. D. Stoller, and E. Zadok, "Aspect-oriented instrumentation with GCC," in RV'10, vol. 6418 of LNCS, Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. Zook, S. S. Huang, and Y. Smaragdakis, "Generating AspectJ programs with Meta-AspectJ," in GPCE'04, vol. 3286 of LNCS, pp. 1--18, Springer, 2004.Google ScholarGoogle Scholar
  25. D. Lohmann, G. Blaschke, and O. Spinczyk, "Generic advice: On the combination of AOP with generative programming in aspectC++," in GPCE'04, vol. 3286 of LNCS, pp. 55--74, Springer, 2004.Google ScholarGoogle Scholar
  26. D. R. Smith, "A generative approach to aspect-oriented programming," in GPCE'04, vol. 3286 of LNCS, pp. 39--54, Springer, 2004.Google ScholarGoogle Scholar
  27. U. Kulesza, A. F. Garcia, and C. J. P. de Lucena, "An aspect-oriented generative approach," in OOPSLA'04 Companion, pp. 166--167, ACM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. Cleenewerck and J. Noyé, "Editorial domain specific aspect languages," IET Software, vol. 3, no. 3, pp. 165--166, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  29. C. Henthorne and E. Tilevich, "Code generation on steroids: Enhancing cots code generators via generative aspects," in Second International Workshop on Incorporating COTS Software into Software Systems: Tools and Techniques, IEEE Computer Society, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Monitoring aspects for the customization of automatically generated code for big-step models

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 47, Issue 3
            GCPE '11
            March 2012
            179 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2189751
            Issue’s Table of Contents
            • cover image ACM Conferences
              GPCE '11: Proceedings of the 10th ACM international conference on Generative programming and component engineering
              October 2011
              194 pages
              ISBN:9781450306898
              DOI:10.1145/2047862

            Copyright © 2011 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 22 October 2011

            Check for updates

            Qualifiers

            • research-article
          • Article Metrics

            • Downloads (Last 12 months)1
            • Downloads (Last 6 weeks)1

            Other Metrics

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!