Coding Guidelines and Undecidability
Roberto Bagnara, Abramo Bagnara, Patricia M. Hill

TL;DR
This paper examines the role of decidability in coding guidelines for C and C++, highlighting how undecidable guidelines impact automatic checking and understanding of safety standards.
Contribution
It provides a systematic analysis of undecidable MISRA C:2012 guidelines, explaining their implications and exploring decidable approximations for practical enforcement.
Findings
Many MISRA guidelines are undecidable, affecting automatic compliance checking.
Decidable approximations can help enforce guidelines without overly restricting code.
Understanding undecidability aids in better interpretation and application of coding standards.
Abstract
The C and C++ programming languages are widely used for the implementation of software in critical systems. They are complex languages with subtle features and peculiarities that might baffle even the more expert programmers. Hence, the general prescription of language subsetting, which occurs in most functional safety standards and amounts to only using a "safer" subset of the language, is particularly applicable to them. Coding guidelines are the preferred way of expressing language subsets. Some guidelines are formulated in terms of the programming language and its implementation only: in this case they are amenable to automatic checking. However, due to fundamental limitations of computing, some guidelines are undecidable, that is, they are based on program properties that no current and future algorithm can capture in all cases. The most mature and widespread coding standards, the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
