diff options
Diffstat (limited to 'subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java')
-rw-r--r-- | subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java deleted file mode 100644 index 8f7056f2..00000000 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.dse.internal; | ||
7 | |||
8 | import tools.refinery.store.adapter.AbstractModelAdapterBuilder; | ||
9 | import tools.refinery.store.model.ModelStore; | ||
10 | import tools.refinery.store.model.ModelStoreBuilder; | ||
11 | import tools.refinery.store.query.dnf.RelationalQuery; | ||
12 | import tools.refinery.store.dse.DesignSpaceExplorationBuilder; | ||
13 | import tools.refinery.store.dse.Strategy; | ||
14 | import tools.refinery.store.dse.objectives.Objective; | ||
15 | |||
16 | import java.util.LinkedHashSet; | ||
17 | import java.util.LinkedList; | ||
18 | import java.util.List; | ||
19 | |||
20 | public class DesignSpaceExplorationBuilderImpl | ||
21 | extends AbstractModelAdapterBuilder<DesignSpaceExplorationStoreAdapterImpl> | ||
22 | implements DesignSpaceExplorationBuilder { | ||
23 | private final LinkedHashSet<TransformationRule> transformationSpecifications = new LinkedHashSet<>(); | ||
24 | private final LinkedHashSet<RelationalQuery> globalConstraints = new LinkedHashSet<>(); | ||
25 | private final List<Objective> objectives = new LinkedList<>(); | ||
26 | private Strategy strategy; | ||
27 | |||
28 | @Override | ||
29 | protected DesignSpaceExplorationStoreAdapterImpl doBuild(ModelStore store) { | ||
30 | return new DesignSpaceExplorationStoreAdapterImpl(store, transformationSpecifications, globalConstraints, | ||
31 | objectives, strategy); | ||
32 | } | ||
33 | |||
34 | @Override | ||
35 | public DesignSpaceExplorationBuilder transformation(TransformationRule transformationRule) { | ||
36 | checkNotConfigured(); | ||
37 | transformationSpecifications.add(transformationRule); | ||
38 | return this; | ||
39 | } | ||
40 | |||
41 | @Override | ||
42 | public DesignSpaceExplorationBuilder globalConstraint(RelationalQuery globalConstraint) { | ||
43 | checkNotConfigured(); | ||
44 | globalConstraints.add(globalConstraint); | ||
45 | return this; | ||
46 | } | ||
47 | |||
48 | @Override | ||
49 | public DesignSpaceExplorationBuilder objective(Objective objective) { | ||
50 | checkNotConfigured(); | ||
51 | objectives.add(objective); | ||
52 | return this; | ||
53 | } | ||
54 | |||
55 | @Override | ||
56 | public DesignSpaceExplorationBuilder strategy(Strategy strategy) { | ||
57 | checkNotConfigured(); | ||
58 | this.strategy = strategy; | ||
59 | return this; | ||
60 | } | ||
61 | |||
62 | @Override | ||
63 | protected void doConfigure(ModelStoreBuilder storeBuilder) { | ||
64 | storeBuilder.symbols(DesignSpaceExplorationAdapterImpl.NODE_COUNT_SYMBOL); | ||
65 | super.doConfigure(storeBuilder); | ||
66 | } | ||
67 | } | ||