(IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 12, No. 6, 2021 From User Stories to UML Diagrams Driven by Ontological and Production Model Samia Nasiri 1 , Yassine Rhazali 2 , Mohammed Lahmer 3 , Amina Adadi 4 LMMI Laboratory of ENSAM, Moulay Ismail University ISIC Research Team of ESTM Meknes, Morocco AbstractThe User Story format has become the most popular way of expressing requirements in Agile methods. However, a requirement does not state how a solution will be physically achieved. The purpose of this paper is to present a new approach that automatically transforms user stories into UML diagrams. Our approach aims to automatically generate UML diagrams, namely class, use cases, and package diagrams. User stories are written in natural language (English), so the use of a natural language processing tool was necessary for their processing. In our case, we have used Stanford core NLP. The automation approach consists of the combination of rules formulated as a predicate and an ontological model. Prolog rules are used to extract relationships between classes and eliminate those that are at risk of error. To extract the design elements, the prolog rules used dependencies offered by Stanford core NLP. An ontology representing the components of the user stories was created to identify equivalent relationships and inclusion use cases. The tool developed was implemented in the Python programming language and has been validated by several case studies. Keywords—Ontology; prolog rules; natural language processing; UML diagrams; user stories I. INTRODUCTION Requirements engineering (RE) represents an important role in all types of software development processes. They aim to define the scope of development together with customers [1]. In agile software development, requirements are presented in documents named user stories. These documents are an efficient way to express requirements from the user. User stories are written in natural language that renders them easily understandable to stakeholders, indeed they are short text that depicts a semi-structured specification. A user story often uses the following format type: As <role>, I want <feature> to <reason> [2, 3]. Recently, agile software development has become more and more widely used. However, unlike the extensive automation research on RE in traditional software development, the automation of RE in agile development has not yet been investigated sufficiently, especially in the area of requirements modeling [4]. Requirements modeling is a critical process in the software engineering life cycle. It is a multi- faceted and time-consuming process. However, it provides a solid guide for the final product. The success of software projects depends mainly on careful and timely analysis and modeling of system requirements. In [5], the authors propose an approach to generate a conceptual model using heuristic rules and the NLP tool, but this model is not complete as it lacks the attributes of each entity. In [6], the authors also analyzed user stories in order to generate a UML use case diagram, but their approach is limited as they did not extract the relationships between the use cases. Furthermore, the authors of both approaches have not refined the relationships in the conceptual model or in the use cases in the use case diagram. Our contribution aims to automate RE in agile development in order to generate automatically three UML diagrams which are class diagram, use case diagram, and package diagram with the refinement of results. To achieve the refinement task, at first, ontology engineering is created for defining synonyms and relationships between actions, given that action is a relationship or part of the use case, secondly, Prolog rules are used to eliminate the relationships that are at risk of error in the class diagram. Our purpose is to minimize the errors of the relationships extraction and to avoid the redundancy of the associations not taken into account by Wordnet in the class diagram. Prolog rules are applied at first to determine the relationship between engineering requirements. All statements are converted to rules and facts in the SWI-Prolog language. A user story is made up of three elements: the role which represents the actor who acts, then the action represented by a verb, and finally the object which has undergone the action. Ontology is created to describe the components of user stories as the role, the action and the object. This ontology represents the field of agile methods by focusing on the part of user stories. After the creation of the classes in ontology editor, we proceeded to the stage of filling the ontology by enriching it with vocabulary and equivalent of class instances; we concentrated on the class "action" which represents the relation between the classes in a diagram of UML. The object properties reflect the relations that can be established between instances of the ontology classes. The structure of this paper is as follows: This section introduces agile methods and our proposed approach. In Section 2, we present the related work of our proposal. However, we detail our proposal approach, and we present the main of the platform in Section 3. Then, we present a generated UML diagrams in Section 4. In Section 5, we present the discussion and analysis. At finally, conclusion is presented in Section 6. 333 | Page www.ijacsa.thesai.org