Generating APIs through Library Learning using Large Language Models

dc.contributor.authorSam Kirubahar, Shaphan Manipaul
dc.contributor.authorHalil, Erdem
dc.contributor.departmentChalmers tekniska högskola / Institutionen för data och informationstekniksv
dc.contributor.departmentChalmers University of Technology / Department of Computer Science and Engineeringen
dc.contributor.examinerHeyn, Hans-Martin
dc.contributor.supervisorYu, Yinan
dc.date.accessioned2025-10-07T08:50:51Z
dc.date.issued2025
dc.date.submitted
dc.description.abstractThe 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.coursecodeDATX05
dc.identifier.urihttp://hdl.handle.net/20.500.12380/310602
dc.language.isoeng
dc.setspec.uppsokTechnology
dc.subjectLLMs
dc.subjectAutomotive Software
dc.subjectSoftware Engineering
dc.subjectLibrary Learning
dc.subjectProgram Synthesis
dc.titleGenerating APIs through Library Learning using Large Language Models
dc.type.degreeExamensarbete för masterexamensv
dc.type.degreeMaster's Thesisen
dc.type.uppsokH
local.programmeSoftware engineering and technology (MPSOF), MSc

Ladda ner

Original bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
CSE 25-13 EH SS.pdf
Storlek:
1.77 MB
Format:
Adobe Portable Document Format

License bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
license.txt
Storlek:
2.35 KB
Format:
Item-specific license agreed upon to submission
Beskrivning: