|
16 | 16 | */ |
17 | 17 | package de.learnlib.algorithms.discriminationtree.mealy; |
18 | 18 |
|
| 19 | +import java.util.Map; |
| 20 | + |
| 21 | +import net.automatalib.automata.transout.MealyMachine; |
| 22 | +import net.automatalib.graphs.dot.EmptyDOTHelper; |
| 23 | +import net.automatalib.graphs.dot.GraphDOTHelper; |
| 24 | +import net.automatalib.words.Alphabet; |
| 25 | +import net.automatalib.words.Word; |
| 26 | + |
19 | 27 | import com.github.misberner.buildergen.annotations.GenerateBuilder; |
20 | 28 |
|
21 | 29 | import de.learnlib.algorithms.discriminationtree.AbstractDTLearner; |
|
28 | 36 | import de.learnlib.discriminationtree.MultiDTree; |
29 | 37 | import de.learnlib.oracles.AbstractQuery; |
30 | 38 |
|
31 | | -import net.automatalib.automata.transout.MealyMachine; |
32 | | -import net.automatalib.words.Alphabet; |
33 | | -import net.automatalib.words.Word; |
34 | | - |
35 | 39 | /** |
36 | 40 | * |
37 | 41 | * @author Malte Isberner |
@@ -82,4 +86,28 @@ public void answer(Word<O> output) { |
82 | 86 | } |
83 | 87 | }; |
84 | 88 | } |
| 89 | + |
| 90 | + @Override |
| 91 | + public GraphDOTHelper<HState<I, Word<O>, Void, O>, HTransition<I, Word<O>, Void, O>> getHypothesisDOTHelper() { |
| 92 | + return new EmptyDOTHelper<HState<I,Word<O>,Void,O>,HTransition<I,Word<O>,Void,O>>() { |
| 93 | + @Override |
| 94 | + public boolean getEdgeProperties(HState<I, Word<O>, Void, O> src, |
| 95 | + HTransition<I, Word<O>, Void, O> edge, |
| 96 | + HState<I, Word<O>, Void, O> tgt, |
| 97 | + Map<String, String> properties) { |
| 98 | + if (!super.getEdgeProperties(src, edge, tgt, properties)) { |
| 99 | + return false; |
| 100 | + } |
| 101 | + String label = String.valueOf(edge.getSymbol()); |
| 102 | + label += " / "; |
| 103 | + if (edge.getProperty() != null) { |
| 104 | + label += edge.getProperty(); |
| 105 | + } |
| 106 | + properties.put(EdgeAttrs.LABEL, label); |
| 107 | + |
| 108 | + return true; |
| 109 | + } |
| 110 | + |
| 111 | + }; |
| 112 | + } |
85 | 113 | } |
0 commit comments