1 /* Copyright (c) 2014. The SimGrid Team.
2 * All rights reserved. */
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. */
12 #include <simgrid/modelchecker.h>
14 XBT_LOG_NEW_DEFAULT_CATEGORY(random_bug, "Application");
16 /** An (fake) application with a bug occuring for some random values
18 static int app(int argc, char *argv[])
20 int x = MC_random(0, 5);
21 int y = MC_random(0, 5);
24 MC_assert(x !=3 || y !=4);
27 fprintf(stderr, "Error reached\n");
34 int main(int argc, char *argv[])
36 MSG_init(&argc, argv);
37 MSG_function_register("app", &app);
38 MSG_create_environment(argv[1]);
39 MSG_launch_application(argv[2]);