Generating APIs through Library Learning using Large Language Models
| dc.contributor.author | Sam Kirubahar, Shaphan Manipaul | |
| dc.contributor.author | Halil, Erdem | |
| dc.contributor.department | Chalmers tekniska högskola / Institutionen för data och informationsteknik | sv |
| dc.contributor.department | Chalmers University of Technology / Department of Computer Science and Engineering | en |
| dc.contributor.examiner | Heyn, Hans-Martin | |
| dc.contributor.supervisor | Yu, Yinan | |
| dc.date.accessioned | 2025-10-07T08:50:51Z | |
| dc.date.issued | 2025 | |
| dc.date.submitted | ||
| dc.description.abstract | The development of APIs in vehicular systems, such as trucks, is a manual and laborintensive process that involves multiple teams and iterative coordination, which makes it a prime candidate for automation. In this thesis, we develop a SPAPI Coder, a system that synthesizes high-level API endpoint implementations from low-level Controller Area Network (CAN) signals and OpenAPI specifications. Inspired by the manual workflow but restructured for automation using inductive program synthesis and library learning techniques, the system decomposes the manual software development workflow into three more manageable abstraction levels. SPAPI Coder utilizes LLMs for code generation at each level while employing a Retrieval-Augmented Generation (RAG) pipeline for efficient and accurate mapping of API properties to CAN signals. The system features automated test script generation and execution for LLM-produced code, as well as LLM-assisted judging for evaluation. The results of the study indicate that the proposed system can successfully generate functional API components if correct prompt engineering, library learning, and program synthesis techniques are used. While LLMs show promise as evaluators, their standalone accuracy for code evaluation tasks remains a limitation. Findings suggest automating API development in complex domains like automotive systems using LLMs and program synthesis is viable. The approach feasibly addresses all dimensions of program synthesis and demonstrates the potential of library learning to automate API generation. It also provides a foundation for future work in incremental synthesis and intelligent software process automation. | |
| dc.identifier.coursecode | DATX05 | |
| dc.identifier.uri | http://hdl.handle.net/20.500.12380/310602 | |
| dc.language.iso | eng | |
| dc.setspec.uppsok | Technology | |
| dc.subject | LLMs | |
| dc.subject | Automotive Software | |
| dc.subject | Software Engineering | |
| dc.subject | Library Learning | |
| dc.subject | Program Synthesis | |
| dc.title | Generating APIs through Library Learning using Large Language Models | |
| dc.type.degree | Examensarbete för masterexamen | sv |
| dc.type.degree | Master's Thesis | en |
| dc.type.uppsok | H | |
| local.programme | Software engineering and technology (MPSOF), MSc |
