Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove useless parameters in header generation
[simgrid.git] / src / mc / mc_record.h
1 /* Copyright (c) 2014-2017. 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.h
7  *
8  *  This file contains the MC replay/record functionnality.
9  *  A MC path may be recorded by using ``-cfg=model-check/record:1`'`.
10  *  The path is written in the log output and an be replayed with MC disabled
11  *  (even with an non-LC build) with `--cfg=model-check/replay:$replayPath`.
12  *
13  *  The same version of Simgrid should be used and the same arguments should be
14  *  passed to the application (without the MC specific arguments).
15  */
16
17 #ifndef SIMGRID_MC_RECORD_H
18 #define SIMGRID_MC_RECORD_H
19
20 #include "src/mc/Transition.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 char* trace);
38
39 }
40 }
41
42 SG_BEGIN_DECL()
43
44 /** Whether the MC record mode is enabled
45  *
46  *  The behaviour is not changed. The only real difference is that
47  *  the path is writtent in the log when an interesting path is found.
48  */
49 #define MC_record_is_active() _sg_do_model_check_record
50
51 // **** Data conversion
52
53 SG_END_DECL()
54
55 #endif