Generating APIs through Library Learning using Large Language Models

Sam Kirubahar, Shaphan Manipaul
Halil, Erdem
Göteborgs universitet/Institutionen för data- och informationsteknikswe
University of Gothenburg/Department of Computer Science and Engineeringeng
2025-10-07T08:47:05Z
2025-10-07T08:47:05Z
2025-10-07
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.sv
https://hdl.handle.net/2077/89829
engsv
Technology
LLMssv
Automotive Softwaresv
Software Engineeringsv
Library Learningsv
Program Synthesissv
Generating APIs through Library Learning using Large Language Modelssv
text
Student essay
H2

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
CSE 25-13 EH SS.pdf
Size:
1.77 MB
Format:
Adobe Portable Document Format
Description:
Master thesis

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
876 B
Format:
Item-specific license agreed upon to submission
Description:

Collections