GTA: Automated Semantic NLP-Based Generation of UML Activity Diagrams from Acceptance Criteria
In agile development, user stories express stakeholder needs, and the associated acceptance criteria (AC), written in the Given/When/Then (GWT) notation, specify the behaviour expected of the system under stated preconditions. Their manual translation into UML activity diagrams is laborious and remains sensitive to wording differences between authors. Existing automated approaches rely on lexical matching or on grammatical rules. Both fail when an identical precondition is expressed through different wording, a case that occurs frequently in collaborative backlogs. This study introduces GTA (GWT-to- Activity), a deterministic pipeline that converts GWT AC into UML activity diagrams. The clause structure is first recovered through dependency parsing. Paraphrased Given states are then merged based on sentence embedding similarity using Sentence-BERT (SBERT), and natural language inference (NLI) is used to separate semantic opposition from lexical variation, with thresholds calibrated on annotated data to preserve output stability under paraphrastic variation. Eleven behavioural patterns are supported, from simple sequences to nested compound conditions. The pipeline was evaluated on 107 test sets containing 230 AC drawn from four heterogeneous corpora of synthetic, open-source, and benchmark origin, and it reaches a node F1-score of 99.26%, an edge F1-score of 97.37%, and an exact topological match rate of 95.33%. All eleven patterns are recovered, and every generated file is a valid PlantUML that requires no post-processing. The output is structurally correct, deterministic from one run to another, and traceable to the thresholds set at each gate.