Skip to content

Commit

Permalink
Fix for MDP counter examples
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatfpmK committed Nov 25, 2024
1 parent 0fdece1 commit c98d149
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions payntbind/src/synthesis/counterexamples/CounterexampleMdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,22 @@ std::pair<bool,bool> CounterexampleGeneratorMdp<ValueType,StateType>::expandAndC
this->hint_result = storm::api::verifyWithSparseEngine<ValueType>(env, submdp, task);
this->timer_model_check.stop();
storm::modelchecker::ExplicitQuantitativeCheckResult<ValueType>& model_check_result = this->hint_result->template asExplicitQuantitativeCheckResult<ValueType>();

auto comparisonType = this->formula_modified[index]->asOperatorFormula().getComparisonType();

bool satisfied;
if(this->formula_safety[formula_index]) {
satisfied = model_check_result[initial_state] < formula_bound;
// std::cout << model_check_result[initial_state] << " < " << formula_bound << std::endl;
if (comparisonType == storm::logic::ComparisonType::Less) {
satisfied = model_check_result[initial_state] < formula_bound;
} else {
satisfied = model_check_result[initial_state] <= formula_bound;
}
} else {
satisfied = model_check_result[initial_state] > formula_bound;
// std::cout << model_check_result[initial_state] << " > " << formula_bound << std::endl;
if (comparisonType == storm::logic::ComparisonType::Greater) {
satisfied = model_check_result[initial_state] > formula_bound;
} else {
satisfied = model_check_result[initial_state] >= formula_bound;
}
}
result.second = satisfied;

Expand Down

0 comments on commit c98d149

Please sign in to comment.