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*'
The Finite State Kernel Creator (FSKC) is a Computer Aided Software Engineering (CASE) tool that allows one to:
- Graphically design Finite State Machines (FSM)
- Easily add states and events
- Interactively execute previously designed FSMs
- Print an FSMs finite state transition table
- Print state and event descriptions
- Generate C source code implementing an FSK
- Incorporate a customizable length circular buffer retaining the previous state-event transitions for debugging purposes
- Check for infinite states and provide a warning if such states are found
- 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:
In File Open and other file selection windows a pop-up window is sometimes displayed containing the following message:Error in Tcl ScriptJust select OK and ignore the error message
Error: PRIMARY selection doesn't exist or from "STRING" not defined
Released version 2.1 on March 4, 2001.
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.