CS 685 - Software Engineering
Assignment 1 - Documentation
Greg Yukl (gjy3a)
Joel Winstead (jaw2u)
Andrea Rowan (apr5w)
David Larochelle (drl7x)


Overview
Code
Specifications
Time Chart
Overview

This code implements a state machine API.  The user of this package makes a sequence of function calls to build the state machine.  The machine can be fed events, and it will transition from state to state as appropriate.

The model used for a state machine parallels the graph data structure: individual states are nodes in the graph, while transitions correspond to directed edges between nodes.  The user defines nodes with a node name, unique within the state machine.  Transitions are defined in terms of the source node name, destination node name, and a letter identifying each transition uniquely within the context of a given source node.  Transitions from a node to itself are allowed, as are multiple transitions between the same two nodes (triggered by different events).  A transition will occur when a particular event is fed into the machine.  Each event is associated with a
specific letter, which will trigger a given transition if it matches the letter identifying that transition.

This package effectively implements a deterministic finite state machine.  The user first builds the machine, then makes it operational and feeds it events.   The simulation must be stopped to change the properties (add/remove states and transitions).  It can either resume where it left off, or be reset to the original initial state.

A driver has been provided to allow automated testing of the library internals, specifically to support maintenance of this package.  This code should be run after any changes have been made to the library.  It has been designed to test a number of likely failure points and produces easily readable output, making it more user-friendly.

Code

  • Driver.java
  • Letter.java
  • Transition.java
  • FSMException.java
  • MealyMachine.java
  • FiniteStateMachine.java
  • State.java Specifications Here is a list of problems that we encountered and the solutions we chose: Time Chart Bar graph with time break down