From 91084a5da4b1954c3dab0ddcc657f0894cdd2831 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 28 Nov 2014 11:14:55 +0100 Subject: [PATCH] APs true/false can now be queried for a state. Former-commit-id: 3c16df45091fb606c97b2abdd987497101f78b5a --- src/models/AtomicPropositionsLabeling.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/models/AtomicPropositionsLabeling.h b/src/models/AtomicPropositionsLabeling.h index 6281c5d6b..c7c3912a6 100644 --- a/src/models/AtomicPropositionsLabeling.h +++ b/src/models/AtomicPropositionsLabeling.h @@ -209,9 +209,14 @@ public: * @return True if the node is labeled with the atomic proposition, false otherwise. */ bool getStateHasAtomicProposition(std::string const& ap, const uint_fast64_t state) const { + if (ap == "true") { + return true; + } else if (ap == "false") { + return false; + } if (!this->containsAtomicProposition(ap)) { - LOG4CPLUS_ERROR(logger, "The atomic proposition " << ap << " is invalid for the labeling of the model."); - throw storm::exceptions::InvalidArgumentException() << "The atomic proposition " << ap << " is invalid for the labeling of the model."; + LOG4CPLUS_ERROR(logger, "The atomic proposition '" << ap << "' is invalid for the labeling of the model."); + throw storm::exceptions::InvalidArgumentException() << "The atomic proposition '" << ap << "' is invalid for the labeling of the model."; } auto apIndexPair = nameToLabelingMap.find(ap); return this->singleLabelings[apIndexPair->second].get(state);