Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
untangle a bit mc header files
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 22 Jun 2018 18:12:15 +0000 (20:12 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 23 Jun 2018 08:18:37 +0000 (10:18 +0200)
16 files changed:
include/xbt/automaton.h
src/include/xbt/mmalloc.h
src/mc/AddressSpace.hpp
src/mc/ModelChecker.cpp
src/mc/ModelChecker.hpp
src/mc/Transition.hpp
src/mc/mc_base.cpp
src/mc/mc_forward.hpp
src/mc/mc_snapshot.hpp
src/mc/remote/Channel.hpp
src/mc/remote/Client.hpp
src/mc/remote/RemoteClient.hpp
src/mc/remote/RemotePtr.hpp
src/mc/remote/mc_protocol.h
src/xbt/automaton/automaton.c
src/xbt/automaton/automatonparse_promela.c

index f76712c..0b935ed 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2011-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2011-2018. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -8,10 +7,6 @@
 #define XBT_AUTOMATON_H
 
 #include <xbt/dynar.h>
-#include <xbt/sysdep.h>
-#include <xbt/graph.h>
-#include <stdlib.h>
-#include <string.h>
 
 SG_BEGIN_DECL()
 
index 54cbd19..fd20910 100644 (file)
@@ -10,7 +10,6 @@
 #define SIMGRID_MMALLOC_H 1
 
 #include "src/internal_config.h"
-#if HAVE_MMALLOC
 
 #include <stdio.h>     /* for NULL */
 #include <sys/types.h> /* for size_t */
@@ -29,6 +28,7 @@ SG_BEGIN_DECL()
 typedef struct mdesc s_xbt_mheap_t;
 typedef s_xbt_mheap_t* xbt_mheap_t;
 
+#if HAVE_MMALLOC
 /* Allocate SIZE bytes of memory (and memset it to 0).  */
 XBT_PUBLIC void* mmalloc(xbt_mheap_t md, size_t size);
 
@@ -63,7 +63,7 @@ ssize_t mmalloc_get_busy_size(xbt_mheap_t, void* ptr);
 
 void* malloc_no_memset(size_t n);
 
+#endif
 SG_END_DECL()
 
-#endif
 #endif /* SIMGRID_MMALLOC_H */
index e06c61e..76396c1 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2008-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2008-2018. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -7,15 +6,6 @@
 #ifndef SIMGRID_MC_ADDRESS_SPACE_H
 #define SIMGRID_MC_ADDRESS_SPACE_H
 
-#include <cassert>
-#include <cstddef>
-#include <cstdint>
-#include <cstring>
-#include <type_traits>
-
-#include <string>
-#include <vector>
-
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/remote/RemotePtr.hpp"
 
index 3ca696b..10bee5d 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "simgrid/sg_config.hpp"
 
-#include "src/mc/ModelChecker.hpp"
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/PageStore.hpp"
 #include "src/mc/Transition.hpp"
@@ -29,6 +28,7 @@
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
 #include "src/mc/mc_record.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
 #include "src/mc/remote/mc_protocol.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
index 65ad9ad..1296853 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
 
 /* 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 <event2/event.h>
 
-#include "xbt/base.h"
 #include <sys/types.h>
 
 #include "src/mc/PageStore.hpp"
-#include "src/mc/Transition.hpp"
 #include "src/mc/mc_forward.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
 #include "src/mc/remote/mc_protocol.h"
 
 namespace simgrid {
index 1c3bf93..d8566a2 100644 (file)
@@ -18,7 +18,8 @@ namespace mc {
  *  in things like waitany and for associating a given value of MC_random()
  *  calls.
  */
-struct Transition {
+class Transition {
+public:
   int pid = 0;
 
   /* Which transition was executed for this simcall
index 2ad939f..c1968fc 100644 (file)
@@ -8,7 +8,9 @@
 #include "mc/mc.h"
 #include "src/mc/mc_base.h"
 #include "src/mc/mc_config.hpp"
+#include "src/mc/mc_forward.hpp"
 #include "src/mc/mc_replay.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
 #include "src/simix/smx_private.hpp"
 
 #include "src/kernel/activity/MutexImpl.hpp"
index ed94bf9..6ab3a4b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -25,6 +24,7 @@ class ObjectInformation;
 class Member;
 class Type;
 class Variable;
+class Transition;
 class Frame;
 class ActorInformation;
 
index 62a18fe..d9c9107 100644 (file)
@@ -6,15 +6,10 @@
 #ifndef SIMGRID_MC_SNAPSHOT_HPP
 #define SIMGRID_MC_SNAPSHOT_HPP
 
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/RegionSnapshot.hpp"
-#include "src/mc/mc_forward.hpp"
 #include "src/mc/mc_unw.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
 
 // ***** Snapshot region
 
index 62edf66..69a58c0 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2015-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2015-2018. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -7,12 +6,10 @@
 #ifndef SIMGRID_MC_CHANNEL_HPP
 #define SIMGRID_MC_CHANNEL_HPP
 
-#include <unistd.h>
+#include "src/mc/remote/mc_protocol.h"
 
 #include <type_traits>
 
-#include "src/mc/remote/mc_protocol.h"
-
 namespace simgrid {
 namespace mc {
 
index 1d4cd21..7e9c6dd 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2015-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2015-2018. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -7,18 +6,10 @@
 #ifndef SIMGRID_MC_CLIENT_H
 #define SIMGRID_MC_CLIENT_H
 
-#include "src/internal_config.h"
+#include "src/mc/remote/Channel.hpp"
 
-#include <cstddef>
 #include <memory>
 
-#include <xbt/base.h>
-
-#include <simgrid/simix.h>
-
-#include "src/mc/remote/Channel.hpp"
-#include "src/mc/remote/mc_protocol.h"
-
 namespace simgrid {
 namespace mc {
 
index e55df1a..5d66c58 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "src/xbt/mmalloc/mmprivate.h"
 #include "src/mc/remote/Channel.hpp"
-#include "src/simix/smx_private.hpp"
 #include "src/mc/ObjectInformation.hpp"
 
 #include <vector>
index f8d09f7..bd58e1b 100644 (file)
@@ -6,11 +6,7 @@
 #ifndef SIMGRID_MC_REMOTE_PTR_HPP
 #define SIMGRID_MC_REMOTE_PTR_HPP
 
-#include <cstdint>
-#include <cstring>
-
-#include <stdexcept>
-#include <type_traits>
+#include "src/simix/smx_private.hpp"
 
 namespace simgrid {
 namespace mc {
index 6770bf0..d6924f1 100644 (file)
@@ -9,8 +9,6 @@
 #include "mc/datatypes.h"
 #include "simgrid/forward.h"
 
-#include <stdint.h>
-
 SG_BEGIN_DECL()
 
 // ***** Environment variables for passing context to the model-checked process
index 377992a..a601827 100644 (file)
@@ -8,6 +8,7 @@
 #include "xbt/automaton.h"
 #include <stdio.h> /* printf */
 #include <xbt/log.h>
+#include <xbt/sysdep.h>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_automaton, xbt, "Automaton");
 
index 6f59cb4..9bc4586 100644 (file)
@@ -13,6 +13,7 @@
 # include <unistd.h>   /* isatty */
 #endif
 #include <xbt/log.h>
+#include <xbt/sysdep.h>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_automaton);