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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- D. Harel, "Statecharts: A visual formalism for complex systems," Science of Computer Programming, vol. 8, no. 3, pp. 231--274, 1987. Google Scholar
Digital Library
- M. von der Beeck, "A comparison of Statecharts variants," in FTRTFT'94, vol. 863 of LNCS, pp. 128--148, Springer, 1994. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- G. Holzmann, "Reliable software development: Analysis-aware design," in TACAS'11, vol. 6605 of LNCS, pp. 1--2, Springer, 2011. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- F. Chen and G. Rosu, "Mop: an efficient and generic runtime verification framework," in OOPSLA'07, pp. 569--588, ACM Press, 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- K. Havelund, "Runtime verification of C programs," in TestCom/FATES'08, vol. 5047 of LNCS, pp. 7--22, Springer, 2008. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- D. R. Smith, "A generative approach to aspect-oriented programming," in GPCE'04, vol. 3286 of LNCS, pp. 39--54, Springer, 2004.Google Scholar
- 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 Scholar
Digital Library
- T. Cleenewerck and J. Noyé, "Editorial domain specific aspect languages," IET Software, vol. 3, no. 3, pp. 165--166, 2009.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
Index Terms
Monitoring aspects for the customization of automatically generated code for big-step models
Recommendations
Monitoring aspects for the customization of automatically generated code for big-step models
GPCE '11: Proceedings of the 10th ACM international conference on Generative programming and component engineeringThe 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 ...
JEqualityGen: generating equality and hashing methods
GPCE '10Manually implementing equals (for object comparisons) and hashCode (for object hashing) methods in large software projects is tedious and error-prone. This is due to many special cases, such as field shadowing, comparison between different types, or ...
JEqualityGen: generating equality and hashing methods
GPCE '10: Proceedings of the ninth international conference on Generative programming and component engineeringManually implementing equals (for object comparisons) and hashCode (for object hashing) methods in large software projects is tedious and error-prone. This is due to many special cases, such as field shadowing, comparison between different types, or ...







Comments