Commit 2ebf6ad2 authored by nilsfreyer's avatar nilsfreyer
Browse files

added src/, pom.xml, settings.xml

parent 6fe63e0a
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>mnistcalculator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<!-- .. SE-Libraries .................................................. -->
<streamtest.plugin>0.0.3-SNAPSHOT</streamtest.plugin>
<!-- .. Misc .......................................................... -->
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>de.monticore.lang.monticar.utilities</groupId>
<artifactId>maven-streamtest</artifactId>
<version>${streamtest.plugin}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>de.monticore.lang.monticar.utilities</groupId>
<artifactId>maven-streamtest</artifactId>
<version>${streamtest.plugin}</version>
<configuration>
<pathMain>./src/main/emam</pathMain>
<pathTest>./src/test/emam</pathTest>
<pathTmpOut>./target/tmp</pathTmpOut>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>streamtest-execute</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>se-nexus</id>
<url>https://nexus.se.rwth-aachen.de/content/repositories/embeddedmontiarc-releases/</url>
</repository>
<snapshotRepository>
<id>se-nexus</id>
<url>https://nexus.se.rwth-aachen.de/content/repositories/embeddedmontiarc-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
******************************************************************************
MontiCAR Modeling Family, www.se-rwth.de
Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
All rights reserved.
This project is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this project. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
<pluginGroup>org.mortbay.jetty</pluginGroup>
<pluginGroup>de.topobyte</pluginGroup>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>se-nexus</id>
<username>cibuild</username>
<password>${env.cibuild}</password>
</server>
<server>
<id>github</id>
<username>travisbuilduser</username>
<password>${env.travisbuilduserpassword}</password>
</server>
</servers>
<mirrors>
<mirror>
<id>se-nexus</id>
<mirrorOf>external:*</mirrorOf>
<url>https://nexus.se.rwth-aachen.de/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Optional URL to server. Default value is http://localhost:9000 -->
<sonar.host.url>
https://metric.se.rwth-aachen.de
</sonar.host.url>
<sonar.login>
jenkins
</sonar.login>
<sonar.password>
${env.sonar}
</sonar.password>
</properties>
</profile>
<profile>
<id>se-nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled /></releases>
<snapshots><enabled /></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled /></releases>
<snapshots><enabled /></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>se-nexus</activeProfile>
</activeProfiles>
</settings>
\ No newline at end of file
package CalculatorTest;
import NumberDetector;
component Calculator{
ports in Q(0:1)^10 vec1_1,
in Q(0:1)^10 vec1_2,
in Q(0:1)^10 vec1_3,
in Q(0:1)^10 vec2_1,
in Q(0:1)^10 vec2_2,
in Q(0:1)^10 vec2_3,
out Z(0:1998) result;
instance NumberDetector nd1;
instance NumberDetector nd2;
connect vec1_1 -> nd1.pred_num1;
connect vec1_2 -> nd1.pred_num2;
connect vec1_3 -> nd1.pred_num3;
connect vec2_1 -> nd2.pred_num1;
connect vec2_2 -> nd2.pred_num2;
connect vec2_3 -> nd2.pred_num3;
implementation Math{
result = nd1.number + nd2.number;
}
}
package CalculatorTest;
component NumberDetector{
ports in Q(0:1)^10 pred_num1,
in Q(0:1)^10 pred_num2,
in Q(0:1)^10 pred_num3,
out Z(0:999) number;
implementation Math{
for j = 1:3
if(j == 1)
tmp_vector = pred_num1;
end
if(j == 2)
tmp_vector = pred_num2;
end
if(j == 3)
tmp_vector = pred_num3;
end
maxIndex = 0;
maxValue = tmp_vector(1);
for i = 2:10
if tmp_vector(i) > maxValue
maxIndex = i - 1;
maxValue = tmp_vector(i);
end
end
if(j == 1)
num1 = maxIndex;
end
if(j == 2)
num2 = maxIndex;
end
if(j == 3)
num3 = maxIndex;
end
end
number = (num1*100) + (num2*10) + num3;
}
}
package CalculatorTest;
import NumberDetector;
component Calculator{
ports in Q(0:1)^10 vec1_1,
in Q(0:1)^10 vec1_2,
in Q(0:1)^10 vec1_3,
in Q(0:1)^10 vec2_1,
in Q(0:1)^10 vec2_2,
in Q(0:1)^10 vec2_3,
out Z(0:1998) result;
instance NumberDetector nd1;
instance NumberDetector nd2;
connect vec1_1 -> nd1.pred_num1;
connect vec1_2 -> nd1.pred_num2;
connect vec1_3 -> nd1.pred_num3;
connect vec2_1 -> nd2.pred_num1;
connect vec2_2 -> nd2.pred_num2;
connect vec2_3 -> nd2.pred_num3;
implementation Math{
result = nd1.number + nd2.number;
}
}
package CalculatorTest;
component NumberDetector{
ports in Q(0:1)^10 pred_num1,
in Q(0:1)^10 pred_num2,
in Q(0:1)^10 pred_num3,
out Z(0:999) number;
implementation Math{
for j = 1:3
if(j == 1)
tmp_vector = pred_num1;
end
if(j == 2)
tmp_vector = pred_num2;
end
if(j == 3)
tmp_vector = pred_num3;
end
maxIndex = 0;
maxValue = tmp_vector(1);
for i = 2:10
if tmp_vector(i) > maxValue
maxIndex = i - 1;
maxValue = tmp_vector(i);
end
end
if(j == 1)
num1 = maxIndex;
end
if(j == 2)
num2 = maxIndex;
end
if(j == 3)
num3 = maxIndex;
end
end
number = (num1*100) + (num2*10) + num3;
}
}
package CalculatorTest;
stream streamtest_calculator for Calculator {
vec1_1: (0,0,1,0,0,0,0,0,0,0);
vec1_2: (0,0,1,0,0,0,0,0,0,0);
vec1_3: (0,0,1,0,0,0,0,0,0,0);
vec2_1: (0,0,1,0,0,0,0,0,0,0);
vec2_2: (0,0,1,0,0,0,0,0,0,0);
vec2_3: (0,0,1,0,0,0,0,0,0,0);
out1: 444;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment