1 /* Copyright (c) 2007-2014. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef MC_MODEL_CHECKER_H
8 #define MC_MODEL_CHECKER_H
10 #include <sys/types.h>
12 #include <simgrid_config.h>
13 #include <xbt/dynar.h>
15 #include "mc_forward.h"
16 #include "mc_process.h"
17 #include "mc_page_store.h"
18 #include "mc_protocol.h"
22 /** @brief State of the model-checker (global variables for the model checker)
24 * Each part of the state of the model chercker represented as a global
25 * variable prevents some sharing between snapshots and must be ignored.
26 * By moving as much state as possible in this structure allocated
27 * on the model-chercker heap, we avoid those issues.
29 struct s_mc_model_checker {
30 // This is the parent snapshot of the current state:
31 mc_snapshot_t parent_snapshot;
32 mc_pages_store_t pages;
35 s_mc_process_t process;
36 /** String pool for host names */
37 xbt_dict_t /* <hostname, NULL> */ hosts;
40 mc_model_checker_t MC_model_checker_new(pid_t pid, int socket);
41 void MC_model_checker_delete(mc_model_checker_t mc);
42 unsigned long MC_smx_get_maxpid(void);