# Automated Conditional Statements Checking for Complete Natural Language Requirements Specification
## 1 Introduction  
It has been shown that the quality of software requirements specification has a significant impact on the success of software projects [1]. The duality, repetition, and incompleteness in a software requirements specification (SRS, or just \"requirements specification\") which is often written in natural language may lead to the failure of projects or affect the dependability of the software systems developed. To ensure the quality of software requirements specification, researchers have proposed non-natural language approaches to specify software requirements, for example, the formal languages of \(Z\)[2] and Petri Nets [3], the graphical languages of UML [4, 5] and SysML [6], the scenario-based [7] and the table-based [8] approaches. However, it is not easy to apply these non-natural language approaches in practice. On the one hand, requirements analysts and stakeholders need to familiarize themselves with these approaches beforehand. On the other hand, since natural language is what the requirements analysts and the stakeholders use when thinking and communicating, applying these non-natural language approaches requires analysts and stakeholders to switch between these non-natural languages and the natural language. This makes it more difficult and inconvenient to apply these approaches, and leads to the result that most software requirements specifications are still written in natural language in practice. The investigation [PERSON] et al. [9] has shown that 95% of software requirements in industry are described in natural language or controlled natural language [10; 11]. In this case, it is of great significance for the methods which can assist requirements analysts to identify the defects in the natural language requirements. By now, many approaches have been proposed for this purpose by different researchers. For example, [PERSON] et al. [12] proposed methods to discover the presence of duality in natural language requirements; [PERSON] et al. [13] proposed the method which transforms the requirements into propositional logic to discover potential conflicts in natural language requirements; [PERSON] et al. [14; 15] presented a method to detect whether the requirements described in natural language conform to the qualified templates with the natural language processing techniques; [PERSON] et al. [16] proposed a series of methods to detect terminological inconsistencies in the natural language requirements. Due to the arbitrariness that requirements analysts use the natural language to describe software requirements, existing methods tend to detect some specific types of requirement defects. In this paper, we focus on detecting the requirements incompleteness implied by the conditional statements. In domains such as aerospace, many software requirements are often expressed in terms of conditional statements. For example, one requirement expressed in terms of a conditional statement is: \"When there are GPS events to report, the communication system shall send a detailed report with event parameters to the ground station.\" For this requirement, the analysts need to specify at least one requirement about what actions to be adopted when there are no GPS events to report. Otherwise, the requirements specification is incomplete. This could lead to the result that the ground station cannot judge the status of the communication system and the aircraft. This paper proposes a sentence embedding- and antonyms-based approach for detecting the requirements incompleteness implied by the conditional statements. The basic idea is that when one condition is stated, its opposite condition should also be there. Otherwise, the requirements specification is incomplete. Based on state-of-the-art machine learning and natural language processing techniques, the proposed approach detects the potential requirements incompleteness by clustering the conditional statements and finding the opposite of the words in the clusters.