Back to search

Chalmers University of Technology

CAPLint: A Static Analysis Tool for CAPL in Automotive Software Development - Automated Code Quality Enforcement for HIL Test Scripts

Abstract

dc:description.abstract

CAPL (Communication Access Programming Language) is a domain-specific language widely used in the automotive industry for Hardware-in-the-Loop (HIL) testing of electronic control units. Despite its critical role in vehicle software validation, CAPL has limited or no widely adopted static analysis tooling to enforce coding standards or detect common programming mistakes. This gap forces development teams to rely on manual code review, a process that could be time-consuming, error-prone, and difficult to scale. This thesis presents CAPLint, a static analysis tool designed specifically for CAPL. The tool was developed in collaboration with the HIL development team at Volvo Cars in Gothenburg, Sweden, and informed by a formative survey of engineers on their CAPL debugging practices. CAPLint addresses this problem through a two tier analysis architecture: a fast text-based tier that operates on raw source lines using pattern matching, and a structured tier that performs analysis on an abstract syntax tree generated by a custom-built LALR parser. The parser was developed from scratch due to the absence of a publicly available CAPL grammar specification, and achieves a 100% parse success rate on a large production corpus of CAPL files. CAPLint implements 39 lint rules across fifteen categories, including naming conventions, formatting, documentation, semantic checks for unused and undeclared variables, and cross-file include analysis. The tool supports hierarchical configuration, inline suppression comments, and integrates into existing command-line workflows and CI/CD pipelines. The system was developed using an Agile methodology over a 17-week period and evaluated through corpus validation and developer feedback. The results show that automated static analysis can be applied to a domain-specific language with limited public documentation, and that CAPLint can reduce the amount of repetitive checking engineers do during code review.

Degree

thesis:*
Level thesis:degree_level
M2
Department dc:contributor.department
Chalmers tekniska högskola / Institutionen för data och informationsteknik

Author and committee

dc:creator, dc:contributor.*
Authors dc:creator
  • Shojay, Amir
  • Musharaf, Shariq

Subjects

dc:subject × 1

Rights

Language dc:language.iso
eng

Identifiers

dc:identifier.*

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

Shojay, Amir; Musharaf, Shariq. CAPLint: A Static Analysis Tool for CAPL in Automotive Software Development - Automated Code Quality Enforcement for HIL Test Scripts. M2 thesis, https://hdl.handle.net/20.500.12380/311674