Abstract
This work presents our approach to formally model the Swiftaid system design, a digital platform that enables donors to automatically add Gift Aid to donations made via card payments. Following principles of Behaviour-Driven Development, we use Gherkin to capture requirements specified in legislation, specifically the UK Charity (Gift Aid Declarations) Regulations 2016. The Gherkin scenarios provide a basis for subsequent formal modelling and analysis using Event-B, Rodin and ProB. Interactive model simulations assist communication between domain experts, software architects and other stakeholders during requirements capture and system design, enabling the emergent system behaviour to be validated. Our approach was employed within the development of the real Swiftaid product, launched by Streeva in February 2019. Our analysis helped conclude that there was not a strong enough business case for one of the features, whichwas shown to provide nominal user convenience at the expense of increased complexity. This work provides a case study in allying formal and agile software development to enable rapid development of robust software.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Abrial, J.-R., Butler, M., Hallerstede, S., Hoang, T.S., Mehta, F., Voisin, L.: Rodin: an open toolset for modelling and reasoning in Event-B. Int J Softw Tools Technol Transf 12(6), 447–466 (2010)
Abrial, J.-R.: The B-book: assigning programs to meanings. Cambridge University Press, Cambridge (1996)
Abrial, J.-R.: Modeling in EventB: system and software engineering. Cambridge University Press, Cambridge (2010)
Behave: behavior-driven development, python style. https://github.com/behave/behave. Accessed 24 May 2019
Carter J (2017) BHive: behaviour-driven development meets B-method. Ph.D. thesis, The University of Guelph
Common criteria for information technology security evaluation. V3.1r5. Technical report, Common Criteria (2017)
Cucumber: 10 minute tutorial. https://cucumber.io/docs/guides/10-minute-tutorial/. Accessed 24 May 2019
Cucumber: a tool that supports behaviour-driven development. https://github.com/cucumber/cucumber. Accessed 24 May 2019
Falampin, J., Le-Dang, H., Leuschel, M., Mokrani, M., Plagge, D.: Improving railway data validation with ProB, pp. 27–43. Springer, Berlin (2013)
Gherkin Reference: Cucumber. Accessed 24 May 2019
Gmehlich, R., Jones, C.: Experience of deployment in the automotive industry, pp. 13–26. Springer, Berlin (2013)
Hallerstede, S., Leuschel, M., Plagge, D.: Validation of formal models by refinement animation. Sci Comput Program 78(3), 272–292 (2013)
HMRC (2016) The donations to charity (gift aid declarations) regulations 2016. Statutory instruments
HMRC (2018a) Alternative method of VAT collection—split payment. Summary of responses
HMR (2018b) Charitable giving and gift aid. HMRC research report 482
HMRC (2018c) Measuring tax gaps 2018 edition. An official statistics release
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)
Hansen D, Schneider D, Leuschel M (2016) Using B and ProB for data validation projects. In: Proceedings ABZ 2016, pp 167–182. Springer International Publishing
Hoang, T.S., Schneider, S., Treharne, H., Williams, D.M.: Foundations for using linear temporal logic in Event-B refinement. Formal Asp Comput 28(6), 909–935 (2016)
Ilić, D., Laibinis, L., Latvala, T., Troubitsyna, E., Varpaaniemi, K.: Deployment in the space sector, pp. 45–62. Springer, Berlin (2013)
JBehave: a framework for behaviour-driven development. https://jbehave.org/. Accessed 24 May 2019
Leuschel, M., Butler, M.: ProB: A model checker for B. FME 2003: formal methods, pp. 855–874. Springer, Berlin (2003)
Larsen PG, Fitzgerald JS, Wolff S (2010) Are formal methods ready for agility? a reality check. Technical report no. CS-TR-1218, Newcastle University
Ladenberger L, Leuschel M (2016) BMotionWeb: A tool for rapid creation of formal prototypes. In: Software engineering and formal methods—14th international conference, SEFM 2016, Held as part of STAF 2016, Vienna, Austria, July 4–8, 2016, Proceedings, pp 403–417
Manifesto for agile software development. https://agilemanifesto.org/. Accessed 24 May 2019
Principles behind the agile manifesto. https://agilemanifesto.org/principles.html. Accessed 24 May 2019
North D (2006) Introducing behaviour-driven development (BDD). Better Software
Romanovsky, A., Thomas, M.: Industrial deployment of system engineering methods providing high dependability and productivity. Springer, Berlin (2013)
Siqueira FL, de Sousa TC, Silva PSM (2017) Using BDD and SBVR to refine business goals into an Event-B model: a research idea. In: 2017 IEEE/ACM 5th international FME workshop on formal methods in software engineering (FormaliSE), pp 31–36. IEEE
Snook C, Hoang TS, Dghyam D, Butler M, Fischer T, Schlick R, Wang K (2018) Behaviour-driven formal model development. In: Formal methods and software engineering, pp 21–36. Springer
Smart JF (2015) BDD in action: behavior-driven development for the whole software lifecycle. Manning
Streeva. Swiftaid. https://swiftaid.co.uk/. Accessed 09 July 2019
Schneider, S., Treharne, H., Wehrheim, H.: The behavioural semantics of Event-B refinement. Formal Asp Comput 26(2), 251–280 (2014)
Solis C, Wang X (2011) A study of the characteristics of behaviour driven development. In: 2011 37th EUROMICRO conference on software engineering and advanced applications, pp 383–387. IEEE
UKRI gateway to research: Swift Aid project reference 133294. https://gtr.ukri.org/projects?ref=133294. Accessed 24 May 2019
Woodcock, J., Davies, J.: Using Z: specification, refinement, and proof. Prentice Hall, Upper Saddle River (1996)
Williams, D.M., Darwish, S., Schneider, S., Michael, D.R.: Swiftaid rodin event-b models. Zonodo (2020). https://doi.org/10.5281/zenodo.3715494
Wieczorek, S., Kozyura, V., Wei, W., Roth, A., Stefanescu, A.: Business information sector, pp. 63–79. Springer, Berlin (2013)
Werth M, Leuschel M (2020) VisB: A lightweight tool to visualize formal models with SVG graphics. In: Proceedings ABZ 2020, LNCS
Acknowledgements
This work was funded by UKRI through the Innovate UK Swiftaid Project (Grant Number 133294). We thank Chris Chorley and Dr. François Dupressoir for contributing to the specification of Gherkin scenarios and Event-B modelling and we thank Dr. Benjamin Aziz and Dr. Philip Godsiff for insightful comments on an early draft of this paper. We also thank the anonymous reviewers for providing their essential critical insight.
Author information
Authors and Affiliations
Corresponding author
Additional information
Michael Butler
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Williams, D.M., Darwish, S., Schneider, S. et al. Legislation-driven development of a Gift Aid system using Event-B. Form Asp Comp 32, 251–273 (2020). https://doi.org/10.1007/s00165-020-00512-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-020-00512-5