diff --git a/eqtests/basic-eqtests/src/main/java/de/learnlib/eqtests/basic/AbstractTestWordEQOracle.java b/eqtests/basic-eqtests/src/main/java/de/learnlib/eqtests/basic/AbstractTestWordEQOracle.java new file mode 100644 index 0000000000..83694d1362 --- /dev/null +++ b/eqtests/basic-eqtests/src/main/java/de/learnlib/eqtests/basic/AbstractTestWordEQOracle.java @@ -0,0 +1,124 @@ +/* Copyright (C) 2013-2017 TU Dortmund + * This file is part of LearnLib, http://www.learnlib.de/. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.learnlib.eqtests.basic; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.stream.Stream; + +import javax.annotation.Nullable; + +import com.google.common.base.Preconditions; +import com.google.common.collect.Streams; +import de.learnlib.api.EquivalenceOracle; +import de.learnlib.api.MembershipOracle; +import de.learnlib.oracles.DefaultQuery; +import net.automatalib.automata.concepts.Output; +import net.automatalib.commons.util.collections.BatchingIterator; +import net.automatalib.words.Word; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * An abstract equivalence oracle that takes care of query batching and hypothesis checking and allows extending classes + * to solely focus on test word generation by implementing {@link #generateTestWords(Output, Collection)}. + *
+ * Being {@link Stream stream}-based, this oracle encourages the lazy computation of counterexamples, so that all
+ * counterexamples do not have to be computed upfront, but only as long as the first valid counterexample is found.
+ *
+ * @param
+ * hypothesis type
+ * @param
+ * input symbol type
+ * @param