Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mc: kill model-check/ksm option. Was not activated because not very useful
[simgrid.git] / src / mc / mc_record.hpp
1 /* Copyright (c) 2014-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 /** \file mc_record.hpp
7  *
8  *  This file contains the MC replay/record functionnality.
9  *  The recorded path is written in the log output and can be replayed with MC disabled
10  *  (even with an non-MC build) using `--cfg=model-check/replay:$replayPath`.
11  *
12  *  The same version of Simgrid should be used and the same arguments should be
13  *  passed to the application (without the MC specific arguments).
14  */
15
16 #ifndef SIMGRID_MC_RECORD_HPP
17 #define SIMGRID_MC_RECORD_HPP
18
19 #include "src/mc/mc_config.hpp"
20 #include "src/mc/mc_forward.hpp"
21 #include "xbt/base.h"
22
23 #include <vector>
24
25 namespace simgrid {
26 namespace mc {
27
28 typedef std::vector<Transition> RecordTrace;
29
30 /** Convert a string representation of the path into a array of `simgrid::mc::Transition`
31  */
32 XBT_PRIVATE RecordTrace parseRecordTrace(const char* data);
33 XBT_PRIVATE std::string traceToString(simgrid::mc::RecordTrace const& trace);
34 XBT_PRIVATE void dumpRecordPath();
35
36 XBT_PRIVATE void replay(RecordTrace const& trace);
37 XBT_PRIVATE void replay(const std::string& trace);
38 }
39 }
40
41 // **** Data conversion
42
43 #endif