EmbeddedMontiArc issueshttps://git.rwth-aachen.de/groups/monticore/EmbeddedMontiArc/-/issues2021-10-20T17:39:36+02:00https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/basic-simulator/-/issues/4Time-control bugs2021-10-20T17:39:36+02:00Jean MeuriceTime-control bugs## Problem
The time-control of the visualization does not seem to be correct.
For example, with the "simulation-speed" set to low values (1/4, 1/8, ...) the control loop can stop advancing the simulation.
Generally, the visualization ...## Problem
The time-control of the visualization does not seem to be correct.
For example, with the "simulation-speed" set to low values (1/4, 1/8, ...) the control loop can stop advancing the simulation.
Generally, the visualization does not handle the rendering time well in order to prioritize the simulation speed.
## Fixes
A correct time-control loop should adapt the FPS to keep-up the desired simulation speed up to a certain minimum FPS limit.
Right now, the updates are handled in a java `Timer` callback. This is used in order to be in the GUI thread. However this makes the control loop logic hard. Ideally, the control logic should be as presented [here](https://gafferongames.com/post/fix_your_timestep/) (with fixed time-steps).
**If the [Async Simulation and Visualization](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/basic-simulator/-/issues/3) are implemented again**, the visualization control loop would be completely different since the simulation would not have to be updated in parallel.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/languages/MontiMath/-/issues/8Bug: Struct and array access in once does not work2021-03-14T14:36:01+01:00Andreas WahlenBug: Struct and array access in once does not work```
// given input port like StructXY xy[2];
Q z = xy(1).member; // does not work
StructXY xy1 = xy(1);
Q z = xy1.member; // works fine
``````
// given input port like StructXY xy[2];
Q z = xy(1).member; // does not work
StructXY xy1 = xy(1);
Q z = xy1.member; // works fine
```Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/languages/MontiMath/-/issues/7Bug: Boolean variable assignment with equal comparison throws error2021-03-14T14:33:46+01:00Andreas WahlenBug: Boolean variable assignment with equal comparison throws errorWhen removing the brackets in the following example there would be different error messages like "y was not declared in this scope". I already observed several pretty different error messages caused by this.
```
Q x = 5;
Q y = 10;
B z = ...When removing the brackets in the following example there would be different error messages like "y was not declared in this scope". I already observed several pretty different error messages caused by this.
```
Q x = 5;
Q y = 10;
B z = (x == y); // brackets should not be necessary as in other languages and when using operators like <= for comparison
```Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/26Output ports can not be used for further connects2021-03-14T14:15:44+01:00Andreas WahlenOutput ports can not be used for further connectsWhen using an output port as a source of a connect statement, there will be no error or warning but no corresponding code will be generated.
This should either throw an error or just work. Could be helpful in situations like the followi...When using an output port as a source of a connect statement, there will be no error or warning but no corresponding code will be generated.
This should either throw an error or just work. Could be helpful in situations like the following:
```
package ...;
component Test {
port
in x,
out y,
out z;
instance InstX instX;
instance InstY instY;
connect x -> instX.param;
connect instX.res -> y;
connect y -> instY.param; // this is the problematic line, one could of course also use instX.res again
connect instY.res -> z;
}
```Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/simulation/-/issues/25Proper Logging2021-10-20T18:59:13+02:00Jean MeuriceProper Logging## Idea
Re-instate *proper* logging: well structured, controllable, efficient (using ifs).
## Task
- Define a *target tree* which would well represent the different logging points of interest.
- The different branches/leaves in that t...## Idea
Re-instate *proper* logging: well structured, controllable, efficient (using ifs).
## Task
- Define a *target tree* which would well represent the different logging points of interest.
- The different branches/leaves in that tree should be easily enabled/disabled for debugging.
- The code uses `if`s on its corresponding target before logging to minimize overhead.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/simulation/-/issues/24Proper Error/Exception handling2021-10-20T17:43:13+02:00Jean MeuriceProper Error/Exception handlingThe entire simulator could use a proper error handling concept that would be used throughout all simulator projects.
Goals:
- Describe a concept for designing exceptions and how they are propagated through the simulator.
- It has to sup...The entire simulator could use a proper error handling concept that would be used throughout all simulator projects.
Goals:
- Describe a concept for designing exceptions and how they are propagated through the simulator.
- It has to support exceptions occurring remotely (autopilot, remote server) as well as in other languages (ex: c++ for the hardware_emulator)
- Ideally a comprehensible stack trace would show additional contextual information at different points in the call/catch stack.
- List all the *errors* (that are relevant to a *user*) and define a system to properly notify them.
- Define a system to properly notify *exceptions* (bugs/missing features).https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/commons/-/issues/2JSON extensions2021-10-20T17:32:39+02:00Jean MeuriceJSON extensionsImprove the usability of the JSON system for the configuration and scenarios.
Ideas:
- Support hex & binary
- Allow comments
- Units
- Duration: alternative representations (with units)
- Reference to other files: A special tag could be...Improve the usability of the JSON system for the configuration and scenarios.
Ideas:
- Support hex & binary
- Allow comments
- Units
- Duration: alternative representations (with units)
- Reference to other files: A special tag could be used to refer to a file relative to the current one. It would then be substituted. This mechanism could also be used as "template". The referred file would be loaded first, but the 'calling' file could still specify fields that would override the loaded file.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/simulation/-/issues/23Async Simulation and Visualization + Data-Export system2021-10-20T17:43:40+02:00Jean MeuriceAsync Simulation and Visualization + Data-Export systemSee [basic-sim issue](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/basic-simulator/-/issues/3)See [basic-sim issue](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/basic-simulator/-/issues/3)https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/basic-simulator/-/issues/3Async Simulation and Visualization + Data-Export system2021-10-20T17:40:34+02:00Jean MeuriceAsync Simulation and Visualization + Data-Export systemIdea: Run the simulations in another thread.
Advantages:
- Some performance improvement since one thread can run the simulation full speed, the other render the visualization.
- (Re-)develop the simulation data exporting. The relevant s...Idea: Run the simulations in another thread.
Advantages:
- Some performance improvement since one thread can run the simulation full speed, the other render the visualization.
- (Re-)develop the simulation data exporting. The relevant simulation data-points are saved per frame (can be a different rate then the simulation rate). The simulation "client" would register which data-points should be exported (to save bandwidth).
- The basic-sim can store the frames for a simulation. This allows to watch a simulation as it is simulated, but also to watch back/navigate the simulation using a timeline.
- This simplifies the time control logic between visualization and simulation.
- The data-export system can also directly be used to save simulation results.
- The data-export system could also be used to watch simulations remotely (would update the *visualization* project)
- A solid data-export system would make exporting any data (also inspection data for plotting, ...) cleaner and more generic.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/25Usage of type N inside structs leads to error2021-02-10T17:31:17+01:00Andreas WahlenUsage of type N inside structs leads to errorError message is: [ERROR] 0xA1038 SymbolReference Could not load full information of 'N' (Kind de.monticore.lang.monticar.ts.MCTypeSymbolKind)
No stack trace present.Error message is: [ERROR] 0xA1038 SymbolReference Could not load full information of 'N' (Kind de.monticore.lang.monticar.ts.MCTypeSymbolKind)
No stack trace present.Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/24Warning for types in structs2021-02-10T17:09:12+01:00Andreas WahlenWarning for types in structs`[WARN] unknown type symbol: Q`
Where Q is the type used inside a struct. Could also be N, Z, ...
After all the generator produces the expected code correctly.`[WARN] unknown type symbol: Q`
Where Q is the type used inside a struct. Could also be N, Z, ...
After all the generator produces the expected code correctly.Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/23StackOverflowError2021-02-10T16:41:25+01:00Andreas WahlenStackOverflowErrorPipeline: https://git.rwth-aachen.de/se-student/ws2021/labs/connectedcars/ema/-/jobs/1458084
Branch: https://git.rwth-aachen.de/se-student/ws2021/labs/connectedcars/ema/-/tree/andreaswPipeline: https://git.rwth-aachen.de/se-student/ws2021/labs/connectedcars/ema/-/jobs/1458084
Branch: https://git.rwth-aachen.de/se-student/ws2021/labs/connectedcars/ema/-/tree/andreaswEvgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/22NullPointerException instead of proper error message when undefined port is used2021-02-03T18:46:34+01:00Andreas WahlenNullPointerException instead of proper error message when undefined port is usedWhen using an undefined port (e.g. in a connect statement) the maven plugin will output a NullPointerException instead of a proper error message.When using an undefined port (e.g. in a connect statement) the maven plugin will output a NullPointerException instead of a proper error message.Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/21Connect of full array2021-02-03T17:44:34+01:00Andreas WahlenConnect of full array```
component Dummy {
port
in Q x[2],
out Q y;
instance Foo bar; // assume there is an input port array like x above
connect x -> bar.x; // does not work
connect x[1] -> bar.x[1]; // currently p...```
component Dummy {
port
in Q x[2],
out Q y;
instance Foo bar; // assume there is an input port array like x above
connect x -> bar.x; // does not work
connect x[1] -> bar.x[1]; // currently possible workaround
connect x[2] -> bar.x[2];
}
```Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/20Bug: Arrays of instances do not work2021-02-03T17:20:05+01:00Andreas WahlenBug: Arrays of instances do not workThe following can be parsed but generation of C++ code fails with "no value present":
```
component TestInstArray {
port
in Q x[2],
out Q y[2];
instance Identity idInst[2];
connect x[1] -> idInst[1].x;
connect x[2] -> idInst[2]...The following can be parsed but generation of C++ code fails with "no value present":
```
component TestInstArray {
port
in Q x[2],
out Q y[2];
instance Identity idInst[2];
connect x[1] -> idInst[1].x;
connect x[2] -> idInst[2].x;
connect idInst[1].y -> y[1];
connect idInst[2].y -> y[2];
}
```Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/19Semantics Update probably broke something2021-02-12T08:53:51+01:00Lukas BramSemantics Update probably broke somethingHi, we noticed that since the ExecutionSemantics update, the generator isn't able to compile the ema autopilot anymore. I tried to get a CI-Pipeline that reproduces the error, but the maven-streamtest plugin has some dependency-problems ...Hi, we noticed that since the ExecutionSemantics update, the generator isn't able to compile the ema autopilot anymore. I tried to get a CI-Pipeline that reproduces the error, but the maven-streamtest plugin has some dependency-problems at the moment, so it doesn't work. So I can only give you the error and a few of the files.
The error:
```
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Scanning dependencies of target TestEmadlAutoPilotAdapter
[ 9%] Building CXX object CMakeFiles/TestEmadlAutoPilotAdapter.dir/network.cpp.o
[ 18%] Building CXX object CMakeFiles/TestEmadlAutoPilotAdapter.dir/server_adapter.cpp.o
In file included from /home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/server_adapter.h:8,
from /home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/server_adapter.cpp:1:
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h: In member function ‘void de_rwth_connectedcars_testAutoPilot::execute()’:
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:36:1: error: ‘mps’ was not declared in this scope
36 | mps.currentVelKMH = true_velocity;
| ^~~
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:37:1: error: ‘path’ was not declared in this scope
37 | path.current_pos = true_position;
| ^~~~
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:38:1: error: ‘steering’ was not declared in this scope; did you mean ‘set_steering’?
38 | steering.currentAngle = true_compass;
| ^~~~~~~~
| set_steering
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:40:1: error: ‘constr’ was not declared in this scope; did you mean ‘confstr’?
40 | constr.maxAllVelocity = trajectory_x;
| ^~~~~~
| confstr
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:44:1: error: ‘coef’ was not declared in this scope; did you mean ‘cosf’?
44 | coef.execute();
| ^~~~
| cosf
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:45:1: error: ‘pid’ was not declared in this scope
45 | pid.kI = coef.kI;
| ^~~
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:49:1: error: ‘error’ was not declared in this scope; did you mean ‘perror’?
49 | error.currentVel = mps.currentVelMPS;
| ^~~~~
| perror
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:50:1: error: ‘velCalc’ was not declared in this scope
50 | velCalc.currentVel = mps.currentVelMPS;
| ^~~~~~~
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:52:1: error: ‘driveProf’ was not declared in this scope
52 | driveProf.maxAllVel = constr.maxVelocity;
| ^~~~~~~~~
/home/lukas/workspace/EmbeddedMontiArc/vcg-tools/build_environment/ema/src/target/cpp/./de_rwth_connectedcars_testAutoPilot.h:82:1: error: ‘res2pedal’ was not declared in this scope
82 | res2pedal.controlValue = pid.controlValue;
| ^~~~~~~~~
make[2]: *** [CMakeFiles/TestEmadlAutoPilotAdapter.dir/build.make:95: CMakeFiles/TestEmadlAutoPilotAdapter.dir/server_adapter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/TestEmadlAutoPilotAdapter.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
[ERROR] During compilation, an error occured. See above for more details.
```
What I noticed so far is that the resulting cpp files are erronuous. The component `coef` for example, is not directly part of the root component `TestAutopilot`. Instead it is a subcomponent of the `Velocity` component, which is itself a subcomponent of the `MovementController`, which again is a subcompoment of `TestAutopilot`. So the correct way to reference it in the resulting de_rwth_connectedcars_testAutoPilot.h cpp file should be `moveCont.vel.coef.execute();` but it instead was referenced like this `coef.execute();`.
And here the important files:
[de_rwth_connectedcars_testAutoPilot.h](/uploads/d264dac1be7d1b2d0d345898d6fb16d0/de_rwth_connectedcars_testAutoPilot.h)
[de_rwth_connectedcars_testAutoPilot_moveCon.h](/uploads/88e497a72e73061ab45138b588741397/de_rwth_connectedcars_testAutoPilot_moveCon.h)[de_rwth_connectedcars_testAutoPilot_vel.h](/uploads/93100d4b5c41f8c46dde54c2675a1d37/de_rwth_connectedcars_testAutoPilot_vel.h)[de_rwth_connectedcars_testAutoPilot_coef.h](/uploads/2ea9d5630420964080ccd196a0958ec1/de_rwth_connectedcars_testAutoPilot_coef.h)[TestAutoPilot.emadl](/uploads/cfac289f53a4c7aaecdbcd9e20af3966/TestAutoPilot.emadl)[MovementController.emadl](/uploads/e1864d011f7e16a27ab67b029e0d642c/MovementController.emadl)[Velocity.emadl](/uploads/8d93bbb55a3e10194bacccf1015e70ec/Velocity.emadl)[PIDcoef.emadl](/uploads/504cf7e5eddb58fb7b7293064725b3f7/PIDcoef.emadl)Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/languages/MontiMath/-/issues/6Bug: variable names do not need to be unique2021-02-01T19:30:00+01:00Andreas WahlenBug: variable names do not need to be uniqueThis is a "valid" code, but should be declined:
```
implementation Math {
Q a = 0;
Q a = 1;
}
```This is a "valid" code, but should be declined:
```
implementation Math {
Q a = 0;
Q a = 1;
}
```Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/18Bug: Access struct member of a port array2021-02-01T16:26:20+01:00Andreas WahlenBug: Access struct member of a port arrayAssume one has created an own struct type and wants to define an array of ports of this type.
Example:
```
struct MyStruct {
Q myMember;
}
```
```
component MyComponent {
port
in MyStruct inputStruct[2],
out Q ...Assume one has created an own struct type and wants to define an array of ports of this type.
Example:
```
struct MyStruct {
Q myMember;
}
```
```
component MyComponent {
port
in MyStruct inputStruct[2],
out Q outputMember;
implementation Math {
outputMember = inputStruct(1).myMember; // could not parse...
}
}
```
The problem seems to be the inline access of an element of the array and the member of this element at once. It works when one puts it into separat lines.Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/languages/Struct/-/issues/1Structs don't allow arrays2021-01-26T18:34:26+01:00Martin FitzkeStructs don't allow arraysStructs do not allow C-like arrays of any type.
```
struct MyStruct {
Q someArray[2];
MyStruct2 myStruct2;
}
```Structs do not allow C-like arrays of any type.
```
struct MyStruct {
Q someArray[2];
MyStruct2 myStruct2;
}
```Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/basic-simulator/-/issues/2Feature Request: Scenario folders2021-10-20T17:57:37+02:00TamfaetFeature Request: Scenario foldersIt would be really convenient to provide a path to other scenario files. Thus project files can be contained in their corresponding projects and no need for copy-pasting would be needed.It would be really convenient to provide a path to other scenario files. Thus project files can be contained in their corresponding projects and no need for copy-pasting would be needed.