return len;
}
});
if (onlyUsePositives)
pta.paths.augmentPTA(generator.getAllSequences(0).filter(new FilterPredicate() {
@Override
public boolean shouldBeReturned(Object name) {
return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
}
}));
else
pta.paths.augmentPTA(generator.getAllSequences(0));// the PTA will have very few reject-states because we are generating few sequences and hence there will be few negative sequences.
// In order to approximate the behaviour of our case study, we need to compute which pairs are not allowed from a reference graph and use those as if-then automata to start the inference.
//pta.paths.augmentPTA(referenceGraph.wmethod.computeNewTestSet(referenceGraph.getInit(),1));
List<List<Label>> sPlus = generator.getAllSequences(0).getData(new FilterPredicate() {
@Override
public boolean shouldBeReturned(Object name) {
return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
}
});
List<List<Label>> sMinus= generator.getAllSequences(0).getData(new FilterPredicate() {
@Override
public boolean shouldBeReturned(Object name) {
return !((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
}
});