Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker: remove unused examples
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Thu, 21 Jun 2012 09:32:41 +0000 (11:32 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Thu, 21 Jun 2012 09:34:41 +0000 (11:34 +0200)
examples/msg/mc/CMakeLists.txt
examples/msg/mc/bugged1_stateful.c [deleted file]
examples/msg/mc/bugged2_stateful.c [deleted file]

index 34cf083..e11ce0b 100644 (file)
@@ -5,8 +5,6 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 
 add_executable(centralized centralized_mutex.c)
 add_executable(bugged1     bugged1.c)
 
 add_executable(centralized centralized_mutex.c)
 add_executable(bugged1     bugged1.c)
-add_executable(bugged1_stateful bugged1_stateful.c)
-add_executable(bugged2_stateful bugged2_stateful.c)
 add_executable(bugged2      bugged2.c)
 add_executable(bugged3    bugged3.c)
 add_executable(random_test random_test.c)
 add_executable(bugged2      bugged2.c)
 add_executable(bugged3    bugged3.c)
 add_executable(random_test random_test.c)
@@ -19,8 +17,6 @@ add_executable(test_snapshot test_snapshot.c)
 
 target_link_libraries(centralized simgrid m )
 target_link_libraries(bugged1     simgrid m )
 
 target_link_libraries(centralized simgrid m )
 target_link_libraries(bugged1     simgrid m )
-target_link_libraries(bugged1_stateful simgrid m)
-target_link_libraries(bugged2_stateful simgrid m)
 target_link_libraries(bugged2     simgrid m )
 target_link_libraries(bugged3     simgrid m )
 target_link_libraries(random_test     simgrid m )
 target_link_libraries(bugged2     simgrid m )
 target_link_libraries(bugged3     simgrid m )
 target_link_libraries(random_test     simgrid m )
@@ -56,11 +52,9 @@ set(examples_src
   ${examples_src}
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_for_liveness.c
   ${examples_src}
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_for_liveness.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_stateful.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_while_liveness.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_liveness.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_while_liveness.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_liveness.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_stateful.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged3.c
   ${CMAKE_CURRENT_SOURCE_DIR}/centralized_liveness.c
   ${CMAKE_CURRENT_SOURCE_DIR}/centralized_liveness_deadlock.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged3.c
   ${CMAKE_CURRENT_SOURCE_DIR}/centralized_liveness.c
   ${CMAKE_CURRENT_SOURCE_DIR}/centralized_liveness_deadlock.c
diff --git a/examples/msg/mc/bugged1_stateful.c b/examples/msg/mc/bugged1_stateful.c
deleted file mode 100644 (file)
index 4bf0381..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/******************** Non-deterministic message ordering  *********************/
-/* Server assumes a fixed order in the reception of messages from its clients */
-/* which is incorrect because the message ordering is non-deterministic       */
-/******************************************************************************/
-
-#include <msg/msg.h>
-#include <simgrid/modelchecker.h>
-#define N 3
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(example, "this example");
-
-int server(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-
-int server(int argc, char *argv[])
-{
-  m_task_t task = NULL;
-  int count = 0;
-  while (count < N) {
-    if (task) {
-      MSG_task_destroy(task);
-      task = NULL;
-    }
-    MSG_task_receive(&task, "mymailbox");
-    count++;
-  }
-  MC_assert_stateful(atoi(MSG_task_get_name(task)) == 3);
-
-  XBT_INFO("OK");
-  return 0;
-}
-
-int client(int argc, char *argv[])
-{
-
-  m_task_t task =
-      MSG_task_create(argv[1], 0 /*comp cost */ , 10000 /*comm size */ ,
-                      NULL /*arbitrary data */ );
-
-  MSG_task_send(task, "mymailbox");
-
-  XBT_INFO("Sent!");
-  return 0;
-}
-
-int main(int argc, char *argv[])
-{
-   
-  MSG_global_init(&argc, argv);
-
-  MSG_create_environment("platform.xml");
-
-  MSG_function_register("server", server);
-
-  MSG_function_register("client", client);
-
-  MSG_launch_application("deploy_bugged1.xml");
-
-  MSG_main_stateful();
-  
-  MSG_clean();
-   
-  return 0;
-
-}
diff --git a/examples/msg/mc/bugged2_stateful.c b/examples/msg/mc/bugged2_stateful.c
deleted file mode 100644 (file)
index 8c6df80..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/******************** Non-deterministic message ordering  *********************/
-/* Server assumes a fixed order in the reception of messages from its clients */
-/* which is incorrect because the message ordering is non-deterministic       */
-/******************************************************************************/
-
-#include <msg/msg.h>
-#include <simgrid/modelchecker.h>
-#define N 3
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(example, "this example");
-
-int server(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-
-int server(int argc, char *argv[])
-{
-  m_task_t task1, task2;
-  long val1, val2;
-
-  MSG_task_receive(&task1, "mymailbox");
-  val1 = (long) MSG_task_get_data(task1);
-  MSG_task_destroy(task1);
-  task1 = NULL;
-  XBT_INFO("Received %lu", val1);
-
-  MSG_task_receive(&task2, "mymailbox");
-  val2 = (long) MSG_task_get_data(task2);
-  MSG_task_destroy(task2);
-  task2 = NULL;
-  XBT_INFO("Received %lu", val2);
-
-  MC_assert_stateful(min(val1, val2) == 1);
-
-  MSG_task_receive(&task1, "mymailbox");
-  val1 = (long) MSG_task_get_data(task1);
-  MSG_task_destroy(task1);
-  XBT_INFO("Received %lu", val1);
-
-  MSG_task_receive(&task2, "mymailbox");
-  val2 = (long) MSG_task_get_data(task2);
-  MSG_task_destroy(task2);
-  XBT_INFO("Received %lu", val2);
-
-  XBT_INFO("OK");
-  return 0;
-}
-
-int client(int argc, char *argv[])
-{
-  m_task_t task1 =
-      MSG_task_create("task", 0, 10000, (void *) atol(argv[1]));
-  m_task_t task2 =
-      MSG_task_create("task", 0, 10000, (void *) atol(argv[1]));
-
-  XBT_INFO("Send %d!", atoi(argv[1]));
-  MSG_task_send(task1, "mymailbox");
-
-  XBT_INFO("Send %d!", atoi(argv[1]));
-  MSG_task_send(task2, "mymailbox");
-
-  return 0;
-}
-
-int main(int argc, char *argv[])
-{
-  MSG_global_init(&argc, argv);
-
-  MSG_create_environment("platform.xml");
-
-  MSG_function_register("server", server);
-
-  MSG_function_register("client", client);
-
-  MSG_launch_application("deploy_bugged2.xml");
-
-  MSG_main_stateful();
-
-  return 0;
-}