Requirements typically drive software development and are generally expressed using natural language (NL), which is widely used in many industrial contexts. The central role of NL in software requirement specifications (SRSs) stems from its usability in all application domains and its ease of understanding by all stakeholders in software development projects. A study reports that 61% of users prefer to express requirements using NL. However, despite its popularity, NL is highly prone to quality problems, such as vagueness, ambiguity, complexity, and incompleteness.

One important cause of project failures in industry is quality problems in NL requirements. When such problems are not fixed early during development, they carry over to subsequent development phases, and fixing them becomes a costly and time-consuming process. Improving the quality of NL requirements by identifying quality problems at early development stages is therefore a pivotal need for successful software development.

In collaboration with an industrial partner, which provides post-trade services for various types of financial securities and develops information systems to support these services, we noticed elevated costs associated with in-house processes to improve the quality of NL requirements, which typically involve several manual inspections and are thus prone to errors. A tool that automatically detects quality problems in NL requirements and guides analysts to improve the quality of NL requirements is thus highly desirable.

To address the challenges stated above, we developed an approach and tool that addresses common quality problems in NL requirements. In particular, our work aims at assisting analysts with automatically detecting quality problems and suggesting recommendations to fix them in functional requirements. Given our focus on information systems, a functional requirement specifies what system response an actor is expected to receive when providing certain inputs, if certain conditions are met. We have named our tool Paska, which means “solution” in Quechua. In this article, the term “smells” refers to these quality problems in functional requirements that can lead to defects at different levels of severity.

To automatically detect quality problems in functional requirements and provide concrete improvement recommendations, our work relies on a state-of-the-art controlled natural language (CNL) called Rimay, which is used to specify functional requirements for information systems. Rimay requires analysts to write requirements in a disciplined manner using controlled grammar and vocabulary, ensuring they follow best practices for writing requirements. This results in writing precise, unambiguous, complete, and atomic requirements, which in turn enables automated analysis such as traceability analysis and acceptance criteria generation. However, defining a language like Rimay is a different problem than applying it to detect quality problems in non-compliant requirements and propose recommendations for their rectification. We first define requirement smells corresponding to violations of quality attributes, such as completeness, clarity, atomicity, and correctness, which Rimay enforces when writing requirements. Based on the Rimay grammar, we define a set of Rimay patterns that capture recommended structures for expressing requirements. In order to help analysts address smells in a requirement, Paska then provides Rimay patterns as suggestions. Analysts can then rewrite these requirements based on the recommended patterns. Indeed, such patterns indicate what requirement segments are missing, warrant change, or must be re-ordered. To automate the detection of requirement smells and the recommendation of Rimay patterns, Paska combines natural language processing (NLP) techniques, including tokenization, lemmatization, POS tagging, constituency parsing, glossary search, and Tregex. We note that this article not only presents an automated method for identifying a large spectrum of smells but, different from existing work, also provides automated and accurate guidance on how to address them.

To summarize, the main contributions of this work are (1) an automated approach that detects smells in SRSs and suggests Rimay patterns to fix these smells and (2) an extensive industrial case study on smell detection, involving a large set of 2725 information system requirements from 13 projects in the financial domain, to assess the accuracy of Paska when detecting smells and suggesting patterns to fix them. The results show that Paska is accurate in detecting smells (89% precision and recall) and suggesting appropriate Rimay pattern recommendations (96% precision and 94% recall). Our industrial case study is the largest to date regarding requirements quality assurance.