Skip to content

Commit 0022fb2

Browse files
authored
Merge pull request #20 from 6b6279/main
Merge back from fork after benchmark adaption
2 parents cb1a47d + 7051b19 commit 0022fb2

File tree

17 files changed

+365
-126
lines changed

17 files changed

+365
-126
lines changed

lib/TraVarT-DOPLER-SMT.jar renamed to lib/placeholder3/placeholder4/1.0/placeholder4-1.0.jar

File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>placeholder3</groupId>
6+
<artifactId>placeholder4</artifactId>
7+
<version>1.0</version>
8+
<description>POM was created from install:install-file</description>
9+
</project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<metadata>
3+
<groupId>placeholder3</groupId>
4+
<artifactId>placeholder4</artifactId>
5+
<versioning>
6+
<release>1.0</release>
7+
<versions>
8+
<version>1.0</version>
9+
</versions>
10+
<lastUpdated>20250624105841</lastUpdated>
11+
</versioning>
12+
</metadata>

lib/travart-core-2.0.0.jar

-123 KB
Binary file not shown.

pom.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
<name>TraVarT - DOPLER - decision</name>
88
<description>TraVarT - Transforming Variability Artifacts - DOPLER - decision</description>
99

10+
<repositories>
11+
<repository>
12+
<id>travart-lib-static</id>
13+
<url>file://${project.basedir}/lib</url>
14+
</repository>
15+
</repositories>
1016

1117
<properties>
1218
<maven.compiler.source>21</maven.compiler.source>
1319
<maven.compiler.target>21</maven.compiler.target>
14-
<plugin.class>edu/kit/dopler/plugin/DoplerPlugin.java</plugin.class>
20+
<plugin.class>edu.kit.travart.dopler.plugin.DoplerPlugin</plugin.class>
1521
<plugin.version>2.0</plugin.version>
1622
<plugin.provider>CPS</plugin.provider>
1723
<plugin.dependencies/>
@@ -58,17 +64,13 @@
5864
<groupId>at.jku.cps</groupId>
5965
<artifactId>travart-core</artifactId>
6066
<version>2.0.0</version>
61-
<scope>system</scope>
62-
<systemPath>${project.basedir}/lib/travart-core-2.0.0.jar</systemPath>
67+
<scope>provided</scope>
6368
</dependency>
64-
65-
<!-- local jar with dopler model -->
69+
6670
<dependency>
67-
<groupId>placeholder3</groupId>
68-
<artifactId>placeholder4</artifactId>
69-
<version>1.0</version>
70-
<scope>system</scope>
71-
<systemPath>${project.basedir}/lib/TraVarT-DOPLER-SMT.jar</systemPath>
71+
<groupId>placeholder3</groupId>
72+
<artifactId>placeholder4</artifactId>
73+
<version>1.0</version>
7274
</dependency>
7375

7476
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14 -->
@@ -85,7 +87,6 @@
8587

8688
<build>
8789
<plugins>
88-
8990
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
9091
<!-- needed for GitHub actions -->
9192
<plugin>

src/main/java/edu/kit/travart/dopler/injection/Injector.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import edu.kit.travart.dopler.sampling.Z3OutputParserImpl;
3030
import edu.kit.travart.dopler.sampling.Z3Runner;
3131
import edu.kit.travart.dopler.sampling.Z3RunnerImpl;
32+
import edu.kit.travart.dopler.transformation.DoplerBenchmarkingTransformer;
3233
import edu.kit.travart.dopler.transformation.Transformer;
3334
import edu.kit.travart.dopler.transformation.decision.to.feature.AttributeCreator;
3435
import edu.kit.travart.dopler.transformation.decision.to.feature.AttributeCreatorImpl;
@@ -124,6 +125,9 @@ private void installTransformation() {
124125

125126
install(Transformer.class,
126127
new Transformer(getInstance(DmToFmTransformer.class), getInstance(FmToDmTransformer.class)));
128+
install(DoplerBenchmarkingTransformer.class,
129+
new DoplerBenchmarkingTransformer(getInstance(DmToFmTransformer.class), getInstance(FmToDmTransformer.class)));
130+
127131
}
128132

129133
private void installDmToFm() {
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/*******************************************************************************
2+
* SPDX-License-Identifier: MPL-2.0
3+
* <p>
4+
* This Source Code Form is subject to the terms of the Mozilla
5+
* Public License, v. 2.0. If a copy of the MPL was not distributed
6+
* with this file, You can obtain one at
7+
* https://mozilla.org/MPL/2.0/.
8+
* <p>
9+
* Contributors:
10+
* @author Yannick Kraml
11+
* @author Kevin Feichtinger
12+
* <p>
13+
* Copyright 2023 Johannes Kepler University Linz
14+
* LIT Cyber-Physical Systems Lab
15+
* Copyright 2024 Karlsruhe Institute of Technology (KIT)
16+
* KASTEL - Dependability of Software-intensive Systems
17+
*******************************************************************************/
18+
package edu.kit.travart.dopler.plugin;
19+
20+
import at.jku.cps.travart.core.common.IBenchmarkingPlugin;
21+
import at.jku.cps.travart.core.common.IDeserializer;
22+
import at.jku.cps.travart.core.common.IModelTransformer;
23+
import at.jku.cps.travart.core.common.IPlugin;
24+
import at.jku.cps.travart.core.common.IPrettyPrinter;
25+
import at.jku.cps.travart.core.common.ISerializer;
26+
import at.jku.cps.travart.core.common.IStatistics;
27+
import at.jku.cps.travart.core.transformation.*;
28+
import edu.kit.travart.dopler.injection.Injector;
29+
import edu.kit.travart.dopler.transformation.DoplerBenchmarkingTransformer;
30+
import edu.kit.travart.dopler.transformation.Transformer;
31+
import edu.kit.dopler.model.Dopler;
32+
import org.pf4j.Extension;
33+
34+
import java.util.List;
35+
36+
/**
37+
* Implementation of {@link IPlugin} with the {@link Dopler} model as type variable.
38+
*/
39+
@Extension
40+
public class DoplerBenchmarkingPlugin implements IBenchmarkingPlugin<Dopler> {
41+
42+
private static final String ID = "dopler-dm-benchmarking-plugin";
43+
44+
private final Injector injector;
45+
46+
/**
47+
* Constructor of {@link DoplerBenchmarkingPlugin}:
48+
*/
49+
public DoplerBenchmarkingPlugin() {
50+
injector = new Injector();
51+
}
52+
53+
/*
54+
@Override
55+
public IModelTransformer<Dopler> getTransformer() {
56+
return injector.getInstance(Transformer.class);
57+
}
58+
*/
59+
60+
@Override
61+
public AbstractBenchmarkingTransformer<Dopler> getBenchmarkingTransformer() {
62+
return injector.getInstance(DoplerBenchmarkingTransformer.class);
63+
}
64+
65+
@Override
66+
public IDeserializer<Dopler> getDeserializer() {
67+
return injector.getInstance(DoplerDeserializer.class);
68+
}
69+
70+
@Override
71+
public IStatistics<Dopler> getStatistics() {
72+
throw new UnsupportedOperationException("Not implemented");
73+
}
74+
75+
@Override
76+
public ISerializer<Dopler> getSerializer() {
77+
return injector.getInstance(DoplerSerializer.class);
78+
}
79+
80+
@Override
81+
public IPrettyPrinter<Dopler> getPrinter() {
82+
return injector.getInstance(DoplerPrettyPrinter.class);
83+
}
84+
85+
@Override
86+
public String getName() {
87+
return "dopler";
88+
}
89+
90+
@Override
91+
public String getAbbreviation() {
92+
return "DOPLER";
93+
}
94+
95+
@Override
96+
public String getVersion() {
97+
return "2.0.1";
98+
}
99+
100+
@Override
101+
public String getId() {
102+
return ID;
103+
}
104+
105+
@Override
106+
public List<String> getSupportedFileExtensions() {
107+
return List.of(new CsvFormat().extension());
108+
}
109+
}
Lines changed: 7 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,10 @@
1-
/*******************************************************************************
2-
* SPDX-License-Identifier: MPL-2.0
3-
* <p>
4-
* This Source Code Form is subject to the terms of the Mozilla
5-
* Public License, v. 2.0. If a copy of the MPL was not distributed
6-
* with this file, You can obtain one at
7-
* https://mozilla.org/MPL/2.0/.
8-
* <p>
9-
* Contributors:
10-
* @author Yannick Kraml
11-
* @author Kevin Feichtinger
12-
* <p>
13-
* Copyright 2023 Johannes Kepler University Linz
14-
* LIT Cyber-Physical Systems Lab
15-
* Copyright 2024 Karlsruhe Institute of Technology (KIT)
16-
* KASTEL - Dependability of Software-intensive Systems
17-
*******************************************************************************/
181
package edu.kit.travart.dopler.plugin;
192

20-
import at.jku.cps.travart.core.common.IDeserializer;
21-
import at.jku.cps.travart.core.common.IModelTransformer;
22-
import at.jku.cps.travart.core.common.IPlugin;
23-
import at.jku.cps.travart.core.common.IPrettyPrinter;
24-
import at.jku.cps.travart.core.common.ISerializer;
25-
import at.jku.cps.travart.core.common.IStatistics;
26-
import edu.kit.travart.dopler.injection.Injector;
27-
import edu.kit.travart.dopler.transformation.Transformer;
28-
import edu.kit.dopler.model.Dopler;
29-
import org.pf4j.Extension;
3+
import org.pf4j.Plugin;
4+
import org.pf4j.PluginWrapper;
305

31-
import java.util.List;
32-
33-
/**
34-
* Implementation of {@link IPlugin} with the {@link Dopler} model as type variable.
35-
*/
36-
@Extension
37-
public class DoplerPlugin implements IPlugin<Dopler> {
38-
39-
private static final String ID = "dopler-decision-plugin";
40-
41-
private final Injector injector;
42-
43-
/**
44-
* Constructor of {@link DoplerPlugin}:
45-
*/
46-
public DoplerPlugin() {
47-
injector = new Injector();
48-
}
49-
50-
@Override
51-
public IModelTransformer<Dopler> getTransformer() {
52-
return injector.getInstance(Transformer.class);
53-
}
54-
55-
@Override
56-
public IDeserializer<Dopler> getDeserializer() {
57-
return injector.getInstance(DoplerDeserializer.class);
58-
}
59-
60-
@Override
61-
public IStatistics<Dopler> getStatistics() {
62-
throw new UnsupportedOperationException("Not implemented");
63-
}
64-
65-
@Override
66-
public ISerializer<Dopler> getSerializer() {
67-
return injector.getInstance(DoplerSerializer.class);
68-
}
69-
70-
@Override
71-
public IPrettyPrinter<Dopler> getPrinter() {
72-
return injector.getInstance(DoplerPrettyPrinter.class);
73-
}
74-
75-
@Override
76-
public String getName() {
77-
return "Decision-Oriented Product Line Engineering for effective Reuse";
78-
}
79-
80-
@Override
81-
public String getAbbreviation() {
82-
return "DOPLER";
83-
}
84-
85-
@Override
86-
public String getVersion() {
87-
return "2.0";
88-
}
89-
90-
@Override
91-
public String getId() {
92-
return ID;
93-
}
94-
95-
@Override
96-
public List<String> getSupportedFileExtensions() {
97-
return List.of(new CsvFormat().extension());
98-
}
99-
}
6+
public class DoplerPlugin extends Plugin {
7+
public DoplerPlugin(final PluginWrapper wrapper) {
8+
super(wrapper);
9+
}
10+
}

0 commit comments

Comments
 (0)