Skip to content

Commit

Permalink
Fixed counter example generation for properties with leq/geq comparis…
Browse files Browse the repository at this point in the history
…on operators
  • Loading branch information
TheGreatfpmK committed Nov 25, 2024
1 parent b7ecfd3 commit 0fdece1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions payntbind/src/synthesis/counterexamples/Counterexample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,22 @@ namespace synthesis {
this->hint_result = storm::api::verifyWithSparseEngine<ValueType>(env, subdtmc, task);
this->timer_model_check.stop();
storm::modelchecker::ExplicitQuantitativeCheckResult<ValueType>& result = this->hint_result->template asExplicitQuantitativeCheckResult<ValueType>();

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

bool satisfied;
if(this->formula_safety[index]) {
satisfied = result[initial_state] < formula_bound;
if (comparisonType == storm::logic::ComparisonType::Less) {
satisfied = result[initial_state] < formula_bound;
} else {
satisfied = result[initial_state] <= formula_bound;
}
} else {
satisfied = result[initial_state] > formula_bound;
if (comparisonType == storm::logic::ComparisonType::Greater) {
satisfied = result[initial_state] > formula_bound;
} else {
satisfied = result[initial_state] >= formula_bound;
}
}

return satisfied;
Expand Down

0 comments on commit 0fdece1

Please sign in to comment.