For systems which deal with serious or dangerous things (for example nuclear power plant), programs are constrained by legislation to be safe in any case, which requires verification process during the execution, in other words “Runtime Verification” (RV). The field of runtime verification has many different names: runtime monitoring, runtime checking, runtime result checking, runtime reflection, monitoring oriented programming, design by contract, runtime analysis, dynamic analysis, trace analysis, fault protection, etc. Aspect-oriented programming (AOP) is a useful paradigm for monitoring programs, even if it was not created for this purpose. Indeed, AOP tries to deal with crosscutting concerns (tangled and scattered codes) by “capturing” them within a new entity called aspect, and runtime verification properties are conceptually transversal to the code they verify, unavoidably resulting in such crosscutting codes. AOP is always used as an extension of an existing language. Hence it is necessary to design an aspect language extending the target language, and to use what is called a weaver, to realize a binding operation between the target program and the aspects. Thus, one can find many aspect-programming extensions (including an aspect language and an aspect weaver) for most programming languages. The first one to be developed was AspectJ, designed for Java, and which has been the best-known reference among aspect-oriented tools until now. We use an AspectJ-like tool, straight inspired from AspectJ but designed for C, called ACC, which is itself an improved version of AspectC. The purpose of this paper is to explore the possibility of implementing and monitoring generic (also called parameterized) verification properties, i.e. which could be used on any target code, with ACC through a basic example. As ACC, contrary to AspectJ, does not provide abstraction for aspects, which would have made generic monitoring an easy task, we tried to simulate abstraction by making use of macros in the aspect code, which boils down to monitor every parameterized property within one macro function. We will see that despite losses of expressiveness without complexification of the monitoring code, the method still allows monitoring generically any property which is already monitorable directly in ACC.
Published in | Software Engineering (Volume 4, Issue 3) |
DOI | 10.11648/j.se.20160403.11 |
Page(s) | 50-58 |
Creative Commons |
This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited. |
Copyright |
Copyright © The Author(s), 2016. Published by Science Publishing Group |
Runtime Verification, Monitoring, Aspect-Oriented Programming, Generic Properties, AspectC, ACC
[1] | Bram Adams, “Co-evolution of Source Code and the Build System: Impact on the Introduction of AOSD in Legacy Systems”, PhD thesis in Ghent University, Department of Information Technology, (March 2008). |
[2] | Bram Adams and Tom Tourwe, “Aspect orientation for C: express yourself”, in 3rd Software-Engineering Properties of Languages and Aspect Technologies Workshop (SPLAT), AOSD (2005). |
[3] | Remi Douence, Thomas Fritz, Nicolas Loriant, Jean-Marc Menaud, Marc Segura-Devillechaise, and Mario Sudholt, “An expressive aspect language for system applications with Arachne”, in Transactions on Aspect-Oriented Software Development I, Lecture Notes on Computer Science, vol. 3880, pp 174-213 (2006). |
[4] | Ylies Falcone, Klaus Havelund, and Giles Reger, “A tutorial on runtime verification”, in Engineering Dependable Software Systems, vol. 34, pp 141-175 (2013). |
[5] | Klaus Havelund, “Runtime verification of C programs”, in Proceedings of the 20th IFIP TC 6/WG 6.1 International Conference on Testing of Communicating Systems (TestCom 2008) and the 8th International Workshop on Formal Approaches to Testing of Software (FATES 2008), Lecture Notes in Computer Science, vol. 5047, pp 7-22 (2008). |
[6] | Klaus Havelund and Eric Van Wyk, “Aspect-oriented monitoring of C programs”, in the 3rd Domain-Specific Aspect Languages Workshop (2008). |
[7] | Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier, and John Irwin, “Aspect-oriented programming”, in Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP 1997), Lecture Notes in Computer Science, vol. 1241, pp 220-242 (1997). |
[8] | Martin Leucker and Christian Schallhart, “A brief account of runtime verification”, in The Journal of Logic and Algebraic Programming, vol. 78, pp 293-303 (2009). |
[9] | Daniel Lohmann, Georg Blaschke, and Olaf Spinczyk, “Generic advice: On the combination of AOP with generative programming in AspectC++”, in Proceedings of the Third International Conference on Generative Programming and Component Engineering (GPCE 2004), Lecture Notes in Computer Science, vol. 3286, pp 55-74 (2004). |
[10] | E. M. Novikov, “An approach to implementation of aspect-oriented programming for C”, in Programming and Computer Software, vol. 39, pp 194-206 (2013). |
[11] | Justin Seyster, Ketan Dixit, Xiaowan Huang, Radu Grosu, Klaus Havelund, Scott A. Smolka, Scott D. Stoller, and Erez Zadok, “Inter Aspect: Aspect-oriented instrumentation with GCC”, in Formal Methods in System Design, vol. 41, pp 295-320 (December 2012). |
[12] | Olaf Spinczyk and Daniel Lohmann, “The design and implementation of AspectC++”, in Knowledge-Based Systems, vol. 20, pp 636-651 (2007). |
[13] | Charles Zhang and Hans-Arno Jacobsen, “TinyC2: Towards building a dynamic weaving aspect language for C”, in Proceedings of the 2nd AOSD Workshop on Foundations of Aspect-Oriented Languages (March 2003). |
[14] | Zhe Chen, Zhemin Wang, Yunlong Zhu, Hongwei Xi, and Zhibin Yang, “Parametric runtime verification of C programs”, in Proceedings of the 22nd International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2016), Lecture Notess in Computer Science, vol. 9636, pp 299-315 (2016). |
APA Style
Pikeroen Olivier. (2016). An Approach About Monitoring Generic Properties on C Programs Using Aspect-Oriented Programming with ACC (AspeCtC). Software Engineering, 4(3), 50-58. https://doi.org/10.11648/j.se.20160403.11
ACS Style
Pikeroen Olivier. An Approach About Monitoring Generic Properties on C Programs Using Aspect-Oriented Programming with ACC (AspeCtC). Softw. Eng. 2016, 4(3), 50-58. doi: 10.11648/j.se.20160403.11
@article{10.11648/j.se.20160403.11, author = {Pikeroen Olivier}, title = {An Approach About Monitoring Generic Properties on C Programs Using Aspect-Oriented Programming with ACC (AspeCtC)}, journal = {Software Engineering}, volume = {4}, number = {3}, pages = {50-58}, doi = {10.11648/j.se.20160403.11}, url = {https://doi.org/10.11648/j.se.20160403.11}, eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.se.20160403.11}, abstract = {For systems which deal with serious or dangerous things (for example nuclear power plant), programs are constrained by legislation to be safe in any case, which requires verification process during the execution, in other words “Runtime Verification” (RV). The field of runtime verification has many different names: runtime monitoring, runtime checking, runtime result checking, runtime reflection, monitoring oriented programming, design by contract, runtime analysis, dynamic analysis, trace analysis, fault protection, etc. Aspect-oriented programming (AOP) is a useful paradigm for monitoring programs, even if it was not created for this purpose. Indeed, AOP tries to deal with crosscutting concerns (tangled and scattered codes) by “capturing” them within a new entity called aspect, and runtime verification properties are conceptually transversal to the code they verify, unavoidably resulting in such crosscutting codes. AOP is always used as an extension of an existing language. Hence it is necessary to design an aspect language extending the target language, and to use what is called a weaver, to realize a binding operation between the target program and the aspects. Thus, one can find many aspect-programming extensions (including an aspect language and an aspect weaver) for most programming languages. The first one to be developed was AspectJ, designed for Java, and which has been the best-known reference among aspect-oriented tools until now. We use an AspectJ-like tool, straight inspired from AspectJ but designed for C, called ACC, which is itself an improved version of AspectC. The purpose of this paper is to explore the possibility of implementing and monitoring generic (also called parameterized) verification properties, i.e. which could be used on any target code, with ACC through a basic example. As ACC, contrary to AspectJ, does not provide abstraction for aspects, which would have made generic monitoring an easy task, we tried to simulate abstraction by making use of macros in the aspect code, which boils down to monitor every parameterized property within one macro function. We will see that despite losses of expressiveness without complexification of the monitoring code, the method still allows monitoring generically any property which is already monitorable directly in ACC.}, year = {2016} }
TY - JOUR T1 - An Approach About Monitoring Generic Properties on C Programs Using Aspect-Oriented Programming with ACC (AspeCtC) AU - Pikeroen Olivier Y1 - 2016/06/08 PY - 2016 N1 - https://doi.org/10.11648/j.se.20160403.11 DO - 10.11648/j.se.20160403.11 T2 - Software Engineering JF - Software Engineering JO - Software Engineering SP - 50 EP - 58 PB - Science Publishing Group SN - 2376-8037 UR - https://doi.org/10.11648/j.se.20160403.11 AB - For systems which deal with serious or dangerous things (for example nuclear power plant), programs are constrained by legislation to be safe in any case, which requires verification process during the execution, in other words “Runtime Verification” (RV). The field of runtime verification has many different names: runtime monitoring, runtime checking, runtime result checking, runtime reflection, monitoring oriented programming, design by contract, runtime analysis, dynamic analysis, trace analysis, fault protection, etc. Aspect-oriented programming (AOP) is a useful paradigm for monitoring programs, even if it was not created for this purpose. Indeed, AOP tries to deal with crosscutting concerns (tangled and scattered codes) by “capturing” them within a new entity called aspect, and runtime verification properties are conceptually transversal to the code they verify, unavoidably resulting in such crosscutting codes. AOP is always used as an extension of an existing language. Hence it is necessary to design an aspect language extending the target language, and to use what is called a weaver, to realize a binding operation between the target program and the aspects. Thus, one can find many aspect-programming extensions (including an aspect language and an aspect weaver) for most programming languages. The first one to be developed was AspectJ, designed for Java, and which has been the best-known reference among aspect-oriented tools until now. We use an AspectJ-like tool, straight inspired from AspectJ but designed for C, called ACC, which is itself an improved version of AspectC. The purpose of this paper is to explore the possibility of implementing and monitoring generic (also called parameterized) verification properties, i.e. which could be used on any target code, with ACC through a basic example. As ACC, contrary to AspectJ, does not provide abstraction for aspects, which would have made generic monitoring an easy task, we tried to simulate abstraction by making use of macros in the aspect code, which boils down to monitor every parameterized property within one macro function. We will see that despite losses of expressiveness without complexification of the monitoring code, the method still allows monitoring generically any property which is already monitorable directly in ACC. VL - 4 IS - 3 ER -