SourceForge Logo
Finite State Kernel Creator
A CASE Tool for Developing Finite State Machines

tonycu at users_sourceforge_net


Download FSKC v2.1 source code here.
Download FSKC PDF documentation here see NOTE1 below

The FSKC project page is http://sourceforge.net/projects/fskc

NOTE1: I selected a bad font (Roman-WP) when writing this document and have spent a significant amount of time trying to globally change the font so it is legible in the PDF readers - without luck. The xpdf utility does NOT display the file, acroread does but the characters are real choppy. Use ghostview to view the PDF documentation!

NOTE2: Use this Makefile in the .../fskc/src/Tk directory on distros that have TCL/TK v8.4. Otherwise you will get the errors below. A new FSKC package will be release (sometime this year) to fix these build issues in the code as outlined here.

fsm_wish.C: In function `void vCheckModifiedFlag(int*, Tcl_Interp*)':
fsm_wish.C:320: error: invalid conversion from `const char*' to `char*'
fsm_wish.C: In function `void vLoadDisplayMessage(char*, int*, Tcl_Interp*)':
fsm_wish.C:349: error: invalid conversion from `const char*' to `char*'
:



What does this tool do?
The Finite State Kernel Creator (FSKC) is a Computer Aided Software Engineering (CASE) tool that allows one to:
 
  1. Graphically design Finite State Machines (FSM)
  2. Easily add states and events
  3. Interactively execute previously designed FSMs
  4. Print an FSMs finite state transition table
  5. Print state and event descriptions
  6. Generate C source code implementing an FSK
  7. Incorporate a customizable length circular buffer retaining the previous state-event transitions for debugging purposes
  8. Check for infinite states and provide a warning if such states are found
  9. Define a fail-safe action for undefined state-event combinations


The FSM CASE tool allows developers to specify all valid and invalid state-event combinations of the software through a simple Graphical User Interface (GUI).  The complete state table can be printed at any time, in ASCII form, for design reviews or presentations.  With a click of a mouse button, the CASE tool will automatically create source code implementing the Finite State Kernel (FSK).  The actual functions called by the FSK can then be coded and linked with the FSK to form the complete FSM.  New states and events can be added or removed in a fraction of the time previously taken when done by hand.  Engineers can interactively step through the state machine to verify its correctness and completeness.

A few screen shots:

 
 
 


Known Issues:
In File Open and other file selection windows a pop-up window is sometimes displayed containing the following message:
Error in Tcl Script
        Error: PRIMARY selection doesn't exist or from "STRING" not defined
Just select OK and ignore the error message




News/Announcements:
Released version 2.1 on March 4, 2001.


What needs to be done?/Help Wanted!
Examples, examples, and more examples - I'd like to have a half dozen or so "real world" examples.

Re-write the code segment in iGenerateCSource(...), or better yet make the segment a function that parses the formal parameter list to handle such variables as "char *var" - it can currently handle "char* var" (note the location of the *).

Add FSKC user supplied description to source and header file; need to format the description to fit within the comment section.

Show file names in the directory when doing a Save As.

Add configure script for building FSKC.

Provide option to log states and events to a file when interactively running the FSK.

When a state or event is found in the Find window, flash the state or event block a few times in case it can't align with the leftmost column or topmost row.

Add the capability to find all action-blocks that transition to a given state.

Make changes to allow dynamic state, event, and action-block structure member lengths. This will remove the length limits on such fields as the state name and description, function name and parameter list, and description fields.

Automatically generate test cases based on the state transitions. Taking this a step further, when transitioning from an action-block to a given state, the source code could be automatically analyzed to determine the possible return values from each iterative action-block. The number of test cases could then be reduced by removing the test cases associated with events the function will never return. For example, if a function in an action block has the capability of returning two of N events, only those two events need to be tested when transitioning from that action-block.

When searching for functions, add a flag indicating if the action-block is iterative and the state the action-block transitions to.

Remove the dependency on FSKC_BIN_DIR being set in order to start the tool.

When printing documents and generating source code, if the file about to be created exists, prompt the user to confirm overwriting.
 



  The CMoy Beginners Board by Tony Cureington.