X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d8eb62b207b566949a0d9ce649a7b21e226b9168..7e2f1b12f4459f77318e5d664317473e35aeb473:/src/mc/checker/LivenessChecker.cpp?ds=sidebyside diff --git a/src/mc/checker/LivenessChecker.cpp b/src/mc/checker/LivenessChecker.cpp index e82ea1b5a4..5875f8071d 100644 --- a/src/mc/checker/LivenessChecker.cpp +++ b/src/mc/checker/LivenessChecker.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2011-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -251,7 +251,7 @@ void LivenessChecker::purgeVisitedPairs() } } -LivenessChecker::LivenessChecker(Session& session) : Checker(session) +LivenessChecker::LivenessChecker(Session& s) : Checker(s) { } @@ -446,8 +446,9 @@ void LivenessChecker::run() // For each enabled transition in the property automaton, push a // (application_state, automaton_state) pair to the exploration stack: - for (int cursor = xbt_dynar_length(current_pair->automaton_state->out) - 1; cursor >= 0; cursor--) { - xbt_automaton_transition_t transition_succ = (xbt_automaton_transition_t)xbt_dynar_get_as(current_pair->automaton_state->out, cursor, xbt_automaton_transition_t); + for (int i = xbt_dynar_length(current_pair->automaton_state->out) - 1; i >= 0; i--) { + xbt_automaton_transition_t transition_succ = (xbt_automaton_transition_t)xbt_dynar_get_as( + current_pair->automaton_state->out, i, xbt_automaton_transition_t); if (evaluate_label(transition_succ->label, *prop_values)) explorationStack_.push_back(this->newPair( current_pair.get(), transition_succ->dst, prop_values)); @@ -459,9 +460,9 @@ void LivenessChecker::run() simgrid::mc::session->logState(); } -Checker* createLivenessChecker(Session& session) +Checker* createLivenessChecker(Session& s) { - return new LivenessChecker(session); + return new LivenessChecker(s); } }