diff options
Diffstat (limited to 'subprojects/store-reasoning')
-rw-r--r-- | subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java deleted file mode 100644 index 6a0004d9..00000000 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.reasoning.actions; | ||
7 | |||
8 | import tools.refinery.store.dse.transition.actions.AbstractActionLiteral; | ||
9 | import tools.refinery.store.dse.transition.actions.BoundActionLiteral; | ||
10 | import tools.refinery.store.model.Model; | ||
11 | import tools.refinery.logic.term.NodeVariable; | ||
12 | import tools.refinery.store.reasoning.ReasoningAdapter; | ||
13 | import tools.refinery.store.tuple.Tuple; | ||
14 | |||
15 | import java.util.List; | ||
16 | |||
17 | public class CleanupActionLiteral extends AbstractActionLiteral { | ||
18 | private final NodeVariable node; | ||
19 | |||
20 | public CleanupActionLiteral(NodeVariable node) { | ||
21 | this.node = node; | ||
22 | } | ||
23 | |||
24 | public NodeVariable getNode() { | ||
25 | return node; | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | public List<NodeVariable> getInputVariables() { | ||
30 | return List.of(node); | ||
31 | } | ||
32 | |||
33 | @Override | ||
34 | public List<NodeVariable> getOutputVariables() { | ||
35 | return List.of(); | ||
36 | } | ||
37 | |||
38 | @Override | ||
39 | public BoundActionLiteral bindToModel(Model model) { | ||
40 | var reasoningAdapter = model.getAdapter(ReasoningAdapter.class); | ||
41 | return tuple -> reasoningAdapter.cleanup(tuple.get(0)) ? Tuple.of() : null; | ||
42 | } | ||
43 | } | ||