UCOSPLogEvgeniyaVashkevich

vash-evg edited this page Nov 13, 2018 · 19 revisions

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

2018-11-13

I did more testing related to issue ##552 and went through the code. The part I was not sure about seems right, after I understood the generated code better.

For issue ##254, I was learning Parser structure and how to sue grammar.

2018-11-06

I submitted PR for issue ##552 and started looking into issue ##254.

For state machines (issue 552), I want to confirm my understanding of how generated Java code is supposed to look like for state machines with nested states. Here is an example of what I think is a bug:

Umple code


class Window
{

  WindowController
  {
    Stationary
    {
      entry/{//stopMotor(); 
	  }
      NormalStationary
      {
        entry/{System.out.println("Window is stopped");}
        down -> SafetyMechanism;
      }
    }
   
    SafetyMechanism
    {
      entry/{System.out.println("Safety mechanism - please wait");}  
      after(5000) -> Stationary;
    }
  }

  public static void main (String[] argc) 
  {  	
  	new Window();
  } 
}

Here is a piece of generated Java code:

import java.util.*;
// line 2 "model.ump"
// line 30 "model.ump"
public class Window
{

//------------------------
// MEMBER VARIABLES
//------------------------
 
//Window State Machines
public enum WindowController { Stationary, SafetyMechanism }
public enum WindowControllerStationary { Null, NormalStationary }
private WindowController windowController;
private WindowControllerStationary windowControllerStationary;

//Helper Variables
private TimedEventHandler timeoutSafetyMechanismToStationaryHandler;

As can be seen, Safety Mechanism and Stationary are not being treated the same way.

2018-10-30

I was working on issue ##552.

Here is a simplified repro:

class Window
{

  WindowController
  {
    Stationary
    {
      entry/{//stopMotor(); 
	  }
      NormalStationary
      {
        entry/{System.out.println("Window is stopped");}
        down -> SafetyMechanism;
      }
    }
   
    SafetyMechanism
    {
      entry/{System.out.println("Safety mechanism - please wait");}  
      after(5000) -> Stationary;
    }
  }

  public static void main (String[] argc) 
  {  	
  	new Window();
  } 
}

It seems that if I have a nested NormalStationary state, we never check SafetyMechanism and states that go after it if there are more. Because of that, we do not detect an event that requiires timer and do not import utilities.

If I take out NormalStationary, we Generator_CodeJava goes to other states and detects the timer. I am currently working on figuring out why this is happening.

2018-10-23

Found the cause of the issue##552.

Generated .java file was missing import statements:

import java.util.TimerTask;

import java.util.Timer;

Since we are using Java's Timer, util library needs to be imported.

2018-10-16

Fixed issue #911. Picked up issue #552.

For issue #1254, I cannot find test suite for the testbed.

2018-10-09

I was working on issues #911 and #1254

Updates:

#911: I was learning the overall structure of UmpleOnline and relationships between scripts. When Class data is being passed to umple_class.js, the data for interface object is already missing methods. I am trying to find part of the code that parses class objects from umpleonline/ump/tempfolder/model.ump into actual data, that is being passed to umple_class.js

#1254 I am going to check how to do the test during the call. The ump files from cruise.association.specializations are being tested in TestHarnessAssociationSpecializations.ump. After it is compiled, it is not checked anywhere, so I want to confirm if I need to create a new file that tests Harness set, and if so, in which languages.

2018-10-02

I am getting an error when trying to install Apache. I tried to start UmpleOnline on Ubuntu, but building umpleOnline fails with the error: Traget package "UmpleOnline" doesn't exist in the project "UmpleCore". Full compliation suceeds without any errors. When I try to start UmpleOnline after full build, I am getting an error:" unable to access jarfile umplesync.jar" . This file does not exist in my umple/umpleonline/scripts directory. I picked issue Some test cases in testbed are never executed #1254 to work on wile I am fixing my UmpleOnline installation.

2018-09-27

During the Code sprint I fixed this bug by changing the generated error message to escape the double quotes. After that I was trying to see why Umple Online is not working on Windows. I was able to find the part of build.umple.xml that makes umple online build to fail:

<java jar="${dist.dir}/libs/build/yuicompressor.jar"
          fork="true"
          failonerror="true">
      <arg value="${tmpScript}"/>
      <arg line="-o ${scriptPath}/allumple-min.js"/>
    </java>
    <delete>
      <fileset file="${tmpScript}"/>
    </delete>

After taking out this part of the code, the build compiled successfully, however, UmpleOmline was still giving an error. Currently, I am configuring Apache to see if using it resolves the problem

2018-09-11

I tried to set up Umple on my machine. I got it working up to the step 3d Additional projects in Eclipse. I am still getting errors in cruise.umple project after I finish this step. I had no errors after step 3c. I am planning to confirm during the call what is referred as "Working copy". In particular, project is displayed in Eclipse as "umple master", so I am not sure if it was supposed to be a branch.

I also tried UmpleOnline.

2018-09-11

I have tried to re-configure Eclipse, I believe original errors I had are gone. Current error:

deps-manual:
     [echo] Fetching manual dependencies
     [echo] Fetching org.eclipse.cdt.core_5.5.0.jar
     [echo] WARNING: This is merely wget-itng http://ftp.acc.umu.se/mirror/eclipse.org/tools/cdt/releases/kepler/sr1/plugins/org.eclipse.cdt.core_5.5.0.201309180223.jar
      [get] Getting: http://ftp.acc.umu.se/mirror/eclipse.org/tools/cdt/releases/kepler/sr1/plugins/org.eclipse.cdt.core_5.5.0.201309180223.jar
      [get] To: C:\Users\vasha\Desktop\year 4\UMPLE\umple\dist\libs\manual\org.eclipse.cdt.core_5.5.0.201309180223.jar
      [get] http://ftp.acc.umu.se/mirror/eclipse.org/tools/cdt/releases/kepler/sr1/plugins/org.eclipse.cdt.core_5.5.0.201309180223.jar moved to http://saimei.ftp.acc.umu.se/mirror/eclipse.org/tools/cdt/releases/kepler/sr1/plugins/org.eclipse.cdt.core_5.5.0.201309180223.jar
      [get] Not modified - so not downloaded
     [echo] Resolving configuration: validator
[ivy:resolve] :: loading settings :: file = ivysettings.xml
[ivy:retrieve]  conflict on C:\Users\vasha\Desktop\year 4\UMPLE\umple\dist\libs\validator\org.eclipse.jdt.core.jar in [validator]: 3.14.0 won
[ivy:retrieve]  conflict on C:\Users\vasha\Desktop\year 4\UMPLE\umple\dist\libs\validator\asm.jar in [validator]: 5.0.1 won
     [echo] Resolving configuration: test
    [javac] Compiling 940 source files to C:\Users\vasha\Desktop\year 4\UMPLE\umple\cruise.umple.validator\bin
    [javac] C:\Users\vasha\Desktop\year 4\UMPLE\umple\cruise.umple.validator\src-gen-umple\cruise\umple\validator\JavaCodeGenValidator.java:99: error: incompatible types: Map<CAP#1,CAP#2> cannot be converted to Map<String,String>
    [javac]             parser.setCompilerOptions(options);
    [javac]                                       ^
    [javac]   where CAP#1,CAP#2 are fresh type-variables:
    [javac]     CAP#1 extends Object from capture of ?
    [javac]     CAP#2 extends Object from capture of ?
    [javac] Note: C:\Users\vasha\Desktop\year 4\UMPLE\umple\cruise.umple.validator\src-gen-umple\cruise\umple\validator\JavaCodeGenValidator.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
    [javac] 1 error

BUILD FAILED

I spent time learning more about testing in Umple. I picked up bug "String constants in constraints generate invalid code #1327". The problem there is that we are not escaping double quotes with a backslash in the resulting Java code: Instead of

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public X(String aS1)
  {
    s1 = aS1;
    if (aS1.equals("cat"))
    {
      throw new RuntimeException("Please provide a valid s1 ["cat"object!=s1]");
    }
  }

Should be

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public X(String aS1)
  {
    s1 = aS1;
    if (aS1.equals("cat"))
    {
      throw new RuntimeException("Please provide a valid s1 [\"cat\"object!=s1]");
    }
  }

I was learning about the overall architecture and trying to find what generates this line.

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.