EmbeddedRelated.com
Forums

Is UML appropriate for embedded systems ?

Started by Alain October 14, 2004
On Tue, 26 Oct 2004 16:27:41 +0200, Ton Janssen wrote:
> Reading your reaction below you obviously did NOT use Rose Realtime 2003. > Another observation is that hierarchical packages ARE allowed. We always use > hierarchical packages in our design. CM integration must be prepared by an > expert. Once this has been done Rose-RT integrates seamlesly with your Cm > tool. Check in, check out, refresh, all no problem. Refreshing a large model > takes about a minute (at least on my PC, a Pentium 4 1.6GHz) and is done in > the background. Rose-RT 2003 gives you the possibility to refresh from CM in > the background afer opening the model. We use CMSynergy. I agree only on the > crappy editor used to fill in your transition code etc. Each freeware > product has a better source code editor with syntax highlighting. Your > collegae in France probably means Telelogic Tau-G2, which is also a UML 2.0 > tool with code generation. I like ROOM state diagram more (above UML 2.0) > because they correspond better to the program flow. > <snip>
A couple notes from another Realtime user. First, you can have Rose automatically use any favorite editor you choose (Xemacs, etc.) to fill in the code and documentation windows when you're filling in a use case specification or transition snippet. Regarding the CM refresh time, we've hooked it up to RCS, ClearCase, and Razor and the only slow experience is on our older Solaris machines. On a newer Linux based machine it's pretty fast, especially if you replace the rtperl program supplied by Rational with your own scripting front end. There's not a whole lot of speed optimization behind the Perl scripts supplied out-of-the-box by Rational.
Ed Beroset wrote:
> I haven't used a gnu toolchain for an embedded project yet, but I would > expect that there are still going to be dead code possibilities that the > machine is going to have a hard time eliminating. E.g:
If bar() in your example was declared static, and if you didn't say i==0 in the for() loop initialisation (which makes the whole program undefined), then gcc optimises it to a single call to printf. If you meant to say "i < limit" as the for() termination condition as I suspect, gcc turns foo() into a return statement. This is with -O6. Try it yourself using -S and look at the asm. This level of global-optimization was becoming standard about 8 years ago. There are much better optimisers now, including link-time ones that do this over the whole program. There are even optimisers that generate instrumented code, link it, get you to run it over some typical input, then re-optimise using the information gained. To my knowledge this was implemented first in a production compiler also about 6-8 years ago, but definitely wasn't standard then. Clifford Heath.
"Ton Janssen" <djan@oce.nl> wrote in message news:<1098167368.621217@news-ext.oce.nl>...
> Hi, > > In my opinion, UML is very wel suited for embedded systems specification, > design AND implementation. Sequence diagrams are a good help in specifying > specific behaviour, although you need more diagrams (structure and > behaviour) to completely specify the system. IMO the big advantage only > starts if your systems's model is used to generate the actual code, > otherwise you end up with a documentation tool. >
In an article by telelogic, www.telelogic.com, one can read: "Structured Analysis and Structured Design (SASD) techniques have been around for over twenty years, and usage in certain areas of systems and software development, particularly system engineering in large aerospace and defense projects, is still found today. The first generation of UML has had uptake for analysis and high-level design and some degree of use for partial software generation, but has not been seen as sufficiently complete to replace SASD in all circumstances. For current practioners of Structured Analysis and Structured Design, who have not been satisfied with the first generation of UML (1.x) due to its lack of support for hierarchical architecture modeling, but who want to be able to adopt the latest visual systems and software development tool support, UML 2.0 provides the answer." Did you find that UML 1.x had shortcomings and do you consider that UML 2.0 is satisfactory ?
"Alain" <alain.boule@atermes.fr> wrote in message
news:d2753e91.0410290505.5e567a11@posting.google.com...
> "Ton Janssen" <djan@oce.nl> wrote in message
news:<1098167368.621217@news-ext.oce.nl>...
> > Hi, > > > > In my opinion, UML is very wel suited for embedded systems
specification,
> > design AND implementation. Sequence diagrams are a good help in
specifying
> > specific behaviour, although you need more diagrams (structure and > > behaviour) to completely specify the system. IMO the big advantage only > > starts if your systems's model is used to generate the actual code, > > otherwise you end up with a documentation tool. > > > > In an article by telelogic, www.telelogic.com, one can read: > "Structured Analysis and Structured Design (SASD) techniques have been > around for over twenty years, and usage in certain areas of systems and > software development, particularly system engineering in large aerospace > and defense projects, is still found today. > > The first generation of UML has had uptake for analysis and high-level > design and some degree of use for partial software generation, > but has not been seen as sufficiently complete to replace SASD in all > circumstances. > > For current practioners of Structured Analysis and Structured Design, > who have not been satisfied with the first generation of UML (1.x) due > to its lack of support for hierarchical architecture modeling, but who > want to be able to adopt the latest visual systems and software
development
> tool support, UML 2.0 provides the answer." > > Did you find that UML 1.x had shortcomings and do you consider that UML
2.0
> is satisfactory ?
In UML 2.0 'Ports' are introduced with required and provided interfaces. IMHO this is the biggest advantage of UML 2.0 compared to 1.x. Ports are a very strong concept when specifying composite objects, i.e. one that contains other objects in a containment relationship. In particular the structured class concept can be specialized to model active objects which have their own thread of control that communicate with other active objects, asynchronously, using message queues. These active objects address a key need of the embedded and real-time developer: the ability to model complex and concurrent objects in the problem domain such as interfaces and devices. Ports were introduced based on the ROOM concept of ports. The only reason I prefer ROOM above UML is the statediagram implementation. We compared UML state diagrams (Rhapsody) with ROOM state diagrams (Rose RealTime) and found that ROOM state diagrams correspend better to the actual program flow of the generated code. Compare the result of a piece of generated code when drawing a diagram with 3 states (A,B,C) and a choicepoint between A,B(true) and A,C(false). In the UML version there is code duplication, in the ROOM version, reading the diagram is reading the code. It is probably also a matter of taste; we used to ObjecTime in the late nineties. Cheers, Ton Janssen