Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MakeCanonicTest.cpp
Go to the documentation of this file.
1#include "storm-config.h"
7#include "storm/api/storm.h"
10#include "test/storm_gtest.h"
11
12TEST(MakeCanonic, Simple) {
13#ifndef STORM_HAVE_Z3
14 GTEST_SKIP() << "Z3 not available.";
15#endif
16 storm::prism::Program program = storm::parser::PrismParser::parse(STORM_TEST_RESOURCES_DIR "/pomdp/simple.prism");
17 program = storm::utility::prism::preprocess(program, "slippery=0.4");
18 std::shared_ptr<storm::logic::Formula const> formula = storm::api::parsePropertiesForPrismProgram("Pmax=? [F \"goal\" ]", program).front().getRawFormula();
19 std::shared_ptr<storm::models::sparse::Pomdp<double>> pomdp =
20 storm::api::buildSparseModel<double>(program, {formula})->as<storm::models::sparse::Pomdp<double>>();
22 pomdp = makeCanonic.transform();
23}
TEST(MakeCanonic, Simple)
This class represents a partially observable Markov decision process.
Definition Pomdp.h:15
static storm::prism::Program parse(std::string const &filename, bool prismCompatability=false)
Parses the given file into the PRISM storage classes assuming it complies with the PRISM syntax.
std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > transform() const
std::vector< storm::jani::Property > parsePropertiesForPrismProgram(std::string const &inputString, storm::prism::Program const &program, boost::optional< std::set< std::string > > const &propertyFilter)
storm::prism::Program preprocess(storm::prism::Program const &program, std::map< storm::expressions::Variable, storm::expressions::Expression > const &constantDefinitions)
Definition prism.cpp:19