"Mike Silva" <snarflemike / yahoo.com> wrote in message 
news:a6f8591e-8e47-4d01-9755-c30df92b68e1 / c65g2000hsa.googlegroups.com...
On Apr 16, 2:39 pm, "Arved Sandstrom" <asandst... / accesswave.ca>
wrote:
> What I don't see is any particular emphasis on specific languages.
> Considering that there seems to be no shortage of avionics software 
> written
> in C/C++, I don't immediately see why Ruby or Python wouldn't work either,
> especially considering the intense process the software goes through.
>
> I tend not to discount any particular language prima facie. I recall over
> ....
> I'm inclined to think that 90%+ of software reliability comes from 
> training,
> experience and above all, process. Not the programming language.

******************************
But that still leaves 10%-.  For example, as noted here (http://
www.praxis-his.com/sparkada/pdfs/spark_c130j.pdf), an analysis of
safety-critical code written in three languages (C, Ada and SPARK),
all of which was already certified to DO-178B Level A (the most
stringent level), it was found that the SPARK code had one tenth the
residual error rate of the Ada code, and the Ada code had only one
tenth the residual rate of the C code.  That's a 100:1 difference in
residual error rates in code all of which was certified to the highest
aviation standards.  Would anybody argue that putting out safety-
critical software with an error rate 100 times greater than the
current art allows is a good thing?  In fact, would anybody argue that
it is not grossly negligent?

Oh, and the anecdote about the compiler finding in minutes a bug that
had defied testing for a week should not be lightly dismissed either.
******************************

I won't dispute the fact that some languages have more inherent support for 
"correct" programming than others do. SPARK wouldn't be the only one; Eiffel 
and various functional languages come to mind also. For others you can get 
add-ons, such as JML for Java (see 
http://en.wikipedia.org/wiki/Design_by_contract)

Having said that, it seems to me that the better correctness of programs in 
SPARK or Ada compared to C/C++, say, would also be due to the qualities of 
organizations that tend to use/adopt these languages. Those qualities 
include programmer competence/experience/education, organizational 
standards, processes in place, and external requirements (as in legal ones 
for avionics or medical software). Not to mention, there is a correlation 
between the ease of use of a language and the rate of poor coding (I may get 
flak for that statement), which is not necessarily a fault of that language. 
Note that by ease of use I do not mean masterability, I simply mean how 
quickly a programmer can write something that sort of works.

For example, is shabby software written in Java or C or Python or PHP or 
JavaScript shabby because one of those languages was chosen, or is it shabby 
because the requirements analysis sucks, design is basically absent, there 
is no documentation, testing is a myth, and the coders haven't mastered the 
language? I've seen more than a few ads in my area advertising Web developer 
jobs for $9 or $10 an hour...you could use the best language in the world at 
a job like that and you'd still end up with crap. Conversely, get a team of 
really experienced and smart coders who are well-versed in process, have 
management backing for process, and I don't see the language of choice 
mattering _that_ much. IOW, in that MoD analysis you refer to, was 
everything else equal? Throw Ruby at a CMM Level 5 team and I wonder whether 
the product is going to be an order or two of magnitude worse than if they 
had Ada. Myself I doubt it.

AHS