This thesis explores the use of Large Language Models to automate the translation of applications between two major mobile development frameworks: SwiftUI (for iOS using Swift) and Jetpack Compose (for Android using Kotlin). As mobile development increasingly requires cross-platform compatibility, the ability to efficiently port code between these frameworks has become crucial. The manual process is labor-intensive and error-prone, particularly due to the syntactic and semantic differences between Swift and Kotlin. In this study, an evaluation of the effectiveness of the GPT-4o in translating applications between SwiftUI and Jetpack Compose is presented. Through the translation of multiple applications from one framework to the other, the study assesses the capabilities of the LLM identifying the areas where the model excel and struggle. The methodology involved breaking down applications into components, such as UI elements, state management, and data models, allowing for more focused translation tasks. The study highlights the most common challenges faced by the LLM, including handling complex interdependencies between components and ensuring that translated code maintains functional and visual integrity. The findings show that while LLMs demonstrate proficiency in translating basic UI elements and simple state management patterns, they struggle with more complex interactions and platform-specific optimizations. This research offers insights into the current capabilities and limitations of GPT-4o in mobile development, providing a foundation for future improvements in code translation tools.
Questa tesi esplora l'uso dei Modelli Linguistici di Grandi Dimensioni per automatizzare la traduzione di applicazioni tra due importanti framework di sviluppo mobile: SwiftUI (per iOS utilizzando Swift) e Jetpack Compose (per Android utilizzando Kotlin). Poiché lo sviluppo di applicazioni mobili richiede sempre più una compatibilità multipiattaforma, la capacità di tradurre efficientemente il codice tra questi framework è diventata cruciale. Il processo manuale è laborioso e soggetto a errori, in particolare a causa delle differenze sintattiche e semantiche tra Swift e Kotlin. In questo studio, viene presentata una valutazione dell'efficacia di GPT-4o nella traduzione di applicazioni tra SwiftUI e Jetpack Compose. Attraverso la traduzione di molteplici applicazioni da un framework all'altro, lo studio valuta le capacità del LLM identificandone le aree in cui eccelle e quelle in cui incontra difficoltà. La metodologia ha coinvolto la scomposizione delle applicazioni in componenti, come elementi dell'interfaccia utente, gestione dello stato e modelli dei dati, permettendo traduzioni più mirate. Lo studio evidenzia le sfide più comuni affrontate dal LLM, inclusa la gestione di complesse interdipendenze tra componenti e la necessità che il codice tradotto mantenga l'integrità funzionale e visiva. I risultati mostrano che mentre i LLM dimostrano competenza nella traduzione di elementi UI di base e semplici modelli di gestione dello stato, incontrano difficoltà con interazioni più complesse e ottimizzazioni specifiche delle singole piattaforme. Questa ricerca offre spunti sulle attuali capacità e limitazioni di GPT-4o nello sviluppo mobile, fornendo una base per futuri miglioramenti negli strumenti di traduzione del codice.
Assessing LLM capabilities in mobile UI Code Conversion: A SwiftUI and Jetpack Compose comparative study
BELTRANTE, MATTEO
2024/2025
Abstract
This thesis explores the use of Large Language Models to automate the translation of applications between two major mobile development frameworks: SwiftUI (for iOS using Swift) and Jetpack Compose (for Android using Kotlin). As mobile development increasingly requires cross-platform compatibility, the ability to efficiently port code between these frameworks has become crucial. The manual process is labor-intensive and error-prone, particularly due to the syntactic and semantic differences between Swift and Kotlin. In this study, an evaluation of the effectiveness of the GPT-4o in translating applications between SwiftUI and Jetpack Compose is presented. Through the translation of multiple applications from one framework to the other, the study assesses the capabilities of the LLM identifying the areas where the model excel and struggle. The methodology involved breaking down applications into components, such as UI elements, state management, and data models, allowing for more focused translation tasks. The study highlights the most common challenges faced by the LLM, including handling complex interdependencies between components and ensuring that translated code maintains functional and visual integrity. The findings show that while LLMs demonstrate proficiency in translating basic UI elements and simple state management patterns, they struggle with more complex interactions and platform-specific optimizations. This research offers insights into the current capabilities and limitations of GPT-4o in mobile development, providing a foundation for future improvements in code translation tools.File | Dimensione | Formato | |
---|---|---|---|
2024_10_Beltrante.pdf
accessibile in internet per tutti
Dimensione
64.7 MB
Formato
Adobe PDF
|
64.7 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/227660