Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove deprecated features for next release.
[simgrid.git] / src / mc / Transition.hpp
1 /* Copyright (c) 2015-2021. 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 <string>
11
12 namespace simgrid {
13 namespace mc {
14
15 /** An element in the recorded path
16  *
17  *  At each decision point, we need to record which process transition
18  *  is triggered and potentially which value is associated with this
19  *  transition. The value is used to find which communication is triggered
20  *  in things like waitany and for associating a given value of MC_random()
21  *  calls.
22  */
23 class Transition {
24 public:
25   int pid_ = 0;
26
27   /* Which transition was executed for this simcall
28    *
29    * Some simcalls can lead to different transitions:
30    *
31    * * waitany/testany can trigger on different messages;
32    *
33    * * random can produce different values.
34    */
35   int times_considered_ = 0;
36
37   /* Textual representation of the transition, to display backtraces */
38   std::string textual;
39 };
40
41 } // namespace mc
42 } // namespace simgrid
43
44 #endif