Tabcon: Tablet-based Tools for Teaching Concurrent Programming

Concurrent programming is an important and difficult topic in computer science education. It requires a way of thinking that is significantly different from the one in the ordinary sequential programming model. This project focuses on improving the teaching and learning of concurrent programming by developing tablet-based tools to add dynamism to previously static artifacts and unveil the hidden behavior of concurrent programs.

Correlating runtime visualization with thread interaction diagrams

Visualization tools (as shown in Figure 1) let students control the execution of threads and provide instant visual feedback, but they do not help students discover and analyze concurrency problems such as data race and deadlock. Thread interaction diagrams as shown in Figure 2 are illustrative in describing concurrency problems, but they are separate from the code and hard for students to know which part of the code causes the problems.

Figure 1: Visualization of thread execution.


Figure 2: A thread interaction diagram showing deadlock.

This project will correlate the thread visualization and thread interaction diagram to support better illustration of concurrency problems in class. For example, during a class, the instructor can use a stylus to draw a thread interaction diagram as shown in Figure 3. Then, the instructor can associate critical points on the diagram (such as the intersections between the thread lines and the object circles) with specific lines of code in Figure 1. The software will automatically use the lines of code as delimiters to evenly map the rest of the code with the thread lines. Then, the instructor can move the stylus along a thread line and the corresponding code in Figure 1 will be highlighted simulating the execution of the thread. Our tool will allow the instructor to move two styluses simultaneously with one stylus in the left hand and one stylus in the right hand to simulate unlucky timing of operations in two thread execution, an action that instructors often do when showing two threads being executed at the same time. Figure 3 shows the starting points of the lines of code that are highlighted when two styluses move along the thread lines.


Figure 3: The starting points of the code that is highlighted in Figure 1 when styluses move along the thread lines.

Figure 4 shows another type of diagram that is commonly used in concurrent programming. We will develop tools to help instructors create such diagrams and associate them with visualization by adding annotation marks to the code (see Figure 5). When the instructor moves styluses along the thread lines in the diagram, corresponding code will be highlighted accordingly.


Figure 4: A diagram describing a data race problem.


Figure 5: Two threads involved in a data race problem.

Sponsor: Microsoft Research.