1
Fork 0
mirror of https://github.com/Jaxan/hybrid-ads.git synced 2025-04-27 15:07:45 +02:00
This commit is contained in:
Joshua Moerman 2015-12-16 11:32:40 +01:00
commit b990221c3c
5 changed files with 24 additions and 9 deletions

View file

@ -43,11 +43,26 @@ sourcefile (`src/main.cpp`) can also be built with c++11 (this is tested on some
commits on both Windows and linux). commits on both Windows and linux).
### Notes for linux
There seems to be a problem with docopt.cpp with gcc-4.9 as well... (Everything
compiles, but the program options are not parsed well.) If you want to build
with `clang` on linux, you should also use `libc++`. Try the following:
```
sudo apt-get install libc++-dev
mkdir build
cd build
CXX=clang++ CC=clang CXXFLAGS=-stdlib=libc++ LDFLAGS=-pthread cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make
```
## Java ## Java
For now the java code, which acts as a bridge between LearnLib and this c++ For now the java code, which acts as a bridge between LearnLib and this c++
tool, is included here. But it should earn its own repo at some point. Also, my tool, is included here (can be out-dated). But it should earn its own repo at
javanese is a bit rusty... some point. Also, my javanese is a bit rusty...
## License ## License

View file

@ -23,7 +23,7 @@ import java.util.*;
public class YannakakisEQOracle<O> implements EquivalenceOracle.MealyEquivalenceOracle<String, O> { public class YannakakisEQOracle<O> implements EquivalenceOracle.MealyEquivalenceOracle<String, O> {
private final MembershipOracle<String, Word<O>> sulOracle; private final MembershipOracle<String, Word<O>> sulOracle;
private final List<Alphabet<String>> alphabets; private final List<Alphabet<String>> alphabets;
private final ProcessBuilder pb = new ProcessBuilder("/Users/joshua/Documents/PhD/Yannakakis/build/main", "--", "0", "3", "random"); private final ProcessBuilder pb = new ProcessBuilder("/Users/joshua/Documents/PhD/Yannakakis/build/main", "--prefix", "buggy", "=", "random", "0", "3");
private int currentAlphabet = 0; private int currentAlphabet = 0;
private long bound = 100; private long bound = 100;

View file

@ -21,7 +21,7 @@ static size_t clamp_to_size_t(double x, size_t min, size_t max) {
transfer_sequences create_transfer_sequences(transfer_options const & opt, const mealy & machine, transfer_sequences create_transfer_sequences(transfer_options const & opt, const mealy & machine,
state s, uint_fast32_t random_seed) { state s, uint_fast32_t random_seed) {
mt19937 generator(random_seed); mt19937 generator(random_seed);
uniform_int_distribution<double> dist(opt.q_min, opt.q_max); uniform_real_distribution<double> dist(opt.q_min, opt.q_max);
vector<bool> added(machine.graph_size, false); vector<bool> added(machine.graph_size, false);
vector<word> words(machine.graph_size); vector<word> words(machine.graph_size);

View file

@ -19,7 +19,7 @@
using namespace std; using namespace std;
static const char USAGE[] = static const char USAGE[] =
R"(Generate a test suite R"(Generate a test suite. Use '=' as filename for stdin.
Usage: Usage:
main [options] <filename> (all|fixed|random) <max k> <rnd length> main [options] <filename> (all|fixed|random) <max k> <rnd length>
@ -38,7 +38,7 @@ R"(Generate a test suite
using time_logger = silent_timer; using time_logger = silent_timer;
int main(int argc, char *argv[]) try { int main(int argc, char *argv[]) try {
const auto args = docopt::docopt(USAGE, {argv + 1, argv + argc}, true, "5 aug 11:00"); const auto args = docopt::docopt(USAGE, {argv + 1, argv + argc}, true, "25 Nov 11:50");
const string filename = args.at("<filename>").asString(); const string filename = args.at("<filename>").asString();
const bool use_stdio = filename == "="; const bool use_stdio = filename == "=";

View file

@ -94,8 +94,8 @@ int main(int argc, char * argv[]) {
const auto suffixes = suffixes_fut.get(); const auto suffixes = suffixes_fut.get();
for(state s = 0; s < suffixes.size(); ++s){ for(state s = 0; s < suffixes.size(); ++s){
clog << "suffixes for " << s << endl; clog << "suffixes for " << s << endl;
for(auto s : suffixes[s].local_suffixes) { for(auto s2 : suffixes[s].local_suffixes) {
for(auto x : s){ for(auto x : s2){
clog << x; clog << x;
} }
clog << endl; clog << endl;