Combining Formal Methods and Aspects for Specifying and Enforcing Architectural Invariants

  • Slim Kallel
  • Anis Charfi
  • Mira Mezini
  • Mohamed Jmaiel
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4467)

Abstract

Several types of invariants should be maintained when the architecture of a software application evolves. To specify these invariants in a reliable way, formal methods are used. However, current approaches suffer from two limitations. First, they support only certain types of invariants. Second, checking and enforcing the invariants is generally done by adding appropriate logic to the application implementation in a manual way, which is error-prone and may lead to architectural erosion.

In this paper, we combine the Z notation and Petri nets to specify formally architectural invariants in distributed object-oriented software applications. Moreover, we use a generative aspect-based approach to checking and enforcing these invariants. Thus, we bridge the gap between the formal specification and the implementation. Our approach brings several other benefits as the code that checks and enforces invariants is generated automatically and well-modularized in aspects.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.M., Irwin, J.: Aspect-Oriented Programming. In: Weske, M., Liggesmeyer, P. (eds.) NODe 2004. LNCS, vol. 3263, pp. 220–242. Springer, Heidelberg (1997)Google Scholar
  2. 2.
    Spivey, M.: The Z notation: a reference manual, 2nd edn. Prentice Hall International Ltd., Hertfordshire (1992)Google Scholar
  3. 3.
    Meisels, I., Saaltink, M.: The Z/EVES Reference Manual (for Version 1.5). Reference manual, ORA Canada (1997)Google Scholar
  4. 4.
    Petri, C.A.: Kommunikation mit Automaten. PhD thesis, Darmstadt University of Technology, Darmstadt, Germany (1961)Google Scholar
  5. 5.
    Jacky, J.: The Way of Z: Practical Programming with Formal Methods. Cambridge University Press, Cambridge (1997)Google Scholar
  6. 6.
    Agha, G.A., De Cindio, F., Rozenberg, G. (eds.): Concurrent Object-Oriented Programming and Petri Nets. LNCS, vol. 2001. Springer, Heidelberg (2001)MATHGoogle Scholar
  7. 7.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)Google Scholar
  8. 8.
    Pellegrini, M.C., Riveill, M.: Component Management in a Dynamic Architecture. The Journal of Supercomputing 24, 151–159 (2003)MATHCrossRefGoogle Scholar
  9. 9.
    Georgiadis, I., Magee, J., Kramer, J.: Self-organising software architectures for distributed systems. In: Proceedings of the first workshop on Self-healing systems, pp. 33–38. ACM Press, New York (2002)CrossRefGoogle Scholar
  10. 10.
    Medvidovic, N., Egyed, A., Gruenbacher, P.: Stemming Architectural Erosion by Coupling Architectural Discovery and Recovery. In: Proc. of the 2nd International Software Requirements to Architectures Workshop, Portland, Oregon (2003)Google Scholar
  11. 11.
    Bockisch, C., Kanthak, S., Haupt, M., Arnold, M., Mezini, M.: Efficient control flow quantification. In: Proc. of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pp. 125–138. ACM Press, New York (2006)CrossRefGoogle Scholar
  12. 12.
    Bockisch, C., Arnold, M., Dinkelaker, T., Mezini, M.: Adapting virtual machine techniques for seamless aspect support. In: Proc. of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pp. 109–124. ACM Press, New York (2006)CrossRefGoogle Scholar
  13. 13.
    Laddad, R.: Aspect Oriented Refactoring. Addison-Wesley Professional, Reading (2006)Google Scholar
  14. 14.
    Shomrat, M., Yehudai, A.: Obvious or not?: regulating architectural decisions using aspect-oriented programming. In: Proc. of the 1st international conference on Aspect-oriented software development, pp. 3–9. ACM Press, New York (2002)CrossRefGoogle Scholar
  15. 15.
    Douence, R., Fradet, P., Sudholt, M.: A Framework for the Detection and Resolution of Aspect Interactions. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 173–188. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  16. 16.
    Gasevic, D., Devedzic, D.: Software Support for Teaching Petri Nets: P3. In: Proc. of the 3rd IEEE International Conference on Advanced Learning Technologies, Athens, Greece, pp. 300–301. IEEE Computer Society Press, Los Alamitos (2003)CrossRefGoogle Scholar
  17. 17.
    Medvidovic, N., Taylor, R.N.: A Classification and Comparison Framework for Software Architecture Description Languages. IEEE Transactions on Software Engineering 26, 70–93 (2000)CrossRefGoogle Scholar
  18. 18.
    Kacem, M.H., Jmaiel, M., Kacem, A.H., Drira, K.: Evaluation and Comparison of ADL Based Approaches for the Description of Dynamic of Software Architectures. In: Proc. of the Seventh International Conference on Enterprise Information Systems, Miami, pp. 189–195 (2005)Google Scholar
  19. 19.
    Endler, M., Wei, J.: Programming generic dynamic reconfigurations for distributed applications. In: Proc. of the International Workshop on Configurable Distributed Systems, pp. 68–79 (1992)Google Scholar
  20. 20.
    Abowd, G., Allen, R., Garlan, D.: Formalizing style to understand descriptions of software architecture. ACM Transactions on Software Engineering and Methodology 4, 319–364 (1995)CrossRefGoogle Scholar
  21. 21.
    Aguirre, N., Maibaum, T.: A Temporal Logic Approach to the Specification of Reconfigurable Component-Based Systems. In: Proc. of the 17th IEEE International Conference on Automated Software Engineering, Edinburgh, Scotland, pp. 271–274. IEEE Computer Society Press, Los Alamitos (2002)CrossRefGoogle Scholar
  22. 22.
    Métayer, D.L.: Describing software architecture styles using graph grammars. IEEE Transactions on Software Engineering 24, 521–553 (1998)CrossRefGoogle Scholar
  23. 23.
    Berry, G., Boudol, G.: The chemical abstract machine. In: Proc. of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 81–94. ACM Press, New York (1990)CrossRefGoogle Scholar
  24. 24.
    Hilderink, G.H.: Graphical modelling language for specifying concurrency based on CSP. IEE Proceedings - Software 150, 108–120 (2003)CrossRefGoogle Scholar
  25. 25.
    Oquendo, F.: π-method: a model-driven formal method for architecture-centric software engineering. SIGSOFT Software Engineering Notes 31, 1–13 (2006)Google Scholar
  26. 26.
    Galloway, A., Stoddart, B.: An operational semantics for ZCCS. In: Proc. of the International Conference of Formal Engineering Methods, IEEE Computer Society Press, Los Alamitos (1997)Google Scholar
  27. 27.
    Heisel, M., Shl, C.: Formal specification of safety-critical software with Z and real-time CSP. In: Proc. of the 15th International Conference on Computer Safety, Reliability and Security, Vienna, Austria, pp. 31–46. Springer, Heidelberg (1996)Google Scholar
  28. 28.
    Smith, G.: A Semantic Integration of Object-Z and CSP for the Specification of Concurrent Systems. In: Fitzgerald, J., Jones, C.B, Lucas, P. (eds.) FME 1997. LNCS, vol. 1313, pp. 62–81. Springer, Heidelberg (1997)Google Scholar
  29. 29.
    Bussow, R., Geisler, R., Grieskamp, W., Klar, M.: The μSZ Notation Version 1.0. Technical report, TU Berlin, Gemany (1997)Google Scholar
  30. 30.
    He, X., Yu, H., Shi, T., Ding, J., Deng, Y.: Formally analyzing software architectural specifications using SAM. Journal System Software 71, 11–29 (2004)CrossRefGoogle Scholar
  31. 31.
    Regayeg, A., Kallel, S., Kacem, A.H., Jmaiel, M.: ForMAAD Method: An Experimental Design for Air Traffic Control. International Transactions on Systems Science and Applications 1, 327–334 (2006)Google Scholar
  32. 32.
    Rodriguez-Fortiz, M., Parets-Llorca, J.: Using predicate temporal logic and coloured Petri nets to specifying integrity restrictions in the structural evolution of temporal active systems. In: Proc. of the international symposium on principles of software evolution, pp. 83–87 (2000)Google Scholar
  33. 33.
    Ramkarthik, S., Zhang, C.: Generating Java Skeletal Code with Design Contracts from Specifications in a Subset of Object Z. In: Proc. of the 5th IEEE/ACIS International Conference on Computer and Information Science, Honolulu, Hawaii, pp. 405–411. IEEE Computer Society Press, Los Alamitos (2006)CrossRefGoogle Scholar
  34. 34.
    Jia, X., Skevoulis, S.: Code Synthesis Based on Object-Oriented Design Models and Formal Specifications. In: Proc. of the 22nd International Computer Software and Applications Conference, Washington, DC, pp. 393–399. IEEE Computer Society Press, Los Alamitos (1998)Google Scholar
  35. 35.
    Bodden, E.: Efficient and Expressive Runtime Verification for Java. In: Proc. of the Grand finals of the ACM Student Research Competition, San Francisco, ACM Press, New York (2005)Google Scholar
  36. 36.
    Maoz, S., Harel, D.: From multi-modal scenarios to code: compiling LSCs into aspectJ. In: Proc. of the 14th ACM SIGSOFT international symposium on Foundations of software engineering, pp. 219–230. ACM Press, New York (2006)CrossRefGoogle Scholar
  37. 37.
    Ostermann, K., Mezini, M., Bockisch, C.: Expressive Pointcuts for Increased Modularity. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 214–240. Springer, Heidelberg (2005)Google Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Slim Kallel
    • 1
    • 2
  • Anis Charfi
    • 1
  • Mira Mezini
    • 1
  • Mohamed Jmaiel
    • 2
  1. 1.Software Technology Group, Darmstadt University of TechnologyGermany
  2. 2.ReDCAD Laboratory, National Engineering School of SfaxTunisia

Personalised recommendations