zikele

zikele

人生如此自可乐

LLM作為敏捷模型驅動開發中的代碼生成器

2410.18489v2

中文标题#

LLM 作為敏捷模型驅動開發中的代碼生成器

英文标题#

LLM as a code generator in Agile Model Driven Development

中文摘要#

利用大型語言模型(LLM)如 GPT4 在代碼自動生成中的應用代表了重大進展,但並非沒有挑戰。 自然語言描述軟件時固有的模糊性對生成可部署的結構化成果構成了重大障礙。 本研究倡導模型驅動開發(MDD)作為一種可行的策略來克服這些挑戰,提出了一種採用 GPT4 作為代碼生成器的敏捷模型驅動開發(AMDD)方法。 這種方法提高了代碼自動生成過程的靈活性和可擴展性,並提供了敏捷性,使模型或部署環境的變化能夠無縫適應。 我們通過使用統一建模語言(UML)對多智能體無人車輛編隊(UVF)系統進行建模來說明這一點,通過集成對象約束語言(OCL)進行代碼結構元建模,以及使用 FIPA 本體語言進行通信語義元建模,顯著減少了模型的模糊性。 應用 GPT4 的自動生成能力分別生成與 JADE 和 PADE 框架兼容的 Java 和 Python 代碼。 我們對自動生成的代碼進行了全面評估,驗證了其與預期行為的一致性,並識別了智能體交互的改進。 在結構上,我們評估了僅受 OCL 元模型約束的模型所生成代碼的複雜性,與同時受 OCL 和 FIPA 本體語言元模型影響的代碼複雜性進行了比較。 結果表明,受本體語言約束的元模型生成的代碼本質上更複雜,但其循環複雜度仍處於可控水平,這表明可以加入額外的元模型約束而不會超過複雜度的高風險閾值。

英文摘要#

Leveraging Large Language Models (LLM) like GPT4 in the auto generation of code represents a significant advancement, yet it is not without its challenges. The ambiguity inherent in natural language descriptions of software poses substantial obstacles to generating deployable, structured artifacts. This research champions Model Driven Development (MDD) as a viable strategy to overcome these challenges, proposing an Agile Model Driven Development (AMDD) approach that employs GPT4 as a code generator. This approach enhances the flexibility and scalability of the code auto generation process and offers agility that allows seamless adaptation to changes in models or deployment environments. We illustrate this by modeling a multi agent Unmanned Vehicle Fleet (UVF) system using the Unified Modeling Language (UML), significantly reducing model ambiguity by integrating the Object Constraint Language (OCL) for code structure meta modeling, and the FIPA ontology language for communication semantics meta modeling. Applying GPT4 auto generation capabilities yields Java and Python code that is compatible with the JADE and PADE frameworks, respectively. Our thorough evaluation of the auto generated code verifies its alignment with expected behaviors and identifies enhancements in agent interactions. Structurally, we assessed the complexity of code derived from a model constrained solely by OCL meta models, against that influenced by both OCL and FIPA ontology meta models. The results indicate that the ontology constrained meta model produces inherently more complex code, yet its cyclomatic complexity remains within manageable levels, suggesting that additional meta model constraints can be incorporated without exceeding the high risk threshold for complexity.

PDF 获取#

查看中文 PDF - 2410.18489v2

智能達人抖店二維碼

抖音掃碼查看更多精彩內容

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。