1#include "storm-config.h"
12TEST(SparseItemLabelingParserTest, NonExistingFile) {
15 storm::exceptions::FileIoException);
18TEST(SparseItemLabelingParserTest, BasicDeterministicParsing) {
27 char phi[] =
"phi", psi[] =
"psi", smth[] =
"smth";
78TEST(SparseItemLabelingParserTest, BasicNondeterministicParsing) {
79 std::vector<uint_fast64_t> choiceIndices{0, 3, 5, 6, 9, 11};
105TEST(SparseItemLabelingParserTest, NoDeclarationTagHeader) {
108 storm::exceptions::WrongFormatException);
111TEST(SparseItemLabelingParserTest, NoEndTagHeader) {
114 storm::exceptions::WrongFormatException);
117TEST(SparseItemLabelingParserTest, MisspelledDeclarationTagHeader) {
121 storm::exceptions::WrongFormatException);
124TEST(SparseItemLabelingParserTest, MisspelledEndTagHeader) {
127 storm::exceptions::WrongFormatException);
130TEST(SparseItemLabelingParserTest, NoLabelDeclaredNoneGiven) {
135 for (uint_fast64_t i = 0; i < 13; i++) {
140TEST(SparseItemLabelingParserTest, UndeclaredLabelsGiven) {
144 storm::exceptions::WrongFormatException);
147TEST(SparseItemLabelingParserTest, LabelForNonExistentState) {
151 storm::exceptions::OutOfRangeException);
156TEST(SparseItemLabelingParserTest, DoubledLines) {
159 storm::exceptions::WrongFormatException);
164 storm::exceptions::WrongFormatException);
167TEST(SparseItemLabelingParserTest, WrongProposition) {
171 storm::exceptions::WrongFormatException);
174TEST(SparseItemLabelingParserTest, Whitespaces) {
184 ASSERT_TRUE(labeling == labeling2);
TEST(SparseItemLabelingParserTest, NonExistingFile)
This class manages the labeling of the choice space with a number of (atomic) labels.
storm::storage::BitVector const & getChoices(std::string const &label) const
Returns the labeling of choices associated with the given label.
bool getChoiceHasLabel(std::string const &label, uint64_t choice) const
Checks whether a given choice is labeled with the given label.
bool containsLabel(std::string const &label) const
Checks whether a label is registered within this labeling.
std::size_t getNumberOfLabels() const
Returns the number of labels managed by this object.
This class manages the labeling of the state space with a number of (atomic) labels.
bool getStateHasLabel(std::string const &label, storm::storage::sparse::state_type state) const
Checks whether a given state is labeled with the given label.
std::set< std::string > getLabelsOfState(storm::storage::sparse::state_type state) const
Retrieves the set of labels attached to the given state.
static storm::models::sparse::ChoiceLabeling parseChoiceLabeling(uint_fast64_t choiceCount, std::string const &filename, boost::optional< std::vector< uint_fast64_t > > const &nondeterministicChoiceIndices=boost::none)
Parses the given file and returns the resulting choice labeling.
static storm::models::sparse::StateLabeling parseAtomicPropositionLabeling(uint_fast64_t stateCount, std::string const &filename)
Parses the given file and returns the resulting state labeling.
bool empty() const
Retrieves whether no bits are set to true in this bit vector.
uint64_t getNumberOfSetBits() const
Returns the number of bits that are set to true in this bit vector.
#define STORM_SILENT_ASSERT_THROW(statement, expected_exception)