Dear John,
your approach was pretty much correct. There was only a small bug in your
SUL implementation: In your step function you always queried the
"input-1st" position of your simulation without acknowledging the state of
your application. For example, the second "1" input should query the
second data point of your simulation, not the first. You would need to
keep track of the elapsed time in your SUL rather than the internalState.
I uploaded an updated version [0] of the code which should give you a more
expressive model (you can play with the input alphabet or the fallDuration
parameter).
The difference of a passive approach is that for passive learning you
don't need a SUL implementation that computes outputs for given inputs on
demand but a set of (previously computed) samples that describe your
system. See our in-tree passive example [1].
Currently, LearnLib only supports one passive learning algorithm for Mealy
machines (RPNI) and for a good generalization of Mealy machines you need a
lot of data. However, given that you already mapped your observations to
RISING/FALLING, maybe a DFA interpretation (i.e. RISING = accepted,
FALLING = rejected) may be possible, too. Then you could also use the EDSM
and MDL variants of the (base) RPNI learner.
Kind regards,
Markus
[0] -
https://gist.github.com/mtf90/f5f369daa0bad3c00c7e17e8a99d4f90
I simplified the SUL to generate the upward/downward motion from a sine
wave. Also, it looked like you used an older version of LearnLib
(0.12.something). The uploaded code uses the latest version 0.14.0. But
this should only concern some import statements -- you still should get
the general gist of it.
[1] -
https://github.com/LearnLib/learnlib/blob/develop/examples/src/main/java/de/learnlib/examples/passive/Example1.java