Kevin Brightwell edited this page Aug 26, 2015 · 1 revision

Each UCOSP participant is asked to log all their accomplishments as well as the difficulties they have getting set up to understand Umple and other experiences they have. Difficulties might include understanding how to model in Umple, using y UmpleOnline, code that is difficult to figure out, and development tools that are hard to figure out, or don't seem to work properly. The more log entries added the more we can better get a grip on the usability issues with Umple, and the more we can help future new contributors come up to speed.

Log entries in reverse chronological order

April 22th

I worked on developing unique names for my active objects. It now works.

Again, I had to change few template tests. They now pass.

April 21th

Since I can declare several state-machines containing the same state names, I can contibue to develop the active objects. What I want is the possibility to declare several active objects within the same class. It is now easier since I only have to care about the name of the state-machine. To make those names unique I simply add a digit a the end of the variable. I faced some problems trying to be consistent with the numbers (restart at 0, etc.).

April 20th

Working on issue 384 (on Google Code), the one where we want to declare several state-machines with different names but with same inner state names. The bug was occuring when you had more than 2 levels of state-machines. The name of the thread object was formed from the state name and his parent.

To solve this problem, the name are now formed from all parents. So it respects the scopes and all name are unique.

I had to change few template tests. They now pass.

April 16th

I did my presentation and they seemed interested so I think I did well. They asked me a lot of question, which is a very good sign. I must listen to 9 presentation today and tomorrow. I miss working on code... I am going to work on it this weekend.

April 15th

I am preparing my presentation for tomorrow. Everything is going well, but I am not really good at making power point... I must prepare for 35mins, but it is going to be hard to say everything in that time.

April 10th

I did the presentation for my supervisor and it went well. I started to talk about Umple and he was so interested that he asked me a lot of questions. The sad thing is, because of all those questions, I weren't able to talk about everything...

April 9th

Trying to reproduce the bug about the multiples state machines in a class, I discovered a bug in my last commit. I didn't specify the grammar correctly. So, any state machine beginning with the word "active" was considered as a active object. I replaced "active" by "[=active]". The tests pass and I did a commit of that change.

I finally raised the issue happening when you try to declare several state machines containing active object in a single class. The issue number is 384. I will work on it now.

The scopes for activity name aren't respected for a simple reason. The names used only use the name of the state machine (can be a nested state machine) and the name of the state. In this case, if we have more than 2 levels of state or nested state machines in a single class, nothing verify if the name is unique.

In our case we have 2 state machines containing the same state names. It should parse since the names are in different scopes. Per con, the names of those state machines wouldn't get interaction if they contain 2 levels or more of states. For exemple our case :

class CourseY {

activeSm {

someState {

thread1 {

do {






anotherActiveSm {

someState {

thread1 {

do {





} }

The thread names are going to be someStateThread1. And if I have this state machine :

class CourseY {

activeSm {

nestedStateMachine {

someState {

thread1 {

do {





} anotherNestedStateMachine {

someState {

thread1 {

do {






} }

I am still going to have someStateThread1 as thread name.

I started to prepare my presentation. At the moment, I know I am going to have 2 presentation. 1 for my supervisor and 1 in front of the other students. Tim gave me a lot of good stuff for it.

April 5th

I faced a lot of problems trying to make my template tests working. First, sometime, the system generate tabulation instead of spaces. My tests files only contain spaces. Also, the error message isn't easy to read since it doesn't show any error. It simply says, expecter <.md> but was <.md>. Second, after all the work around I did, I didn't realize that I was working in a backup folder... Third, to be able to make easier grep to search in the dist/qa files, I gave a special name to my class so I can find it easier. I don't think it is a good strategy since you have to remplace everything after. Then, I realized that I could simple look for the comment generated. It usually includes name of the file somewhere.

I think I should find a better routine before commiting. All my commit passed perfectly, but I do a lot of verification and maybe it makes me lose time.

April 2th

Some tokens were missing in the generation I did. With the proper print line, I could figure out exactly what I needed. Once I realized that, the tokens I was generating were perfect.

March 30th

The tokens are now correctly generated. Unfortunately, it will not be possible to declare multiples active objects in the same class at the moment. I discovered a bug when you try to declare multiples state machines containing do activity in the same class. So generating the tokens necessary will result in the same bug.

So what I need to do is, raise an issue to correct this bug. Once it is repaired, modify the active object feature so you can declare more than one in a single class.

Some template tests aren't working at the moment, but it should be really simple to repair. After that, I will be able to commit the change.

March 27th

I decided to go for my option 2, generates the necessary tokens to create the state machine.

March 26th

There are two ways I could make it works. First choice, I could generate all the arborecense of state-machine and states. My second choice would be to simply generate the tokens for it and call the existing method.

I found it hard to work in TDD with the templates. What I am doing right now is to create a test in Java (testbed) so I can directly look what is generate.

I modified the grammar so it accepts the new keyword "active".

March 25th

I did a small analysis of what option 3 is about and what changes I'll need to do.

March 24th

Here are the options I got :

Option 1 : We add a relation from StateMachine to itself so state-machine can contains state-machines. By cons, we agreed that this solution might be overwhelming.

Option 2 : We raise an error if a user attempt to add concurrency at top level states (since it is only possible between nested state-machines).

Option 3 : We add a new keyword 'active' so it is easier to declare concurrent activities.

Option 2 is done and committed.

March 22th

Tuesday, I said I was going to solve this problem before I go to sleep. Unfortunately, I wasn't able to do that. So I fixed the same objective for today.

Since I've been running in circle for a while, I decided to write everything that I understand on paper and draw few things. Doing that, I discovered something major. The actual architecture of states machines doesn't allow me to make concurrency between states, but only between nested states machines. Then, it is no longer a bug that I'm trying to fix, but I am working with a 'limitation'.

Once I understood this, I did some analysis and I though it could work if we add a relation from StateMachine to itself. I proposed this solution to my supervisor and he told me that it could be a bit overwhelming. He is right. A smaller solution should exist. He gave me two more options and I am going to explore them as soon as possible.

March 19th

I have a clear objective today, I want to solve the problem about concurrent state machine. Each time I am near a solution, I have to stop and when I start working again on this issue, it seems like I have to catch up everything again. So, I won't sleep util it works!

Again, few hours past and I didn't find any clear solution. The problem seems really small, but it seems like the actual conception of the states and nested state machines doesn't allow me to build a good solution for this problem. I think I could do something really messy that would solve this problem, but this isn't my goal and this isn't how usually work.

I got the idea of adding a class to group up the states for concurrency, but first, I must analyse if it's a good idea.

March 14th

Tuesday, I said I was near a solution. In fact, it's more like that my understanding of the system should allow to find a solution quickly. Again, I underestimated the problem. I think this part of the state machine code is maybe a little bit fancy and not very intuitive. Which is totally normal since the concurrency doesn't seems to be an old feature in Umple. So, I don't think that a lot of developers refactored this part. Then, while I fix this problem, I should do some refactoring if I want the other developers to save time.

I added many printline statements to understand what really happen at the moment. I wrote some lines of code, but I don't know yet if it will work.

March 12th

My objective today is to find why it doesn't generate a concurrent state machine and what change I have to do to solve it.

I found where in the Umple code is the problem. Since I just added the token in the grammar, the code isn't looking for it in the state machine sub-tokens. It actually does it in the state sub-tokens. For now, I'll try to just copy this behaviour to see if it works. After that, I'll have to do some refactoring since I think this part really need it.

March 8th

I have this state machine :

class CourseY {

status {

Motor { }

Fan { }

} }

It is supposed to generate 2 concurrent state machines, but it seems like the concurrency symbol is just ignored. I should have this :

enum StatusMotor { Motor } enum StatusFan { Fan }

and :

public CourseF() {

setStatusFan(StatusFan.Fan); setStatusMotor(StatusMotor.Motor); }

But, I simply get this :

enum Status { Motor, Fan } public CourseY() {

setStatus(Status.Motor); }

At the moment, I don't really know how I will attack this problem. It is clear in my mind what it should do, but I need to find a good way to debug the parser.

March 6th

While writing a question to Tim, I realized few things. First, the grammar doesn't allow concurrency at the first level of a state machine. It is only possible once you get nested state machines. Second, the parse doesn't raise any error when you do something against the grammar.

I tried to modify the grammar many times, but each time I got the same bug. The compiler was just looping at the umpleSelf. The fact is, each time, I was broking the grammar. I'll need to fund a proper to develop in the grammar.

Fortunately, after few tests, I successfully modified it so it can parse. Unfortunately, only one state machines is generated. Adding the token wasn't enough. I need to know why.

March 5th

I began to work on another issue, the issue 377 (on Google Code). There is a parsing problem when you declare concurrent state machines. When you generate the code, no error are raised and the umple code is simply copied in the java file.

I tried to read the grammar to find if there is an error. I think I will have to study a bit the syntax of the umple grammar.

March 4th

Time to look more closely at the code that generate concurrent state machines.

I see no error. I wrote a test with the case given in the issue and the test pass. I might solved it when I solved another issue.

Since the code is now working, Tim found some strange things. Like, some entry function are not being called, etc. I'll have to take a look at it.

March 3th

I now got the confirmation that I should commit the generated files. I did my first commit and everything went well.

I opened a new issue. There is something wrong initializing concurrent state machines. Took me a while to figure out how Umple manage concurrency. I should be able to find the problem soon.

March 2nd

Reading the documentation to do my first commit, I realised that I had to setup a new environment. Even if I thought I became good at it, I faced some problems again. Each time I was trying to import the cruise.umple project, the cruise.umple.test.implementation was exluded from the test project. I finnaly found how to solve this problem (am I becoming good with eclipse?). The problem is that the implementation folder is in the build path and it shouldn't. Once you remove it from buildpath, you click est folder and you can remove the exclusion.

February 28th

I discovered why transitioning from an inner state to a parent doesn't work. In fact, it works on only one level. The state machine was only looking at his parent, but not at the root.

The problem was quite simple and I found myself spending a lot of time trying to solve it, but I think it was worth it. My understanding of the state machines in Umple just get stronger day to day.

What I do now is, instead of looking only at the parent, I loop in parents util I get the root. Then, I try to find the state from there. My test now pass. Time to do my first commit, but I think I am going to wait for tomorrow since it will be my first one and it's 1:15 am..

February 26th

It's been a while again since I worked on the project. It is now time to catch up! Last week I decided to work on the issue I just created about the semicolon. Now, I think it would be a better idea to just continue on the issue 371 (on Google Code), the one with transitions from inner state failing. I do this because I think it is bad to work on many issues at the same time and it only can result on more time wasting. Each time you jump from an issue to another, you have to learn some things again. And this one had a higher priority

I wrote the state machine given in the issue description in a test. I did it replacing the names for something more natural, so it's easier to understand. I added few entry statement to follow what's happening. First, I can see that it enters directly in a final state. I just removed it for the purpose of my test.

One thing that I see it that the Java tests are really long to test. It is normal since the tests contains some sleep on the main thread. I have to admit that I did put one too in my test without knowing why. I saw that and I thought it is the way to work. Unfortunately, the build is just longer because of that, I'll have to find if it's really necessary.

I finished to write the test and it doesn't pass. I need to find why. My first guess it's something related to nested state machines.

I think I know why this problem happens. When you declare a transition, the system verify if the resulting state exists. If not, it generates a state on the same level as the first state machine (not the nested ones), this state is final and it pops a warning. In my case, the states exist, but are not detected. It should be something as simple as the system doesn't verify in nested state machines. I just need to know where this verification is done.

In fact, this is not something about "the system doesn't verufy in nested state machines", the problem is that the system doesn't verify if the next state exists in the parents node. I'll try to find what I can do to iterate in parents.

February 19th

It's been a while since I worked on the project. Working a regular base as its benefits, because I didn't, I don't remember where I was with my understanding of the problem. Lets just write the case given in the issue description and try to figure out.

While I was trying to write my test, I did a mistake. I added an extra semicolon at the end of my entry statement. So I got something like this :

class CourseX {

status {

Open {

entry / { System.out.println("Enter open"); };


} }

The reason I lost some much time with it is because it compiles... When you're adding the semicolon, it expects extra code. Then, the generation just skip his process and paste the statemachine in Umple. So the Java build fail. Once I figured out the problem, I contacted Tim and he told me to create an issue, my first one as a commiter!

I am working on the issue I just created, Tim told me it's gonna be trivial, but I don't know if it will be that fast for me. I am looking at the grammar and I realize that my regex skills are far behind me.

February 12th

I wrote the test and it passed. Took me some time to realize that the issue was already solved. I communicated with Tim and I was right. Issue closed. Time to start something fresh, I picked a new issue that could be about nested state machine again. I am reading the generated Java code.

February 9th

I decided to start a new issue. The description says that there are functions missing from the generated code. The example given contains a nested state-machines with some parallelism.

I pasted the case given into UmpleOnline to generate it in Java. I'm reading the code and trying to know how things work with multi-threads with state-machines. I think I understand how it works, but I still didn't find the problem.

February 6th

While making my patch for the doActivity issue, I discovered few little problems. I corrected them and submitted my patch.

February 5th

Found that I did a mistake doing my tests in cruise.umple. In fact, I discovered that's not really my mistake. When I was looking more closely to the cpp generated code, I found some special characters. The generated code contains tabulations instead of spaces. To find that, I took the generated file : /dist/qa/cruise.umple/cruise/umple/statemachine/implementation/cpp/247_CppStateMachineTemplateTest-out.html

and I opened it with Notepad++ (I need to find an equivalent on linux, this editor is awesome!). With it, I could easily see the specials characters. I think you can also do it with VI, but I didn't test it. Then, I added those tabulations in my test file. I think it could be nice if we could just remove them from the generation. I'll talk to Tim about it later.

At the moment, I'm not really proud of my change in the JET code. I just added a duplication of code. I'll ask a question to the dev group to see what's the best practice to avoid it. During the videoconference, Tim told me to look at the others JET files to find an example. The only solution I got from it was to create a file for the code I want to repeat and work with includes. It should work fine, but it doesn't really look clean to me since you will have to get many files open just to see what a function does. The best practice could be to add a function for the repetitive code (like in others languages..), but I just didn't find a way to do it in JET. I think I'll just commit my code like that since it works, ask a question to the group and come back to refactor it when I have more experience with JET.

February 1st

I created a test in the project testbed to test the behaviour of the generated Java code. I did the change and the test now pass. After that, I decided to add a test in umple.cruise to check if the class extending Thread is generated. The test doesn't succeed, I need to know why. I also need to know if it's possible to add a test for java only since this class isn't generated for PHP. I need to verify for c++ too.

January 31th

For my test, I created an umple class named CourseW with a nested statemachine containing a doActivity. First problem I get, the build fails. I think it's because the generated code contains an error. Since it doesn't generates the class extending Thread, the code contains a function who doesn't exist.

While looking at the code, I saw an if statement containing that condition "(state.getActivity() != null)". For our case, it means that the state doesn't contain the activity, so the code for it isn't generated. What I need to know now, why it doesn't contain it? Is there a way to test it?

January 30th

Like each time I start to work on the project, I get problems using eclipse. At the beginning, I did a build and ran the tests. After a moment, I do a partial build and try to run the tests and they all fail. I changed nothing, so it's impossible. It seems like that running the tests on eclipse just ruined my build. I had to do a complete build again, it first failed but I just ran it again and it worked. I seriously think about to stop using eclipse for other purpose than text editing.

After that I solved all my problems with the build, I had to find where the Java code is tested. Took a while to find them but I did! The thing is, I couldn't simply import the project, that's why I had difficulty to find it. I created a new project and called it testbed and it worked just fine. I think I'll verify if it's the right way to do it.

Looking at the DoActivityTest, I see that it generates a class extending Thread. This is basic in multi-threading in java, but I didn't realise that the generated code from nested state machine didn't have it. so that must be the problem.

At first, I'll write a test to verify if the class extending thread is generated. Then, I'll modify the tests in testbed to see if it works.

January 29th

I understand now why a nested state is initialized with a null state. It's all about scopes (in which state machine you are).

I put the umple code producing the problem in UmpleOnline to see what it generates. I read the generated code and I can't see what is the problem. I need to look more closely to the tests to see how it works. Actually, I know how the generated template are tested, but I don't know how the behaviour of the generated java code is. During the video conference, Tim told me to look at the end of the build. The java code is tested there.

January 25th

I forgot my laptop at school since I got injured... I installed linux on my desktop and setuped a development environment. I begin to get really good at it :).

January 24th

I opened a new issue. I feel comfortable working with the states machine and the difficulty is rated as medium. Priority was marked as critical, but when I read at the logs, it says that issue should be done before December. I guess it's not critical anymore.

The problem happen when you get a function inside a nested state machine. At the beginning I tough it was because of the parallelism, but it's simpler than that. So, I generated the java code and looked at it. It seems like a nested state machine create an extra state called null. When the state machine is initialized, it is with the null state. Then, the function can never be called. What I have to figure now is why it has a null state? Did they do it on purpose?

January 23th

I felt really bad about setting a new environment and not trying to understand what was the problem. I had to know why. Fortunatly, it didn't take so long. The problem is that I never builded the project correctly. At the code sprint, Tim told me to never use this one

"ant -Dmyenv=local -f build.umple.xml build".

The fact is, when you run this command, you don't need PHP or ruby installed. It can build succefully without them. So, when I tried this command to do a complete build

"ant -Dmyenv=local"

I got many problems because I didn't have them installed. The problem is that I was trying both commands at same time. I never realised that the second one never worked. Maybe I could add this in the Wiki since I am not the only one that faced this problem. however, I installed PHP, ruby and rake and the build worked fine.

After that, I decided to finish my issue. It was about time... I changed the files manually (I'm not really proud about it, but if I face this problem again I'll take the time to code a generic script). I did a patch and everything worked fine.

January 20th

I downloaded all the project over again, to have a new environment, but still wasn't able to run a build. I decided to change my way to work. I did set up a virtual machine with Ubuntu 32 bits. I got everything installed and did a copy of this machine. Now, if I get a problem like that, I can go back in one minute.

January 19th

I got assigned to few issues and all are related to the states machines. One of them is rated very easy. So I started with this one to get familiar with the states machines. The change I need to do is pretty simple. Tim also helped me to find where I should do it. Unfortunately, I realized that I have to modify a lot of tests. I wanted to work well so I decided to create a script to make it automatically. The mistake I did is that I decided to do in c# to be fast. I got some difficulties working with the end-line character different on window than linux. Also, I couldn't keep the encoding of the file. First it is UTF-8 without BOM and it becomes UTF-8 only. I lost some time trying to solve this problem.

After that I got like 20 different problems running the build, the tests, etc. I decided to change manually the tests to get something done. First, I changed one test. The build worked and I got one less fail in the tests. Second, I changed the rest. Got unsuccessful build. I tried many things in the rest of the day to solve this problem.

January 18th

First day of the hacketon, my motivation is at its maximum, time to finish my first issue. I started reading code to figure out where is the change I need to make. Appears like the parse function is using the function that can raise the warning. So I decide to get a better understanding of the parse function. At first, the code seems really complicated. In fact, this function is very long. But, if you think about it, this function is pretty simple, it does one thing, it parses. It is only a function that visits all nodes of a code. So, it has to contain many loops and conditions. It has to be generic. Then I realized that is not the place that I need to detect the redundancy. My second strategy was to use the command grep to find where the keyword lazy is used. Got lucky, it is only used in few files and I have to change them all to make my change. I began by writing the test. I ran it and it didn't pass. Then I added a condition to detect the redundancy (a attribute that is lazy and got a default value assigned). The test now pass. I did a patch and sent it. Everything worked fine.

Later in the day, I got few problems with my eclipse environment. We tried may things, but nothing really worked. After a while, I decided to completely reset my environment. I installed a new eclipse and downloaded a new project. I don't have the problem anymore, but I feel bad a bit that I didn't find why. Anyway, my eclipse is working so I can work.

January 15th

Time to work on something real. I decided to work on this simple issue : “lazy and initialization of attributes together should result in warning”. In a functionnal programming course I saw what is a lazy evaluation of a variable. What I understand from this issue is that if you declare a variable this way :

class Student


lazy x="cat";

} the expression x="cat"; will only be evaluated once x is needed which makes the keyword “lazy” redundant. So, if I'm right, in umple, any affection outside of the constructor is considered “lazy”. In the wiki Architecture section I found “Error and Warning Messages”. This is exactly what I need. Now, I just need to find where I should detect the redundancy.

Just fund that I was wrong about the signification of lazy expression while reading the “Attribute Definition”. The lazy keyword only means a constructor argument is not required. I though the constructor that the issue was talking about was the constructor, by example, of the Student class. There is no constuctor-like in classContent.

January 12th

It was time to finish to set up my development environment. Everything went just fine util I try to run the tests. Then, I realised that I didn't even have Ant installed. I faced some problems trying to install it, but I finally found it in the software manager of my distribution.

The next step was to build Umple using Ant. Seemed like I didn't install Java 7 correctly. The error message told me that JAVA_HOME was not set. So I set it. The tests now pass.

January 8th

Since I didn't use eclipse alot and I'm not particularly familiar with the linux environment, I faced my first problem while installing eclipse's plugins. It occurred while downloading Jet.

Firstly, I didn't have the right release of eclipse. I cannot blame the tutorial since it's clearly indicated to get the Indigo one. Sometime you lose time trying to work too fast... However, it could be pertinent to mention how this problem appear because the error message isn't really intuitive. It simply says something like “The component isn't available at address ...”.

Secondly, once I got the Indigo release of Eclipse, I was able to download Jet. Everything seemed to work fine, but I noticed a kind of loop in the download. It was downloading the same component again and again. After a moment, the download just failed and I got this magnificent error message “Error download0”. I tried alot of things, but the problem always persisted. Is it because I'm running eclipse 64bits? Is it really the good release? Is it my linux distribution? Fortunatly, just before going crazy, I saw Geoffrey's logs about his install of Xtext. So, I tried to install Java 7 properly. Again, I faced some problems just because I'm not familiar with eclipse and linux, but I did it. I installed Java 7 and made my eclipse use it. After that, I tried again to download Jet and I was able to install it!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.