LearnLib triggers an unexpected ArrayIndexOutOfBoundsException in SharedWord

11 views
Skip to first unread message

Masoud Ebrahimi

unread,
Nov 8, 2019, 10:30:04 AM11/8/19
to LearnLib Q&A
Hi everyone,

Recently I tried LearnLib 0.14.0 (TTTLearner) and found an interesting exception that is not supposed to be triggered.
What is weird about this exception is that is triggered by lines (55 and 56) in MealyUtil.java of LearnLib while accessing 
an element that is beyond array's length. Interestingly there is an assertion 3 lines above to prevent such behaviour and 
yet it is not triggered.

Any ideas?

P.S. IntelliJ, Maven, Java 8 (1.8.0_161).

Best,
Masoud Ebrahimi

Following is the stack trace:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at net.automatalib.words.SharedWord.getSymbol(SharedWord.java:100)
at de.learnlib.util.mealy.MealyUtil.findMismatch(MealyUtil.java:56)
at de.learnlib.algorithms.ttt.mealy.TTTLearnerMealy.findOutputInconsistency(TTTLearnerMealy.java:103)
at de.learnlib.algorithms.ttt.base.AbstractTTTLearner.refineHypothesisSingle(AbstractTTTLearner.java:218)
at de.learnlib.algorithms.ttt.mealy.TTTLearnerMealy.refineHypothesisSingle(TTTLearnerMealy.java:67)
at de.learnlib.algorithms.ttt.base.AbstractTTTLearner.refineHypothesis(AbstractTTTLearner.java:162)
at somepackage.ExperimentClass $ExperimentImpl.run(ExperimentClass.java:181)
at somepackage.ExperimentClass.run(ExperimentClass.java:60)
at somepackage.main(Simulation.java:82)


learnlib.png


Markus Frohme

unread,
Nov 8, 2019, 2:55:35 PM11/8/19
to Masoud Ebrahimi, LearnLib Q&A
Dear Masoud,


assertions are usually disabled by the JVM unless you pass "-ea" (enable assertions) to the JVM when running your programm. So while the code crashes in L56, the error really is the different length of out1 and out2.

Could you maybe elaborate what your counterexample looks like? I.e. the inputs of the counterexample, the hypothesis output and the output of the system under learning? I suspect that they already differ in length (which shouldn't happen if both systems represent Mealy Machines).

The fact that your output contains λs looks like you try to model "qiescent", unobservable outputs? Maybe there is some discrepancy in how the hypothesis and the SUL handle these?


Kind regards,
Markus
Reply all
Reply to author
Forward
0 new messages