Alma Architecture

Alma2 system is divided into two main parts: the Front-End and the Back-End. Lets begin by explaining the FE. Its main component is the Compiler. It receives the programs and extracts the necessary information to build the DapAST (an intermediate representation of the program concerning its semantics and the animation settings of the problem domain associated, meaning Decorated with animation patterns Abstract Syntax Tree). The compiler recognizes one single DSL, since it is generated automatically from the grammar specification of such a language, using LISA. The Grammar Specification and LISA are presented inside a dashed box because, in fact, they are not part of the FE; with their inclusion in the Figure above is intended to show what is necessary to create the FE. For each DSL is built a FE, capable of reading the compliant programs to generate the intermediate structure that supports the abstract representation of the program’s meaning.

The DapAST is the communication channel between the FE and the BE, for being the structure where the needed information for the program visualization, problem animation and understanding is kept.

The Back-End is composed of one component called Core Processor. From the name of this component, it is easy to understand that it is where the most important actions are executed. This processor processes the DapAST information performing top-down traversals, actuating based on appropriated pre-defined rules. However, it does not do it alone. It delegates responsibilities by exchanging information with other components: the Visualizer, the Rewriter and the Animator.

  • The Rewriter component gets the information incoming from the DapAST node being processed, and transforms it regarding the rewriting rules database (cylinder labeled as RR in Figure above). It performs simple and various calculi to compute the value of a variable, to access a variable’s value, and so on.
  • The Visualizer also receives information from the DapAST and from the Rewriter. Based on it, it accesses a database of visualization rules (cylinder labeled as VR in Figure above), and creates the visualization of the program domain, by drawing a tree of the abstract program’s flow. However, other program domain visualization could be constructed, by extending these rules.
  • The Animator works similarly to the Visualizer. It takes information from the DapAST and from the Rewriter. But instead of being concerned with the semantic information of the DapAST node under processing, it grabs, essentially, the information related with the Animation Patterns of the node. Then, regarding these patterns, it accesses the animation rules database (cylinder labeled as AR in Figure above) to apply the animation functions to the actors, drawing, then, the actors in the scene.

The Core Processor, receives the work done by its components and holds the task of presenting the output visualizations in a user-friendly interface. This interface of visualizations corresponds to the main window of Alma2. Figure below presents a printed screen of this window In this Figure is possible to see four sub-windows representing the four views intended to be necessary to provide important information about the program.