Skip to main content

Trigger2B: A Tool Generating Event-B Models from Database Triggers

  • Conference paper
  • First Online:
Context-Aware Systems and Applications, and Nature of Computation and Communication (ICCASA 2020, ICTCC 2020)

Abstract

Triggers are commonly used many traditional database applications that can be checked if they are correct after execution or manual inspection. Formal methods are techniques complementing to testing that ensure the correctness of software. In practical aspect, one limitation of formal techniques is the complexity that makes software developers lazy to use in the development. This paper introduces a tool named Trigger2B which partly supports for translating DML triggers to Event-B models. From the targeted model, we can verify the data constraints and detect infinite loops of trigger execution with RODIN. Finally, we take an example for illustration purpose. The proposed tool overcomes the complexity of formal modeling and makes them practical in the development.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The Trigger2B source code can be found at: https://github.com/anhfit/Trigger2B.

References

  1. Anltr (2014). http://www.antlr.org

  2. String template (2014). http://www.stringtemplate.org

  3. Abrial, J.-R.: Modeling in Event-B - System and Software Engineering. Cambridge University Press, Cambridge (2010)

    Book  Google Scholar 

  4. Abrial, J.-R., Butler, M., Hallerstede, S., Voisin, L.: An open extensible tool environment for Event-B. In: Liu, Z., He, J. (eds.) ICFEM 2006. LNCS, vol. 4260, pp. 588–605. Springer, Heidelberg (2006). https://doi.org/10.1007/11901433_32

    Chapter  Google Scholar 

  5. Al-Brashdi, A., Butler, M., Rezazadeh, A.: UB2DB Rodin plug-in for automated database code generation. In: 6th International ABZ Conference ASM, Alloy, B, TLA, VDM, Z, 2018Programme (2018)

    Google Scholar 

  6. Baralis, E.: Rule analysis. In: Paton, N.W. (ed.) Active Rules in Database Systems. MCS, pp. 51–67. Springer, New York (1999). https://doi.org/10.1007/978-1-4419-8656-6_3

    Chapter  Google Scholar 

  7. Chavarría-Báez, L., Li, X.: Verification of active rule base via conditional colored petri nets. In: SMC, pp. 343–348 (2007)

    Google Scholar 

  8. Chavarriéa-Baéez, L., Li, X.: Termination analysis of active rules - a petri net based approach. In: IEEE International Conference on Systems, Man and Cybernetics, SMC 2009, pp. 2205–2210, October 2009

    Google Scholar 

  9. Choi, E.-H., Tsuchiya, T., Kikuno, T.: Model checking active database rules. Technical report, AIST CVS, Osaka University, Japan (2006)

    Google Scholar 

  10. Choi, E.-H., Tsuchiya, T., Kikuno, T.: Model checking active database rules under various rule processing strategies. IPSJ Digit. Cour. 2, 826–839 (2006)

    Article  Google Scholar 

  11. Ghazi, T., Huth, M.: An abstraction-based analysis of rule systems for active database management systems. Technical report, Kansas State University, April 1998. Technical report KSU-CIS-98-6, pp15

    Google Scholar 

  12. Ksystra, K., Triantafyllou, N., Stefaneas, P.: On verifying reactive rules using rewriting logic. In: Bikakis, A., Fodor, P., Roman, D. (eds.) RuleML 2014. LNCS, vol. 8620, pp. 67–81. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-09870-8_5

    Chapter  Google Scholar 

  13. Le, H.A., Truong, N.T.: Modeling and verifying DML triggers using Event-B. In: Selamat, A., Nguyen, N.T., Haron, H. (eds.) ACIIDS 2013, Part II. LNCS (LNAI), vol. 7803, pp. 539–548. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-36543-0_55

    Chapter  Google Scholar 

  14. Lee, S.-Y., Ling, T.-W.: Are your trigger rules correct? In: Proceedings of the 9th International Workshop on Database and Expert Systems Applications, DEXA 1998, pp. 837–842. IEEE Computer Society, Washington, D.C. (1998)

    Google Scholar 

  15. Lee, S.-Y., Ling, T.-W.: Verify updating trigger correctness. In: Bench-Capon, T.J.M., Soda, G., Tjoa, A.M. (eds.) DEXA 1999. LNCS, vol. 1677, pp. 382–391. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48309-8_36

    Chapter  Google Scholar 

  16. Li, X., Medina, J., Chapa, S.: Applying petri nets in active database systems. IEEE Trans. Syst. Man Cybern. Part C Appl. Rev. 37(4), 482–493 (2007)

    Article  Google Scholar 

  17. Manicka Chezian, R., Devi, T.: A new algorithm to detect the non-termination of triggers in active databases. Int. J. Adv. Netw. Appl. 3(2), 1098–1104 (2011)

    Google Scholar 

  18. Zhang, J., Moyne, J., Tilbury, D.: Verification of ECA rule based management and control systems. In: IEEE International Conference on Automation Science and Engineering, CASE 2008, pp. 1–7, August 2008

    Google Scholar 

Download references

Acknowledgments

This work is supported by the project no. CT.2019.01.05 granted by Ministry of Education and Training (MOET).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hong Anh Le .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Le, H.A. (2021). Trigger2B: A Tool Generating Event-B Models from Database Triggers. In: Vinh, P.C., Rakib, A. (eds) Context-Aware Systems and Applications, and Nature of Computation and Communication. ICCASA ICTCC 2020 2020. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 343. Springer, Cham. https://doi.org/10.1007/978-3-030-67101-3_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-67101-3_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-67100-6

  • Online ISBN: 978-3-030-67101-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics