value of the condition in the previous step. For exam-
ple, the formula entry in cell A3 of the sheet shown in
Figure 4 is as follows.
=IF(A2=0,30,IF(A2=30,31,IF(A2=31,50,
IF(A2=50,51,IF(A2=51,61,IF(A2=61,62,
IF(A2=62,63,IF(AND(A2=63,C2=TRUE),70,
IF(AND(A2=70,C2=TRUE),80,IF(AND(A2=70,
C2=FALSE),64,IF(A2=80,64,IF(A2=64,63,
IF(AND(A2=63,C2=FALSE),90,90)))))))))))))
This formula compares the line number of the previ-
ous step to all line numbers in the program and, pos-
sibly depending on the value of condition in the pre-
vious step, decides the current line number.
The formula for the second column (labeled as
“code”) is straightforward. It compares the current
line number with all line numbers and, when the num-
bers match, returns the string for the code fragment
corresponding to the number.
The formula for the third column representing the
value of the condition, when the current code frag-
ment is a condition expression, is similar to the one
for memory cells.
4.2 How to Generate Formula Entries
In this section, we show how the formula entries of
a tracesheet is generated from a source code of Java
program.
First, we parse the source code and get an Abstract
Syntax Tree (AST) using Eclipse JDT libraries. Then
we analyze the AST and create a transition diagram,
which is a directed graph where the vertices are code
fragments and the edges are transitions. A transition
is unconditional if it represents the usual sequential
flow in the execution. It is a true-transition it cor-
responds to conditional branches prescribed by an if-
statement or a for-statement and occurs when the con-
dition evaluates to true. False-transitions are defined
similarly. In addition to the transition graph, we com-
pute the list of updates for each variable. An update
for a variable is a pair consisting of the line number of
a code fragment that is an assignment to the variable
and the right-hand-side expression of the code frag-
ment.
Given the transition graph and the list of updates,
it is rather straightforward to generate formula entries
of the tracesheet. We omit the details.
5 CONCLUDING REMARKS
We have proposed the use of tracesheets in introduc-
tory programming courses, discussed the motivation
and potential benefits of their use, and described a
preliminary implementation of a tracesheet genera-
tor for Java. We plan to evaluate the effectiveness of
tracesheets through their use in actual classes and ses-
sions and in a web-based programming course we are
developing.
REFERENCES
Baecker, R. (1998). Sorting out sorting: a case study of soft-
ware visualization for teaching computer science. In
SoftwareVisualization: Programming as a Multimedia
Experience, pages 369–381. MIT Press.
Hundhausen, C. D., Douglas, S. A., and Stasko, J. T.
(2002). A meta-study of algorithm visualization ef-
fectiveness. Journal of Visual Languages and Com-
puting, 13(3):259–290.
Lahtinen, S.-P., Sutinen, E., and Tarhio, J. (1998). Auto-
mated Animation of Algorithms with Eliot. Journal
of Visual Languages and Computing, 9(3):337–349.
Levy, R. B.-B., Ben-Ari, M., and Uronen, P. A. (2003). The
Jeliot 2000 program animation system. Computers
and Education, 40(1):1–15.
Microsoft Corporation (1985). Microsoft excel.
http://office.microsoft.com/en-us/excel.
Moreno, A., Myller, N., Sutinen, E., and Ben-Ari, M.
(2004). Visualizing programs with Jeliot 3. In Pro-
ceedings of the Working Conference on Advanced Vi-
sual Interfaces, pages 373–376. ACM Press.
Sajaniemi, J. and Kuittinen, M. (2003). Program anima-
tion based on the roles of variables. In Proceedings of
the 2003 ACM symposium on Software visualization,
pages 7–16. ACM Press.
Shaffer, C. A., Cooper, M. L., Alon, A. J. D., Akbar, M.,
Stewart, M., Ponce, S., and Edwards, S. H. (2010).
Algorithm Visualization: The State of the Field. ACM
Transactions on Computing Education, 10(3):1–22.
Sun Microsystems (1995). Java.
http://www.oracle.com/technetwork/java/index.html.
Sutinen, E., Tarhio, J., and Ter¨asvirta, T. (2003). Easy Al-
gorithm Animation on the Web. Multimedia Tools and
Applications, 19(2):179–194.
Timsit, C. and Zertal, S. (2010). Using spreadsheets to teach
computer architecture. In CSEDU 2010 2nd Interna-
tional Conference on Computer Supported Education,
pages 101–105. INSTICC.
Urquiza-Fuentes, J. and
´
Angel Vel´azquez-Iturbide, J.
(2009). A Survey of Successful Evaluations of Pro-
gram Visualization and Algorithm Animation Sys-
tems. ACM Transactions on Computing Education,
9(2):1–21.
TRACESHEETS-SpreadsheetsofProgramExecutionsasaCommonGroundbetweenLearnersandInstructors
163