• Ingen resultater fundet

Algorithm Simulation—A Novel Way to Specify Algorithm Animations

3.3 ADT Extends Probe

Finally, let us assume that we do not have an implementation for AVL-tree, but we would like to create one for our own purposes. This might be the case, for example, if we would like to animate an AVL tree of our own. The easiest way to implement and visualize an AVL-tree is to reuse the binary search tree probe and to change its behavior properly. For example, one can inherit the existing binary search tree and override its insert and delete methods to keep the tree balanced.

4 Discussion

Algorithm simulation provides lecturers as well as students a valuable aid for demonstrating and sur-veying the working of basic algorithms because no user written code is needed. Moreover, the instru-ments that are capable of visualization and simulation of user’s own code greatly extend the learning possibilities.

Even though educational software is the main application area for Matrix, it is obvious that similar tools can be applied also to other areas. These instruments can be used for testing purposes or visual debugging in software engineering. However, the more application areas there are involved the more flexibility is needed to meet the overall requirements. Our strategy, in this sense, is to support as many techniques as possible. Moreover, our research aims at new techniques and specification styles, such as algorithm simulation.

Even though some techniques are not fully supported at the moment, the Matrix framework is at least capable of adopting them with little or no effort. Thus, it is flexible enough to be extended further in terms of fast prototyping. We believe that this is the way we can keep the framework live enough also for further research. Of course, real applications for special areas are better implemented from the scratch, but at that point it should be clear which techniques to use.

From this point of view, it is obvious that there is not just one technique that could dominate the others. The invasive methods have their applications in education as stated by Stasko (1997).

However, they cannot be applied to software engineering, if effortless techniques are required. The interface typing can produce arbitrary complex structural visualizations, but lacks the ability to store the animation or reverse its temporal direction. Probing can fix this problem, but requires inheritance.

Annotation can be applied to automatic code animation, but it has its weaknesses as it is an invasive

method. Thus, by supporting multiple techniques and specification styles the system can allow the visualizer to choose the technique used, so that it would be the most suitable for the specified case.

4.1 Future

Obviously, the range of different techniques can be extended even further. At the moment, the research is aiming at even more effortless visualizations. One possible area of development is the intelligent systems that are capable of concept visualizations of arbitrary data structures. The idea is not com-pletely new, but the Java language provides new powerful tools to implement the technique. From Matrix point of view this could mean a process where the conceptual displays are generated without the need to implement any of the interfaces.

References

O. Astrachan, T. Selby, and J. Unger. An object-oriented, apprenticeship approach to data structures using simulation. InProceedings of Frontiers in Education, pages 130–134, 1996.

Ryan S. Baker, Michael Boilen, Michael T. Goodrich, Roberto Tamassia, and B. Aaron Stibel. Testers and visualizers for teaching data structures. InProceedings of the 30th SIGCSE Technical Sympo-sium on Computer Science Education, pages 261–265, New Orleans, LA, USA, 1999. ACM.

M.H. Brown and R. Sedgewick. A system for algorithm animation. InProceedings of SIGGRAPH’84, pages 177–186. ACM, 1984.

M. Eisenstadt and M. Brayshaw. The transparent prolog machine (TPM): An execution model and graphical debugger for logic programming.Journal of Logic Programming, 5(4):1–66, 1988.

J. Haajanen, M. Pesonius, E. Sutinen, J. Tarhio, T. Ter¨asvirta, and P. Vanninen. Animation of user algorithms on the web. InProceedings of Symposium on Visual Languages, pages 360–367, Isle of Capri, ITALY, 1997. IEEE.

Chris D. Hundhausen and Sarah A. Douglas. Using visualizations to learn algorithms: Should students construct their own, or view an expert’s? InIEEE Symposium on Visual Languages, pages 21–28, Los Alamitos, CA, September 2000. IEEE Computer Society Press.

Ari Korhonen and Lauri Malmi. Proposed design pattern for object structure visualization. In The proceedings of the First Program Visualization Workshop – PVW 2000, pages 89–100, Porvoo, Finland, 2001. University of Joensuu.

Ari Korhonen and Lauri Malmi. Matrix – concept animation and algorithm simulation system. In Proceedings of the Working Conference on Advanced Visual Interfaces, pages 109–114, Trento, Italy, May 2002. ACM.

Ari Korhonen, Erkki Sutinen, and Jorma Tarhio. Understanding algorithms by means of visualized path testing. InSoftware Visualization: International Seminar, pages 256–268, Dagstuhl, Germany, 2002. Springer.

P. LaFollette, J. Korsh, and R. Sangwan. A visual interface for effortless animation of c/c++programs.

Journal of Visual Languages and Computing, 11(1):27–48, 2000.

B.A. Price, R.M. Baecker, and I.S. Small. A principled taxonomy of software visualization. Journal of Visual Languages and Computing, 4(3):211–266, 1993.

R. Rasala. Automatic array algorithm animation in c++. InThe Proceedings of the 30th SIGCSE Technical Symposium on Computer science education, pages 257–260, New Orleans, LA, USA, 1999. ACM.

G.C. Roman, K.C. Cox, C.D. Wilcox, and J.Y. Plun. Pavane: A system for declarative visualization of concurrent computations. Journal of Visual Languages and Computing, 3:161–193, 1992.

J.T. Stasko. TANGO: a framework and system for algorithm animation. IEEE Computer, 23(9):

27–39, 1990.

J.T. Stasko. Using student-built algorithm animations as learning aids. InThe Proceedings of the 28th SIGCSE Technical Symposium on Computer Science Education, pages 25–29, San Jose, CA, USA, 1997. ACM.