Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : restore sequential system state comparison (parallel version is slowe...
[simgrid.git] / src / mc / mc_pair.c
1 /* Copyright (c) 2013. 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   mc_pair_t p = NULL;
11   p = xbt_new0(s_mc_pair_t, 1);
12   p->nb_processes = xbt_swag_size(simix_global->process_list);
13   p->num = ++mc_stats->expanded_pairs;
14   p->search_cycle = 0;
15   p->other_num = -1;
16   return p;
17 }
18
19 void MC_pair_delete(mc_pair_t p){
20   p->automaton_state = NULL;
21   MC_state_delete(p->graph_state);
22   p->stack_removed = 0;
23   p->visited_removed = 0;
24   p->acceptance_removed = 0;
25   xbt_dynar_free(&(p->atomic_propositions));
26   xbt_free(p);
27   p = NULL;
28 }
29
30 void mc_pair_free_voidp(void *p){
31   MC_pair_delete((mc_pair_t) * (void **)p);
32 }