I'm looking for a Statechart (Harel) tool that supports C code generation, and is free (not trial copies). Any suggestions?
- posted
13 years ago
I'm looking for a Statechart (Harel) tool that supports C code generation, and is free (not trial copies). Any suggestions?
Book: Practical Statecharts in C/C++ by Miro Samek, pub CMP Books, ISBN
1-57820-110-1I'm actually looking for a software tool. I have an extremely good understanding of statecharts having used iLogix Statemate for many years. I'm looking for a free tool that hopefully targets C/PIC processors. I wish to draw my statecharts and then autogenerate code. The book recommended is a methodology, not really the type of tool I'm looking for.
Has a CD of the code, but good luck.
Nel suo scritto precedente, Marc Hillman ha sostenuto :
Hi, these days I0m trying out YAKINDU, a plugin for Eclipse.
-- http://www.grgmeda.it
,
You might want to try:
Which you cannot use without buying a license :(
-- John Devereux
Rule #3: Always check
Searching on "state machine" returns several results, including
-- Rich Webb Norfolk, VA
Rich Webb escreveu:
It seems SMC does not generate Harel (hierarchical) state charts.
-- Cesar Rabak GNU/Linux User 52247.
In my experience (several years of professional OO work), if you need hierarchical state charts, your class model is incorrect.
I think you experience does not apply here. It is possible to do the design using only state machines and turning them in code without need to resort to OO (be it analysis or design). OTOH, since Harel (hierarchical) cope well with the expansion of states that "flat" state machines have when working in real life projects.
-- Cesar Rabak GNU/Linux User 52247.
wish
aThe book and website actually contains a really vast amount of reference code that runs on dozens of embedded platforms.
What this would give you is a framework to create your own application with or without a premptive RTOS component. The framework gives you active objects, event queues, multiple simultaneous statemachines and other services.
check out the ports here:
It isn't going to generate code for you, but coding of the state machines is a breeze if you create the appropriate diagrams in Visio (or other drawing package). Filling in the actual "application code" is what takes time, and I don't know of many tools that can generate that for you. ;-)
--------------------------------------- This message was sent using the comp.arch.embedded web interface on
I'm confused... UML 2.0 is very broad and includes multiple tools for high level software design. OO would be a subset of that, right?
Anyway, the hierarchical state charts are one tool that I've found particularly useful in the past. It has worked for me when using C on embedded chips.
I don't see how that would automatically mean I'm engaged in bad OO design...
--CG
--------------------------------------- This message was sent using the comp.arch.embedded web interface on
vinnie escreveu:
I'm not sure if your comments are addressing my post or nobody's one, so. . .
UML is a 'modeling language' so is not a tool nor includes any tool at all. I will take you're using 'tool' here as figure of speech.
Yes, that's why I made my comment above.
Me either.
-- Cesar Rabak GNU/Linux User 52247.
IAR's visualSTATE
-- Dan Henry
Dan Henry escreveu:
But it is not free, is it?
-- Cesar Rabak GNU/Linux User 52247.
,
Since this forum mentions my book ("Practical Statecharts in C/C++") and the website
For starters, I'd recommend reading a few articles about modern state machines in embedded systems (see also
The bottom line is that to use state machines effectively, you first need to make a paradigm shift from the traditional sequential programming (such as a traditional RTOS or just a "superloop") to event-driven programming. Event-driven programming leads to inversion of control (a.k.a. the Hollywood Principle: "Don't call us, we'll call you") between the application and the event-driven infrastructure. This inversion of control, in turn, means that the event-driven infrastructure for executing state machines naturally takes a form of an application framework.
Which brings us to the tools based on state machines. As it turns out, virtually all such code-generating tools have an event-driven framework buried inside (e.g., the Rhapsody tool generates code for either the OXF or the IDF framework). In fact, the framework is the most important enabler of automatic code generation.
But you don't need a big tool to use an event-driven framework. You just need the framework. For example, the QP family of very lightweight, open source frameworks
Miro Samek
It is not GPL it is "Dual Licensing" very different!!
-- Cesar Rabak GNU/Linux User 52247.
Thanks for your comments Miro. It is amazing how quickly a thread can descend down a rabit hole, and the original question get lost.
I have been programming, professionally, with Harel Statecharts for 10 years, in an Avionics environment. I have an exceptionally good understanding of Statecharts. I'm used to an enviromnent with animation, and the ability to connect models to real hardware.
What I'm trying to achieve is something similar to the rich environment I'm used to in aerospace industry, but accessable to your average hobbiest, as I'm in that mode now. What I'm after is a statechart drawing tool that supports the full statechart notation, including concurrent states, so I can design my software. I have your book, but the Visio templates provided are a bit manual for my liking, and I still haven't worked out why they are needed - the Visio ones seem smarter. I'd like a system with some completeness/correctness checking. It also has to be free. I'd also like it to be possible, if I decided to do so, to 'autocode' from the statecharts to QP (C). It's a bit tedious transcribing the drawn statecharts into C, but I'm happy to do this if autocode is not feasible.
I'm still looking, so any suggestions for a Statechart tool welcome.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.