SWE 637 Homework 7
Fall 2006
FSM Coverage: Due 11/14, beginning of class


Answer the following questions. Bring hardcopies of your answers to class, hand written or printouts. All homeworks are due before class on the due date. Please remember that the GMU Honor Code is in effect: You may discuss the assignment with each other, the professor, or the GTA, but each homework should be done individually.

  1. FSM Implementation. (5 pts)
    Write a simple program to implement the state machine on slide 3 for section 3.5 (the subway train door opening example). Your class should have the state variables used in the example: secondPlatform, emergencyStop, overrideOpen, doorsClear, trainSpeed, platform, inStation, emergencyStop, overrideOpen, and, of course, a variable to indicate the current state. Make the logic simple: each time the state handling method is called, check the current state and the current values of the variables and change the state if appropriate. To increase observability, have the program print the current state after each update. (Print the state even if a transition is not taken.)

    Note that this FSM is not defined to be total, but your program should be. If the predicates are not satisfied, no transition is taken.
    Submit a printout of your program.

  2. CACC Test Design. (10 pts)
    Starting with the example tests in the slides, derive complete CACC tests for your program.

  3. CACC Test Execution. (5 pts)
    Run your tests. Report the results by submitting result of the executions.

  4. Agitator Bonus. (5 pts)
    1. What level of combinatorial coverage does agitator achieve on your program?
    2. Run your tests within agitator. What level of edge coverage do they achieve?