Contents

Title

Abstract

Introduction

We bring together two largely exclusive fields: CS education and mutation testing in software engineering.

Evolutionary Computation

Mutation Testing

CS Education

Programming

=== Debugging ===

Academic Honesty and Cheating

Methods

User Workflow

  1. Write assignment
  2. Write unit test for assignment
  3. Ensure 100% line coverage
  4. Generate and test mutants
  5. Select killed mutants and distribute to students

Program Flow

program-flow

  1. Given a translation unit...
  1. Feed through parser, traverse syntax tree, and locate mutation candidates. Store in file. User can edit this file before step 3, which allows fine tuning of mutation parameters. The file is formatted as a CSV:
  1. Feed the candidate file and the source file through a mutator program. The mutator program reads the candidate file and performs a mutation. The mutation is recorded and the output file is recorded.:
    1. Table 2
      LINE COL SYMBOL OP TYPE OPERATOR NEW OP LOCATION
      9 13 is_valid_sides BinaryOp != <= 0-0-triangle.so
      9 13 is_valid_sides BinaryOp != > 0-1-triangle.so
      9 13 is_valid_sides BinaryOp != < 0-2-triangle.so
      9 13 triangle_tritype BinaryOp != <= 0-0-triangle.so
      9 13 triangle_tritype BinaryOp != > 0-1-triangle.so
  1. Two new columns are added: NEW OP and LOCATION. The NEW OP column indicates how the symbol was mutated. Location indicates the file where the mutated symbol can be found. In our implementation for C, the new symbol is found in a shared object file.
  2. The last two row indicates that the symbolic link from table 1 has been resolved
  1. The DB file is read by the unit test executor. The data is stored in an associative array, keyed by the symbol. The value is a list of all mutations for that given symbol. Represented in JSON, the data would look like this:
        {
            “Is_valid_side”: [“0-0-triangle.so”, “0-1-triangle,so”, …]
            “triangle_tritype”: [“0-0-triangle.so”, “0-1-triangle.so”, …]
        }

Note that in these examples, is_valid_side is a private function. However, we expect references to private references to fail at link-time.

  1. Run the mutation test, and record which mutants were successfully killed.

Results

Discussion

References

[1] Offut, et al. "An Experimental Determination of Sufficient Mutation Operators"

TODO