ReqGen: Keywords-driven Software Requirements Generation
Description
Software requirements specification is undoubtedly critical for the whole software life-cycle. Temporarily, writing software requirement specification primarily depends on human work, although massive great work have been proposed to help eliciting and analyzing the related information. The writing task is human-effort due to the factors like time-consuming domain learning, repeated expressions usage and the compliance with certain syntax. An approach of ReqGen is proposed in this work to automatically generate the requirement specification based on certain given keywords. Particularly, keywords-oriented knowledge is selected from domain ontology and is injected to the basic Unified pre-trained Language Model (UniLM) model for domain fine-tuning. A copy mechanism is integrated to promise the occurrence of keywords in the generated statements. Finally, a requirement syntax constrained decoding is designed to close the semantic distance between the candidate and reference specification. Experiments with two public datasets show that ReqGen outperforms six popular natural language generation approaches on the hard constraint of keywords(phrases), BLEU, ROUGE and syntax compliance.