Software requirements specification is undoubtedly critical for the whole software life-cycle. Currently, writing software requirements specifications primarily depends on human work. Although massive studies have been proposed to speed up the process via proposing advanced elicitation and analysis techniques, it is still a time-consuming and error-prone task, which needs to take domain knowledge and business information into consideration. In this paper, we propose an approach, named ReqGen, which can provide further assistance by automatically generating natural language requirements specifications based on certain given keywords. Specifically, ReqGen consists of three critical steps. First, keywords-oriented knowledge is selected from the domain ontology and is injected into the basic Unified pre-trained Language Model (UniLM) for domain fine-tuning. Second, a copy mechanism is integrated to ensure the occurrence of keywords in the generated statements. Finally, a requirements-syntax-constrained decoding is designed to close the semantic and syntax distance between the candidate and reference specifications. Experiments on two public datasets from different groups and domains show that ReqGen outperforms six popular natural language generation approaches with respect to the hard constraint of keywords’ (phrases’) inclusion, BLEU, ROUGE, and syntax compliance. We believe that ReqGen can promote the efficiency and intelligence of specifying software requirements.
Privacy policies are critical for helping individuals make decisions on the usage of information systems. However, as a common language phenomenon, ambiguity occurs pervasively in privacy policies and largely impedes their usefulness. The existing research focuses on the identification of individual vague words or sentences, without considering the context of documents, which may cause a significant amount of false vagueness. Our goal is to automatically detect the potential false vagueness and the related supporting evidence, which illustrates or explains the vagueness, and therefore probably assist in alleviating the vagueness. We firstly analyze the public manual annotations and define four common patterns of false vagueness and three types of supporting evidence. Then we propose the approach of the F·vague-Detector to automatically detect the supporting evidence and then locate the corresponding potential false vagueness. According to our analysis, about 29–39% of individual vague sentences have at least one clarifying sentence in the documents, and experiments show good performance of our approach, with recall of 66.98–67.95%, precision of 70.59–94.85%, and of 69.24–78.51% on the potential false vagueness detection. Detecting the vagueness of isolated sentences without considering their context within the whole document would bring about one-third potential false vagueness, and our approach can detect this potential false vagueness and the alleviating evidence effectively.
5 November 2023 in Software: Practice and Experience