论文标题
Barr-C:2018和Misra C:2012:两个最广泛使用的C编码标准之间的协同作用
BARR-C:2018 and MISRA C:2012: Synergy Between the Two Most Widely Used C Coding Standards
论文作者
论文摘要
对于嵌入式系统行业所使用的编码标准,Barr Group的嵌入式C编码标准(Barr-C:2018,源自2009年Netrino的嵌入式C编码标准)是仅次于Misra C的编码标准。但是,Misra C:2012和Barr-C:2018之间的选择并不是一个艰难的决定,因为它们不足以互补。一方面,Barr-C:2018删除了上一版中存在的Misra C:2012(Barr-C:2013)的所有无兼容性。结果,无视编程样式,Barr-C:2018定义了C的一部分,该子集在防止大量编程错误的同时,它比Misra C:2012定义的c要大。另一方面,关于编程样式,而Misra C将此留给了个别组织,Barr-C:2018定义了一种针对最小化编程错误的编程风格。结果,Barr-C:2018可以看作是适合各种项目的C语言子集的第一个非常有用的步骤。然后,关键项目可以在保持Barr-C编程风格的同时顺利地朝着Misra C:2012顺利发展。在本文中,我们介绍了Barr-C:2018,我们描述了它与Misra C:2012的关系,并讨论了两个编码标准的平行和序列采用。
The Barr Group's Embedded C Coding Standard (BARR-C:2018, which originates from the 2009 Netrino's Embedded C Coding Standard) is, for coding standards used by the embedded system industry, second only in popularity to MISRA C. However, the choice between MISRA C:2012 and BARR-C:2018 needs not be a hard decision since they are complementary in two quite different ways. On the one hand, BARR-C:2018 has removed all the incompatibilities with respect to MISRA C:2012 that were present in the previous edition (BARR-C:2013). As a result, disregarding programming style, BARR-C:2018 defines a subset of C that, while preventing a significant number of programming errors, is larger than the one defined by MISRA C:2012. On the other hand, concerning programming style, whereas MISRA C leaves this to individual organizations, BARR-C:2018 defines a programming style aimed primarily at minimizing programming errors. As a result, BARR-C:2018 can be seen as a first, dramatically useful step to C language subsetting that is suitable for all kinds of projects; critical projects can then evolve toward MISRA C:2012 compliance smoothly while maintaining the BARR-C programming style. In this paper, we introduce BARR-C:2018, we describe its relationship with MISRA C:2012, and we discuss the parallel and serial adoption of the two coding standards.