My favorites | Sign in
Project Logo
                
Feeds:
People details
Project owners:
  avishn

ModSL

Text-to-diagram UML sketching tool

The goal of the project is to build a platform-independent UML modeling library for text-to-diagram translation. The domain-specific scripting language used by the core library is designed for simplicity of diagram sketching. The rendering engine produces an image object which can be saved or returned as a PNG or JPEG file.

Philosophy behind declarative diagram sketching

ModSL addresses several shortcomings in the conventional mouse-click-to-diagram approach:

ModSL library is trying to address these issues by being able to process a simple scripting language and automatically lay out and render the resulting diagram image.

ModSL allows you to add diagramming capabilities to any inherently "text-only" environment, such as wiki or a text editor (as a plugin). This allows you to edit your diagrams inline in wiki pages and have complete access to their change history.

Samples

Class Diagram Collaboration Diagram

Class diagram input:

class diagram Sample {
   abstract class AbstractElement {
      name; parent; type;
      abstract accept(AbstractVisitor);
   } 
   abstract class AbstractBox extends AbstractElement {
      pos; disp; size;
   }
   class Edge extends AbstractElement {
      labels; bends; node1; node2;
   }
   class Bend extends AbstractBox {}
   class Graph extends AbstractBox {
      reqSize; labels; 
      1->*(Edge);
      1->*(Node);
   }
   class Node extends AbstractBox {
      connectedEdges; labels;
   }	
}

Collaboration diagram input:

collaboration diagram Sample { 
   Main->Lexer.tokenize();
   Main->Parser.parse();
   Main->GraphLayout.apply();
   GraphLayout->SugiyamaLayout.apply();
   GraphLayout->NodeLabelLayout.apply();
   GraphLayout->EdgeLabelLayout.apply();
   Main->RenderVisitor.apply(graph); 
   RenderVisitor->Graph.visit();
}








Hosted by Google Code