P3: Violet to Prolog Tables and the FSM Tool

Due: TBD


Part 1

Violet is a stand-alone graphical tool, written in Java, that allows its users to draw different UML diagrams.  Here is a link to the Violet Jar file, which you can invoke by:

> java -jar violet.jar

Each diagram (use case, class, object, state, activity, and sequence) is hard-coded, meaning that there are separate subtools buried within Violet for each diagram type.  So mixing and matching icons to produce customized palettes - as one might expect in a more general tool like Visio, is not a feature of Violet.

Never-the-less, Violet provides a decent palette for to draw FSMs having at least the capabilities to:

As an example, I've drawn a simple FSM below in Violet

I saved this file in xxx (which violet saves as xxx.state.violet).  It is an XML file that you can view by clicking the above image.

Your project is to use an XML parser to:

  1. extract information from a state.violet file
  2. and output a MDELite prolog definition of its corresponding tables
  3. The tables that you produce to encode an Violet FSM may be different from those tables you used in assignments P1 and P2.  It is OK if they don't match.

Hint: here is the .zip file for the Netbeans source of MDELite.  In its source directory, you'll find a parser for violet class diagrams and other xml parsers/translators (e.g. src/xformPrograms)  You might look at them to get you started.  I will give you the login/password to access this source code in class.


Part 2

With:

  1. your vm2t result of programming assignment P1

  2. your FSM metamodel constraints of programming assignment P2

  3. your result of the above Part 1 (where you may need to write a M2M transformation to match the database you output from translating state.violet files)

You now have all the major parts to implement the FSM tool discussed in class.  Your task is to implement the FSM tool.  Verify that you tool works with the following state.violet files.

and at least 2 other FSMs (drawn in Violet) of your choosing.


Submission

You are to submit a zip file containing: