How to find the Equivalence queries #104
Closed
VishalPatel43
started this conversation in
General
Replies: 1 comment 2 replies
-
Please how provide how to calcaulate the equivalence queries There is issue while print the observation table of the nlstar If you wanted I can provide the link of the my repo |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
package com.experiment.dfas;
import net.automatalib.automata.fsa.DFA;
import net.automatalib.automata.fsa.NFA;
import net.automatalib.automata.fsa.impl.compact.CompactDFA;
import net.automatalib.util.automata.equivalence.DeterministicEquivalenceTest;
import net.automatalib.util.automata.minimizer.hopcroft.HopcroftMinimization;
import net.automatalib.util.automata.random.RandomAutomata;
import net.automatalib.words.Alphabet;
import net.automatalib.words.Word;
import net.automatalib.words.impl.GrowingMapAlphabet;
import java.io.;
import java.util.;
public class DFAOperation {
// public CompactDFA generateRandomDFA() {
// // Define the alphabet
// Alphabet alphabet = new GrowingMapAlphabet<>();
//
// // Add symbols to the alphabet
// alphabet.add('a');
// alphabet.add('b');
//
// // Set the number of states and create a random DFA
// int numStates = 1000;
// Random random = new Random();
//// DFA<?, Character> randomDFA = RandomAutomata.randomDFA(random, numStates, alphabet);
// CompactDFA randomDFA = RandomAutomata.randomDFA(random, numStates, alphabet);
//
// // Generate DOT file
// String dotFileName = "randomDFA.dot";
// generateDOTFile(randomDFA, alphabet, dotFileName);
//
// return randomDFA;
// }
// int numStates = new Random().nextInt(191) + 10;
int numStates = 10;
// String dotFileName = "randomDFA.dot";
// generateDOTFile(randomDFA, alphabet, dotFileName);
}
package com.experiment;
import com.experiment.dfas.DFAOperation;
import net.automatalib.automata.fsa.impl.compact.CompactDFA;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
public class Main {
// List<CompactDFA> loadedDFAs = dfaOperation.loadDFAsFromFile(new File(dfasFolder, "dfas.ser"));
// String answer = dfaOperation.checkDFAEquivalenceString(dfaList.get(1), loadedDFAs.get(0), loadedDFAs.get(0).getInputAlphabet());
// System.out.println(answer);
}
Beta Was this translation helpful? Give feedback.
All reactions