[ANN] SMC - State Machine Compiler v. 4.2.1 for C

C

Charles Rapp

SMC - The State Machine Compiler v. 4.2.1


Requires: Java 1.4.1 SE (Standard Edition) or better.
Download: http://sourceforge.net/projects/smc
Home Page: http://smc.sourceforge.net

Why use C? You know why - powerful, flexible, simple and
very capable.

Why use finite state machines (FSMs)? For the exact same reasons.

Computing has long since moved beyond a single process, a single
processor and single computer programming language. Your application
lives in a distributed world with asynchronous events, I/O and
timers. Objects together with FSMs can handle this difficult
world in a robust and efficient manner. An object's encapsulated
FSM tracks the object's current state. The current state defines
how the object should respond to an event.

=================================================================
What is SMC?
=================================================================

SMC takes a state machine description (stored in a .sm file) and
generates State pattern classes in a target language (C++, C,
Java, Tcl, VB.Net, C#, Python, Ruby and Perl are currently
supported). SMC is a console-based app written in Java which
means SMC can run anywhere Java (1.4.1 or better) can run. The
download package includes an example directory showing how SMC
can used with all nine supported languages. The examples range
from trivial to GUI apps.

SMC generated code is trivial to hook into existing C
applications:

+ SMC does not change your code or require you to change your
code's logic.
+ SMC does not use state transition arrays or switch
statements.

An object simply instantiates the FSM and passing in its "self"
to the FSM constructor.

SMC is a mature software tool: 5 years old, in use around the
world and used in production software for the telecommunications
and financial exchanges. It is an active open source project with
new languages and features regularly added.


=================================================================
How can I learn more?
=================================================================

At http://smc.sourceforge.net. You can access the SMC
Programmer's Manual there as well. While you're there, check out
the SMC demo applet at http://smc.sourceforge.net/SmcDemo.htm.


=================================================================
Where can I get it?
=================================================================

SMC and the Programmer's Manual can be downloaded from
http://sourceforge.net/projects/smc. You can also use this
website to:

+ Ask questions (via the Public Forum's Help discussion)
+ Submit a bug.
+ Join a mailing list.
+ Access SMC documentation.
+ Access SMC's source code in the CVS repository.

(Note: in order to make full use of SourceForge capabilities,
you must be a SourceForge member. If you are not a member,
head over to http://sourceforge.net/account/register.php
and sign up. SourceForge membership is free - no money, no
requirements and NO SPAM! Membership has its benefits.)

If you have any problems, surf over to
http://sourceforge.net/forum/forum.php?forum_id=27865 and report
the problem. I will try and answer you via the Help forum as
quickly as I can.


Enjoy!

Charles Rapp
 
W

William Ahern

Charles Rapp said:
Why use C? You know why - powerful, flexible, simple and
very capable.

How 'bout portable?
supported). SMC is a console-based app written in Java which
means SMC can run anywhere Java (1.4.1 or better) can run. The

In others, it won't run on my desktop, server or laptop (altogether two
operating systems and three processors). That's a shame, because it actually
looked interesting.

Oh well.
 
J

Julian V. Noble

William said:
How 'bout portable?


In others, it won't run on my desktop, server or laptop (altogether two
operating systems and three processors). That's a shame, because it actually
looked interesting.

Oh well.

You might want to look at my article "Finite State Machines in Forth"
which describes various kinds of FSM's. I am not advocating that you
should use Forth, merely pointing out that the code for compiling
FSM's is simple and (I am sure) easily translatable to C or C++ .

The essential ingredient is a table of pointers to functions, which
operates in parallel with a table listing state transitions. Or you
could make one table using structs. The virtue of doing it that way
is that the program looks just like the state-transition table it is
supposed to represent.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top