Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
authormlaurent <mathieu.laurent@ens-rennes.fr>
Mon, 5 Jun 2023 11:59:56 +0000 (13:59 +0200)
committermlaurent <mathieu.laurent@ens-rennes.fr>
Mon, 5 Jun 2023 11:59:56 +0000 (13:59 +0200)
1  2 
src/mc/api/State.cpp
src/mc/api/strategy/BasicStrategy.hpp
src/mc/api/strategy/Strategy.hpp
src/mc/explo/DFSExplorer.cpp
src/mc/mc_config.cpp
src/mc/mc_config.hpp
tools/cmake/DefinePackages.cmake

Simple merge
@@@ -6,23 -6,20 +6,25 @@@
  #ifndef SIMGRID_MC_BASICSTRATEGY_HPP
  #define SIMGRID_MC_BASICSTRATEGY_HPP
  
+ #include "Strategy.hpp"
  namespace simgrid::mc {
  
 -/** Basic MC guiding class which corresponds to no guide at all (random choice) */
 +/** Basic MC guiding class which corresponds to no guide. When asked for different states
 + *  it will follow a depth first search politics to minize the number of opened states. */
  class BasicStrategy : public Strategy {
 +    int depth_ = 100000; // Arbitrary starting point. next_transition must return a positiv value to work with threshold in DFSExplorer
 +
  public:
 +  void copy_from(const Strategy* strategy) override
 +  {
 +    const BasicStrategy* cast_strategy = static_cast<BasicStrategy const*>(strategy);
 +    xbt_assert(cast_strategy != nullptr);
 +    depth_ = cast_strategy->depth_ - 1;
 +    xbt_assert(depth_ > 0, "The exploration reached a depth greater than 100000. We will stop here to prevent weird interaction with DFSExplorer.");
 +  }
    BasicStrategy()                     = default;
    ~BasicStrategy() override           = default;
 -  BasicStrategy(const BasicStrategy&) = delete;
 -  BasicStrategy& operator=(const BasicStrategy&)
 -  { /* nothing to copy over while cloning */
 -    return *this;
 -  }
  
    std::pair<aid_t, int> next_transition() const override
    {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge