1 /* Copyright (c) 2008-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. */
17 #include "simgrid/sg_config.h"
18 #include "../surf/surf_private.h"
19 #include "../simix/smx_private.h"
21 #include "xbt/automaton.h"
25 #include <libunwind.h>
26 #include <xbt/mmalloc.h>
28 #include "../xbt/mmalloc/mmprivate.h"
29 #include "mc_object_info.h"
30 #include "mc_comm_pattern.h"
31 #include "mc_request.h"
32 #include "mc_safety.h"
33 #include "mc_memory_map.h"
34 #include "mc_snapshot.h"
35 #include "mc_liveness.h"
36 #include "mc_private.h"
40 #include "mc_record.h"
41 #include "mc_protocol.h"
42 #include "mc_client.h"
44 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc,
45 "Logging specific to MC (global)");
49 double *mc_time = NULL;
52 int user_max_depth_reached = 0;
54 /* MC global data structures */
55 mc_state_t mc_current_state = NULL;
56 char mc_replay_mode = FALSE;
58 __thread mc_comparison_times_t mc_comp_times = NULL;
59 __thread double mc_snapshot_comparison_time;
60 mc_stats_t mc_stats = NULL;
61 mc_global_t initial_global_state = NULL;
62 xbt_fifo_t mc_stack = NULL;
65 xbt_automaton_t _mc_property_automaton = NULL;
68 FILE *dot_output = NULL;
69 const char *colors[13];
72 /******************************* Initialisation of MC *******************************/
73 /*********************************************************************************/
75 static void MC_init_dot_output()
76 { /* FIXME : more colors */
81 colors[3] = "goldenrod";
84 colors[6] = "magenta";
85 colors[7] = "turquoise4";
87 colors[9] = "forestgreen";
88 colors[10] = "hotpink";
89 colors[11] = "lightblue";
92 dot_output = fopen(_sg_mc_dot_output_file, "w");
94 if (dot_output == NULL) {
95 perror("Error open dot output file");
100 "digraph graphname{\n fixedsize=true; rankdir=TB; ranksep=.25; edge [fontsize=12]; node [fontsize=10, shape=circle,width=.5 ]; graph [resolution=20, fontsize=10];\n");
106 MC_init_pid(getpid(), -1);
109 static void MC_init_mode(void)
111 if (mc_mode == MC_MODE_NONE) {
112 if (getenv(MC_ENV_SOCKET_FD)) {
113 mc_mode = MC_MODE_CLIENT;
115 mc_mode = MC_MODE_STANDALONE;
120 void MC_init_pid(pid_t pid, int socket)
122 /* Initialize the data structures that must be persistent across every
123 iteration of the model-checker (in RAW memory) */
125 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
127 mc_model_checker = MC_model_checker_new(pid, socket);
128 if (mc_mode == MC_MODE_SERVER) {
129 unsigned long maxpid;
130 MC_process_read_variable(&mc_model_checker->process, "simix_process_maxpid",
131 &maxpid, sizeof(maxpid));
132 simix_process_maxpid = maxpid;
135 mmalloc_set_current_heap(std_heap);
136 mc_time = xbt_new0(double, MC_smx_get_maxpid());
137 mmalloc_set_current_heap(mc_heap);
139 mc_comp_times = xbt_new0(s_mc_comparison_times_t, 1);
141 /* Initialize statistics */
142 mc_stats = xbt_new0(s_mc_stats_t, 1);
143 mc_stats->state_size = 1;
145 if ((_sg_mc_dot_output_file != NULL) && (_sg_mc_dot_output_file[0] != '\0'))
146 MC_init_dot_output();
149 //parmap = xbt_parmap_mc_new(xbt_os_get_numcores(), XBT_PARMAP_DEFAULT);
153 if (_sg_mc_visited > 0 || _sg_mc_liveness || _sg_mc_termination) {
154 /* Ignore some variables from xbt/ex.h used by exception e for stacks comparison */
155 MC_ignore_local_variable("e", "*");
156 MC_ignore_local_variable("__ex_cleanup", "*");
157 MC_ignore_local_variable("__ex_mctx_en", "*");
158 MC_ignore_local_variable("__ex_mctx_me", "*");
159 MC_ignore_local_variable("__xbt_ex_ctx_ptr", "*");
160 MC_ignore_local_variable("_log_ev", "*");
161 MC_ignore_local_variable("_throw_ctx", "*");
162 MC_ignore_local_variable("ctx", "*");
164 MC_ignore_local_variable("self", "simcall_BODY_mc_snapshot");
165 MC_ignore_local_variable("next_cont"
166 "ext", "smx_ctx_sysv_suspend_serial");
167 MC_ignore_local_variable("i", "smx_ctx_sysv_suspend_serial");
169 /* Ignore local variable about time used for tracing */
170 MC_ignore_local_variable("start_time", "*");
173 MC_ignore_global_variable("mc_model_checker");
174 MC_ignore_global_variable("initial_communications_pattern");
175 MC_ignore_global_variable("incomplete_communications_pattern");
176 MC_ignore_global_variable("nb_comm_pattern");
178 /* MC __thread variables: */
179 MC_ignore_global_variable("mc_diff_info");
180 MC_ignore_global_variable("mc_comp_times");
181 MC_ignore_global_variable("mc_snapshot_comparison_time");
183 /* This MC state is used in MC replay as well: */
184 MC_ignore_global_variable("mc_time");
186 /* Static variable used for tracing */
187 MC_ignore_global_variable("counter");
190 MC_ignore_global_variable("smx_total_comms");
192 if (mc_mode == MC_MODE_STANDALONE || mc_mode == MC_MODE_CLIENT) {
193 /* Those requests are handled on the client side and propagated by message
196 MC_ignore_heap(mc_time, MC_smx_get_maxpid() * sizeof(double));
198 smx_process_t process;
199 xbt_swag_foreach(process, simix_global->process_list) {
200 MC_ignore_heap(&(process->process_hookup), sizeof(process->process_hookup));
206 mmalloc_set_current_heap(heap);
209 /******************************* Core of MC *******************************/
210 /**************************************************************************/
212 static void MC_modelcheck_comm_determinism_init(void)
215 if (mc_mode == MC_MODE_CLIENT) {
216 // This will move somehwere else:
217 MC_client_handle_messages();
220 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
222 /* Create exploration stack */
223 mc_stack = xbt_fifo_new();
227 MC_pre_modelcheck_comm_determinism();
230 initial_global_state = xbt_new0(s_mc_global_t, 1);
231 initial_global_state->snapshot = MC_take_snapshot(0);
232 initial_global_state->initial_communications_pattern_done = 0;
233 initial_global_state->recv_deterministic = 1;
234 initial_global_state->send_deterministic = 1;
235 initial_global_state->recv_diff = NULL;
236 initial_global_state->send_diff = NULL;
240 MC_modelcheck_comm_determinism();
242 mmalloc_set_current_heap(heap);
245 static void MC_modelcheck_liveness_init()
250 if (mc_mode == MC_MODE_CLIENT) {
251 // This will move somehwere else:
252 MC_client_handle_messages();
255 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
257 /* Create exploration stack */
258 mc_stack = xbt_fifo_new();
260 /* Create the initial state */
261 initial_global_state = xbt_new0(s_mc_global_t, 1);
265 MC_pre_modelcheck_liveness();
268 MC_print_statistics(mc_stats);
271 mmalloc_set_current_heap(heap);
275 void MC_do_the_modelcheck_for_real()
279 if (_sg_mc_comms_determinism || _sg_mc_send_determinism) {
280 XBT_INFO("Check communication determinism");
281 mc_reduce_kind = e_mc_reduce_none;
282 MC_modelcheck_comm_determinism_init();
285 else if (!_sg_mc_property_file || _sg_mc_property_file[0] == '\0') {
286 if(_sg_mc_termination){
287 XBT_INFO("Check non progressive cycles");
288 mc_reduce_kind = e_mc_reduce_none;
290 if (mc_reduce_kind == e_mc_reduce_unset)
291 mc_reduce_kind = e_mc_reduce_dpor;
294 mc_reduce_kind = e_mc_reduce_dpor;
295 if (mc_mode == MC_MODE_SERVER || mc_mode == MC_MODE_STANDALONE) {
296 XBT_INFO("Check a safety property");
297 MC_modelcheck_safety();
300 // Most of this is not needed:
303 MC_client_main_loop();
310 if (mc_reduce_kind == e_mc_reduce_unset)
311 mc_reduce_kind = e_mc_reduce_none;
312 XBT_INFO("Check the liveness property %s", _sg_mc_property_file);
313 MC_automaton_load(_sg_mc_property_file);
314 MC_modelcheck_liveness_init();
327 int MC_deadlock_check()
329 if (mc_mode == MC_MODE_SERVER) {
331 if ((res = MC_protocol_send_simple_message(mc_model_checker->process.socket,
332 MC_MESSAGE_DEADLOCK_CHECK)))
333 xbt_die("Could not check deadlock state");
334 s_mc_int_message_t message;
335 ssize_t s = MC_receive_message(mc_model_checker->process.socket, &message, sizeof(message), 0);
337 xbt_die("Could not receive message");
338 else if (s != sizeof(message) || message.type != MC_MESSAGE_DEADLOCK_CHECK_REPLY) {
339 xbt_die("%s received unexpected message %s (%i, size=%i) "
340 "expected MC_MESSAGE_DEADLOCK_CHECK_REPLY (%i, size=%i)",
341 MC_mode_name(mc_mode),
342 MC_message_type_name(message.type), (int) message.type, (int) s,
343 (int) MC_MESSAGE_DEADLOCK_CHECK_REPLY, (int) sizeof(message)
347 return message.value;
350 int deadlock = FALSE;
351 smx_process_t process;
352 if (xbt_swag_size(simix_global->process_list)) {
354 MC_EACH_SIMIX_PROCESS(process,
355 if (MC_process_is_enabled(process)) {
364 void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t req, int value, xbt_dynar_t pattern, int backtracking) {
367 case MC_CALL_TYPE_NONE:
369 case MC_CALL_TYPE_SEND:
370 case MC_CALL_TYPE_RECV:
371 MC_get_comm_pattern(pattern, req, call_type, backtracking);
373 case MC_CALL_TYPE_WAIT:
374 case MC_CALL_TYPE_WAITANY:
376 smx_synchro_t current_comm = NULL;
377 if (call_type == MC_CALL_TYPE_WAIT)
378 current_comm = simcall_comm_wait__get__comm(req);
380 current_comm = xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_synchro_t);
381 MC_complete_comm_pattern(pattern, current_comm, req->issuer->pid, backtracking);
385 xbt_die("Unexpected call type %i", (int)call_type);
391 * \brief Re-executes from the state at position start all the transitions indicated by
392 * a given model-checker stack.
393 * \param stack The stack with the transitions to execute.
394 * \param start Start index to begin the re-execution.
396 void MC_replay(xbt_fifo_t stack)
398 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
400 int value, count = 1, j;
402 smx_simcall_t req = NULL, saved_req = NULL;
403 xbt_fifo_item_t item, start_item;
406 XBT_DEBUG("**** Begin Replay ****");
408 /* Intermediate backtracking */
409 if(_sg_mc_checkpoint > 0 || _sg_mc_termination || _sg_mc_visited > 0) {
410 start_item = xbt_fifo_get_first_item(stack);
411 state = (mc_state_t)xbt_fifo_get_item_content(start_item);
412 if(state->system_state){
413 MC_restore_snapshot(state->system_state);
414 if(_sg_mc_comms_determinism || _sg_mc_send_determinism)
415 MC_restore_communications_pattern(state);
422 /* Restore the initial state */
423 MC_restore_snapshot(initial_global_state->snapshot);
424 /* At the moment of taking the snapshot the raw heap was set, so restoring
425 * it will set it back again, we have to unset it to continue */
428 start_item = xbt_fifo_get_last_item(stack);
432 if (_sg_mc_comms_determinism || _sg_mc_send_determinism) {
433 for (j=0; j < simix_process_maxpid; j++) {
434 xbt_dynar_reset((xbt_dynar_t)xbt_dynar_get_as(incomplete_communications_pattern, j, xbt_dynar_t));
435 ((mc_list_comm_pattern_t)xbt_dynar_get_as(initial_communications_pattern, j, mc_list_comm_pattern_t))->index_comm = 0;
441 /* Traverse the stack from the state at position start and re-execute the transitions */
442 for (item = start_item;
443 item != xbt_fifo_get_first_item(stack);
444 item = xbt_fifo_get_prev_item(item)) {
446 state = (mc_state_t) xbt_fifo_get_item_content(item);
447 saved_req = MC_state_get_executed_request(state, &value);
450 /* because we got a copy of the executed request, we have to fetch the
451 real one, pointed by the request field of the issuer process */
453 const smx_process_t issuer = MC_smx_simcall_get_issuer(saved_req);
454 req = &issuer->simcall;
456 /* Debug information */
457 if (XBT_LOG_ISENABLED(mc_global, xbt_log_priority_debug)) {
458 req_str = MC_request_to_string(req, value, MC_REQUEST_SIMIX);
459 XBT_DEBUG("Replay: %s (%p)", req_str, state);
463 /* TODO : handle test and testany simcalls */
464 e_mc_call_type_t call = MC_CALL_TYPE_NONE;
465 if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
466 call = MC_get_call_type(req);
468 MC_simcall_handle(req, value);
471 if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
472 MC_handle_comm_pattern(call, req, value, NULL, 1);
475 MC_wait_for_requests();
480 /* Update statistics */
481 mc_stats->visited_states++;
482 mc_stats->executed_transitions++;
486 XBT_DEBUG("**** End Replay ****");
487 mmalloc_set_current_heap(heap);
490 void MC_replay_liveness(xbt_fifo_t stack)
493 initial_global_state->raw_mem_set = (mmalloc_get_current_heap() == mc_heap);
495 xbt_fifo_item_t item;
496 mc_pair_t pair = NULL;
497 mc_state_t state = NULL;
498 smx_simcall_t req = NULL, saved_req = NULL;
499 int value, depth = 1;
502 XBT_DEBUG("**** Begin Replay ****");
504 /* Intermediate backtracking */
505 if(_sg_mc_checkpoint > 0) {
506 item = xbt_fifo_get_first_item(stack);
507 pair = (mc_pair_t) xbt_fifo_get_item_content(item);
508 if(pair->graph_state->system_state){
509 MC_restore_snapshot(pair->graph_state->system_state);
515 /* Restore the initial state */
516 MC_restore_snapshot(initial_global_state->snapshot);
518 /* At the moment of taking the snapshot the raw heap was set, so restoring
519 * it will set it back again, we have to unset it to continue */
520 if (!initial_global_state->raw_mem_set)
523 /* Traverse the stack from the initial state and re-execute the transitions */
524 for (item = xbt_fifo_get_last_item(stack);
525 item != xbt_fifo_get_first_item(stack);
526 item = xbt_fifo_get_prev_item(item)) {
528 pair = (mc_pair_t) xbt_fifo_get_item_content(item);
530 state = (mc_state_t) pair->graph_state;
532 if (pair->exploration_started) {
534 saved_req = MC_state_get_executed_request(state, &value);
536 if (saved_req != NULL) {
537 /* because we got a copy of the executed request, we have to fetch the
538 real one, pointed by the request field of the issuer process */
539 const smx_process_t issuer = MC_smx_simcall_get_issuer(saved_req);
540 req = &issuer->simcall;
542 /* Debug information */
543 if (XBT_LOG_ISENABLED(mc_global, xbt_log_priority_debug)) {
544 req_str = MC_request_to_string(req, value, MC_REQUEST_SIMIX);
545 XBT_DEBUG("Replay (depth = %d) : %s (%p)", depth, req_str, state);
551 MC_simcall_handle(req, value);
552 MC_wait_for_requests();
555 /* Update statistics */
556 mc_stats->visited_pairs++;
557 mc_stats->executed_transitions++;
563 XBT_DEBUG("**** End Replay ****");
565 if (initial_global_state->raw_mem_set)
573 * \brief Dumps the contents of a model-checker's stack and shows the actual
575 * \param stack The stack to dump
577 void MC_dump_stack_safety(xbt_fifo_t stack)
579 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
581 MC_show_stack_safety(stack);
586 while ((state = (mc_state_t) xbt_fifo_pop(stack)) != NULL)
587 MC_state_delete(state, !state->in_visited_states ? 1 : 0);
588 mmalloc_set_current_heap(heap);
592 void MC_show_stack_safety(xbt_fifo_t stack)
594 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
598 xbt_fifo_item_t item;
600 char *req_str = NULL;
602 for (item = xbt_fifo_get_last_item(stack);
603 (item ? (state = (mc_state_t) (xbt_fifo_get_item_content(item)))
604 : (NULL)); item = xbt_fifo_get_prev_item(item)) {
605 req = MC_state_get_executed_request(state, &value);
607 req_str = MC_request_to_string(req, value, MC_REQUEST_EXECUTED);
608 XBT_INFO("%s", req_str);
613 mmalloc_set_current_heap(heap);
616 void MC_show_deadlock(smx_simcall_t req)
618 /*char *req_str = NULL; */
619 XBT_INFO("**************************");
620 XBT_INFO("*** DEAD-LOCK DETECTED ***");
621 XBT_INFO("**************************");
622 XBT_INFO("Locked request:");
623 /*req_str = MC_request_to_string(req);
624 XBT_INFO("%s", req_str);
625 xbt_free(req_str); */
626 XBT_INFO("Counter-example execution trace:");
627 MC_dump_stack_safety(mc_stack);
628 MC_print_statistics(mc_stats);
631 void MC_show_non_termination(void){
632 XBT_INFO("******************************************");
633 XBT_INFO("*** NON-PROGRESSIVE CYCLE DETECTED ***");
634 XBT_INFO("******************************************");
635 XBT_INFO("Counter-example execution trace:");
636 MC_dump_stack_safety(mc_stack);
637 MC_print_statistics(mc_stats);
641 void MC_show_stack_liveness(xbt_fifo_t stack)
645 xbt_fifo_item_t item;
647 char *req_str = NULL;
649 for (item = xbt_fifo_get_last_item(stack);
650 (item ? (pair = (mc_pair_t) (xbt_fifo_get_item_content(item))) : (NULL));
651 item = xbt_fifo_get_prev_item(item)) {
652 req = MC_state_get_executed_request(pair->graph_state, &value);
653 if (req && req->call != SIMCALL_NONE) {
654 req_str = MC_request_to_string(req, value, MC_REQUEST_EXECUTED);
655 XBT_INFO("%s", req_str);
662 void MC_dump_stack_liveness(xbt_fifo_t stack)
664 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
666 while ((pair = (mc_pair_t) xbt_fifo_pop(stack)) != NULL)
667 MC_pair_delete(pair);
668 mmalloc_set_current_heap(heap);
671 void MC_print_statistics(mc_stats_t stats)
673 if(_sg_mc_comms_determinism) {
674 if (!initial_global_state->recv_deterministic && initial_global_state->send_deterministic){
675 XBT_INFO("******************************************************");
676 XBT_INFO("**** Only-send-deterministic communication pattern ****");
677 XBT_INFO("******************************************************");
678 XBT_INFO("%s", initial_global_state->recv_diff);
679 }else if(!initial_global_state->send_deterministic && initial_global_state->recv_deterministic) {
680 XBT_INFO("******************************************************");
681 XBT_INFO("**** Only-recv-deterministic communication pattern ****");
682 XBT_INFO("******************************************************");
683 XBT_INFO("%s", initial_global_state->send_diff);
687 if (stats->expanded_pairs == 0) {
688 XBT_INFO("Expanded states = %lu", stats->expanded_states);
689 XBT_INFO("Visited states = %lu", stats->visited_states);
691 XBT_INFO("Expanded pairs = %lu", stats->expanded_pairs);
692 XBT_INFO("Visited pairs = %lu", stats->visited_pairs);
694 XBT_INFO("Executed transitions = %lu", stats->executed_transitions);
695 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
696 if ((_sg_mc_dot_output_file != NULL) && (_sg_mc_dot_output_file[0] != '\0')) {
697 fprintf(dot_output, "}\n");
700 if (initial_global_state != NULL && (_sg_mc_comms_determinism || _sg_mc_send_determinism)) {
701 XBT_INFO("Send-deterministic : %s", !initial_global_state->send_deterministic ? "No" : "Yes");
702 if (_sg_mc_comms_determinism)
703 XBT_INFO("Recv-deterministic : %s", !initial_global_state->recv_deterministic ? "No" : "Yes");
705 mmalloc_set_current_heap(heap);
708 void MC_automaton_load(const char *file)
710 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
712 if (_mc_property_automaton == NULL)
713 _mc_property_automaton = xbt_automaton_new();
715 xbt_automaton_load(_mc_property_automaton, file);
716 mmalloc_set_current_heap(heap);
719 static void register_symbol(xbt_automaton_propositional_symbol_t symbol)
721 if (mc_mode != MC_MODE_CLIENT)
723 s_mc_register_symbol_message_t message;
724 message.type = MC_MESSAGE_REGISTER_SYMBOL;
725 const char* name = xbt_automaton_propositional_symbol_get_name(symbol);
726 if (strlen(name) + 1 > sizeof(message.name))
727 xbt_die("Symbol is too long");
728 strncpy(message.name, name, sizeof(message.name));
729 message.callback = xbt_automaton_propositional_symbol_get_callback(symbol);
730 message.data = xbt_automaton_propositional_symbol_get_data(symbol);
731 MC_client_send_message(&message, sizeof(message));
734 void MC_automaton_new_propositional_symbol(const char *id, int(*fct)(void))
736 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
738 if (_mc_property_automaton == NULL)
739 _mc_property_automaton = xbt_automaton_new();
741 xbt_automaton_propositional_symbol_t symbol = xbt_automaton_propositional_symbol_new(_mc_property_automaton, id, fct);
742 register_symbol(symbol);
743 mmalloc_set_current_heap(heap);
746 void MC_automaton_new_propositional_symbol_pointer(const char *id, int* value)
748 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
749 if (_mc_property_automaton == NULL)
750 _mc_property_automaton = xbt_automaton_new();
751 xbt_automaton_propositional_symbol_t symbol = xbt_automaton_propositional_symbol_new_pointer(_mc_property_automaton, id, value);
752 register_symbol(symbol);
753 mmalloc_set_current_heap(heap);
756 void MC_automaton_new_propositional_symbol_callback(const char* id,
757 xbt_automaton_propositional_symbol_callback_type callback,
758 void* data, xbt_automaton_propositional_symbol_free_function_type free_function)
760 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
761 if (_mc_property_automaton == NULL)
762 _mc_property_automaton = xbt_automaton_new();
763 xbt_automaton_propositional_symbol_t symbol = xbt_automaton_propositional_symbol_new_callback(
764 _mc_property_automaton, id, callback, data, free_function);
765 register_symbol(symbol);
766 mmalloc_set_current_heap(heap);
769 void MC_dump_stacks(FILE* file)
771 xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
774 stack_region_t current_stack;
776 xbt_dynar_foreach(stacks_areas, cursor, current_stack) {
777 unw_context_t * context = (unw_context_t *)current_stack->context;
778 fprintf(file, "Stack %i:\n", nstack);
783 unw_init_local (&c, context);
786 const char * name = !unw_get_proc_name(&c, buffer, 100, &off) ? buffer : "?";
787 fprintf(file, " %i: %s\n", nframe, name);
789 } while(unw_step(&c));
793 mmalloc_set_current_heap(heap);
797 double MC_process_clock_get(smx_process_t process)
801 return mc_time[process->pid];
809 void MC_process_clock_add(smx_process_t process, double amount)
811 mc_time[process->pid] += amount;
814 void MC_report_assertion_error(void)
816 XBT_INFO("**************************");
817 XBT_INFO("*** PROPERTY NOT VALID ***");
818 XBT_INFO("**************************");
819 XBT_INFO("Counter-example execution trace:");
820 MC_record_dump_path(mc_stack);
821 MC_dump_stack_safety(mc_stack);
822 MC_print_statistics(mc_stats);