Browse Source

support for liveness cex in jani

tempestpy_adaptions
Sebastian Junges 7 years ago
parent
commit
c517ec14b1
  1. 20
      src/storm/counterexamples/SMTMinimalLabelSetGenerator.h

20
src/storm/counterexamples/SMTMinimalLabelSetGenerator.h

@ -1887,11 +1887,17 @@ namespace storm {
} }
if (onlyProb0ESuccessors) { if (onlyProb0ESuccessors) {
auto const& labelSet = model.getChoiceOrigins()->asPrismChoiceOrigins().getCommandSet(choice);
hasLabeledChoice |= !labelSet.empty();
uint64_t labelSetSize = 0;
if (model.getChoiceOrigins()->isPrismChoiceOrigins()) {
labelSetSize = model.getChoiceOrigins()->asPrismChoiceOrigins().getCommandSet(choice).size();
} else {
assert(model.getChoiceOrigins()->isJaniChoiceOrigins());
labelSetSize = model.getChoiceOrigins()->asJaniChoiceOrigins().getEdgeIndexSet(choice).size();
}
hasLabeledChoice |= (labelSetSize != 0);
if (smallestCommandChoice == 0 || labelSet.size() < smallestCommandSetSize) {
smallestCommandSetSize = labelSet.size();
if (smallestCommandChoice == 0 || labelSetSize < smallestCommandSetSize) {
smallestCommandSetSize = labelSetSize;
smallestCommandChoice = choice; smallestCommandChoice = choice;
} }
} }
@ -1899,8 +1905,14 @@ namespace storm {
if (hasLabeledChoice) { if (hasLabeledChoice) {
// Take all labels of the selected choice. // Take all labels of the selected choice.
if (model.getChoiceOrigins()->isPrismChoiceOrigins()) {
auto const& labelSet = model.getChoiceOrigins()->asPrismChoiceOrigins().getCommandSet(smallestCommandChoice); auto const& labelSet = model.getChoiceOrigins()->asPrismChoiceOrigins().getCommandSet(smallestCommandChoice);
commandSet.insert(labelSet.begin(), labelSet.end()); commandSet.insert(labelSet.begin(), labelSet.end());
} else {
assert(model.getChoiceOrigins()->isJaniChoiceOrigins());
auto const& labelSet = model.getChoiceOrigins()->asJaniChoiceOrigins().getEdgeIndexSet(smallestCommandChoice);
commandSet.insert(labelSet.begin(), labelSet.end());
}
// Check for which successor states choices need to be added // Check for which successor states choices need to be added
for (auto const& successorEntry : model.getTransitionMatrix().getRow(smallestCommandChoice)) { for (auto const& successorEntry : model.getTransitionMatrix().getRow(smallestCommandChoice)) {

Loading…
Cancel
Save