From 5676d990c4ad93eddefb8eaf152d0e92694d2b3c 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: 0157e033403dabffe6ebe2e735e4a5fa21af9468 --- 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);