11 : numberOfAcceptanceSets(numberOfAcceptanceSets), acceptance(acceptance) {
13 for (
unsigned int i = 0; i < numberOfAcceptanceSets; i++) {
19 return numberOfAcceptanceSets;
23 return acceptanceSets.at(index);
27 return acceptanceSets.at(index);
39 switch (expr->getType()) {
40 case acceptance_expr::EXP_AND:
42 case acceptance_expr::EXP_OR:
44 case acceptance_expr::EXP_NOT:
46 case acceptance_expr::EXP_TRUE:
48 case acceptance_expr::EXP_FALSE:
50 case acceptance_expr::EXP_ATOM: {
51 const cpphoafparser::AtomAcceptance& atom = expr->getAtom();
53 bool negated = atom.isNegated();
55 switch (atom.getType()) {
56 case cpphoafparser::AtomAcceptance::TEMPORAL_INF:
58 for (
auto& state : scc) {
59 if (acceptanceSet.
get(state)) {
65 case cpphoafparser::AtomAcceptance::TEMPORAL_FIN:
67 for (
auto& state : scc) {
68 if (acceptanceSet.
get(state)) {
76 return (negated ? !rv : rv);
80 STORM_LOG_THROW(
false, storm::exceptions::UnexpectedException,
"Missing case statement.");
84 std::vector<std::vector<AcceptanceCondition::acceptance_expr::ptr>> dnf;
91void AcceptanceCondition::extractFromDNFRecursion(AcceptanceCondition::acceptance_expr::ptr e, std::vector<std::vector<acceptance_expr::ptr>>& dnf,
92 bool topLevel)
const {
95 if (e->getLeft()->isOR()) {
96 extractFromDNFRecursion(e->getLeft(), dnf,
true);
99 extractFromDNFRecursion(e->getLeft(), dnf,
false);
102 if (e->getRight()->isOR()) {
103 extractFromDNFRecursion(e->getRight(), dnf,
true);
106 extractFromDNFRecursion(e->getRight(), dnf,
false);
110 extractFromDNFRecursion(e, dnf,
false);
113 if (e->isOR() || e->isNOT()) {
114 STORM_LOG_THROW(
false, storm::exceptions::InvalidOperationException,
"Acceptance condition is not in DNF.");
115 }
else if (e->isAND()) {
116 extractFromDNFRecursion(e->getLeft(), dnf,
false);
117 extractFromDNFRecursion(e->getRight(), dnf,
false);
119 dnf.back().push_back(e);
126 for (
unsigned int i = 0; i < numberOfAcceptanceSets; i++) {
130 for (std::size_t prodState = 0; prodState < productNumberOfStates; prodState++) {
131 if (set.
get(mapping(prodState))) {
132 liftedSet.
set(prodState);