Checking automatically the output of concurrent threads

  • Authors:
  • Rainer Oechsle;Kay Barzen

  • Affiliations:
  • University of Applied Sciences;University of Applied Sciences

  • Venue:
  • Proceedings of the 12th annual SIGCSE conference on Innovation and technology in computer science education
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Assessing automatically students' solutions to concurrent programming assignments by looking at the produced output is a crucial and error-prone task. On the one hand a student's program may coincidentally produce a correct output although the program is faulty; the program could also produce invalid output which does not happen to be observed even when the program is run several times. On the other hand the synchronization in a student's program may be too strong, leading to a situation where certain correct outputs can never be generated. This paper presents an approach for checking automatically the output of concurrent threads for correctness. The basic idea is that we provide special implementations of synchronization primitives like semaphores that use vector timestamps. Every output action of a thread is tagged by its vector timestamp. Therefore it can be decided whether two output actions are causally related (they can occur only in the order which was actually observed because of an underlying synchronization), or whether two output actions are not causally related, i.e. concurrent (they may happen in any order). The output of a student's program is represented as a graph. The correctness check consists of a comparison between the expected graph and the observed graph.