Skip to main content

Req2Spec: Transforming Software Requirements into Formal Specifications Using Natural Language Processing

  • Conference paper
  • First Online:
Requirements Engineering: Foundation for Software Quality (REFSQ 2022)

Abstract

[Context and motivation] Requirement analysis and Test specification generation are critical activities in the Software Development Life Cycle (SDLC), which if not done correctly can lead to defects in the software system. Manually performing these tasks on Natural Language Requirements (NLR) is time consuming and error prone. [Question/problem] The problem is to facilitate the automation of these activities by transforming the NLR into Formal Specifications. [Principal ideas/results] In this paper we present Req2Spec, a Natural Language Processing (NLP) based pipeline that performs syntactic and semantic analysis on NLR to generate formal specifications that can be readily consumed by HANFOR, an industry scale Requirements analysis and Test specification generation tool. We considered 222 automotive domain software requirements at BOSCH, 71% of which were correctly formalized. [Contribution] Req2Spec will be an aid to stakeholders of the SDLC as it seamlessly integrates with HANFOR enabling automation.

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 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.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

References

  1. IEEE: IEEE Recommended Practice for Software Requirements Specifications. IEEE Std 830-1998, pp. 1–40 (1998). https://doi.org/10.1109/IEEESTD.1998.88286

  2. Fatwanto, A.: Software requirements specification analysis using natural language processing technique. In: 2013 International Conference on QiR, pp. 105–110. IEEE (2013)

    Google Scholar 

  3. Dalpiaz, F., van der Schalk, I., Lucassen, G.: Pinpointing ambiguity and incompleteness in requirements engineering via information visualization and NLP. In: Kamsties, E., Horkoff, J., Dalpiaz, F. (eds.) REFSQ 2018. LNCS, vol. 10753, pp. 119–135. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-77243-1_8

    Chapter  Google Scholar 

  4. Zhao, L., et al.: Natural language processing (NLP) for requirements engineering: a systematic mapping study. arXiv preprint arXiv:2004.01099 (2020)

  5. Gervasi, V., Riccobene, E.: From English to ASM: on the process of deriving a formal specification from a natural language one. Integration of Tools for Rigorous Software Construction and Analysis, p. 85 (2014)

    Google Scholar 

  6. Becker, S., et al.: Hanfor: semantic requirements review at scale. In: REFSQ Workshops (2021)

    Google Scholar 

  7. IBM Engineering Requirements Quality Assistant tool. https://www.ibm.com/in-en/products/requirements-quality-assistant. Accessed 13 Oct 2021

  8. QRA QVscribe tool. https://qracorp.com/qvscribe/. Accessed 13 Oct 2021

  9. Dwarakanath, A., Sengupta, S.: Litmus: generation of test cases from functional requirements in natural language. In: Bouma, G., Ittoo, A., Métais, E., Wortmann, H. (eds.) NLDB 2012. LNCS, vol. 7337, pp. 58–69. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31178-9_6

    Chapter  Google Scholar 

  10. Nayak, A., et al.: Knowledge graph from informal text: architecture, components, algorithms and applications. In: Johri, P., Verma, J.K., Paul, S. (eds.) Applications of Machine Learning. AIS, pp. 75–90. Springer, Singapore (2020). https://doi.org/10.1007/978-981-15-3357-0_6

    Chapter  Google Scholar 

  11. Nayak, A., Kesri, V., Dubey, R.K.: Knowledge graph based automated generation of test cases in software engineering. In: Proceedings of the 7th ACM IKDD CoDS and 25th COMAD, pp. 289–295 (2020)

    Google Scholar 

  12. Kesri, V., Nayak, A., Ponnalagu, K.: AutoKG-an automotive domain knowledge graph for software testing: a position paper. In: 2021 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 234–238. IEEE (2021)

    Google Scholar 

  13. Böschen, M., Bogusch, R., Fraga, A., Rudat, C.: Bridging the gap between natural language requirements and formal specifications. In: REFSQ Workshops (2016)

    Google Scholar 

  14. Fatwanto, A.: Translating software requirements from natural language to formal specification. In: 2012 IEEE International Conference on Computational Intelligence and Cybernetics (CyberneticsCom), pp. 148–152. IEEE (2012)

    Google Scholar 

  15. Giannakopoulou, D., Pressburger, T., Mavridou, A., Schumann, J.: Generation of formal requirements from structured natural language. In: Madhavji, N., Pasquale, L., Ferrari, A., Gnesi, S. (eds.) REFSQ 2020. LNCS, vol. 12045, pp. 19–35. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-44429-7_2

    Chapter  Google Scholar 

  16. Langenfeld, V., Dietsch, D., Westphal, B., Hoenicke, J., Post, A.: Scalable analysis of real-time requirements. In: 2019 IEEE 27th International Requirements Engineering Conference (RE), pp. 234–244. IEEE (2019)

    Google Scholar 

  17. Moitra, A., et al.: Towards development of complete and conflict-free requirements. In: 2018 IEEE 26th International Requirements Engineering Conference (RE), pp. 286–296. IEEE (2018)

    Google Scholar 

  18. Fifarek, A.W., Wagner, L.G., Hoffman, J.A., Rodes, B.D., Aiello, M.A., Davis, J.A.: SpeAR v2.0: formalized past LTL specification and analysis of requirements. In: Barrett, C., Davies, M., Kahsai, T. (eds.) NFM 2017. LNCS, vol. 10227, pp. 420–426. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-57288-8_30

    Chapter  Google Scholar 

  19. Post, A., Hoenicke, J.: Formalization and analysis of real-time requirements: a feasibility study at BOSCH. In: Joshi, R., Müller, P., Podelski, A. (eds.) VSTTE 2012. LNCS, vol. 7152, pp. 225–240. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-27705-4_18

    Chapter  Google Scholar 

  20. Konrad, S., Cheng, B.H.: Real-time specification patterns. In: Proceedings of the 27th International Conference on Software Engineering, pp. 372–381 (2005)

    Google Scholar 

  21. HANFOR tool. https://ultimate-pa.github.io/hanfor/. Accessed 13 Oct 2021

  22. Beltagy, I., Lo, K., Cohan, A.: SciBERT: a pretrained language model for scientific text. In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 3615–3620 (2019)

    Google Scholar 

  23. Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014)

  24. Nayak, A., Timmapathini, H.P.: Wiki to automotive: understanding the distribution shift and its impact on named entity recognition. arXiv preprint arXiv:2112.00283 (2021)

  25. Angeli, G., Premkumar, M.J.J., Manning, C.D.: Leveraging linguistic structure for open domain information extraction. In: Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 344–354 (2015)

    Google Scholar 

  26. Del Corro, L., Gemulla, R.: ClausIE: clause-based open information extraction. In: Proceedings of the 22nd International Conference on World Wide Web, pp. 355–366 (2013)

    Google Scholar 

  27. Manning, C.D., Surdeanu, M., Bauer, J., Finkel, J.R., Bethard, S., McClosky, D.: The Stanford CoreNLP natural language processing toolkit. In: Proceedings of 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pp. 55–60 (2014)

    Google Scholar 

  28. Reimers, N., Gurevych, I.: Sentence-BERT: sentence embeddings using siamese BERT-networks. arXiv preprint arXiv:1908.10084 (2019)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anmol Nayak .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Nayak, A., Timmapathini, H.P., Murali, V., Ponnalagu, K., Venkoparao, V.G., Post, A. (2022). Req2Spec: Transforming Software Requirements into Formal Specifications Using Natural Language Processing. In: Gervasi, V., Vogelsang, A. (eds) Requirements Engineering: Foundation for Software Quality. REFSQ 2022. Lecture Notes in Computer Science, vol 13216. Springer, Cham. https://doi.org/10.1007/978-3-030-98464-9_8

Download citation

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

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-98463-2

  • Online ISBN: 978-3-030-98464-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics