-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substract current automaton size to Wp-method's maxDepth #32
Comments
You are correct, currently the parameter is independent of the hypothesis size and used to insert all tuples of length What I see as a potential problem with shrinking the value is, that a bad estimate will degrade performance in later equivalence checks, because once n > m you basically have no more look-ahead. With a fixed exploration depth (as it is now), you continue to look ahead even in later iterations of refinement cycles. On the contrary, a too low value for the current value of For now, to simulate shrinking exploration depth, you can just instantiate a new equivalence for every refinement loop, like (untested): DFALearner<I> learner = ...;
learner.startLearning();
int m = ...;
boolean finished = false;
while (!finished) {
DFA<?, I> hyp = learner.getHypothesisModel();
DFAEquivalenceOracle<I> eqOracle = new DFAWpMethodEQOracle<>(mqOracle, m - hyp.size());
DefaultQuery<I, Boolean> ce;
if ((ce = eqOracle.findCounterExample(hyp, inputs)) != null) {
learner.refineHypothesis(ce);
} else {
finished = true;
}
} |
Thanks for the quick answer. My main point is that if I know the upper bound size for the automaton I want to learn ( Your solution makes sense to me: |
I probably got it wrong, but after checking the original paper it seems that the "middle part" length is the difference between implementation's bound on number of states (m) and the current spec size (n), so when using Wp-method as equivalence query the
maxDepth
could be shrunk dynamically (by substracting the currentautomaton.size()
). Right?Right now the length is fixed idependently of the candidate automaton: https://github.com/LearnLib/automatalib/blob/master/util/src/main/java/net/automatalib/util/automata/conformance/WpMethodTestsIterator.java#L81
I just started looking at the code base, so I'm might be missing something. Should/Can I update the equivalence oracle inside my learning loop to reduce the max depth?
The text was updated successfully, but these errors were encountered: