Natural Language Processing for Requirements Formalization: How to Derive New Approaches?

  • Chapter
  • First Online:
Concurrency, Specification and Programming

Part of the book series: Studies in Computational Intelligence ((SCI,volume 1091))

Abstract

It is a long-standing desire of industry and research to automate the software development and testing process as much as possible. Model-based design and testing methods have been developed to automate several process steps and handle the growing complexity and variability of software systems. However, major effort is still required to create specification models from a large set of functional requirements provided in natural language. Numerous approaches based on natural language processing (NLP) have been proposed in the literature to generate requirements models using mainly syntactic properties. Recent advances in NLP show that semantic quantities can also be identified and used to provide better assistance in the requirements formalization process. In this work, we present and discuss principal ideas and state-of-the-art methodologies from the field of NLP in order to guide the readers on how to derive new requirements formalization approaches according to their specific use case and needs. We demonstrate our approaches on two industrial use cases from the automotive and railway domains and show that the use of current pre-trained NLP models requires less effort to adapt to a specific use case. Furthermore, we outline findings and shortcomings of this research area and propose some promising future developments.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 139.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 179.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Free ship** worldwide - see info
Hardcover Book
USD 179.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free ship** 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.

    https://github.com/ifak-prototypes/nlp_reform.

  2. 2.

    https://spacy.io/, https://explosion.ai/demos/displacy.

  3. 3.

    https://universaldependencies.org/u/dep/, https://universaldependencies.org/u/pos/.

  4. 4.

    https://sites.astro.caltech.edu/~pls/roget/.

  5. 5.

    https://stanfordnlp.github.io/CoreNLP/coref.html.

  6. 6.

    https://demo.allennlp.org/coreference-resolution.

  7. 7.

    http://wordnetweb.princeton.edu/perl/webwn.

  8. 8.

    https://demo.allennlp.org/semantic-role-labeling.

  9. 9.

    https://sequencediagram.org/.

  10. 10.

    https://www.xivt.org/.

  11. 11.

    https://github.com/, or similar platforms.

  12. 12.

    AUTOSAR, https://www.autosar.org/nc/document-search/.

References

  1. Alhoshan, W., Zhao, L., Batista-Navarro, R.: Using semantic frames to identify related textual requirements: An initial validation. In: ESEM ’18, pp. 1–2. ACM (2018). https://doi.org/10.1145/3239235.3267441

  2. Allala, S.C., Sotomayor, J.P., Santiago, D., King, T.M., Clarke, P.J.: Towards transforming user requirements to test cases using MDE and NLP. In: COMPSAC 2019, pp. 350–355. IEEE (2019). https://doi.org/10.1109/COMPSAC.2019.10231

  3. Ammann, P., Offutt, J.: Introduction to Software Testing, 2nd edn. Cambridge University Press (2017). https://doi.org/10.1017/9781316771273

  4. Björkelund, A., Hafdell, L., Nugues, P.: Multilingual semantic role labeling. In: CoNLL 2009, pp. 43–48. ACL (2009). https://aclanthology.org/W09-1206

  5. Bokaei Hosseini, M., Breaux, T.D., Niu, J.: Inferring ontology fragments from semantic role ty** of lexical variants. In: REFSQ 2018, LNCS, vol. 10753, pp. 39–56. Springer (2018). https://doi.org/10.1007/978-3-319-77243-1_3

  6. Bonial, C., Bonn, J., Conger, K., Hwang, J.D., Palmer, M.: PropBank: Semantics of new predicate types. In: LREC 2014, pp. 3013–3019 (2014). https://aclanthology.org/L14-1011/

  7. de Brock, B., Suurmond, C.: NLG4RE: How NL generation can support validation in RE. In: NLP4RE’22, CEUR-WS.org (2022). http://ceur-ws.org/Vol-3122/NLP4RE-paper-2.pdf

  8. Carvalho, G., Barros, F., Carvalho, A., Cavalcanti, A., Mota, A., Sampaio, A.: NAT2TEST tool: From natural language requirements to test cases based on CSP. In: SEFM 2015, LNPSE, vol. 9276, pp. 283–290. Springer (2015). https://doi.org/10.1007/978-3-319-22969-0_20

  9. Cherukuri, H., Ferrari, A., Spoletini, P.: Towards explainable formal methods: From LTL to natural language with neural machine translation. In: REFSQ 2022, LNCS, vol. 13216, pp. 79–86. Springer (2022). https://doi.org/10.1007/978-3-030-98464-9_7

  10. Diamantopoulos, T., Roth, M., Symeonidis, A., Klein, E.: Software requirements as an application domain for natural language processing. Lang. Resour. Eval. 51(2), 495–524 (2017). https://doi.org/10.1007/s10579-017-9381-z

    Article  Google Scholar 

  11. Farrell, M., Luckcuck, M., Sheridan, O., Monahan, R.: FRETting about requirements: Formalised requirements for an aircraft engine controller. In: REFSQ 2022, LNCS, vol. 13216, pp. 96–111. Springer (2022). https://doi.org/10.1007/978-3-030-98464-9_9

  12. Fischbach, J., Vogelsang, A., Spies, D., Wehrle, A., Junker, M., Freudenstein, D.: SPECMATE: Automated creation of test cases from acceptance criteria. In: ICST 2020, pp. 321–331. IEEE (2020). https://doi.org/10.1109/ICST46399.2020.00040

  13. Fritz, S., Srikanthan, V., Arbai, R., Sun, C., Ovtcharova, J., Wicaksono, H.: Automatic information extraction from text-based requirements. Int. J. Knowl. Eng. 7(1), 8–13 (2021). https://doi.org/10.18178/ijke.2021.7.1.134

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

  15. Gröpler, R., Sudhi, V., Calleja García, E.J., Bergmann, A.: NLP-based requirements formalization for automatic test case generation. In: CS &P’21, CEUR-WS.org, pp. 18–30 (2021). http://ceur-ws.org/Vol-2951/paper15.pdf

  16. Gröpler, R., Sudhi, V., Kutty, L., Smalley, D.: Automated requirement formalization using product design specifications. In: NLP4RE’22, CEUR-WS.org (2022). http://ceur-ws.org/Vol-3122/NLP4RE-paper-1.pdf

  17. Grujic, D., Henning, T., García, E.J.C., Bergmann, A.: Testing a battery management system via criticality-based rare event simulation. In: MSCPES’21, pp. 1–7. ACM (2021). https://doi.org/10.1145/3470481.3472701

  18. Hassert, N., Ménard, P.A., Galy, E.: UD on software requirements: Application and challenges. In: UDW 2021, pp. 62–74. ACL (2021). https://aclanthology.org/2021.udw-1.5/

  19. Herwanto, G.B., Quirchmayr, G., Tjoa, A.M.: A named entity recognition based approach for privacy requirements engineering. In: REW 2021, pp. 406–411. IEEE (2021). https://doi.org/10.1109/REW53955.2021.00072

  20. Koscinski, V., Gambardella, C., Gerstner, E., Zappavigna, M., Cassetti, J., Mirakhorli, M.: A natural language processing technique for formalization of systems requirement specifications. In: REW 2021, pp. 350–356. IEEE (2021). https://doi.org/10.1109/REW53955.2021.00062

  21. Li, W., Hayes, J.H., Truszczyńki, M.: Towards more efficient requirements formalization: A study. In: REFSQ 2015, LNCS, vol. 9013, pp. 181–197. Springer (2015). https://doi.org/10.1007/978-3-319-16101-3_12

  22. Ling, W., Blunsom, P., Grefenstette, E., Hermann, K.M., Kočisky̌, T., Wang, F., Senior, A.: Latent predictor networks for code generation. In: ACL 2016, pp. 599–609 (2016). https://doi.org/10.18653/v1/P16-1057

  23. Mahmud, N., Seceleanu, C., Ljungkrantz, O.: Specification and semantic analysis of embedded systems requirements: From description logic to temporal logic. In: SEFM 2017, LNCS, vol. 10469, pp. 332–348. Springer (2017). https://doi.org/10.1007/978-3-319-66197-1_21

  24. Malik, G., Cevik, M., Khedr, Y., Parikh, D., Başar, A.: Named entity recognition on software requirements specification documents. In: Canadian AI 2021. CAIAC (2021). https://doi.org/10.21428/594757db.507e7951

  25. de Marneffe, M.C., Manning, C.D., Nivre, J., Zeman, D.: Universal dependencies. Comput. Linguist. 1–54 (2021). https://doi.org/10.1162/coli_a_00402

  26. Màrquez, L., Carreras, X., Litkowski, K.C., Stevenson, S.: Semantic role labeling: An introduction to the special issue. Comput. Linguist. 34(2), 145–159 (2008). https://doi.org/10.1162/coli.2008.34.2.145

    Article  Google Scholar 

  27. Mavin, A., Wilkinson, P., Harwood, A., Novak, M.: Easy approach to requirements syntax (EARS). In: RE ’09, pp. 317–322. IEEE (2009). https://doi.org/10.1109/RE.2009.9

  28. Nayak, A., Timmapathini, H.P., Murali, V., Ponnalagu, K., Venkoparao, V.G., Post, A.: Req2Spec: Transforming software requirements into formal specifications using natural language processing. In: REFSQ 2022, LNCS, vol. 13216, pp. 87–95. Springer (2022). https://doi.org/10.1007/978-3-030-98464-9_8

  29. Nicolás, J., Toval, A.: On the generation of requirements specifications from software engineering models: A systematic literature review. Inf. Softw. Technol. 51(9), 1291–1307 (2009). https://doi.org/10.1016/j.infsof.2009.04.001

    Article  Google Scholar 

  30. Rabinovich, M., Stern, M., Klein, D.: Abstract syntax networks for code generation and semantic parsing. In: ACL 2017, pp. 1139–1149 (2017). https://doi.org/10.18653/v1/P17-1105

  31. Ratcliffe, S. (ed.): Oxford Essential Quotations, 6th edn. Oxford reference online. Oxford University Press (2018). https://doi.org/10.1093/acref/9780191866692.001.0001

  32. Riebisch, M., Hübner, M.: Traceability-driven model refinement for test case generation. In: ECBS’05, pp. 113–120. IEEE (2005). https://doi.org/10.1109/ECBS.2005.72

  33. Rupp, C., SOPHISTen: Requirements-Engineering und -Management, 7th edn. Hanser (2021). https://doi.org/10.3139/9783446464308

  34. Sengupta, S., Ramnani, R.R., Das, S., Chandran, A.: Verb-based semantic modelling and analysis of textual requirements. In: ISEC ’15, pp. 30–39. ACM (2015). https://doi.org/10.1145/2723742.2723745

  35. Shi, P., Lin, J.: Simple BERT models for relation extraction and semantic role labeling (2019). https://arxiv.org/abs/1904.05255. Pre-print

  36. Simonson, E.: An MBD adoption story from Bombardier Transportation. In: MATLAB EXPO 2018 Sweden (2018). https://www.matlabexpo.com/se/2018/proceedings/

  37. Sinha, A., Paradkar, A., Kumanan, P., Boguraev, B.: A linguistic analysis engine for natural language use case description and its application to dependability analysis in industrial use cases. In: DSN 2009, pp. 327–336. IEEE (2009). https://doi.org/10.1109/DSN.2009.5270320

  38. Tichy, W.F., Landhäußer, M., Körner, S.J.: nlrpBENCH: A benchmark for natural language requirements processing. In: SE 2015, pp. 159–164. GI (2015). https://dl.gi.de/handle/20.500.12116/2542

  39. Wang, C., Pastore, F., Goknil, A., Briand, L.C.: Automatic generation of acceptance test cases from use case specifications: An NLP-based approach. IEEE Trans. Softw. Eng. 48(2), 585–616 (2022). https://doi.org/10.1109/tse.2020.2998503

    Article  Google Scholar 

  40. Zhao, L., Alhoshan, W., Ferrari, A., Letsholo, K.J., Ajagbe, M.A., Chioasca, E.V., Batista-Navarro, R.T.: Natural language processing for requirements engineering: A systematic map** study. ACM Comput. Surv. 54(3), 1–41 (2021). https://doi.org/10.1145/3444689

    Article  Google Scholar 

Download references

Acknowledgements

This research was funded by the German Federal Ministry of Education and Research (BMBF) within the ITEA projects XIVT (grant no. 01IS18059E) and SmartDelta (grant no. 01IS21083E). We thank AKKA Germany GmbH and Alstom for providing industrial use cases for the demonstration of the presented methods. We are grateful to Prof. Holger Schlingloff from Fraunhofer FOKUS/HU Berlin for his valuable recommendations.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Robin Gröpler .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Sudhi, V., Kutty, L., Gröpler, R. (2023). Natural Language Processing for Requirements Formalization: How to Derive New Approaches?. In: Schlingloff, BH., Vogel, T., Skowron, A. (eds) Concurrency, Specification and Programming. Studies in Computational Intelligence, vol 1091. Springer, Cham. https://doi.org/10.1007/978-3-031-26651-5_1

Download citation

Publish with us

Policies and ethics

Navigation