|
|
@ -167,5 +167,30 @@ TEST(FragmentCheckerTest, MultiObjective) { |
|
|
|
|
|
|
|
ASSERT_NO_THROW(formula = formulaParser.parseSingleFormulaFromString("multi(P=? [F P<0.5 [F \"label\"]], R<0.3 [ C ] )")); |
|
|
|
EXPECT_FALSE(checker.conformsToSpecification(*formula, multiobjective)); |
|
|
|
} |
|
|
|
|
|
|
|
TEST(FragmentCheckerTest, Rpatl) { |
|
|
|
auto expManager = std::make_shared<storm::expressions::ExpressionManager>(); |
|
|
|
storm::logic::FragmentChecker checker; |
|
|
|
storm::logic::FragmentSpecification rpatl = storm::logic::rpatl(); |
|
|
|
|
|
|
|
storm::parser::FormulaParser formulaParser(expManager); |
|
|
|
std::shared_ptr<storm::logic::Formula const> formula; |
|
|
|
|
|
|
|
ASSERT_ANY_THROW(formula = formulaParser.parseSingleFormulaFromString("<<player1>> \"label\"")); |
|
|
|
|
|
|
|
ASSERT_NO_THROW(formula = formulaParser.parseSingleFormulaFromString("<<1>> P=? [F \"label\"]")); |
|
|
|
EXPECT_TRUE(checker.conformsToSpecification(*formula, rpatl)); |
|
|
|
|
|
|
|
ASSERT_NO_THROW(formula = formulaParser.parseSingleFormulaFromString("<<1,2>> Pmin=? [ \"label1\" U \"label2\" ]")); |
|
|
|
EXPECT_TRUE(checker.conformsToSpecification(*formula, rpatl)); |
|
|
|
|
|
|
|
ASSERT_NO_THROW(formula = formulaParser.parseSingleFormulaFromString("<<p1, p2>> Rmax=? [ LRA ]")); |
|
|
|
EXPECT_TRUE(checker.conformsToSpecification(*formula, rpatl)); |
|
|
|
|
|
|
|
ASSERT_NO_THROW(formula = formulaParser.parseSingleFormulaFromString("<<player1>> R=? [C<=3]")); |
|
|
|
EXPECT_FALSE(checker.conformsToSpecification(*formula, rpatl)); |
|
|
|
|
|
|
|
ASSERT_NO_THROW(formula = formulaParser.parseSingleFormulaFromString("<<1,2,3>> Pmin=? [F \"label\"]")); |
|
|
|
EXPECT_TRUE(checker.conformsToSpecification(*formula, rpatl)); |
|
|
|
} |