18-649 Project 5

Due Thursday February 19, 2007 at 11:59 PM

Please submit all project-related correspondence to staff email address


Changelog:

Assignment:

In project 5 you will build half of your elevator system and informally test one sequence diagram.  The purpose of this exercise is to get you started writing code for the elevator system. 

This project is more challenging than the previous ones!!! Please start on this project as early as possible.  You will find that many parts of this (e.g. the acceptance tests) cannot be rushed, so please do not wait until the last minute.

1)   First, download and compile the latest version of the simulator code from the download page

Run run the simulator with no parameters to print the command line documentation.  Study the flags and features available in the simulator. 

Read the simulator development overview.

Read the bug handling policy in the project FAQ.

2) Implement (in Java) the DoorControl, DriveControl, HallButtonControl, and CarButtonControl objects. These correspond to some of objects you have previously designed in state charts.

Each controller object you write interfaces with the simulated physical system and the simulated network.  Here are some requirements for the controllers:
  1. Each controller shall extend the simulator.framework.Controller class.
  2. Each controller shall be places in the simulator.elevatorcontrol package.
  3. Each controller shall use the network and physical interface objects provided in the Controller super class and no other network connection objects.
  4. Each controller shall receive, at most, one physical input and generate, at most, one physical output.
  5. Each physical message shall be sent by, at most, one object and received by, at most, one object.  For example, if your DriveController listens to the DriveSpeed message, your Dispatcher may NOT listen to DriveSpeed messages as well.  If your DriveController sends Drive Framework messages, your Dispatcher may NOT send Drive Framework messages as well.
  6. Each controller shall receive and send network message according to the interfaces defined in the Elevator Behavioral Requirements document.
  7. You may not create additional communication channels of any kind between the controllers.  This includes creating shared references to static/global variables and any method where a controller may directly modify the state of another controller.  If you are in doubt as to whether something you are doing violates this requirement, consult a TA in office hours.

In addition to the above:

A couple of notes regarding the CAN network implementation:
As you continue to develop your project, you should also continue to log defects and changes in the logs that you started during project 4.

3)  Traceability - statecharts to code

You are REQUIRED to mark the line of code that causes each and every state transition (i.e. forward traceability) you have designed on your state charts. This marking will be accomplished with comments. So that these lines are easily distinguished from other comments, you shall begin the line with '//' (to start the comment), followed by the character '#', followed by the word 'transition', followed by the transition name as described on your state machine backward traceability matrix in single quotes.

For example, on the line of code that corresponds to the DC.1 transition on your Drive Controller statechart traceability matrix, you would add the comment:

//#transition 'DC.1'
just above the line in your code that actually CAUSES this transition.

This is done so that it is possible to easily check to ensure all of the arcs in your state transition diagram are implemented as you have described them.

In order to ensure that you have traced all your arcs, you will add an entry to the Statecharts to Code Traceability file (traceability/sc_code.html in the portfolio template)

Controller Name (e.g. DoorControl)
Module Author:  Module author's name
Traceability performed by:  Team member's name
Line Number    Transition #
Line Number    Transition #
....

You may use a table or other basic formating to organize this information. The line number refers to the line that the comment appears on.  Line numbering shall include empty lines.
Hint: 
the following linux commands may help you generate some of the required output:  
        nl -b a Dispatcher.Java | grep "#transition"
where Dispatcher.Java is the name of the controller Java file.

Someone other than the person who authored the module must generate this check and verify that every transition traces to the code.

4) Write unit tests to informally test the DriveControl statechart. 

Read the Unit Test section of the Testing Requirements.   Using these guidelines, create tests that exercise all transitions of your DriveControl design (i.e., all arcs on your state diagram).  Have someone other than the test author perform a peer review of the test.  Execute the test.  Record the peer review and test results in the Unit Test Log in your portfolio.

5) Write tests to informally test one sequence diagram. 

Read the Integration Test section of the Testing Requirements.  The sequence diagram you choose for this test must contain at least one of the four control objects created in this project (DoorControl, DriveControl, HallButtonControl, and CarButtonControl) and must not contain any of the other three control objects (Dispatcher, LanternControl, CarPositionControl).  Have someone other than the test author perform a peer review of the test.  Execute the test.  Record the peer review and test results in the Integration Test Log in your portfolio.

6)  Acceptance testing

Read the Acceptance Testing section of the Testing Requirements.  We will provide you three acceptance test files to test against your elevator system: proj5acceptance1.pass, proj5acceptance2.pass, and proj5acceptance3.pass.  Part of your grade for this project will be based on whether or not your elevator system can pass these three tests and two others that we will not show you until after the project has been submitted.  You are encouraged to make up your own tests to further exercise your elevator system.

Run the three acceptance tests listed above and record the results in the Acceptance Test Log.  If you run any additional acceptance tests, you should also record those results in the log.

If your elevator does not pass the acceptance tests,
you may also receive credit for this part of the assignment by documenting the problems with the elevator code as an unresolved defect in your defect log.  To received credit in this manner, you must clearly document which object or objects is causing the problem, and in what manner they are failing.  For example, "Elevator does not deliver passengers." is not acceptable defect report.  "Elevator does not deliver passengers because the DoorControl does not open the back doors." would be acceptable.  This documentation should appear in your issue log and also in the notes section of the Acceptance Test Log.

Note:  Your elevator will be required to pass the acceptance tests next week, so do not take this alternate option as an excuse to blow off development of your controllers.  You will just have twice as much work next week.

After the project is turned in, if your elevator passed all three acceptance tests, we will run the additional acceptance tests.  Your group will get "bonus" points if you elevator passes these tests. 


Team Design Portfolio

The portfolio you submit should contain the most up-to-date design package for your elevator system organized into the following directories.  You are going to update your portfolio every week, so be sure to keep an up to date working copy. 

Files that you should update for this week are:

Ensure your design portfolio is complete and consistent.

The following is a partial list of the characteristics your portfolio should exhibit:

Handing In Results

Each team shall submit exactly one copy of the assignment.

Follow the handin instructions detailed in the Project FAQ to submit your portfolio into the afs handin directory (/afs/ece/class/ece649/Public/handin/project5/group#/ontime/).

Be sure to follow ALL the portfolio guidelines detailed in the Portfolio Layout page.

Any submission that contains files with modification dates after the project deadline will be considered late and subject to a grade deduction (see course policy page for more information).


Grading Criteria:

This assignment counts as one team grade. If you choose to divide the work, remember that you will be graded on the whole assignment.

105 Points Total. (135 points possible with bonus) Grading will be as follows:


Back to course home page