Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d1327f3c201af729cefde8c242fc9ae2f17c2f7d
[simgrid.git] / src / mc / checker / SimcallInspector.hpp
1 /* Copyright (c) 2019. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_MC_SIMCALL_INSPECTOR_HPP
7 #define SIMGRID_MC_SIMCALL_INSPECTOR_HPP
8
9 #include <string>
10
11 namespace simgrid {
12 namespace mc {
13
14 class SimcallInspector {
15 public:
16   /** whether this transition can currently be taken without blocking.
17    *
18    * For example, a mutex_lock is not enabled when the mutex is not free.
19    * A comm_receive is not enabled before the corresponding send has been issued.
20    */
21   virtual bool is_enabled() { return true; }
22
23   /** Some simcalls may only be observable under some circomstances.
24    * Most simcalls are not visible from the MC because they don't have an inspector at all. */
25   virtual bool is_visible() { return true; }
26   virtual std::string to_string() = 0;
27   virtual std::string dot_label() = 0;
28 };
29 } // namespace mc
30 } // namespace simgrid
31
32 #endif