Matthew Fritze edited this page Dec 6, 2015 · 31 revisions
Clone this wiki locally

Each UCOSP participant is asked to log all the steps they take as they make progress through the semester. This includes difficulties they faced (getting set up, understanding how to model in Umple, using 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.

Please record entries in reverse chronological order

Log Entries

December 3-5 2015

Finished up testing for nested state machines.

Added code for the clearNodes function, which essentially resets the StateMachineGraph class, by un-visiting all nodes reseting the stack/queue for walking.

Submitted the first pull request. Subject to comments and recommended changes, it will likely be the last contribution for UCOSP. That being said, I am interested in working on the project past the deadline to solidify the graph walking API, as it would be much easier for me to implement subsequent graph types.

November 28 & 29 2015

Finished or close to finished (on feedback) writing tests for the State Machine graphs, including those when you have a flat graph and when you have a nested level. Going to add a function to clear all reachable nodes from a start node, such that you can 'unvisit' nodes if you'd like to do more analysis on the same graph.

Next up is either adding a function to output the unreachable states, cyclomatic complexity. The other possibility is adding the concrete graph for the inheritance hierarchy.

I have also completely redone the Wiki page reflecting what is currently implemented.

November 25 2015

Still writing tests for StateMachineLevelGraph.class, which is up to about 15 tests. Added tests for standard graph types, including cycle graphs and complete graphs.

Thankfully, a lot of these tests can be extended for other types of graphs, such as flattened StateMachines or Class Inheritance. These should cover most of the general cases and since I have already implemented one instance of the graphs, it should be significantly quicker to get the subsequent ones as well.

November 23 2015

I found my issue from yesterday, which was that I was using state machines in UmpleParserTest.java, and not UmpleParserStateMachineTest.java, which handles the state machine tests.

Finding this error, once again made me feel "dumb" for not seeing it right away. But on the other hand, I think that it's an important lesson for working with a repository that you're unfamiliar with - in that it's very important you read what you're calling, instead of copying code from within the file and assuming it will do exactly what you want.

Successfully got the base case tests to pass with the StateMachineFlatGraph class for both DFS and BFS. Moving to more complicated state machines. Hopefully will have the majority of tests finished by the end of tomorrow.

November 22 2015

Started testing Graph, StateMachineLevelGraph. I'm having some trouble getting the umple model to be created from a .ump file, from a distinction between assertParse and assertSimpleParse. It seems that when I use assertSimpleParse, that no model is generated - specifically the list of state machines is empty, though the .ump file only contains a single state machine. I won't be able to spend all day on it, but I would like to have at least the base case tests passing.

November 21 2015

Code compiles without errors, but with what I think is a bug. StateMachineLevelGraph becomes abstract when I include the abstract method next() in the parent class, Graph. So for now, I have removed next() from Graph, and just have it in the concrete child class. In doing so, the generated code looks good, and can be instantiated in tests.

November 20 2015

Fixed the build (by re-cloning) and adding the -Donline=true. Getting a better sense of how this API is going to fit together and where. Going to try to add my models into code, and see what breaks.

Got some code added, including the models. The code compiles, with the exception of the trait, Node. I'll play around with interfaces and such to get the functionality. The main thing is injecting the boolean isVisited variable - which I could implement as a HashMap in the graph class instead. I'll think on this.

November 19 2015

Slightly blocked on the broken build (No internet connection...), but writing tests for the Graph class, just doing so outside of the repo.

November 18 2015

Another question that I need to address is where the history of the BFS/DFS will be stored. Obviously we want the code to be light. If we want memory-light code, there could be a strict ordering of visitation which would mean that we would not store any node, and calling next() would simply find the next unvisited node in the ordering. Alternatively, we would store the nodes to be visited (i.e. those on the stack in DFS or Queue in BFS) which seems to make much more sense.

November 17 2015

With the update on the model, I moved it here: Umple Online
Seeing it this way definitely clears up why what I was doing before was wrong. Potential problems here how we will represent 'visiting' a node. One choice could be a list of visited nodes (HashMap?) in the graph, which would remove the need to store it differently in each graph class (StateMachine, Association, etc). An alternative would be to add a boolean in each of the nodes - but I don't like this solution as much. The mix of the two could be to make the Node class a trait, which would inject the boolean field as well as the visit method.

November 8 2015

Created a new model for the graph theory api, defined here: Umple Online
It has a graph as a trait, which StateMachines and UmpleClass' would inherit from.
Nodes would be an interface for States and Classes, and Edges would be a class of its own.

October 25 2015

Under the recommendations of Professor Lethbridge, I am formalizing my notion of what a graph and node such that I can properly define the API for the graph analysis. I'm starting with a UML diagram to get an idea of the hierarchy, and I will formally define the API for the graphs, nodes, and edges once it is finished.

I have also be updated some of the existing API details, such as the link to a reference API, the details of the different kinds of graphs, and the BFS/DFS details.

Though I started defining the diagram, I have realized that I should probably follow best practices and write up use cases first, and follow up with the modelling after.

October 24 2015

Added this wiki page to discuss possible implementations of the API. Note: Until I look more into the code, I have left the classes as Graph, Node and Component, which can be updated later to reflect the actual class names in umple.

October 18 2015

Updated all of the Json tests to include the new isAbstract class field, and added a new test which uses abstract classes and methods, confirming matching Json.

Submitted pull request for issue #529.

October 14th 2015

I have updated the Umple file that generates the JSON to include a field for isAbstract class, as well as for each method within the class. Then, I updated the JavaScript to take into account both abstract methods and classes, adding either italics or guillemets in UmpleOnline.

October 6 2015

I was not able to get my old repository to compile, even when I checked out to a clean repository. Therefore, to not waste any more time on this, I am abandoning Eclipse, and starting from a fresh copy of the code. On my new pull, I was no longer getting the ant error and failure, so I will continue to use the command line. Further, my tests were working before on the command line, so I will confirm that that is still the case.

September 30 2015

I found where the abstract detail is being used, and changed the Generator_CodeJson.ump to reflect that. For whatever reason, I'm no longer able to compile. When I run qfbumble, I get the following error:

[ivy:retrieve]  conflict on /Users/matthewfritze/umple/dist/libs/core/asm.jar in [core]: 5.0.1 won
     [java] java.lang.VerifyError: Bad return type
     [java] Exception Details:
     [java]   Location:
     [java]     cruise/umple/UmpleConsoleConfig.lambda$0(Ljava/lang/Object;)Ljava/lang/String; @1: areturn
     [java]   Reason:
     [java]     Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'java/lang/String' (from method signature)
     [java]   Current Frame:
     [java]     bci: @1
     [java]     flags: { }
     [java]     locals: { 'java/lang/Object' }
     [java]     stack: { 'java/lang/Object' }
     [java]   Bytecode:
     [java]     0x0000000: 2ab0
     [java]     at cruise.umple.UmpleConsoleMain.<init>(UmpleConsoleMain.java:73)
     [java]     at cruise.umple.UmpleConsoleMain.main(Main_Code.ump:210)


September 20 2015

I've been having issues with my local Umple Online. If I try to print something to Standard Out from a Java class, which causes issues with the json, and breaks the java script. When I load the page, I get a perpetual loading wheel in the diagram div, with the following error:

Uncaught SyntaxError: Unexpected identifier

When you look into it, it prints this:

var data = Umple file: -generate
Cmd File: Json
{"umpleClasses":[], "umpleAssociations":[] };

Removing the print statements fixed the issue initially. But after making some changes it came back.

Never mind, silly mistake. The java file hadn't been recompiled before trying.

September 16 2015

Unsure of how serious my issue with the multiple Ant paths are, so I have temporarily stopped working on it. I have been trying to expand my Student UML class diagram example using Umple Online to add to Issue #97.

September 15th 2015

I switched my approach and ran an incremental build for umple, using the command ant -Dmyenv=local -f build.umple.xml umpleSelf compile packageMainJar, followed by running the tests on the command line with ant -Dmyenv=local -f build.umple.xml template.test. Both of these gave me a BUILD SUCCESSFUL message. Further, when I looked at dist/qa/umple.cruise/index.html it told me that all of my tests passed, except the 166 that it skipped.

I proceeded to try the eclipse test suite again. I get 3999 passes, 13 errors, and 1 failure. The error came from UmpleConsoleMainTest and UmpleConsoleConfigTest, all for

java.lang.VerifyError: Bad return type
Exception Details:
     cruise/umple/UmpleConsoleConfig.lambda$0(Ljava/lang/Object;)Ljava/lang/String; @1: areturn
    Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'java/lang/String' (from method signature)

The test that fails is builder.builderTest, on executeSimpleAntScript:

Assert.assertTrue("Ant failed to run successfully", builder.runAnt("mybuild.xml"));

Upon further searching, it turns out that I have two separate paths to Ant. The two paths of Ant are:


The first reference comes from the extended step 2b in the dev setup, and I assume that the second is a reference to something can comes with Umple. I tried removing some the Ant dependancies but I broke it in a way that I couldn't fix, so I'm trying again from a clean repo.

September 12 2015

I have been continuing to look at examples of Umple and play around with them.

I have had trouble with running tests in eclipse. I set up a test configuration in eclipse, but most of the tests gave errors. I tried pulling, rebuilding and refreshing the project in eclipse, but it hasn't worked for me yet.

September 8 2015

I have been unable to build umple.cruise in eclipse after following the steps on the development set up. After finishing step 3b, I get 12000 errors, which start with '<>' operator is not allowed for source level below 1.7. My eclipse version was targeting 1.4, and it would not support 1.8 without additional plugins (which were subsequently installed). Though Eclipse Mars has support far Java 8 on a new install, I was unable to install the Umple Plugin, so I'm staying with Eclipse Kepler.

I have read through the Umple Best Practices, the Vision and other wiki pages. I have looked at different umple online examples, and made this one.

September 4 2015

Going through the development set up on a Macbook Pro OSX Yosemite I had a few issues:

  • The file structure of Eclipse Mars didn't seem to have a plugins folder for the Umple-Epclipse plugin, so I installed Eclipse Kepler which worked.
  • Though I may have missed the step, I couldn't build ant -Dmyenv=local because of the missing umple.jar file in umple/dist/. However, downloading it and adding it to that folder worked.