arXiv · 2603.04013
A Core Calculus for Type-safe Product Lines of C Programs
Abstract
In this paper we: (1) propose Lightweight C (LC), namely a core calculus that formalizes a proper subset of the ANSI C without preprocessor directives; (2) define Colored LC (CLC), namely LC endowed with ANSI C preprocessor directives; and (3) define a type system for CLC that guarantees that all programs to be generated by the C preprocessor are well-typed C programs. We believe that the simple formalization provided by CLC could be useful also for teaching purposes. Stefano Berardi spent most of his academic career at the Department of Computer Science of the University of Turin, where he conducts outstanding research on the logical foundations of computer science and on type-based program analyses. Over the years, he taught many courses, from BSc courses on programming with C to PhD courses on program analysis. Therefore, this paper fully falls within Stefano Berardi's research and teaching activities.
Explore related subjects
Keep this discovery
Ferruccio Damiani, Daisuke Kimura, Luca Paolini, Makoto Tatsuta. 2026-03-04. A Core Calculus for Type-safe Product Lines of C Programs. https://doi.org/10.4204/eptcs.441.7
Cite the original work for its findings. Save a collection to share your selection of sources.