1 #ifndef SIMGRID_MC_API_HPP
2 #define SIMGRID_MC_API_HPP
7 #include "simgrid/forward.h"
8 #include "src/mc/mc_forward.hpp"
15 ** This class aimes to implement FACADE APIs for simgrid. The FACADE layer sits between the CheckerSide
16 ** (Unfolding_Checker, DPOR, ...) layer and the
17 ** AppSide layer. The goal is to drill down into the entagled details in the CheckerSide layer and break down the
18 ** detailes in a way that the CheckerSide eventually
19 ** be capable to acquire the required information through the FACADE layer rather than the direct access to the AppSide.
28 mc_api(mc_api const&) = delete;
29 void operator=(mc_api const&) = delete;
37 void initialize(char** argv);
39 // MODEL_CHECKER FUNCTIONS
40 void create_model_checker(std::unique_ptr<RemoteSimulation> remote_simulation, int sockfd);
41 ModelChecker* get_model_checker() const;
42 void mc_inc_visited_states() const;
43 void mc_inc_executed_trans() const;
44 unsigned long mc_get_visited_states() const;
45 unsigned long mc_get_executed_trans() const;
46 bool mc_check_deadlock() const;
47 std::vector<simgrid::mc::ActorInformation>& get_actors() const;
48 bool actor_is_enabled(aid_t pid) const;
49 void mc_assert(bool notNull, const char* message = "") const;
50 bool mc_is_null() const;
51 Checker* mc_get_checker() const;
52 RemoteSimulation& mc_get_remote_simulation() const;
53 void handle_simcall(Transition const& transition) const;
54 void mc_wait_for_requests() const;
55 void mc_exit(int status) const;
56 std::string const& mc_get_host_name(std::string const& hostname) const;
57 PageStore& mc_page_store() const;
61 void s_initialize() const;
63 void s_restore_initial_state() const;
64 void execute(Transition const& transition);
65 void s_log_state() const;
69 } // namespace simgrid