ISO 26262 and Rust Gap Analysis for the front-page to evaluate Rust safety-critical readiness#562
Conversation
…h the start of an ISO 26262 vs. Rust Gap Analysis documentation
✅ Deploy Preview for safety-critical-rust-consortium ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
DaleEMartin
left a comment
There was a problem hiding this comment.
There are some misspellings in the new text, it would be good to run it through a spell-checker. For this kind of document I don't know if there is a github workflow for auto spelling and grammar checks?
|
@DaleEMartin Thanks for checking it out! Could you comment a bit on the content:
I wanted to gather first some comments through this PR on the overall structure, before investing more time to perfect it. |
PLeVasseur
left a comment
There was a problem hiding this comment.
Thanks for putting this up, @fried-gluttony!
The target audience (Functional Safety Manager deciding if Rust is viable) and the traffic-light framing are both good fits. Main blocking issue is a docs build failure in iso26262.md line 29 (Option'<T'> parsed as invalid JSX in MDX).
Beyond that, several ratings appear overly optimistic or technically inverted (notably concurrency guarantees, "disallow safe rust", process methods marked n.A., and requirements-based testing claims).
This should help: #566 It's the same typo checker we're using on the coding guidelines repo. |
0df2941 to
27d53ce
Compare
|
I see some items where you've pointed out there are things you don't know yet. I'm going to go through this to help with what I can. Please gimme some time, I might be able to do this today. If you don't hear from me before Sunday, feel free to ping me @fried-gluttony. BTW I love what I'm seeing so far :) |
|
Table 6, point 1a One entry and one exit point in subprograms and functions, I have some questions. Do we know what the reasoning is behind this rule? I have the feeling that this might be very C-specific, in the sense that it's trying to address a very important shortcoming of the C language. If that's the case, then we could perhaps make an argument for this not being necessary for Safety Critical Rust in practice. |
|
Table 6 again 1b No dynamic objects or variables, or else online test during their creation I believe this should be enforceable at compile-time by configuring the project to not have any form of allocation. Lemme get back to you on that one, but if memory serves, then this should have been already solved through compile-time enforced configuration |
|
Quick note on Table 6 1j No recursions: we have a guideline in place for that https://coding-guidelines.arewesafetycriticalyet.org/coding-guidelines/associated-items/gui_ot2Zt3dd6of1.html There is however, not a clippy lint for that. But there's hope that for this year we will have one that's good enough for most cases! |
felix91gr
left a comment
There was a problem hiding this comment.
This review has a bit of everything. I hope it helps :)
27d53ce to
ee18ce3
Compare
ee18ce3 to
083da79
Compare
Yes I agree. Even for C++ I already heard that some disprove exception handling due to this rule. This is a typical case where I suggest to tailor it, as it does more harm than good. |
0b8fba4 to
dc70568
Compare
|
I got some comments:
|
|
Awesome, thanks a lot for the review @vjonaswolf . I just edited your remarks and added my opinion below.
Right, I'll just go ahead and remove it for now, I think it would be nice as reference but is not critical. I just also requested the usage of the figure from ISO for the website - let's see what they reply.
Well, it depends I would say on the usage. At the core, defensive programming is a style to cover and check for conditions, that shouldn't happen during intended use and still having defined behavior.
Why? I think it assists the safety development and for some points there are no open solutions yet.
As for memory this is covered already by Table 6 - 1b. By using no_std you don't have that issue of unpredictable dynamic allocation and it's more explicit - I just added that.
Changed that
Which availability do you mean here? Rust tier support?
Oh, I wasn't aware of that. I changed it for now - does maybe Ada have a solution for that?
agreed and edited.
You are right, actually a strategy could be to use back-to-back tests to actually prove the equivalence between model and code.
edited. |
That is my understanding of the term as well. And to the following bit,
I would add that: In general, Rust's type system reduces the need to add defensive programming on top of a project, because programs that type check are, in a sense, "defensive" by construction. Enums and lifetimes especially make it possible to express correctness conditions in the types of the variables. |
|
I'm going to focus a bit more on what I think should happen to make the "status" more visible. I think we should have our landing page working a bit more for us in helping us show: "Are We Safety Critical Yet?" To that end, I think it makes sense to move all the contents of this page: To actually be the contents of the front page: Now that we have a more rigorous methodology and a first set of work on ISO 26262, I think the more hand-wavey nature of this can be somewhat cofusing towards "where are we?": I think this is good, and we should keep it: @fried-gluttony -- if you're okay with giving this a try I think it'd be good to do in this PR. If not, I wouldn't block your PR on it. I'd figure out how to do it afterwards and then do it myself. |
…on traffic light emojis
PLeVasseur
left a comment
There was a problem hiding this comment.
Thanks so much @fried-gluttony for taking the time and care to support ISO 26262 fleshing out! The front page is also looking rather snazzy too :)
c2ce7af
into
Safety-Critical-Rust-Consortium:main


This pull request should update the main website after clicking the button "find out more".
I imagined a typical Functional Safety Manager that has to decide whether it's viable to use Rust for an project and what he has to know to make that decision.
My suggestion is to give on the first page a small overview, to get everyone on the same track on what safety-critical is and how to judge the readiness of Rust.
Next I propose to give an overview using a simple traffic-light score in terms of how much additional effort to expect when using Rust for safety critical - depending on different standards - purely from a standards-conformity perspective. That means it doesn't account for all the savings due to the awesome language. I guess that still needs to be stated for fair comparison.
It is not yet ripe, I just wanted to outline the methodology and give some examples. Would love any feedback - is it well structured and understandable?