• Ingen resultater fundet

Model-Based Animation for Program Visualization

3.2 Advantages & Disadvantages

There are several advantages in using model-based reasoning for program animation:

• There is no need to separately script the animation. Since animation is entrusted to the model of the programming language, it is realized implicitly through message passing among the domain objects rather than explicitly through calls in the script.

• Since there is no need to write scripts to animate a program, the system can handle any program, without having to first preprocess it to generate the animation script. The completeness of the animation depends on the comprehensiveness of the model of the domain built into the system.

• Since the animation is assembled dynamically, this approach is more cost-effective than anno-tating programs individually.

For program animation, the actions performed during the simulation of the programs serve as adequate cues for model-based animation. On the other hand, for algorithm animation, the individual steps in an algorithm may not be at a sufficiently low level of abstraction to be directly translatable into cues for model-based animation.

Finally, a model-based system presents the "ideal" animation, i.e., the instructor’s idea of what the animation should look like. It does not provide for learner control over issues of animation such as the level of detail and the choice of highlights.

3.3 Implementation

We are in the process of extending the models in our tutors to animate programs in addition to sim-ulating them and providing feedback. Currently, our models have been organized in a hierarchy of inheritance and composition in the tradition of object-oriented programming. As per the Model-View-Controller pattern (Krasner and Pope, 1988), we have implemented the content, i.e,. program logic in the model, and form, i.e., presentation in the view.

Currently, program objects are presented in the form of text, i.e., various program statements that affect it. We plan to implement alternative views of objects to present their graphic visualizations.

During simulation of the model to explain the behavior of the program, we plan to cue the animation of the program using the messages passed between the model and the view of each object.

We have proposed this scheme to generate program animation based on our experience generating explanations for the behavior of programs using model-based reasoning. Some issues that we will have to resolve during our implementation include coordinating the visualizations of multiple objects, and rewinding animations.

4 Evaluation

We have been conducting controlled tests of our tutors to evaluate their effectiveness. The protocol of our tests consists of a pretest, followed by a practice session with the tutor, and finally, a post-test.

During the practice session, the control group and test group are given different treatments of the tutor to evaluate its effectiveness, e.g., tutor with no feedback versus tutor with detailed feedback.

We plan to use the above protocol to evaluate the effectiveness of using animation with our tutors - does it help students learn better? Is there a correlation between the improvement (if any) and the learning style of the student? We also expect to formatively evaluate the design of our animation.

Acknowledgments

Partial support for this work was provided by the National Science Foundation’s Course, Curriculum and Laboratory Improvement Program under grant DUE-0088864.

References

J.R. Anderson, A.T. Corbett, K.R. Koedinger, and R. Pelletier. Cognitive Tutors: Lessons Learned, volume 4(2). Lawrence Erlbaum Associates, Inc., 1995.

M. Ben-Ari. Constructivism in computer science education. In Proceedings of the 29th SIGCSE Technical Symposium, pages 257–261, Atlanta, 1998.

B.S. Bloom and D.R. Krathwohl. Taxonomy of Educational Objectives: The Classification of Educa-tional Goals, by a committee of college and university examiners, Handbook I: Cognitive Domain.

Longmans, Green, New York, 1956.

C.M. Boroni, T.J. Eneboe, F.W. Goosey, J.A. Ross, and R.J. Ross. Dancing with dynalab: Endearing the science of computing to students. InProceedings of the 27th SIGCSE Technical Symposium, pages 135–139, Philadelphia, 1996.

B. Du Boulay.Some Difficulties of Learning to Program. Studying the Novice programmer. Lawrence Erlbaum Associates, 1989.

P. Brusilovsky, E. Calabrese, J. Hvorecky, A. Kouchnirenko, and P. Miller. Mini-languages: A Way to Learn Programming Principles, volume 2 (1). 1997.

R. Davis. Diagnostic Reasoning Based on Structure and Behavior, volume 24. 1984.

J. deKleer and B.C. Williams. Diagnosing Multiple Faults, volume 32. 1987.

R. Felder. Reaching the Second Tier: Learning and Teaching Styles in College Science Education, volume 23(5). 1993.

S.N. Freund and E.S. Roberts. Thetis: An ansi c programming environment designed for introductory use. InProceedings of the 27th SIGCSE Technical Symposium, pages 300–304, Philadelphia, 1996.

C. George. Using visualization to aid program construction tasks. InProceedings of the 33rd SIGCSE Technical Symposium, pages 191–195, Northern Kentucky, 2002.

T.R.G. Green, M. Petre, and R.K.E. Bellamy. Comprehensibility of visual and textual programs: a test of superlativism against the ’match-mismatch’ conjecture. InEmpirical Studies of Programmers:

Fourth Workshop, pages 121–146, Norwood, NJ, 1991.

E. Kashy, M. Thoennessen, Y. Tsai, N.E. Davis, and S.L. Wolfe. Using networked tools to enhance student success rates in large classes. InProceedings of FIE ’97, Pittsburgh, PA, 1997.

G.E. Krasner and S.T. Pope. A Cookbook for Using the Model View Controller User Interface Paradigm in Smalltalk-80, volume 1(3). 1988.

A. Krishna and A. Kumar. A Problem Generator to Learn Expression Evaluation in CS I and its Effectiveness, volume 16(4). 2001.

A. Kumar. Dynamically generating problems on static scope. In Proceedings of The Fifth Annual Conference on Innovation and Technology in Computer Science Education (ITiCSE 2000), pages 9–12, Helsinki, Finland, 2000.

A. Kumar. Learning the interaction between pointers and scope in c++. InProceedings of The Sixth Annual Conference on Innovation and Technology in Computer Science Education (ITiCSE 2001), pages 45–48, Canterbury, UK, 2001.

A. Kumar. A tutor for using dynamic memory in c++. In Proceedings of FIE 2000, Boston, MA, 2002.

R.B. Levy, M. Ben-Ari, and P.A. Uronen. An extended experiment with jeliot 2000. InNotes of the Program Visualization Workshop, University of Joensuu, 2000.

J. Linington and M. Dixon. Picturing program execution. In Proceedings of the 6th Annual Con-ference on Innovation and Technology in Computer Science Education (ITiCSE 2001), page 175, Canterbury, England, 2001.

P. Mann, P. Suiter, and R. McClung. A Guide for Educating Mainstream Students. Allyn and Bacon, 1992.

T.G. Moher, D.C. Mak, B. Blumenthal, and L.M. Leventhal. Comparing the comprehensibility of textual and graphical programs: The case for petri nets. In Empirical Studies of Programmers, pages 80–98, Norwood, NJ, 1991.

T.L. Naps, J.R. Eagan, and L.L. Norton. Jhave - an environment to actively enhage students in web-based algorithm visualizations. In Proceedings of the 31st SIGCSE Technical Symposium, pages 109–113, Austin, TX, 2000.

T.L. Naps and J. Stenglein. Tools for visual exploration of scope and parameter passing in a program-ming language course. InProceedings of the 27th SIGCSE Technical Symposium,, pages 305–309, Philadelphia, 1996.

G. Rossling and B. Freislebel. Animalscipt: An extensible scripting language for algorithm animation.

InProceedings of the 32nd SIGCSE Technical Symposium, pages 70–74, Charlotte, NC, 2001.

M. Satratzemi, V. Dagdilelis, and G. Evangelidis. A system for program visualization and problem-solving path assessment of novice programmers. In Proceedings of the 6th Annual Conference on Innovation and Technology in Computer Science Education (ITiCSE 2001), pages 137–140, Canterbury, England, 2001.

H. Shah and A. Kumar. A tutoring system for parameter passing in programming languages. In Proceedings of The Seventh Annual Conference on Innovation and Technology in Computer Science Education (ITiCSE 2002), Aarhus, Denmark, 2002.

N. Singhal and A. Kumar. Facilitating problem-solving on nested selection statements in c/c++. In Proceedings of FIE 2000, Kansas City, MO, 2000.

J. Stasko, A. Badre, and C. Lewis. Do algorithm animations assist learning? an empirical study and analysis. InProceedings of the INTERCHI 93 Conference on Human Factors in Computing Systems, Amsterdam, 1993.