Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this example needs to forcefully destroy the VMs
[simgrid.git] / src / mc / mc_pair.c
1 /* Copyright (c) 2013-2014. 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 <xbt.h>
8 #include "mc_liveness.h"
9 #include "mc_private.h"
10
11 mc_pair_t MC_pair_new()
12 {
13   mc_pair_t p = NULL;
14   p = xbt_new0(s_mc_pair_t, 1);
15   p->num = ++mc_stats->expanded_pairs;
16   p->exploration_started = 0;
17   p->search_cycle = 0;
18   p->visited_pair_removed = _sg_mc_visited > 0 ? 0 : 1;
19   return p;
20 }
21
22 void MC_pair_delete(mc_pair_t p)
23 {
24   p->automaton_state = NULL;
25   if(p->visited_pair_removed)
26     MC_state_delete(p->graph_state, 1);
27   xbt_dynar_free(&(p->atomic_propositions));
28   xbt_free(p);
29   p = NULL;
30 }
31
32 void mc_pair_free_voidp(void *p)
33 {
34   MC_pair_delete((mc_pair_t) * (void **) p);
35 }