From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Ada automatic code generation for Simulink models
Date: 01 Jun 2002 11:11:32 -0400
Date: 2002-06-01T15:18:57+00:00 [thread overview]
Message-ID: <u1ybr3ufv.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 3CF7DADA.77DB9166@NOSPAM.visteon.com
John Kern <jkern3@NOSPAM.visteon.com> writes:
> I guess what your are saying is to go ahead and allow code generators to
> use the "Universal Assembly" language, and use Ada for only the parts
> that cannot be modeled. The auto industry is endeavoring to model the
> whole ECU in either Simulink or UML, leaving no room or need for
> generated Ada code.
What you are saying is that people are using Simulink or UML as the
source code, rather than C or Ada. There are real reasons for this;
controls engineers like to think in graphical diagrams. I think we
need to focus on getting the MathWorks and UML tool vendors to
appreciate the features of Ada that we like, and get them integrated
into Simulink and UML.
> However we still get bogged down with the standardization
Standardization of what? The graphical modeling language? yes, that is
a problem, and a reason to use Ada instead of a graphical modeling
language. UML is a standard, but the standard language is _not_
powerful enough to generate a whole system, so people use non-standard
extensions.
Improving the UML standard is the best way forward from here;
hopefully, it will incorporate some of the software engineering
features of Ada.
> and modeling of the tasking kernel,
If it's not an Ada kernel, you have this problem anyway.
> the unsafe C constructs
What do you mean, precisely, by "unsafe"? Usually, in the context of
"writing C code", this means "constructs that are easily mis-used,
leading to maintenance problems". That's irrelevant if Simulink or UML
is the source language.
Of course, there may be "unsafe Simulink constructs" or "unsafe UML
constructs". That would be a reason for using Ada instead, or for
fixing the Simulink or UML languages.
> and MISRA compliance,
Don't know what this is; some industry standard, I guess.
> weak typing
C weak typing or Simulink weak typing? C weak typing you don't care
about. Simulink weak typing is a problem (I haven't used it, so I
don't really know if it is weak). I believe UML has fairly strong
typing; on a par with C++ (not quite as good as Ada, but not "weak").
> and the representations of variables, etc.
I can imagine that defining a "type" in Simulink or UML that matches
some hardware register would be hard, if not impossible.
> which didn't seem to be that big a problem when using Ada.
If the Simulink generated Ada, you still wouldn't be able to define a
Simulink "type" that matched hardware registers. Simulink is _not_
going to generate a representation clause for a bit-mapped record type.
If Simulink did let you define a bit-mapped hardware register, it
could generate a bit-mapped C struct, and hope the C compiler has a
"pack structs" flag; most do. So generated Ada would still not be
necessary.
Make sure you are fighting the right battle; you need Simulink to be
more like Ada, not just Simulink to generate Ada.
--
-- Stephe
next prev parent reply other threads:[~2002-06-01 15:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-29 20:27 Ada automatic code generation for Simulink models John Kern
2002-05-30 6:35 ` Robert C. Leif
2002-05-30 8:59 ` Rod Chapman
2002-05-30 15:20 ` Stephen Leake
2002-05-31 19:21 ` Simon Wright
2002-05-31 20:19 ` John Kern
2002-05-31 20:59 ` Simon Wright
2002-06-01 15:11 ` Stephen Leake [this message]
2002-06-01 17:09 ` Simon Wright
2002-06-01 18:23 ` Vinzent Hoefler
2002-06-01 19:38 ` Stephen Leake
2002-06-03 9:41 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox