moar icon indicating copy to clipboard operation
moar copied to clipboard

GUI tool to create MOAs

Open s4ke opened this issue 7 years ago • 0 comments

As MOAs are more expressive than the Deterministic Regexes, a tool to build MOAs in a GUI would be nice.

Features of such a tool would be:

  • Loading a Regex/JSON representation
  • Creation of new MOAs
  • Manipulation of loaded Regexes/JSON-MOAs
  • Storing the JSON representation of the modeled Graph
  • Testing of the MOA against input strings (no need to define the input alphabet. Ours is always the whole UTF-16 range)
  • Obligatory Determinism Check upon Export to JSON/Testing
  • Optional removal of unneeded States (if the graph is not connected)

Behaviour:

Starting with an empty MOA that doesn't accept any input (L(A) = {}) the user can add states and edges to the graph. Edges are added by click dragging from the start to the end of the edge (a state). These edges then can be annotated with o(x),r(x),c(x) for variables. If the click drag ends on blank space a State is created automatically. (States should be able to be created on their own as well). States are marked with an equivalent representation as in the JSON format. (To see the format, try the cli tool and export a Regex containing all features and as much syntactic sugar as possible to a JSON file).

Translation into MOA:

The easiest way to translate this into a MOA would either be to create the JSON string and then building the MOA from that or by creating the MOA by putting everything into the internal data-structures by hand. The JSON version would require less tight coupling to the MOA internal API.

Possible APIs to use:

  • JGraphX for visualization (or hand written visualization as we don't need all the features, and JGraphX's API seems outdated)
  • JGraphT for representation of the Graph (otherwise, the Graph can easily be represented in a similar way as the internal EdgeGraph of the MOAs does it, no need for a fully fletched mathematical Graph API)

s4ke avatar Jul 26 '16 13:07 s4ke