Hermes/dl Designe Tool Documentation

Author:
Matthew Knowles
screenshot.jpg

Screen Shot

Introduction

The Hermes/DL Design Tool Project was started as a program that could be used for designing software projects using the Hermes Design Language (Heremes/dl for short). This design language was created by Alexandre R. J. Francois as design language that could be intuitively used for developing projects with significant interactive components that require a high level of concurrency. The other major goal of the language was that it should be simple enough that it is accessible by multiple disciplines.

The Design Tool Project

At the present time, although this design language exists, there wasn't a tool that could be used to properly create the graphs used for Hermes/dl in an interactive, collaborative way. As a result, this project was initialized to create such a tool.

GraphML File Format

In order to save and load data, I decided to use a standard XML based graph file format called GraphML.

The data file is broken up into four sections:

The first section contains the generic GraphML header.

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
        xmlns:svg="http://www.w3.org/2000/svg"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
        graphml+svg.xsd">

This is followed by a list of all of the extra data types that we will be storing with each node. Using this allows us to comply with the GraphML standard while still incorporating the extra parts of our Hermes/dl graph. These will be explained in detail soon.

  <key id="type" for="node" attr.name="type" attr.type="string">
    <default>N_REPOS</default>
  </key>
  <key id="label" for="node" attr.name="label" attr.type="string">
    <default>Label</default>
  </key>
  <key id="x" for="node" attr.name="x" attr.type="double">
    <default>0.0</default>
  </key>
  <key id="y" for="node" attr.name="y" attr.type="double">
    <default>0.0</default>
  </key>
  <key id="isEnabled" for="node" attr.name="isEnabled" attr.type="boolean">
    <default>true</default>
  </key>
  <key id="parentID" for="node" attr.name="parentID" attr.type="int">
    <default>-1</default>
  </key>
  <key id="level" for="node" attr.name="level" attr.type="int">
    <default>0</default>
  </key>
  <key id="factoryMappingKey" for="node" attr.name="factoryMappingKey" attr.type="string">
    <default>N_REPOS_0</default>
  </key>
  <key id="description" for="node" attr.name="description" attr.type="string">
    <default></default>
  </key>
  <key id="passiveFilters" for="node" attr.name="passiveFilters" attr.type="string">
    <default></default>
  </key>
  <key id="activeFilters" for="node" attr.name="activeFilters" attr.type="string">
    <default></default>
  </key>

At this point, we begin the definition of the graph itself. There is only one graph in any file used by this application. As a result, the graph tag is mostly ignored but is there to be consistent with the GraphML format.

  <graph id="Test Graph" edgedefault="undirected">
    <node id="n0">
      <data key="type">N_CELL</data>
      <data key="label">label</data>
      <data key="x">298</data>
      <data key="y">411</data>
      <data key="isEnabled">true</data>
      <data key="parentID">-1</data>
      <data key="level">0</data>
      <data key="factoryMappingKey">FSF_CELL_0</data>
      <data key="description"></data>
      <data key="passiveFilters">FSF_INT64_NODE myPassive1</data>
      <data key="activeFilters">FSF_STRING_NODE myActiveString</data>
    </node>
    <node id="n1">
      <data key="type">N_CELL</data>
      <data key="label">label</data>
      <data key="x">260</data>
      <data key="y">210</data>
      <data key="isEnabled">true</data>
      <data key="parentID">-1</data>
      <data key="level">0</data>
      <data key="factoryMappingKey">FSF_CELL_5</data>
      <data key="description"></data>
      <data key="passiveFilters">FSF_FLOAT64_NODE myFloat1</data>
      <data key="activeFilters">FSF_BOOL_NODE myActiveBool</data>
    </node>

As can be seen here, every node in the graph is described by a "node" tag. Each "node" tag has an ID of the form "n*" where the "*" represents a unique number for the node starting with 0. Inside the XML node tag is then a list of "data" entries corresponding to the "key" tags shown above. Here is a detailed description of each tag:

Following the list of nodes in the graph, the final part of the Hermes/dl file is a list of the connections between nodes in the graph and the ending GraphML tag.

    <edge source="n0" target="n1"/>
  </graph>
</graphml>

The "edge" tag indicates an edge between two nodes in a graph. Since there is a combination of directed and undirected edges in a Hermes/dl graph, the source and destination indicate direction of the connection when the two connecting nodes are of the type N_CELL. Otherwise they are just two endpoints on an undirected graph. The "graph" and "graphml" tag are then used to close the "graph" tag and the "graphml" tag respectively.

Controls

The basic means of creating and manipulating the graph is by using the mouse in conjunction with the current input mode that is set using the keyboard.

Keyboard Input

Mouse Input

Project Features

Future Work

Architecture Model

The design of the software follows the Model View Controller paradigm. In this context, the GLUT callbacks in main.cpp act as the Controller and are used to update the Model (the Graph instance) and the View state (Renderer type and Camera state). Aside from this, there is a separate part of the paradigm used for saving and loading the file which is encapsulated in the GraphReader class. This can all be seen in the Architectural Diagram:

ArchitectureDiagram.jpg

Architectural Diagram

Each of these then breaks down further as follows:

Model

View Controller As mentioned before, the only other part that doesn't quite fit into the model is the GraphReader. In some ways this is a type of "View" as it is used to save a textual view of the graph. However, due to the distinct location of the output and the fact that it is used for saving and loading data, I've kept in separate in the model.
Generated on Fri May 8 14:06:24 2009 for Hermes/dl Designe Tool by  doxygen 1.4.7