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)) {
78 return (negated ? !rv : rv);
82 STORM_LOG_THROW(
false, storm::exceptions::UnexpectedException,
"Missing case statement.");
86 std::vector<std::vector<AcceptanceCondition::acceptance_expr::ptr>> dnf;
93void AcceptanceCondition::extractFromDNFRecursion(AcceptanceCondition::acceptance_expr::ptr e, std::vector<std::vector<acceptance_expr::ptr>>& dnf,
94 bool topLevel)
const {
97 if (e->getLeft()->isOR()) {
98 extractFromDNFRecursion(e->getLeft(), dnf,
true);
101 extractFromDNFRecursion(e->getLeft(), dnf,
false);
104 if (e->getRight()->isOR()) {
105 extractFromDNFRecursion(e->getRight(), dnf,
true);
108 extractFromDNFRecursion(e->getRight(), dnf,
false);
112 extractFromDNFRecursion(e, dnf,
false);
115 if (e->isOR() || e->isNOT()) {
116 STORM_LOG_THROW(
false, storm::exceptions::InvalidOperationException,
"Acceptance condition is not in DNF.");
117 }
else if (e->isAND()) {
118 extractFromDNFRecursion(e->getLeft(), dnf,
false);
119 extractFromDNFRecursion(e->getRight(), dnf,
false);
121 dnf.back().push_back(e);
128 for (
unsigned int i = 0; i < numberOfAcceptanceSets; i++) {
132 for (std::size_t prodState = 0; prodState < productNumberOfStates; prodState++) {
133 if (set.
get(mapping(prodState))) {
134 liftedSet.
set(prodState);