Generation of business rules code from natural language - Gonçalves, Nuno Miguel Sousa (2025)
The coding of business rules (BR) is a critical task in information systems (IS) development, particularly within the typical model-view-controller (MVC) architecture. In this architecture, the controller (which includes business logic and BR) handles the flow of data between the view (user interface) and the model (database). Although implementing BR can be complex, time-consuming, and even daunting, current software development tools remain more focused on designing the user interface and the database. This emphasis is understandable, given the challenges of defining complex structures like classes or tables, as well as their relationships, attributes, and fields. However, an alternative approach lies in the domain of natural language processing (NLP). Natural language (NL) may offer a more suitable means of modeling BR, especially as citizen developers become increasingly involved in software development. With this perspective in mind, this thesis reviews the state of the art in generating BR code from NL. The study examined 604 articles through forward, backward, and lateral snowballing techniques, starting with four cornerstone papers and ultimately narrowing the field to 11 relevant articles. These selected articles propose solutions that leverage the semantics of business vocabulary and business rules (SBVR) or decision model and notation (DMN) as a "bridge" to produce code in object constraint language (OCL), entity-relationship (ER) diagrams, or extensible markup language (XML). Our findings suggest that while these solutions are valuable, they fall short of generating BR code in diverse programming languages such as C, Java, or Python. To address this gap, we aim to create a prototype that can effectively translate natural language into machine-readable code. This thesis is part of a larger project called "Hydra Code Generation Tool (HydraCGT)," which belongs to the Department of the University of Madeira – Office for the Development of Information Technology Applications (GDAI).