Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove useless header #includes
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 2 Dec 2014 13:02:26 +0000 (14:02 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 4 Dec 2014 09:37:31 +0000 (10:37 +0100)
32 files changed:
src/mc/mc_checkpoint.c
src/mc/mc_comm_determinism.c
src/mc/mc_compare.cpp
src/mc/mc_config.c
src/mc/mc_diff.c
src/mc/mc_dwarf.c
src/mc/mc_dwarf_expression.c
src/mc/mc_forward.h
src/mc/mc_global.c
src/mc/mc_ignore.c
src/mc/mc_liveness.c
src/mc/mc_location.h
src/mc/mc_member.c
src/mc/mc_memory.c
src/mc/mc_memory_map.h
src/mc/mc_model_checker.h
src/mc/mc_page_snapshot.cpp
src/mc/mc_pair.c
src/mc/mc_private.h
src/mc/mc_record.c
src/mc/mc_request.c
src/mc/mc_safety.c
src/mc/mc_snapshot.c
src/mc/mc_snapshot.h
src/mc/mc_state.c
src/mc/mc_state.h
src/mc/mc_visited.c
src/mc/memory_map.c
src/simix/popping_generated.c
src/simix/simcalls.py
teshsuite/mc/dwarf/dwarf.c
teshsuite/mc/dwarf_expression/dwarf_expression.c

index d205926..8680749 100644 (file)
@@ -14,6 +14,7 @@
 #include <dirent.h>
 
 #include "internal_config.h"
+#include "mc_memory_map.h"
 #include "mc_private.h"
 #include "xbt/module.h"
 #include <xbt/mmalloc.h>
@@ -31,6 +32,8 @@
 #include "mc_private.h"
 #include <mc/mc.h>
 
+#include "mc_snapshot.h"
+#include "mc_object_info.h"
 #include "mc_mmu.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc,
index 1ac3784..9c01b85 100644 (file)
@@ -4,6 +4,10 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "mc_state.h"
+#include "mc_comm_pattern.h"
+#include "mc_request.h"
+#include "mc_safety.h"
 #include "mc_private.h"
 #include "mc_record.h"
 
index 0958d2d..4745d3a 100644 (file)
@@ -9,6 +9,9 @@
 #include <boost/unordered_set.hpp>
 
 #include "internal_config.h"
+#include "mc_object_info.h"
+#include "mc_safety.h"
+#include "mc_liveness.h"
 #include "mc_private.h"
 
 #ifdef HAVE_SMPI
index 1f0d836..07c9179 100644 (file)
@@ -14,6 +14,7 @@
 #include <simgrid/sg_config.h>
 
 #ifdef HAVE_MC
+#include "mc_safety.h"
 #include "mc_private.h"
 #endif
 
index a9b8dd4..03dfb36 100644 (file)
 #include "xbt/str.h"
 #include "mc/mc.h"
 #include "xbt/mmalloc.h"
+#include "mc_object_info.h"
 #include "mc/datatypes.h"
 #include "mc/mc_private.h"
+#include "mc/mc_snapshot.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_diff, xbt,
                                 "Logging specific to mc_diff in mc");
index 40046c2..2b2c2a0 100644 (file)
@@ -14,6 +14,7 @@
 #include <xbt/log.h>
 #include <xbt/sysdep.h>
 
+#include "mc_object_info.h"
 #include "mc_private.h"
 
 static void MC_dwarf_register_global_variable(mc_object_info_t info, dw_variable_t variable);
index ea58470..7653210 100644 (file)
@@ -10,6 +10,8 @@
 #include <dwarf.h>
 #include <elfutils/libdw.h>
 
+#include "mc_object_info.h"
+#include "mc_snapshot.h"
 #include "mc_private.h"
 
 static int mc_dwarf_push_value(mc_expression_state_t state, Dwarf_Off value)
index dd74458..58fde4c 100644 (file)
@@ -16,4 +16,10 @@ typedef struct s_memory_map s_memory_map_t, *memory_map_t;
 typedef struct s_dw_variable s_dw_variable_t, *dw_variable_t;
 typedef struct s_dw_frame s_dw_frame_t, *dw_frame_t;
 
+typedef struct s_mc_pages_store s_mc_pages_store_t, *mc_pages_store_t;
+typedef struct s_mc_snapshot s_mc_snapshot_t, *mc_snapshot_t;
+
+typedef struct s_mc_model_checker s_mc_model_checker_t, *mc_model_checker_t;
+extern mc_model_checker_t mc_model_checker;
+
 #endif
index ec5e3c3..00b8f2b 100644 (file)
 
 #ifdef HAVE_MC
 #include "../xbt/mmalloc/mmprivate.h"
+#include "mc_object_info.h"
+#include "mc_comm_pattern.h"
+#include "mc_request.h"
+#include "mc_safety.h"
+#include "mc_memory_map.h"
+#include "mc_snapshot.h"
+#include "mc_liveness.h"
 #include "mc_private.h"
 #endif
 #include "mc_record.h"
index 1f6dd21..13cab5e 100644 (file)
@@ -5,8 +5,10 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "internal_config.h"
+#include "mc_object_info.h"
 #include "mc_private.h"
 #include "smpi/private.h"
+#include "mc/mc_snapshot.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ignore, mc,
                                 "Logging specific to MC ignore mechanism");
index 841b102..1b8c3dd 100644 (file)
@@ -4,11 +4,17 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "mc_private.h"
-#include "mc_record.h"
 #include <unistd.h>
 #include <sys/wait.h>
 
+#include <xbt/dynar.h>
+#include <xbt/automaton.h>
+
+#include "mc_request.h"
+#include "mc_liveness.h"
+#include "mc_private.h"
+#include "mc_record.h"
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc,
                                 "Logging specific to algorithms for liveness properties verification");
 
index 2929200..45657f4 100644 (file)
@@ -15,6 +15,8 @@
 #include <elfutils/libdw.h>
 
 #include <simgrid_config.h>
+#include "mc_interface.h"
+#include "mc_object_info.h"
 #include "mc_forward.h"
 
 SG_BEGIN_DECL()
index ff7667d..b5ee069 100644 (file)
@@ -4,6 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "mc_object_info.h"
 #include "mc_private.h"
 
 /** Resolve snapshot in the process address space
@@ -38,4 +39,3 @@ void *mc_member_resolve(const void *base, dw_type_t type, dw_type_t member,
   else
     return (void *) state.stack[state.stack_size - 1];
 }
-
index 655418d..b474b0c 100644 (file)
@@ -6,9 +6,12 @@
 
 #include <sys/stat.h>
 #include <fcntl.h>
+
+#include "xbt/log.h"
+
 #include "mc/mc.h"
+#include "mc_object_info.h"
 #include "mc_private.h"
-#include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_memory, mc,
                                 "Logging specific to MC (memory)");
index 6d118d0..afa2b58 100644 (file)
@@ -8,6 +8,7 @@
 #define MC_MEMORY_MAP_H
 
 #include <simgrid_config.h>
+#include "mc_forward.h"
 
 SG_BEGIN_DECL()
 
index 74df0d7..9ab2813 100644 (file)
@@ -3,11 +3,13 @@
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
+#ifndef MC_MODEL_CHECKER_H
+#define MC_MODEL_CHECKER_H
 
 #include <simgrid_config.h>
 
-#ifndef MC_MODEL_CHECKER_H
-#define MC_MODEL_CHECKER_H
+#include "mc_forward.h"
 
 SG_BEGIN_DECL()
 
@@ -18,18 +20,17 @@ SG_BEGIN_DECL()
  *  By moving as much state as possible in this structure allocated
  *  on the model-chercker heap, we avoid those issues.
  */
-typedef struct s_mc_model_checker {
+struct s_mc_model_checker {
   // This is the parent snapshot of the current state:
   mc_snapshot_t parent_snapshot;
   mc_pages_store_t pages;
   int fd_clear_refs;
   int fd_pagemap;
   xbt_dynar_t record;
-} s_mc_model_checker_t, *mc_model_checker_t;
+};
 
 mc_model_checker_t MC_model_checker_new(void);
 void MC_model_checker_delete(mc_model_checker_t mc);
-extern mc_model_checker_t mc_model_checker;
 
 SG_END_DECL()
 
index a231848..499e5f2 100644 (file)
@@ -1,6 +1,7 @@
 #include "mc_page_store.h"
 #include "mc_mmu.h"
 #include "mc_private.h"
+#include "mc_snapshot.h"
 
 #include <xbt/mmalloc.h>
 
index 29910e6..62e1f38 100644 (file)
@@ -4,6 +4,8 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include <xbt.h>
+#include "mc_liveness.h"
 #include "mc_private.h"
 
 mc_pair_t MC_pair_new()
index b0f4fc6..1ef0f8d 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "simgrid_config.h"
 #include <stdio.h>
+#include <stdint.h>
 #include <stdbool.h>
 #ifndef WIN32
 #include <sys/mman.h>
 #include "xbt/parmap.h"
 
 #include "mc_forward.h"
-#include "mc_mmu.h"
-#include "mc_page_store.h"
-#include "mc_interface.h"
-#include "mc_mmalloc.h"
-#include "mc_model_checker.h"
-#include "mc_snapshot.h"
-#include "mc_object_info.h"
-#include "mc_location.h"
-#include "mc_state.h"
-#include "mc_comm_pattern.h"
-#include "mc_request.h"
-#include "mc_safety.h"
-#include "mc_liveness.h"
-#include "mc_memory_map.h"
 
 SG_BEGIN_DECL()
 
index b898e56..d9d79e1 100644 (file)
 #include <xbt.h>
 #include <simgrid/simix.h>
 
-#include "mc_base.h"
 #include "mc_record.h"
+#include "mc_base.h"
 
 #ifdef HAVE_MC
 #include "mc_private.h"
+#include "mc_model_checker.h"
+#include "mc_state.h"
 #endif
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc,
index 234c5d2..af7f1ef 100644 (file)
@@ -4,6 +4,8 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "mc_request.h"
+#include "mc_safety.h"
 #include "mc_private.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_request, mc,
index 401c43b..658c185 100644 (file)
@@ -4,6 +4,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "mc_state.h"
+#include "mc_request.h"
+#include "mc_safety.h"
 #include "mc_private.h"
 #include "mc_record.h"
 
index bc1b553..97c4017 100644 (file)
@@ -9,6 +9,7 @@
 #include "internal_config.h"
 #include "smpi/private.h"
 
+#include "mc_snapshot.h"
 #include "mc_private.h"
 #include "mc_mmu.h"
 #include "mc_page_store.h"
@@ -172,6 +173,8 @@ int mc_snapshot_memcmp(
 #include <sys/mman.h>
 
 #include "mc/mc_private.h"
+#include "mc/mc_snapshot.h"
+#include "mc/mc_mmu.h"
 
 XBT_TEST_SUITE("mc_snapshot", "Snapshots");
 
@@ -281,4 +284,3 @@ static void test_snapshot(bool sparse_checkpoint) {
 }
 
 #endif /* SIMGRID_TEST */
-
index 0f46848..352ae8b 100644 (file)
@@ -3,22 +3,23 @@
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef MC_SNAPSHOT_H
+#define MC_SNAPSHOT_H
+
 #include <sys/types.h> // off_t
 #include <stdint.h> // size_t
 
+#include <simgrid_config.h>
+#include "../xbt/mmalloc/mmprivate.h"
 #include <xbt/asserts.h>
 #include <xbt/dynar.h>
-#include <simgrid_config.h>
 
 #include "mc_forward.h"
-#include "mc_page_store.h"
 #include "mc_model_checker.h"
+#include "mc_page_store.h"
 #include "mc_mmalloc.h"
 
-#ifndef MC_SNAPSHOT_H
-#define MC_SNAPSHOT_H
-
 SG_BEGIN_DECL()
 
 void mc_softdirty_reset();
@@ -150,7 +151,7 @@ typedef struct s_fd_infos{
   int flags;
 }s_fd_infos_t, *fd_infos_t;
 
-typedef struct s_mc_snapshot{
+struct s_mc_snapshot{
   size_t heap_bytes_used;
   mc_mem_region_t regions[NB_REGIONS];
   xbt_dynar_t enabled_processes;
@@ -163,7 +164,7 @@ typedef struct s_mc_snapshot{
   xbt_dynar_t ignored_data;
   int total_fd;
   fd_infos_t *current_fd;
-} s_mc_snapshot_t;
+};
 
 /** @brief Process index used when no process is available
  *
index 4724523..e9b4b04 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "../simix/smx_private.h"
 #include "xbt/fifo.h"
+#include "mc_state.h"
+#include "mc_request.h"
 #include "mc_private.h"
 
 /**
index e5927ec..1bc0316 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <simgrid_config.h>
 #include "../simix/smx_private.h"
+#include "mc_snapshot.h"
 
 SG_BEGIN_DECL()
 
index ac7c56b..8ac5d0f 100644 (file)
@@ -4,10 +4,14 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "mc_private.h"
 #include <unistd.h>
 #include <sys/wait.h>
 
+#include "mc_comm_pattern.h"
+#include "mc_safety.h"
+#include "mc_liveness.h"
+#include "mc_private.h"
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_visited, mc,
                                 "Logging specific to state equaity detection mechanisms");
 
index e63cab7..b867a86 100644 (file)
@@ -4,6 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "mc_memory_map.h"
 #include "mc_private.h"
 #include <stdlib.h>
 
index 0a68930..b339a4a 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "smx_private.h"
 #ifdef HAVE_MC
-#include "mc/mc_private.h"
 #endif
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
index 99a968a..41bd69d 100755 (executable)
@@ -281,7 +281,7 @@ if __name__=='__main__':
   
   fd.write('#include "smx_private.h"\n');
   fd.write('#ifdef HAVE_MC\n');
-  fd.write('#include "mc/mc_private.h"\n');
+  fd.write('#include "mc/mc_private.h"\n');
   fd.write('#endif\n');
   fd.write('\n');
   fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n');
index 7378579..8b22d4b 100644 (file)
@@ -15,6 +15,7 @@
 #include <mc/mc.h>
 
 #include "../../src/include/mc/datatypes.h"
+#include "../../src/mc/mc_object_info.h"
 #include "../../src/mc/mc_private.h"
 
 int test_some_array[4][5][6];
index 905f88a..998b779 100644 (file)
@@ -13,6 +13,7 @@
 #include <stdlib.h>
 
 #include "../src/mc/mc_private.h"
+#include "../src/mc/mc_object_info.h"
 
 static
 uintptr_t eval_binary_operation(mc_expression_state_t state, int op, uintptr_t a, uintptr_t b) {