LearnLib / learnlib

A free, open-source Java library for automata learning algorithms
https://learnlib.de
Apache License 2.0
206 stars 53 forks source link

Handle in-batch duplicates in (DFA) caches #78

Closed mtf90 closed 3 years ago

mtf90 commented 3 years ago

Currently, DFA caches do not handle duplicates within a single query batch, as the cache only checks if a query can be cached and delegates all (duplicate) cache-misses to the oracle.

In comparison, Mealy caches (should?) support this because they aggregate multiple queries into "MasterQueries" which can answer multiple (prefix-) queries with a single call to the oracle.

With this issue, duplicate in-batch queries (for both DFAs and Mealy Machines) should only result in a single query being delegated to the oracle, both for performance resons and benchmarking reasons.

See #76.

z11panyan commented 3 years ago

Dear author, I tried the simplest change. The DFACacheOracle checks the repeat queries in the function "queryCache", and updates anwsers of the repeat queries in the function "processQueries".