程序代写代做代考 7CCSMASE

7CCSMASE
Tutorial 10 (Week 11)
1. Consider the following example of a program that checks whether one string is within edit distance 1 of another string (for autocorrect – used on misspelled words to see whether we can correct them automatically to a close word from the dictionary).
Suppose we seed a fault in line 27, replacing (s1+1) by (s1+0). Is there a test case that will kill this mutant? What happens if we use weak mutation as opposed to strong mutation?
2. Generate some invalid, valid but not useful, valid and equivalent, and valid and non-equivalent (that is, useful) mutants for this program using mutant operators discussed in class (or similar).

3. Storing detailed logs of executions of the modified version to compare with the original version can be lengthy and expensive. Suggest more efficient approaches to implementing comparison- based test oracles when it is not possible to store the whole output.
4. We have described as an ideal but usually unachievable goal that test oracles could be derived automatically from the same specification statement used to record and communicate the intended behavior of a program or module. To what extent does the “test first” approach of extreme programming (XP) achieve this goal? Discuss advantages and limitations of using test cases as a specification statement.
5. Often we can choose between on-line self-checks (recognizing failures as they occur) and producing a log of events or states for off-line checking. What considerations might motivate one choice or the other?