Model Refactoring

Consider the following FSM with start (initial) and stop (accepting) states.  The FSM accepts names of Java identifiers.

Two metamodels, M1 and M2, were submitted for the above FSM and are shown below.  Note that M2 has constraints whereas M1 doesn't.

Note: in M2: if (isState is true) then startState and endState fields are assumed to have null values; if (isState is false) isAccepting and isInitial fields are assumed to have null values.

Here is your assignment:
  1. what sequence of refactorings maps M1 to M2 (i.e., M1 → M2)?
  2. is this sequence of refactorings invertble, so that M2 → M1 is itself a refactoring?  Answer Yes/No and give your reasons.
  • Note: you may have to invent refactorings (substitutions) to sketch your "proof"
  • Note: there is no unique solution.  Do yourself (and me) a favor by presenting the simplest mapping you can.
  • Note: If you have to define preconditions for your refactorings -- please specify them in ENGLISH!

  • What to Submit

    A critical part of any design is clarity and understandability.   Hence, you will be graded on the clarity of your project and its ability to work correctly.  Sloppy code, documentation, or anything that makes grading or understanding your program difficult will cost you points.  Beware, some of these "beauty" points are subjective. 

    Remember: No late assignments/submissions will be accepted.