Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / mc / mc_pair.cpp
1 /* Copyright (c) 2013-2015. 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 #include "src/mc/mc_liveness.h"
8 #include "src/mc/mc_private.h"
9
10 extern "C" {
11
12 mc_pair_t MC_pair_new()
13 {
14   mc_pair_t p = NULL;
15   p = xbt_new0(s_mc_pair_t, 1);
16   p->num = ++mc_stats->expanded_pairs;
17   p->exploration_started = 0;
18   p->search_cycle = 0;
19   p->visited_pair_removed = _sg_mc_visited > 0 ? 0 : 1;
20   return p;
21 }
22
23 void MC_pair_delete(mc_pair_t p)
24 {
25   p->automaton_state = NULL;
26   if(p->visited_pair_removed)
27     MC_state_delete(p->graph_state, 1);
28   xbt_dynar_free(&(p->atomic_propositions));
29   xbt_free(p);
30   p = NULL;
31 }
32
33 }