CAPLint: A Static Analysis Tool for CAPL in Automotive Software Development - Automated Code Quality Enforcement for HIL Test Scripts
| dc.contributor.author | Shojay, Amir | |
| dc.contributor.author | Musharaf, Shariq | |
| 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.date.accessioned | 2026-06-30T11:22:39Z | |
| dc.date.issued | ||
| dc.date.submitted | ||
| 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. | |
| dc.identifier.uri | https://hdl.handle.net/20.500.12380/311674 | |
| dc.language.iso | eng | |
| dc.setspec.uppsok | Technology | |
| dc.subject | static analysis, linting, CAPL, domain-specific language, automotive, HIL testing, parser, code quality | |
| dc.title | CAPLint: A Static Analysis Tool for CAPL in Automotive Software Development - Automated Code Quality Enforcement for HIL Test Scripts | |
| dc.type.degree | Examensarbete på kandidatnivå | sv |
| dc.type.degree | Bachelor Thesis | en |
| dc.type.uppsok | M2 |
