Coding by Design: GPT-4 Empowers Agile Model Driven Development
Ahmed Sadik, Sebastian Brulin, Markus Olhofer
2024
Abstract
Generating code from a natural language using Large Language Models (LLMs) such as ChatGPT, seems groundbreaking. Yet, with more extensive use, it’s evident that this approach has its own limitations. The inherent ambiguity of natural language proposes challenges to auto-generate synergistically structured artifacts that can be deployed. Model Driven Development (MDD) is therefore being highlighted in this research as a proper approach to overcome these challenges. Accordingly, we introduced an Agile Model-Driven Development (AMDD) approach that enhances code auto-generation using OpenAI’s GPT-4. Our work emphasizes "Agility" as a significant contribution to the current MDD approach, particularly when the model undergoes changes or needs deployment in a different programming language. Thus, we presented a case-study showcasing a multi-agent simulation system of an Unmanned Vehicle Fleet (UVF). In the first and second layer of our proposed approach, we modelled the structural and behavioural aspects of the case-study using Unified Modeling Language (UML). In the next layer, we introduced two sets of meta-modelling constraints that minimize the model ambiguity. Object Constraints Language (OCL) is applied to fine-tune the code constructions details, while FIPA ontology is used to shape the communication semantics. Ultimately, GPT-4 is used to auto-generate code from the model in both Java and Python. The Java code is deployed within the JADE framework, while the Python code is deployed in PADE framework. Concluding our research, we engaged in a comprehensive evaluation of the generated code. From a behavioural standpoint, the auto-generated code not only aligned with the expected UML sequence diagram, but also added new behaviours that improved the interaction among the classes. Structurally, we compared the complexity of code derived from UML diagrams constrained solely by OCL to that influenced by both OCL and FIPA-ontology. Results showed that ontology-constrained model produced inherently more intricate code, however it remains manageable. Thus, other constraints can still be added to the model without passing the complexity high risk threshold.
DownloadPaper Citation
in Harvard Style
Sadik A., Brulin S. and Olhofer M. (2024). Coding by Design: GPT-4 Empowers Agile Model Driven Development. In Proceedings of the 12th International Conference on Model-Based Software and Systems Engineering - Volume 1: MODELSWARD; ISBN 978-989-758-682-8, SciTePress, pages 149-156. DOI: 10.5220/0012356100003645
in Bibtex Style
@conference{modelsward24,
author={Ahmed Sadik and Sebastian Brulin and Markus Olhofer},
title={Coding by Design: GPT-4 Empowers Agile Model Driven Development},
booktitle={Proceedings of the 12th International Conference on Model-Based Software and Systems Engineering - Volume 1: MODELSWARD},
year={2024},
pages={149-156},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0012356100003645},
isbn={978-989-758-682-8},
}
in EndNote Style
TY - CONF
JO - Proceedings of the 12th International Conference on Model-Based Software and Systems Engineering - Volume 1: MODELSWARD
TI - Coding by Design: GPT-4 Empowers Agile Model Driven Development
SN - 978-989-758-682-8
AU - Sadik A.
AU - Brulin S.
AU - Olhofer M.
PY - 2024
SP - 149
EP - 156
DO - 10.5220/0012356100003645
PB - SciTePress