Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / src / mc / Transition.hpp
1 /* Copyright (c) 2015-2022. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SIMGRID_MC_TRANSITION_HPP
8 #define SIMGRID_MC_TRANSITION_HPP
9
10 #include "simgrid/forward.h" // aid_t
11 #include <string>
12
13 namespace simgrid {
14 namespace mc {
15
16 /** An element in the recorded path
17  *
18  *  At each decision point, we need to record which process transition
19  *  is triggered and potentially which value is associated with this
20  *  transition. The value is used to find which communication is triggered
21  *  in things like waitany and for associating a given value of MC_random()
22  *  calls.
23  */
24 class Transition {
25 public:
26   aid_t aid_ = 0;
27
28   /* Which transition was executed for this simcall
29    *
30    * Some simcalls can lead to different transitions:
31    *
32    * * waitany/testany can trigger on different messages;
33    *
34    * * random can produce different values.
35    */
36   int times_considered_ = 0;
37
38   /* Textual representation of the transition, to display backtraces */
39   std::string textual;
40 };
41
42 } // namespace mc
43 } // namespace simgrid
44
45 #endif