3 import java
.util
.ArrayList
;
6 import de
.learnlib
.api
.SUL
;
7 import de
.learnlib
.api
.SULException
;
10 * SUL-wrapper to check for non-determinism, by use of an observation tree.
12 * @author Ramon Janssen
17 public class NonDeterminismCheckingSUL
<I
,O
> implements SUL
<I
,O
> {
18 private final SUL
<I
,O
> sul
;
19 private final ObservationTree
<I
,O
> root
= new ObservationTree
<I
,O
>();
20 private final List
<I
> inputs
= new ArrayList
<>();
21 private final List
<O
> outputs
= new ArrayList
<>();
23 public NonDeterminismCheckingSUL(SUL
<I
,O
> sul
) {
30 // check for non-determinism: crashes if outputs are inconsistent with previous ones
31 root
.addObservation(inputs
, outputs
);
42 public O
step(I input
) throws SULException
{
43 O result
= sul
.step(input
);