Capturing behavior as an SM is an art The following 3 step process may help 1

Capturing behavior as an sm is an art the following 3

This preview shows page 11 - 13 out of 13 pages.

Capturing behavior as an SM is an art. The following 3-step process may help 1. Step1. A first step is to list the system's basic state 2. Step2. A second step of the process is to add transitions to each state to achieve the desired behavior
Image of page 11

Subscribe to view the full document.

HW2Z2 EEL 4730 RVC Name: Tristan S. Shadd-Simmons ID: 6169148 3. Step 3. The third step is to mentally check the behavior of the captured SM. This step may result in adding more transitions, or even more states. Minimally, for each state, we should check that exactly one transition's condition will be true, modifying the conditions or adding transitions if necessary. Even more importantly, we should also determine whether the SM's behavior is as desired, by mentally executing the SM and thinking what input sequences might occur. In doing so for the above SM, we consider the possibility that a user might want to disarm the system while armed, and notice that is not possible in the SM. Testing time-ordered behavior requires generating a good set of input scenarios, where a scenario is a sequence of inputs that should cause a sequence of state. Such testing contrasts with merely generating a good set of input combinations for a system lacking internal states, each input combination known as a test vector. A testing process for time-ordered behavior may consist of: 1. Decide what scenarios to test, including normal cases as well as border cases. 2. Devise a sequence of test vectors to test each scenario. When testing an SM, test vectors should ensure that each state and each transition is executed at least once. Furthermore, if a state's action code has branches, then test vectors should also ensure that every statement is executed at least once. Even more ideally, every path through the SM would also be tested, but achieving complete path coverage is hard because huge numbers of paths may exist. In testing terminology, black-box testing refers to checking for correct outputs only, as in checking the value of B0 in the above example. In white-box testing, internal values of the system are also checked, such as the current state. One can see the advantage of white-box testing in the above example, where the output was correct, but the state was not. Further black-box testing might discover the above problem too, but white-box is more likely to detect problems. Of course, white-box testing is harder because a mechanism is necessary to access internal values. Designing good test vectors can take much effort, both to formulate the scenarios, and to properly create the test vectors. Testing is as important as capturing the SM. “Good practice” is to plan to spend nearly as much time for testing a system as for designing a
Image of page 12
HW2Z2 EEL 4730 RVC Name: Tristan S. Shadd-Simmons ID: 6169148 system. New programmers rarely follow this practice, believing testing is just a "sanity check" step at the end of design.
Image of page 13
  • Fall '13

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes