Tools

Short Introduction

We have implementations of a prototype parser as well as some transformation tools for XAAL. As XAAL is intended to be transformed to/from other formats, we have defined two alternative processing pipelines usable to add XAAL support into existing algorithm animation systems. These are discussed in the following sections.

Note
The tools will be available on the downloads page.

Object Hierarchy

The first processing solution is an architecture discussed at the ITiCSE Working Group to implement the language. This architecture is represented in the figure below. The basic idea is to have one XAAL parser that can be used by multiple algorithm animation systems. This parser generates a Java object hierarchy (in the figure, XAAL objects). In addition, there is a part of software that can serialize the object hierarchy to a XAAL XML document.

XAAL implementation architecture

The existing AA systems can then implement adapters that convert the XAAL object hierarchy into an animation in that particular system. By implementing a generator, the existing systems can generate the object hierarchy and serialize it as XAAL.

This solution requires no major modifications to the existing systems, and thus the level of implementing XAAL remains fairly low. Another advantage is that the document has to be parsed only once. There is, however, one extra step in the process compared to the direct approach of parsing the XAAL document directly into the AA system. However, implementing a XAAL parser for each system would not be sensible, and thus the extra processing is not considered a major problem.

In this thesis, we have implemented the XAAL object hierarchy with a parser and serializer. The implementation is on a prototype level, and not all elements are fully supported. Another part of the implementation is an adapter and a generator between XAAL objects and MatrixPro, which implement the data structures and data structure operations parts of the language. These implementations are described here.

XSL Processing

Another way to integrate XAAL with existing systems is represented in the next figure. This way provides a simple solution to import XAAL documents into existing AA systems that have an algorithm animation language. It can also be used to export different formats from a system that supports XAAL.

XAAL implementation architecture

In this solution, an existing XAAL document is processed with an XSL processor with an appropriate XSL stylesheet. The stylesheet is a mapping from XAAL to the language of the target system. Thus, the existing AV system can then parse the generated file in its language. Naturally, any algorithm animation language that is XML, can be transformed similarly to XAAL.

The benefit of this approach is that the XSL stylesheets are quite simple to write for a person who knows the syntax of XAAL, the target language, and XSL. Moreover, the target system needs not be changed at all. This makes it possible to integrate XAAL with systems that are not open-source. On the negative side, this approach requires parsing of three files: the stylesheet, XAAL document, and the generated AV system document. The following section describes prototype implementations of this solution.