Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : cleanups, refactoring and apply indent script
[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 "mc_private.h"
8
9 mc_pair_t MC_pair_new()
10 {
11   mc_pair_t p = NULL;
12   p = xbt_new0(s_mc_pair_t, 1);
13   p->num = ++mc_stats->expanded_pairs;
14   p->search_cycle = 0;
15   return p;
16 }
17
18 void MC_pair_delete(mc_pair_t p)
19 {
20   p->automaton_state = NULL;
21   MC_state_delete(p->graph_state);
22   xbt_dynar_free(&(p->atomic_propositions));
23   xbt_free(p);
24   p = NULL;
25 }
26
27 void mc_pair_free_voidp(void *p)
28 {
29   MC_pair_delete((mc_pair_t) * (void **) p);
30 }