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