Back to search

Chalmers University of Technology

Generating APIs through Library Learning using Large Language Models

Abstract

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.

Degree

thesis:*
Level thesis:degree_level
H
Department dc:contributor.department
Chalmers tekniska högskola / Institutionen för data och informationsteknik
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Authors dc:creator
  • Sam Kirubahar, Shaphan Manipaul
  • Halil, Erdem
Advisor dc:contributor.supervisor
  • Yu, Yinan
Committee member dc:contributor.committeemember
  • Heyn, Hans-Martin

Subjects

dc:subject × 5

Rights

Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Coursecode
DATX05

Chain of custody

source
Harvested from
Chalmers University of Technology
Base URL
odr.chalmers.se/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Sam Kirubahar, Shaphan Manipaul; Halil, Erdem. Generating APIs through Library Learning using Large Language Models. H thesis, 2025. https://hdl.handle.net/20.500.12380/310602