From 271fdb0607a43ad81f8065e90c68c3395c42dd54 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Sat, 22 May 2021 20:23:13 -0700 Subject: [PATCH] minimalistic test cases for building POMDPs added --- .../builder/ExplicitPrismModelBuilderTest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/storm/builder/ExplicitPrismModelBuilderTest.cpp b/src/test/storm/builder/ExplicitPrismModelBuilderTest.cpp index d7d324112..d645f6ce3 100644 --- a/src/test/storm/builder/ExplicitPrismModelBuilderTest.cpp +++ b/src/test/storm/builder/ExplicitPrismModelBuilderTest.cpp @@ -126,6 +126,20 @@ TEST(ExplicitPrismModelBuilderTest, Ma) { EXPECT_EQ(7ul, model->as>()->getMarkovianStates().getNumberOfSetBits()); } +TEST(ExplicitPrismModelBuilderTest, POMdp) { + storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/pomdp/simple.prism"); + program = storm::utility::prism::preprocess(program, "slippery=0.4"); + std::shared_ptr> model = storm::builder::ExplicitModelBuilder(program).build(); + + program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/pomdp/maze2.prism"); + program = storm::utility::prism::preprocess(program, "sl=0.4"); + model = storm::builder::ExplicitModelBuilder(program).build(); + + program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/pomdp/refuel.prism"); + program = storm::utility::prism::preprocess(program, "N=5"); + model = storm::builder::ExplicitModelBuilder(program).build(); +} + TEST(ExplicitPrismModelBuilderTest, FailComposition) { storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/mdp/system_composition.nm");