generators issueshttps://git.rwth-aachen.de/groups/monticore/EmbeddedMontiArc/generators/-/issues2020-01-13T14:14:20+01:00https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Cpp/-/issues/45add largestContour command2020-01-13T14:14:20+01:00Ahmed Diabadd largestContour commandEvgeny KusmenkoAhmed DiabEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/-/issues/2Problem classification2020-08-19T19:27:07+02:00Evgeny KusmenkoProblem classificationOptimization problems can be classified into different categories, cf. thesis of Christoph Richter, e.g. linear, quadratic, convex, etc.
EMAMOpt2CPP provides a [class](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMA...Optimization problems can be classified into different categories, cf. thesis of Christoph Richter, e.g. linear, quadratic, convex, etc.
EMAMOpt2CPP provides a [class](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/-/blob/master/src/main/java/de/monticore/lang/monticar/generator/cpp/optimizationSolver/problem/OptimizationProblemClassification.java
) detecting the problem class:
However, it seems to eb buggy. The corresponding [test](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/-/blob/master/src/test/java/de/monticore/lang/monticar/generator/cpp/optimizationSolver/problem/OptimizationProblemClassificationTest.java) has not been implemented.
Please investigate and try to fix this. We need a classification to enable an appropriate choice of solvers and also to possibly forbid some classes in safety critical systems.Jan Philipp HallerJan Philipp Haller2020-09-02https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Cpp/-/issues/46Index conversion bug2020-09-30T20:21:49+02:00Sascha DewesIndex conversion bugThere seems to be a bug with the conversion from EMA indices to Cpp indices. In the following example it looks like the ceil function was mistaken for an array as the generator applies the decrementation twice to the inputarray index.
I...There seems to be a bug with the conversion from EMA indices to Cpp indices. In the following example it looks like the ceil function was mistaken for an array as the generator applies the decrementation twice to the inputarray index.
Input Code:
```
implementation Math {
for i=1:3
outputarray(i) = ceil(inputarray(i));
end
}
```
Output Code:
```
void execute()
{
for( auto i=1;i<=3;++i){
outputarray(i-1) = ceil(inputarray(i-1-1));
}
}
```
The same Problem occurs when there is no actual array inside the function brackets.
Input Code:
```
implementation Math {
for i=1:3
Q x = inputarray(i);
outputarray(i) = ceil(x);
end
}
```
Output Code:
```
void execute()
{
for( auto i=1;i<=3;++i){
double x = inputarray(i-1);
outputarray(i-1) = ceil(x-1);
}
}
```https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/16Generator cannot resolve port2020-11-11T13:13:04+01:00Mattis HoppeGenerator cannot resolve portI have 3 emadl files containing:
```
component Add{
ports
in Q num1,
in Q num2,
out Q erg;
implementation Math{
erg = num1 + num2;
}
}
```
```
component Add1{
ports
in Q testin,
out Q testout;
instance Add add;
connect te...I have 3 emadl files containing:
```
component Add{
ports
in Q num1,
in Q num2,
out Q erg;
implementation Math{
erg = num1 + num2;
}
}
```
```
component Add1{
ports
in Q testin,
out Q testout;
instance Add add;
connect testin -> add.num1;
connect testin -> add.num2;
connect add.erg -> testout;
}
```
```
component Add2{
ports
in Q test1,
out Q test2;
instance Add1 adder;
connect test1 -> adder.testin;
connect adder.testout -> test2;
}
```
Building Add and Add1 works just fine, but as soon as I try to build Add2 I get following Error-message:
```
[WARN] name of connector's source/target does has two parts: instance.port, cannot resolve port
Exception in thread "main" java.lang.NullPointerException
at de.monticore.lang.monticar.generator.cpp.converter.PortConverter.convertPortSymbolToVariable(PortConverter.java:59)
at de.monticore.lang.monticar.generator.cpp.converter.PortConverter.convertPortSymbolToVariable(PortConverter.java:48)
at de.monticore.lang.monticar.generator.cpp.converter.PortConverter.getVariableForPortSymbol(PortConverter.java:33)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverterMethodGeneration.generateConnectors(ComponentConverterMethodGeneration.java:85)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverterMethodGeneration.generateExecuteMethodInner(ComponentConverterMethodGeneration.java:70)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverterMethodGeneration.generateExecuteMethod(ComponentConverterMethodGeneration.java:61)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverter.convertComponentSymbolToBluePrint(ComponentConverter.java:99)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverter.convertComponentSymbolToBluePrint(ComponentConverter.java:368)
at de.monticore.lang.monticar.generator.cpp.LanguageUnitCPP.generateBluePrints(LanguageUnitCPP.java:64)
at de.monticore.lang.monticar.generator.cpp.GeneratorCPP.generateString(GeneratorCPP.java:159)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateSubComponents(EMADLGenerator.java:636)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateComponent(EMADLGenerator.java:549)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateSubComponents(EMADLGenerator.java:648)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateComponent(EMADLGenerator.java:549)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateStrings(EMADLGenerator.java:395)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateFiles(EMADLGenerator.java:219)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generate(EMADLGenerator.java:125)
at de.monticore.lang.monticar.emadl.generator.EMADLGeneratorCli.runGenerator(EMADLGeneratorCli.java:148)
at de.monticore.lang.monticar.emadl.generator.EMADLGeneratorCli.main(EMADLGeneratorCli.java:72)
```
Changing variablenames etc. does not work either. For building I am using version 0.4.3 of the generatorEvgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Gluon/-/issues/4Check if if-else is required2020-11-12T19:20:19+01:00Julian Johannes Steinsberger-DührßenCheck if if-else is requiredhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Gluon/-/blob/master/src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl#L323https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Gluon/-/blob/master/src/main/resources/templates/gluon/CNNSupervisedTrainer.ftl#L323Evgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/17Create default Dockerfile to be able to test basic scripts2020-11-20T16:27:50+01:00Andreas WahlenCreate default Dockerfile to be able to test basic scriptsCreate a Dockerfile and add it to the repository to allow testing of EMADL models using the streamtest plugin.
Something like that would work (dependency is a local `jdk-8u271-linux-x64.tar.gz` file which is the Oracle JDK 8):
```docke...Create a Dockerfile and add it to the repository to allow testing of EMADL models using the streamtest plugin.
Something like that would work (dependency is a local `jdk-8u271-linux-x64.tar.gz` file which is the Oracle JDK 8):
```docker
FROM ubuntu:bionic
RUN apt update && apt install -y --no-install-recommends maven g++ make cmake libarmadillo-dev
WORKDIR /root
COPY jdk-8u271-linux-x64.tar.gz .
RUN tar -xzf jdk-8u271-linux-x64.tar.gz
RUN rm jdk-8u271-linux-x64.tar.gz
RUN mv jdk1.8.0_271 /opt
RUN update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0_271/bin/java" 1
RUN update-alternatives --set "java" "/opt/jdk1.8.0_271/bin/java"
```
A corresponding `.gitlab-ci.yml` would look like this (settings.xml and pom.xml files are mandatory):
```yml
stages:
- integration
testIIR:
stage: integration
image: registry.git.rwth-aachen.de/se-student/ws2021/labs/connectedcars/ema
script:
- mvn streamtest:streamtest-execute -s settings.xml
except:
changes:
- README.md
- .gitignore
- .gitkeep
```
In the mean time: Feel free to choose [this image](https://git.rwth-aachen.de/se-student/ws2021/labs/connectedcars/ema/container_registry) for testing of basic models (which do not have any specific dependencies)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/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/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/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/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/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/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/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/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/generators/EMADL2CPP/-/issues/27Data loader Target code updaten2021-11-19T14:58:24+01:00Evgeny KusmenkoData loader Target code updatenPaul SchlackPaul Schlackhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Gluon/-/issues/5Save results more often than once per epoch2021-10-19T15:10:05+02:00Evgeny KusmenkoSave results more often than once per epochCurrently, results are only saved once per epoch, which is problematic for large data sets. Consider saving multiple times per epoch.Currently, results are only saved once per epoch, which is problematic for large data sets. Consider saving multiple times per epoch.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Gluon/-/issues/6Upgrade Reinforcement learning code to python 3 / mxnet 1.72021-10-19T15:14:32+02:00Evgeny KusmenkoUpgrade Reinforcement learning code to python 3 / mxnet 1.7@tristan_hoefer probably something you should look into
@mattis.hoppe fyi@tristan_hoefer probably something you should look into
@mattis.hoppe fyiTristan HöferTristan Höferhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/28link to docker files not working2021-11-10T11:05:51+01:00Jonas Ritzlink to docker files not workingThe link to the docker files in the first line of subsection Prerequisites in readme.md does not seem to work properly. (404)The link to the docker files in the first line of subsection Prerequisites in readme.md does not seem to work properly. (404)https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/29link to docker files not working2021-11-10T11:07:13+01:00Jonas Ritzlink to docker files not workinglink to docker files from the README.md file does not see to work (first section of Prerequisites)link to docker files from the README.md file does not see to work (first section of Prerequisites)