TASTE bugtrack - Taste
View Issue Details
0000831Taste[All Projects] ASN.1 Compiler v4public2019-02-20 09:072024-03-20 13:23
cavada@fbk.eu 
maxime 
normalminorhave not tried
closedfixed 
0000831: Standard of generated C code
Which standard is adopted in generated C code of ASN.1 compiler, for structures, encoding/decoding functions and runtime? I think the question is important if generated code and runtime get involved in a certification process. * DO-178B? * EN 50128? * MISRA-C? (I think it is not compliant, although perhaps not far from being so) * ...? I think this should be documented, if it is not yet.
No tags attached.
Issue History
2019-02-20 09:07cavada@fbk.euNew Issue
2019-02-20 09:28maximeNote Added: 0003576
2019-02-20 09:48cavada@fbk.euNote Added: 0003577
2019-02-20 09:52maximeNote Added: 0003578
2024-03-20 13:23maximeStatusnew => closed
2024-03-20 13:23maximeAssigned To => maxime
2024-03-20 13:23maximeResolutionopen => fixed

Notes
(0003576)
maxime   
2019-02-20 09:28   
We have not run yet any auditing tool to check for MISRA compliance. However that is our target standard. We follow all major rules for embedded systems (no malloc, no system calls..). The code being emitted from templates, it is very easy to adapt if we find some MISRA rules are broken. At the moment we are doing a major refactoring of the Ada runtime and code generation templates. We use Ada 2012 with SPARK contracts to prove the correctness of the code. We also run a static code analyzer (CodePeer) on the code and target zero warnings. When this is completed we will perhaps try to have the C runtime aligned with Ada, to get the best code quality (and evaluate the possibility to emit Spark-equivalent contracts in C, with Frama-C). We also have several static code analyzers in our development processes (Polyspace, clang analyser, Infer, and others) and a large experience of use - we will run everything on the code.
(0003577)
cavada@fbk.eu   
2019-02-20 09:48   
Thanks for the quick answer, and for the glace at the very promising future goals! Do you have also some rough time estimation for the ADA refactoring? We are trying to target EN 50128 (Railways), which includes MISRA-C, so targeting MISRA-C would ensure full compliance. We found a few issues, but further analysis is needed to identify the impacts. Suspect is that the impact would be minor (style issues). When the analysis is done, if somehow useful, we may provide you with the list of the identified issues.
(0003578)
maxime   
2019-02-20 09:52   
Thanks, any help with MISRA reports and ways to improve the code is fully appreciated. The Ada refactoring is progressing well and should be completed in the near future.