|
|
@ -14,31 +14,31 @@ TEST(ExplicitJaniModelBuilderTest, Dtmc) { |
|
|
|
storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/die.pm"); |
|
|
|
storm::jani::Model janiModel = program.toJani(); |
|
|
|
|
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(13ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(20ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/brp-16-2.pm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(677ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(867ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/crowds-5-5.pm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(8607ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(15113ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/leader-3-5.pm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(273ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(397ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/dtmc/nand-5-2.pm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(1728ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(2505ul, model->getNumberOfTransitions()); |
|
|
|
} |
|
|
@ -50,31 +50,31 @@ TEST(ExplicitJaniModelBuilderTest, Ctmc) { |
|
|
|
storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ctmc/cluster2.sm"); |
|
|
|
storm::jani::Model janiModel = program.toJani(); |
|
|
|
|
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(276ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(1120ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ctmc/embedded2.sm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(3478ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(14639ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ctmc/polling2.sm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(12ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(22ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ctmc/fms2.sm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(810ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(3699ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ctmc/tandem5.sm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(66ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(189ul, model->getNumberOfTransitions()); |
|
|
|
} |
|
|
@ -83,37 +83,37 @@ TEST(ExplicitJaniModelBuilderTest, Mdp) { |
|
|
|
storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/two_dice.nm"); |
|
|
|
storm::jani::Model janiModel = program.toJani(); |
|
|
|
|
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(169ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(436ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/leader3.nm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(364ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(654ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/coin2-2.nm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(272ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(492ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/csma2-2.nm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(1038ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(1282ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/firewire3-0.5.nm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(4093ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(5585ul, model->getNumberOfTransitions()); |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/wlan0-2-2.nm"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(37ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(59ul, model->getNumberOfTransitions()); |
|
|
|
} |
|
|
@ -122,7 +122,7 @@ TEST(ExplicitJaniModelBuilderTest, Ma) { |
|
|
|
storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ma/simple.ma"); |
|
|
|
storm::jani::Model janiModel = program.toJani(); |
|
|
|
|
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
std::shared_ptr<storm::models::sparse::Model<double>> model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(5ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(8ul, model->getNumberOfTransitions()); |
|
|
|
ASSERT_TRUE(model->isOfType(storm::models::ModelType::MarkovAutomaton)); |
|
|
@ -130,7 +130,7 @@ TEST(ExplicitJaniModelBuilderTest, Ma) { |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ma/hybrid_states.ma"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(5ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(13ul, model->getNumberOfTransitions()); |
|
|
|
ASSERT_TRUE(model->isOfType(storm::models::ModelType::MarkovAutomaton)); |
|
|
@ -138,7 +138,7 @@ TEST(ExplicitJaniModelBuilderTest, Ma) { |
|
|
|
|
|
|
|
program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/ma/stream2.ma"); |
|
|
|
janiModel = program.toJani(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build(); |
|
|
|
model = storm::builder::ExplicitModelBuilder<double>(janiModel).build().getModel(); |
|
|
|
EXPECT_EQ(12ul, model->getNumberOfStates()); |
|
|
|
EXPECT_EQ(14ul, model->getNumberOfTransitions()); |
|
|
|
ASSERT_TRUE(model->isOfType(storm::models::ModelType::MarkovAutomaton)); |
|
|
|