Wednesday, 23 December 2009

Week 51 of 2009

I have spent the last week tidying and fixing various OOA Tool GUI forms. The process that I am following at the moment is that I start by checking model element classes against the OOA Interchange Format DTD. Once I'm happy there, I move on to checking any associated forms against the model element classes (most have at least one GUI form). Since many of the forms perform derived calculations using temporary information from the forms, their logic must match that used in the model elements themselves. It has not always been easy to eliminate duplication here and that has lead to some errors creeping in.

I also got a little sidetracked adding a navigation button mechanism for reference fields to the form editor. As I tidy up each form now, I'm swapping old reference fields to the new ones allowing users to immediately edit/view any associated model elements. This saves a lot of time when navigating a big model. Check out the data type forms to see this in action.

I had hoped to complete and release OOA Tool 1.0 Build 014 before Christmas but that isn't going to happen now. However, I know some people would like to look at some of the features that I have implemented over the last many months, e.g. polymorphic attributes. Thus, I'm going to release an ALPHA version of OOA Tool which should not be used to create models that you want to keep since you may not be able to load the models into the BETA version that will be released in a few weeks. An ALPHA version of OOA Tool can be downloaded from the following link:

2009-12-23_OOATool014_ALPHA (8.30 MB)
Although, the release has been compiled so that it can be run using J2SE 5.0, it should really be run using Java SE 6.0 so that you can see the new Nimbus look and feel in action.

Anyway, it's almost Christmas. Things are slowing down here a lot as usual! We have had lots of snow here in Colchester which is nice. I hope everyone has a good Christmas holiday. Don't forget to start thinking up some New Year resolutions.

Wednesday, 16 December 2009

Week 50 of 2009

I had planned to publish this weekly report Monday but I thought I would just update a few web pages first. I then thought I would tidy up a few form classes fronting some data type classes before finishing changes to one of those pages. Now here we are and its Wednesday! I miss the discipline of working in a team reporting to someone who is always in a hurry.

Anyway, I have started checking my model classes against Version 0.05 of the OOA Interchange Format DTD and noting differences from the previous version. I've also started updating the change log on the main OOA Interchange Format page. I will also shortly be updating the change log in the OOA Tool Read Me detailing overall differences from the previous build. It's been so long since the last build was released I can't even remember what it looked like! I will continue to update these change logs until the next build is released now.

I spent most of the week in the Data Type subsystem since data types were poorly supported in the last build but are fully supported in the next build. This work is now complete except in relation to data type operators which is really part of the Operation subsystem. The only type of data type that is not supported is Composed Type which is discussed in [xtUML02]. Maybe I will add it in the future if I see a good justification for supporting it.

I also updated my References page to include the new book Model-Driven Development with Executable UML by Dragan Milicev [OOISUML09] which I bought from Amazon. It is a very meaty read (786 pages) and I have only just started to read it. Definitely a job to do while relaxing in a Coffee shop. The book discusses a new executable UML profile which it calls OOIS UML. I have yet to find a single mention of xtUML or xUML which is a bit disappointing. Obviously the author didn't want to be associated with any of this work. Dragan Milicev is based out of Belgrade and English probably isn't his first language. Yet, the text book is written in clear plain English (unlike some foreign text books). The author also presents his arguments in a logical incremental way which I like. Don't be put off by the fact that either the author or the publisher thought that the best way to market the book was to stick a big picture of the author on the book's cover! That might be a good strategy if the author was a nice looking lady since most of it's readers would be male but I'm not sure it was a good idea in this case. Anyway, once I have read more of the book, I will give a more complete review.

Monday, 7 December 2009

Week 49 of 2009

A friend mentioned that I should take a look at SEMAT which is a new initiative to identify and formalize the theory behind and the kernel processes underpinning good software development practice. It's a very new initiative with a long list of supporters already. However, what do they really hope to accomplish?

Looking at the processes involved in software development is not what is lacking at present in my opinion. We really need to establish higher-order work products that are reusable across a wide user base. These higher-order work products need to be independent from but translatable to multiple platforms. This is what Shlaer-Mellor OOA/RD was (and still is via OOA09) and UML/MDA is meant to be achieving. Unfortunately, 99.99% of all developers continue to program applications with standard programming languages and techniques. As long as developers continue to mix implementation concerns into application concerns, broad reuse will continue to be a dream. An executable model capturing application concerns separately from implementation concerns is the only viable way to move the software industry forward. Who do we want to be doing implementation programming in 50 years? Us? No. Machines should be implementing solutions to our problems. We should be implementing those machines and innovating sophisticated service domains. We should be moving to a world of software factories and engineering laboratories not maintaining software sweatshops.

The articles on the SEMAT website talk about fashion and politics with regard to current software development practice. This will always be the case when you involve lots of people in any activity. I don't think there is much we can do about that. However, the basic premise behind SEMAT which is that a theory and set of kernel processes will make all the difference is wholly wrong in my opinion. I'm not against process initiatives such as the CMM (I haven't really looked at the current incarnation) which can be used to improve software quality within organizations. However, this doesn't move us away from software sweatshops it only ensures product quality and that everyone is sweating at an optimal level!

I won't be adding my support to SEMAT and I don't recommend that anyone else add their support to this mostly pointless initiative especially if you are already contributing to code generation activities elsewhere.

Rant over. I don't have much progress to report this week since I have been bogged down finished off stuff and fixing several bugs. However, I still expect to release Build 014 of OOA Tool before Christmas.

Wednesday, 2 December 2009

Week 48 of 2009

My Internet is back! Life is just not the same without an Internet connection anymore. My girlfriend has been pigging out at the local McDonald's which is the nearest wifi point to our house so that she can run her web business. It brings to mind the Over-Logging episode of South Park where the Internet goes down. I like Virgin as a provider in general but their phone support is unbelievably bad. Even worst than BT's phone support! I only got thru to report a fault by ringing their 'I want to leave' phone number.

Anyway, the last week has not been one of my most productive. I've gotten myself bogged down with Name Management integration changes. I've also found and fixed a few bugs. I like the improvements but what the hell was I thinking when I decided to upgrade Naming to Name Management? I should be focusing on getting Build 014 out. I'm not going to spend anymore time on this report since I'm sure you would all like to see more progress and less chatter!

Tuesday, 24 November 2009

Week 47 of 2009

I'm a day late this week since I sneaked out at lunch to see New Moon at the local cinema. I've already mentioned in the past that I am a vampire literature fan and I have read all the Twilight books. Yes, I'm a 40 year old bloke but I'm also a romantic at heart especially when vampires and werewolves are involved! Anyway, I thought it was pretty good with some realistic special effects even though it was made on a modest budget compared to 2012 which I watched last week. It was also pretty good but If I had to choose then it would loose!

Back to work related topics. I still haven't finished Naming which I have now renamed as Name Management. This fits better especially since I called the external entity in the OOA of OOA domain Name Manager. I spent considerable time implementing a state model with Action Language code for Name which parses original text into words. The algorithm is mirrored in my Java implementation. I've included below the state transition diagram (for Shlaer-Mellor users):

and the equivalent statechart diagram (for Executable UML users):

You will have to click on the images and zoom to see the details. However, it is worth discussing some Action Language coding points raised. The Start Parsing creation state doesn't strictly have to return name at the end to perform the creation but since I want to be able to animate state transition diagrams, It would be nice to know which active object is being followed. It also allows current_state to be set if necessary, i.e. I didn't need to assign it a value in the create object instance statement. You will also notice that I don't use event data item qualifiers in generate statements when the expression used is a simple data item with the same name. This saves a lot of redundancy. In the Parsing Complete final state I have commented out the unrelate statement since it is redundant in OOA09. I always automatically delete any relationship instances involving an object instance before removing an object instance since the programmer can't be relied upon to get this right. It is just too easy to forget. Finally, I would be interested to know if anyone has a solution for determining how we can skip trailing digits before we have reached Parsing Complete. The above algorithm has to go back and remove trailing numeric words if necessary.

The final topic this week is external types which are new in OOA09. I have been testing how useful they are and whether the current definition is sufficient with the work on Name Management that I have been doing. I realized that there are a couple of major deficiencies. First, how do I specific external literal values, e.g. how do I define Role and Phrase literal values in the OOA of OOA domain which are important in the model? Second, how do I test the OOA of OOA domain without a Name Management domain? Do I have to have all domains in place before I can perform simulations? To fix both problems I now optionally associate a literal type (a population independent type) with external types. I have also subtyped external value into Simple External Value and External Value Literal. External value literals have an optional actual value which is determined via a semantic shift mapping if defined. External types can now have a default value if they have a literal type. Furthermore, if the external type has no semantic shift mapping to another domain then the literal type will be used instead when simulating the domain. To help facilitate this, the literal type should implement the same operators as the external type. However, the literal type operators need only provide the minimum implementation necessary for simulation.

I also made a decision as to whether external types can be mapped to different actual types within a project. I decided that this would be a bad idea and so I will require all external types to resolve to at most one actual non-external type. It will still be possible to map an external type in one domain to another external type in another domain. However, all external types must eventually resolve to the same actual type. I had originally included some concept of generic type into external type but I can't see how it all fits together. I may in future add a separate generic type concept but I can't see a need for it at present. External types on the other hand are starting to play a much more significant role since they now facilitate a clean bridge mechanism.

With the improvements that I have made to external types, I am looking forward to creating an Arithmetic Calculator service domain in the future which would support arithmetic operators across a range of limited and unlimited number types. Arithmetic algorithms is one of my hobbies but I must resist since I am already massively behind with my work schedule.

Monday, 16 November 2009

Week 45/46 of 2009

Week 45 was pretty much a write off for personal reasons and it seemed pointless to publish a blog entry since I only completed week 44's weekly report half way thru week 45. I jumped back into Naming in week 46 and there is still some work to finish before it is completed. I've spent so much time on Naming not for the sake of improving Naming flexibility even though that has been greatly improved, the primary reason has been that the Naming service domain has allowed me to understand the requirements of a datatype-to-object bridge. Names and qualified names are defined as external data types in the OOA of OOA domain but exist as objects in the Naming domain. This is an important type of bridge that is not really discussed in the existing literature. Data types in general are very poorly handed in UML and were only starting to be discussed in the Shlaer-Mellor community before most of community jumped into the Executable UML pit of stagnation.

Anyway, I should probably mention why I needed the Naming domain in the first place. Shlaer-Mellor's primary concern is being able to define an executable model which can be automatically translated into code. Any names used within the model should be reused within any generated code to help identify correspondences between the model and the code. A single named element within the model may have many correspondences within a fragment of code. If non-alpha-numeric characters or letter-case is a significant part of a model element name then such correspondences may be significantly obscured. On the other hand I didn't want to lose the original text of the name supplied by the user. This essentially means that I need a Name object containing the original text with equality defined using a normalized version of that text. I also need a way to format the normalized name into many different formats.

So I needed a Name object and I could have then used object references where names are used within the OOA of OOA domain except for the fact that I don't want to allow users to define non-referential object reference attribute types so I would have to define a large number of additional relationships from various named elements to the Name object. This would invariably lead to a separate Naming subsystem. Since Naming is an entirely generic concept we might as well separate it out from the OOA of OOA domain and that is what I have done. The first version of the Naming domain was discussed in the Naming technical note. The new version includes qualified names (e.g. key letters and label prefixes) and improved name formatting. Since I haven't finished the new technical note yet I will include the new Naming OIM (for Shlaer-Mellor users) here:

and the equivalent class diagram (for Executable UML users):

Both diagrams will appear in the technical note when it is republished along with lots of other details.

A significant improvement to name formats involves numeric word formatting controlled by two attributes: Skip leading zero digits allows numeric words to be padded for various reasons without effecting formatted names, and Skip single digit less than allows single digit words to be dropped from formatted names (e.g. I1 is always shown as I in Shlaer-Mellor and Executable UML). All numeric IDs in OOA Tool are now padded to the same length depending on name type (e.g. if the maximum relationship number is 412 then relationship 36 will have a relationship ID of R036). This means that all numeric IDs are now lexically comparable making some code generation tasks easier without effecting work product presentation since I use the new formatting flags. Of course this means that numeric IDs in the OOA of OOA are now names rather than strings.

Getting back to the datatype-to-object bridge. The OOA of OOA now defines a Name Manager external entity including a whole heap of external types:

  • Domain ID (e.g. D1),
  • Bridge ID (e.g. B1),
  • Layer ID (e.g. L1),
  • Name (e.g. Information Model),
  • Letters (e.g. IM),
  • Identifier ID (e.g. I),
  • Relationship ID (e.g. R1),
  • Phrase (e.g. defines),
  • Data Type ID (e.g. DT1),
  • Key Letters (e.g. IM_O),
  • Relationship Phrase (e.g. InformationModel_defines_Object),
  • Label Prefix (e.g. IM_O-A),
  • Event Label (e.g. IM_O-A1),
  • Operation Label (e.g. IM_O-A.1).
All of which either map to Name or Qualified Name objects in the Naming domain, i.e. all of these types are actually object references. Furthermore, all of these types override the default equality == operator to compare Lower-case ID values rather than use object reference equality which is tied to Original text in the Naming domain. I hadn't planned to allow external operators when I originally though about bridges. However, sorting out this datatype-to-object bridge made the need for such operations obvious.

A number of external processes are also defined for creation (and searching) of names. Name creation processes map to synchronous services in the Naming domain. I have defined Name as an active object with a state model which defines the parsing of the original text into words, i.e. a name creation synchronous service actually generates an asynchronous creation event if exactly the same name doesn't already exist. I can do this by passing a transfer vectorreturn coordinate from the synchronous service to the creation event allowing a final Parsing Complete state to invoke a synchronous return back to the original synchronous name creation process in the OOA of OOA domain. This starts to show the power of bridges. Obviously, the software architecture needs to be able to generate efficient code for state models which only contain local events (excluding the original creation event).

Anyway, I probably shouldn't say anymore about this until after the new Naming technical note is published. With regard to the mythical next build, I think I'm going to have to temporarily disable some of the new features I've not yet finished (e.g. operations) so that I can release all of the other good stuff I have finished. The one important thing I have to do is sort out OOA Interchange Format 0.05 so that maintaining backwards compatibility after Build 016 is released is not a complete nightmare! Assuming I disable any incomplete features I should have a build released sometime in the next 2 weeks. Then I can get back to regular builds.

Wednesday, 4 November 2009

Week 44 of 2009

Last week I mentioned that I would provide a few screenshots of the new relationship identification scheme in OOA Tool. The first shows the Information Model subsystem from the OOA Tool Model which uses Shlaer-Mellor notation:

You can see that relationship IDs are still used as before but users can now search for relationships by a primary object followed by a verb phrase following by an optional secondary object. This is much easier and is more natural when tracking down a navigation in some Action Language code which no longer has to reference relationship IDs. There is still a minor issue here concerning which object is selected as the primary object in this scheme. I have chosen the first object for simple, composed and mathematically dependent relationships, the associative object for associative relationships and the supertype object for subtype-supertype relationships. Obviously, searching for details of a navigation from a secondary object is still more difficult at present. However, all navigations should involve the primary object, e.g. all subtype-supertype navigations involve the supertype object. The only partial exception is that a user could navigate across an associative relationship without explicitly referencing the associative object since the Shlaer-Mellor virtual machine can handle any navigation thru the associative object automatically.

For simple relationships, the initial choice of first object is often arbitrary and has been of little concern in the past. However, users may now want to select the most apprioriate primary object as their first object when creating simple relationships, e.g. in the relationship INFORMATION MODEL defines OBJECT, the INFORMATION MODEL object is definitely the most appriopriate primary object and thus should be first. Users can still swap first and second participants around later if they want to change their mind.

The second screenshot shows the Elevator PIM from the Starr01 Elevator Model which uses Executable UML notation:

You can see that relationship IDs are still used but are shown in the property list associated with each relationship.

I'll keep this week's report brief otherwise next week's report will be even briefer since I'm eating into next week's available time! However, I will mention that I revisited the Naming service domain used in the OOA Tool Model and the Naming technical note that was previously blogged. I've significantly revised the model and have resolved how the Naming service can be bridged to the OOA of OOA domain where names are used. However, I will leave the details until later since I plan on republishing the technical note. The new technical note also includes a Java Applet allowing name parsing and formatting to be demonstrated!