X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1a5ae581508abf014bc4dcbc65f2d5e5af9da573:/src/mc/mc_liveness.h..a497c1d62e1064de5a4d765dc43cb9e71243ba95:/src/mc/LivenessChecker.hpp diff --git a/src/mc/mc_liveness.h b/src/mc/LivenessChecker.hpp similarity index 67% rename from src/mc/mc_liveness.h rename to src/mc/LivenessChecker.hpp index c722183695..918c855ded 100644 --- a/src/mc/mc_liveness.h +++ b/src/mc/LivenessChecker.hpp @@ -4,8 +4,8 @@ /* 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. */ -#ifndef SIMGRID_MC_LIVENESS_H -#define SIMGRID_MC_LIVENESS_H +#ifndef SIMGRID_MC_LIVENESS_CHECKER_HPP +#define SIMGRID_MC_LIVENESS_CHECKER_HPP #include @@ -16,6 +16,7 @@ #include #include #include "src/mc/mc_state.h" +#include "src/mc/Checker.hpp" SG_BEGIN_DECL() @@ -60,7 +61,24 @@ struct XBT_PRIVATE VisitedPair { ~VisitedPair(); }; -int modelcheck_liveness(void); +class LivenessChecker : public Checker { +public: + LivenessChecker(Session& session); + ~LivenessChecker(); + int run() override; +private: + int main(); + void prepare(); + int compare(simgrid::mc::VisitedPair* state1, simgrid::mc::VisitedPair* state2); + void dumpStack(xbt_fifo_t stack); + void showStack(xbt_fifo_t stack); + simgrid::xbt::unique_ptr getPropositionValues(); + simgrid::mc::VisitedPair* insertAcceptancePair(simgrid::mc::Pair* pair); + int insertVisitedPair(simgrid::mc::VisitedPair* visited_pair, simgrid::mc::Pair* pair); + void showAcceptanceCycle(std::size_t depth); + void replay(xbt_fifo_t stack); + void removeAcceptancePair(int pair_num); +}; } }