journal article·2022-07-30Open access

REX: General-Purpose CNL with Code Generation Support

Adriano Carvalho

Applied Sciences· Volume 12· Issue 15

Abstract

Controlled natural languages (CNLs) have been proposed to address some of the issues of natural language when it is used to express requirements. CNLs, however, are based on formal grammar, which can easily become complex, hard to read, and especially hard to write, and the implementation of support tools can also demand a significant effort. Moreover, unanticipated constructions cannot be handled or have to be handled in unexpected and cumbersome ways. In this article, we present REX, a CNL with a simple grammar that is, thus, easy to understand and easy to support, but still general purpose. To accomplish this, instead of trying to support every conceivable construction and imposing a language on the users, through a small but comprehensive set of rules and through patterns, users specify their own language and how natural it is. Another of the benefits of CNLs is the possibility to automate the transformation of a text or specification into something useful, thereby reducing manual labor and transformation errors. In this article, we also present the support tools that were used to transform a REX text into code and a complete application. It is also shown that this CNL and its support tools can be easily adapted to suit different needs.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Software Engineering Research · Model-Driven Software Engineering Techniques · Advanced Software Engineering Methodologies

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Centro Algoritmi, Universidade do Minho, 4800-058 Guimarães, Portugal

References (27)

Show source-provided references
1. Stecklein, J.M., Dabney, J., Dick, B., Haskins, B., Lovell, R., and Moroney, G. (2014, January 15–18). Error cost escalation through the project life cycle. Proceedings of the 14th Annual International Symposium, Marseille, France.
2. A systematic review of transformation approaches between user requirements and analysis models10.1007/s00766-010-0111-y ↗
3. Tommila, T., and Pakonen, A. (2014). Controlled Natural Language Requirements in the Design and Analysis of Safety Critical I&C Systems, VTT Technical Research Centre of Finland.
4. Fuchs, N.E., Kaljurand, K., and Kuhn, T. (2008). Attempto controlled english for knowledge representation. Reasoning Web, Springer.10.1007/978-3-540-85658-0_3 ↗
5. Mohanani, R., Ralph, P., Turhan, B., and Mandic, V. (2021). How Templated Requirements Specifications Inhibit Creativity in Software Engineering. IEEE Trans. Softw. Eng.10.1109/TSE.2021.3112503 ↗
6. Young, R.R. (2001). Effective Requirements Practices, Addison-Wesley Professional.
7. Sadoun, D., Dubois, C., Ghamri-Doudane, Y., and Grau, B. (2014, January 18–20). Formal rule representation and verification from natural language requirements using an ontology. Proceedings of the International Symposium on Rules and Rule Markup Languages for the Semantic Web, Prague, Czech Republic.10.1007/978-3-319-09870-8_17 ↗
8. Letsholo, K.J., Zhao, L., and Chioasca, E.V. (2013, January 11–15). TRAM: A tool for transforming textual requirements into analysis models. Proceedings of the 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE), Silicon Valley, CA, USA.10.1109/ASE.2013.6693146 ↗
9. Fifarek, A.W., Wagner, L.G., Hoffman, J.A., Rodes, B.D., Aiello, M.A., and Davis, J.A. (2017, January 16–18). Spear v2. 0: Formalized past LTL specification and analysis of requirements. Proceedings of the 9th International Symposium, Moffett Field, CA, USA.10.1007/978-3-319-57288-8_30 ↗
10. Manaf, N.A., Antoniades, A., and Moschoyiannis, S. (2017, January 22–25). SBVR2Alloy: An SBVR to Alloy Compiler. Proceedings of the 2017 IEEE 10th Conference on Service-Oriented Computing and Applications (SOCA), Kanazawa, Japan.10.1109/SOCA.2017.18 ↗
11. (2022, June 24). Osmosian. Available online: https://github.com/Folds/osmosian.
12. Kowalski, R. (2020, January 18). Logical english. Proceedings of the Logic and Practice of Programming (LPOP), Oxford, UK.
13. (2022, June 24). SWISH—Minicontract.pl. Available online: https://logicalenglish.logicalcontracts.com/p/minicontract.pl.
14. Bugayenko, Y. (2021, January 17). Combining object-oriented paradigm and controlled natural language for requirements specification. Proceedings of the 1st ACM SIGPLAN International Workshop on Beyond Code, Chicago, IL, USA.10.1145/3486949.3486963 ↗
15. Bugayenko, Y. (2022, June 24). yegor256/requs. Available online: https://github.com/yegor256/requs.
16. (2022, June 24). Gherkin Syntax—Cucumber Documentation. Available online: https://cucumber.io/docs/gherkin/.
17. da Silva, A.R., and Savic, D. (2021). Linguistic Patterns and Linguistic Styles for Requirements Specification: Focus on Data Entities. Appl. Sci., 11.10.3390/app11094119 ↗
18. (2022, June 24). About the Semantics of Business Vocabulary and Business Rules Specification Version 1.5. Available online: https://www.omg.org/spec/SBVR/About-SBVR/.
19. (2022, June 24). RuleSpeak®||Let the Business People Speak Rules!. Available online: http://www.rulespeak.com/en/.
20. (2022, June 24). RuleXpress Overview. Available online: https://www.rulearts.com/rulearts-products/rulexpress-business-rules-software/rulexpress-overview/.
21. Trentelman, K. (2009). Processable English: The Theory Behind the PENG System, Defense Technical Information Center.
22. Mavin, A., Wilkinson, P., Harwood, A., and Novak, M. (September, January 31). Easy Approach to Requirements Syntax (EARS). Proceedings of the 2009 17th IEEE International Requirements Engineering Conference, Atlanta, GA, USA.10.1109/RE.2009.9 ↗
23. Mavin, A., and Wilkinson, P. (October, January 27). Big Ears (The Return of “Easy Approach to Requirements Engineering”). Proceedings of the 2010 18th IEEE International Requirements Engineering Conference, Sydney, NSW, Australia.10.1109/RE.2010.39 ↗
24. (2022, June 24). Eclipse Modeling Project|The Eclipse Foundation. Available online: https://www.eclipse.org/modeling/emf/.
25. (2022, June 24). Eclipse IDE for Java and DSL Developers|Eclipse Packages. Available online: https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-java-and-dsl-developers.
26. (2022, June 24). Xtext—Language Engineering Made Easy!. Available online: https://www.eclipse.org/Xtext/.
27. (2022, June 24). Epsilon. Available online: https://www.eclipse.org/epsilon/.