void __VERIFIER_atomic_take_write_lock() { __VERIFIER_assume(w==0 && r==0); w = 1; }
int main(int argc, char **argv) { //cseq: Copies of global variables __CS_type __CS_cp___CS_thread_status[__CS_ROUNDS][__CS_THREADS+1]; __CS_type *__CS_cp___CS_thread_lockedon[__CS_ROUNDS][__CS_THREADS+1]; int __CS_cp_i[__CS_ROUNDS]; int __CS_cp_j[__CS_ROUNDS]; //cseq: Copy statements for global variables: //cseq: for each global variable x, //cseq: copy into x[1...___CS_ROUNDS] <--- __CS_cp_x[1..___CS_ROUNDS]. //cseq: This is used to fill global variables with non-initialised data. __CS_thread_status[1][0] = __CS_cp___CS_thread_status[1][0]; //cseq: Copy of __CS_thread_status __CS_thread_status[2][0] = __CS_cp___CS_thread_status[2][0]; __CS_thread_status[3][0] = __CS_cp___CS_thread_status[3][0]; __CS_thread_status[4][0] = __CS_cp___CS_thread_status[4][0]; __CS_thread_status[5][0] = __CS_cp___CS_thread_status[5][0]; __CS_thread_status[1][1] = __CS_cp___CS_thread_status[1][1]; __CS_thread_status[2][1] = __CS_cp___CS_thread_status[2][1]; __CS_thread_status[3][1] = __CS_cp___CS_thread_status[3][1]; __CS_thread_status[4][1] = __CS_cp___CS_thread_status[4][1]; __CS_thread_status[5][1] = __CS_cp___CS_thread_status[5][1]; __CS_thread_status[1][2] = __CS_cp___CS_thread_status[1][2]; __CS_thread_status[2][2] = __CS_cp___CS_thread_status[2][2]; __CS_thread_status[3][2] = __CS_cp___CS_thread_status[3][2]; __CS_thread_status[4][2] = __CS_cp___CS_thread_status[4][2]; __CS_thread_status[5][2] = __CS_cp___CS_thread_status[5][2]; __CS_thread_lockedon[1][0] = __CS_cp___CS_thread_lockedon[1][0]; //cseq: Copy of __CS_thread_lockedon __CS_thread_lockedon[2][0] = __CS_cp___CS_thread_lockedon[2][0]; __CS_thread_lockedon[3][0] = __CS_cp___CS_thread_lockedon[3][0]; __CS_thread_lockedon[4][0] = __CS_cp___CS_thread_lockedon[4][0]; __CS_thread_lockedon[5][0] = __CS_cp___CS_thread_lockedon[5][0]; __CS_thread_lockedon[1][1] = __CS_cp___CS_thread_lockedon[1][1]; __CS_thread_lockedon[2][1] = __CS_cp___CS_thread_lockedon[2][1]; __CS_thread_lockedon[3][1] = __CS_cp___CS_thread_lockedon[3][1]; __CS_thread_lockedon[4][1] = __CS_cp___CS_thread_lockedon[4][1]; __CS_thread_lockedon[5][1] = __CS_cp___CS_thread_lockedon[5][1]; __CS_thread_lockedon[1][2] = __CS_cp___CS_thread_lockedon[1][2]; __CS_thread_lockedon[2][2] = __CS_cp___CS_thread_lockedon[2][2]; __CS_thread_lockedon[3][2] = __CS_cp___CS_thread_lockedon[3][2]; __CS_thread_lockedon[4][2] = __CS_cp___CS_thread_lockedon[4][2]; __CS_thread_lockedon[5][2] = __CS_cp___CS_thread_lockedon[5][2]; i[1] = __CS_cp_i[1]; //cseq: Copy of i i[2] = __CS_cp_i[2]; i[3] = __CS_cp_i[3]; i[4] = __CS_cp_i[4]; i[5] = __CS_cp_i[5]; j[1] = __CS_cp_j[1]; //cseq: Copy of j j[2] = __CS_cp_j[2]; j[3] = __CS_cp_j[3]; j[4] = __CS_cp_j[4]; j[5] = __CS_cp_j[5]; //cseq: create new thread for the main function __CS_round = 0; __CS_thread_index = 0; __CS_thread_born_round[0] = __CS_round; __CS_thread_status[0][0] = __THREAD_RUNNING; __CS_thread[0] = main_thread; __CS_thread_allocated[0] = 1; //cseq: simulation of the threads if (__CS_thread_allocated[0] == 1) { __CS_round = __CS_thread_born_round[0]; __CS_ret = 0; __CS_thread[0](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][0] = __THREAD_FINISHED; } if (__CS_thread_allocated[1] == 1) { __CS_round = __CS_thread_born_round[1]; __CS_ret = 0; __CS_thread[1](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][1] = __THREAD_FINISHED; } if (__CS_thread_allocated[2] == 1) { __CS_round = __CS_thread_born_round[2]; __CS_ret = 0; __CS_thread[2](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][2] = __THREAD_FINISHED; } //cseq: Consistency checks for global variables: //cseq: for each global variable x, //cseq: check that x[0...___CS_ROUNDS-1] == __CS_cp_x[1..___CS_ROUNDS]. __VERIFIER_assume(__CS_thread_status[0][0] == __CS_cp___CS_thread_status[1][0]); //cseq: Consistency of __CS_thread_status __VERIFIER_assume(__CS_thread_status[1][0] == __CS_cp___CS_thread_status[2][0]); __VERIFIER_assume(__CS_thread_status[2][0] == __CS_cp___CS_thread_status[3][0]); __VERIFIER_assume(__CS_thread_status[3][0] == __CS_cp___CS_thread_status[4][0]); __VERIFIER_assume(__CS_thread_status[4][0] == __CS_cp___CS_thread_status[5][0]); __VERIFIER_assume(__CS_thread_status[0][1] == __CS_cp___CS_thread_status[1][1]); __VERIFIER_assume(__CS_thread_status[1][1] == __CS_cp___CS_thread_status[2][1]); __VERIFIER_assume(__CS_thread_status[2][1] == __CS_cp___CS_thread_status[3][1]); __VERIFIER_assume(__CS_thread_status[3][1] == __CS_cp___CS_thread_status[4][1]); __VERIFIER_assume(__CS_thread_status[4][1] == __CS_cp___CS_thread_status[5][1]); __VERIFIER_assume(__CS_thread_status[0][2] == __CS_cp___CS_thread_status[1][2]); __VERIFIER_assume(__CS_thread_status[1][2] == __CS_cp___CS_thread_status[2][2]); __VERIFIER_assume(__CS_thread_status[2][2] == __CS_cp___CS_thread_status[3][2]); __VERIFIER_assume(__CS_thread_status[3][2] == __CS_cp___CS_thread_status[4][2]); __VERIFIER_assume(__CS_thread_status[4][2] == __CS_cp___CS_thread_status[5][2]); __VERIFIER_assume(__CS_thread_lockedon[0][0] == __CS_cp___CS_thread_lockedon[1][0]); //cseq: Consistency of __CS_thread_lockedon __VERIFIER_assume(__CS_thread_lockedon[1][0] == __CS_cp___CS_thread_lockedon[2][0]); __VERIFIER_assume(__CS_thread_lockedon[2][0] == __CS_cp___CS_thread_lockedon[3][0]); __VERIFIER_assume(__CS_thread_lockedon[3][0] == __CS_cp___CS_thread_lockedon[4][0]); __VERIFIER_assume(__CS_thread_lockedon[4][0] == __CS_cp___CS_thread_lockedon[5][0]); __VERIFIER_assume(__CS_thread_lockedon[0][1] == __CS_cp___CS_thread_lockedon[1][1]); __VERIFIER_assume(__CS_thread_lockedon[1][1] == __CS_cp___CS_thread_lockedon[2][1]); __VERIFIER_assume(__CS_thread_lockedon[2][1] == __CS_cp___CS_thread_lockedon[3][1]); __VERIFIER_assume(__CS_thread_lockedon[3][1] == __CS_cp___CS_thread_lockedon[4][1]); __VERIFIER_assume(__CS_thread_lockedon[4][1] == __CS_cp___CS_thread_lockedon[5][1]); __VERIFIER_assume(__CS_thread_lockedon[0][2] == __CS_cp___CS_thread_lockedon[1][2]); __VERIFIER_assume(__CS_thread_lockedon[1][2] == __CS_cp___CS_thread_lockedon[2][2]); __VERIFIER_assume(__CS_thread_lockedon[2][2] == __CS_cp___CS_thread_lockedon[3][2]); __VERIFIER_assume(__CS_thread_lockedon[3][2] == __CS_cp___CS_thread_lockedon[4][2]); __VERIFIER_assume(__CS_thread_lockedon[4][2] == __CS_cp___CS_thread_lockedon[5][2]); __VERIFIER_assume(i[0] == __CS_cp_i[1]); //cseq: Consistency of i __VERIFIER_assume(i[1] == __CS_cp_i[2]); __VERIFIER_assume(i[2] == __CS_cp_i[3]); __VERIFIER_assume(i[3] == __CS_cp_i[4]); __VERIFIER_assume(i[4] == __CS_cp_i[5]); __VERIFIER_assume(j[0] == __CS_cp_j[1]); //cseq: Consistency of j __VERIFIER_assume(j[1] == __CS_cp_j[2]); __VERIFIER_assume(j[2] == __CS_cp_j[3]); __VERIFIER_assume(j[3] == __CS_cp_j[4]); __VERIFIER_assume(j[4] == __CS_cp_j[5]); //cseq: Error check __VERIFIER_assert(__CS_error_detail != __ERR_MAXTHREADS_REACHED); __VERIFIER_assert(__CS_error_detail != __ERR_ASSERT_FAILURE); __VERIFIER_assert(__CS_error_detail != __ERR_ERROR_LABEL_REACHED); __VERIFIER_assert(__CS_error_detail != __ERR_UNLOCK_ATTEMPT); __VERIFIER_assert(__CS_error_detail != __ERR_JOIN_FAILED_WRONG_THREAD_ID); __VERIFIER_assert(__CS_error_detail != __ERR_JOIN_FAILED_THREAD_NOT_CREATED); __VERIFIER_assert(__CS_error != 1); }
int main(void) { int c1 ; int i2 ; { c1 = 0; ep12 = __VERIFIER_nondet__Bool(); ep13 = __VERIFIER_nondet__Bool(); ep21 = __VERIFIER_nondet__Bool(); ep23 = __VERIFIER_nondet__Bool(); ep31 = __VERIFIER_nondet__Bool(); ep32 = __VERIFIER_nondet__Bool(); id1 = __VERIFIER_nondet_char(); r1 = __VERIFIER_nondet_char(); st1 = __VERIFIER_nondet_char(); nl1 = __VERIFIER_nondet_char(); m1 = __VERIFIER_nondet_char(); max1 = __VERIFIER_nondet_char(); mode1 = __VERIFIER_nondet__Bool(); id2 = __VERIFIER_nondet_char(); r2 = __VERIFIER_nondet_char(); st2 = __VERIFIER_nondet_char(); nl2 = __VERIFIER_nondet_char(); m2 = __VERIFIER_nondet_char(); max2 = __VERIFIER_nondet_char(); mode2 = __VERIFIER_nondet__Bool(); id3 = __VERIFIER_nondet_char(); r3 = __VERIFIER_nondet_char(); st3 = __VERIFIER_nondet_char(); nl3 = __VERIFIER_nondet_char(); m3 = __VERIFIER_nondet_char(); max3 = __VERIFIER_nondet_char(); mode3 = __VERIFIER_nondet__Bool(); i2 = init(); __VERIFIER_assume(i2); p12_old = nomsg; p12_new = nomsg; p13_old = nomsg; p13_new = nomsg; p21_old = nomsg; p21_new = nomsg; p23_old = nomsg; p23_new = nomsg; p31_old = nomsg; p31_new = nomsg; p32_old = nomsg; p32_new = nomsg; i2 = 0; while (1) { { node1(); node2(); node3(); p12_old = p12_new; p12_new = nomsg; p13_old = p13_new; p13_new = nomsg; p21_old = p21_new; p21_new = nomsg; p23_old = p23_new; p23_new = nomsg; p31_old = p31_new; p31_new = nomsg; p32_old = p32_new; p32_new = nomsg; c1 = check(); assert(c1); } } } return 0; }
int main(void) { int c1 ; int i2 ; { c1 = 0; side1Failed = __VERIFIER_nondet_bool(); side2Failed = __VERIFIER_nondet_bool(); side1_written = __VERIFIER_nondet_char(); side2_written = __VERIFIER_nondet_char(); side1Failed_History_0 = __VERIFIER_nondet_bool(); side1Failed_History_1 = __VERIFIER_nondet_bool(); side1Failed_History_2 = __VERIFIER_nondet_bool(); side2Failed_History_0 = __VERIFIER_nondet_bool(); side2Failed_History_1 = __VERIFIER_nondet_bool(); side2Failed_History_2 = __VERIFIER_nondet_bool(); active_side_History_0 = __VERIFIER_nondet_char(); active_side_History_1 = __VERIFIER_nondet_char(); active_side_History_2 = __VERIFIER_nondet_char(); manual_selection_History_0 = __VERIFIER_nondet_char(); manual_selection_History_1 = __VERIFIER_nondet_char(); manual_selection_History_2 = __VERIFIER_nondet_char(); i2 = init(); __VERIFIER_assume(i2); cs1_old = nomsg; cs1_new = nomsg; cs2_old = nomsg; cs2_new = nomsg; s1s2_old = nomsg; s1s2_new = nomsg; s1s1_old = nomsg; s1s1_new = nomsg; s2s1_old = nomsg; s2s1_new = nomsg; s2s2_old = nomsg; s2s2_new = nomsg; s1p_old = nomsg; s1p_new = nomsg; s2p_old = nomsg; s2p_new = nomsg; i2 = 0; while (i2 < 10) { { Console_task_each_pals_period(); Side1_activestandby_task_each_pals_period(); Side2_activestandby_task_each_pals_period(); Pendulum_prism_task_each_pals_period(); cs1_old = cs1_new; cs1_new = nomsg; cs2_old = cs2_new; cs2_new = nomsg; s1s2_old = s1s2_new; s1s2_new = nomsg; s1s1_old = s1s1_new; s1s1_new = nomsg; s2s1_old = s2s1_new; s2s1_new = nomsg; s2s2_old = s2s2_new; s2s2_new = nomsg; s1p_old = s1p_new; s1p_new = nomsg; s2p_old = s2p_new; s2p_new = nomsg; c1 = check(); assert(c1); i2 ++; } } } return 0; }
int main() { pthread_t t1804; pthread_create(&t1804, NULL, P0, NULL); pthread_t t1805; pthread_create(&t1805, NULL, P1, NULL); pthread_t t1806; pthread_create(&t1806, NULL, P2, NULL); __VERIFIER_atomic_begin(); main$tmp_guard0 = __unbuffered_cnt == 3; __VERIFIER_atomic_end(); __VERIFIER_assume(main$tmp_guard0); __VERIFIER_atomic_begin(); x = x$w_buff0_used && x$r_buff0_thd0 ? x$w_buff0 : (x$w_buff1_used && x$r_buff1_thd0 ? x$w_buff1 : x); x$w_buff0_used = x$w_buff0_used && x$r_buff0_thd0 ? FALSE : x$w_buff0_used; x$w_buff1_used = x$w_buff0_used && x$r_buff0_thd0 || x$w_buff1_used && x$r_buff1_thd0 ? FALSE : x$w_buff1_used; x$r_buff0_thd0 = x$w_buff0_used && x$r_buff0_thd0 ? FALSE : x$r_buff0_thd0; x$r_buff1_thd0 = x$w_buff0_used && x$r_buff0_thd0 || x$w_buff1_used && x$r_buff1_thd0 ? FALSE : x$r_buff1_thd0; __VERIFIER_atomic_end(); __VERIFIER_atomic_begin(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ weak$$choice0 = __VERIFIER_nondet_pointer(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ weak$$choice2 = __VERIFIER_nondet_pointer(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$flush_delayed = weak$$choice2; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$mem_tmp = x; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x = !x$w_buff0_used || !x$r_buff0_thd0 && !x$w_buff1_used || !x$r_buff0_thd0 && !x$r_buff1_thd0 ? x : (x$w_buff0_used && x$r_buff0_thd0 ? x$w_buff0 : x$w_buff1); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$w_buff0 = weak$$choice2 ? x$w_buff0 : (!x$w_buff0_used || !x$r_buff0_thd0 && !x$w_buff1_used || !x$r_buff0_thd0 && !x$r_buff1_thd0 ? x$w_buff0 : (x$w_buff0_used && x$r_buff0_thd0 ? x$w_buff0 : x$w_buff0)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$w_buff1 = weak$$choice2 ? x$w_buff1 : (!x$w_buff0_used || !x$r_buff0_thd0 && !x$w_buff1_used || !x$r_buff0_thd0 && !x$r_buff1_thd0 ? x$w_buff1 : (x$w_buff0_used && x$r_buff0_thd0 ? x$w_buff1 : x$w_buff1)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$w_buff0_used = weak$$choice2 ? x$w_buff0_used : (!x$w_buff0_used || !x$r_buff0_thd0 && !x$w_buff1_used || !x$r_buff0_thd0 && !x$r_buff1_thd0 ? x$w_buff0_used : (x$w_buff0_used && x$r_buff0_thd0 ? FALSE : x$w_buff0_used)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$w_buff1_used = weak$$choice2 ? x$w_buff1_used : (!x$w_buff0_used || !x$r_buff0_thd0 && !x$w_buff1_used || !x$r_buff0_thd0 && !x$r_buff1_thd0 ? x$w_buff1_used : (x$w_buff0_used && x$r_buff0_thd0 ? FALSE : FALSE)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$r_buff0_thd0 = weak$$choice2 ? x$r_buff0_thd0 : (!x$w_buff0_used || !x$r_buff0_thd0 && !x$w_buff1_used || !x$r_buff0_thd0 && !x$r_buff1_thd0 ? x$r_buff0_thd0 : (x$w_buff0_used && x$r_buff0_thd0 ? FALSE : x$r_buff0_thd0)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$r_buff1_thd0 = weak$$choice2 ? x$r_buff1_thd0 : (!x$w_buff0_used || !x$r_buff0_thd0 && !x$w_buff1_used || !x$r_buff0_thd0 && !x$r_buff1_thd0 ? x$r_buff1_thd0 : (x$w_buff0_used && x$r_buff0_thd0 ? FALSE : FALSE)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ main$tmp_guard1 = !(x == 2 && y == 2 && __unbuffered_p0_EAX == 2 && __unbuffered_p2_EAX == 1); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x = x$flush_delayed ? x$mem_tmp : x; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ x$flush_delayed = FALSE; __VERIFIER_atomic_end(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ __VERIFIER_assert(main$tmp_guard1); return 0; }
int main() { pthread_t t2015; pthread_create(&t2015, NULL, P0, NULL); pthread_t t2016; pthread_create(&t2016, NULL, P1, NULL); __VERIFIER_atomic_begin(); main$tmp_guard0 = __unbuffered_cnt == 2; __VERIFIER_atomic_end(); __VERIFIER_assume(main$tmp_guard0); __VERIFIER_atomic_begin(); y = y$w_buff0_used && y$r_buff0_thd0 ? y$w_buff0 : (y$w_buff1_used && y$r_buff1_thd0 ? y$w_buff1 : y); y$w_buff0_used = y$w_buff0_used && y$r_buff0_thd0 ? FALSE : y$w_buff0_used; y$w_buff1_used = y$w_buff0_used && y$r_buff0_thd0 || y$w_buff1_used && y$r_buff1_thd0 ? FALSE : y$w_buff1_used; y$r_buff0_thd0 = y$w_buff0_used && y$r_buff0_thd0 ? FALSE : y$r_buff0_thd0; y$r_buff1_thd0 = y$w_buff0_used && y$r_buff0_thd0 || y$w_buff1_used && y$r_buff1_thd0 ? FALSE : y$r_buff1_thd0; __VERIFIER_atomic_end(); __VERIFIER_atomic_begin(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ weak$$choice0 = __VERIFIER_nondet_pointer(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ weak$$choice2 = __VERIFIER_nondet_pointer(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$flush_delayed = weak$$choice2; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$mem_tmp = y; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y = !y$w_buff0_used || !y$r_buff0_thd0 && !y$w_buff1_used || !y$r_buff0_thd0 && !y$r_buff1_thd0 ? y : (y$w_buff0_used && y$r_buff0_thd0 ? y$w_buff0 : y$w_buff1); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$w_buff0 = weak$$choice2 ? y$w_buff0 : (!y$w_buff0_used || !y$r_buff0_thd0 && !y$w_buff1_used || !y$r_buff0_thd0 && !y$r_buff1_thd0 ? y$w_buff0 : (y$w_buff0_used && y$r_buff0_thd0 ? y$w_buff0 : y$w_buff0)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$w_buff1 = weak$$choice2 ? y$w_buff1 : (!y$w_buff0_used || !y$r_buff0_thd0 && !y$w_buff1_used || !y$r_buff0_thd0 && !y$r_buff1_thd0 ? y$w_buff1 : (y$w_buff0_used && y$r_buff0_thd0 ? y$w_buff1 : y$w_buff1)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$w_buff0_used = weak$$choice2 ? y$w_buff0_used : (!y$w_buff0_used || !y$r_buff0_thd0 && !y$w_buff1_used || !y$r_buff0_thd0 && !y$r_buff1_thd0 ? y$w_buff0_used : (y$w_buff0_used && y$r_buff0_thd0 ? FALSE : y$w_buff0_used)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$w_buff1_used = weak$$choice2 ? y$w_buff1_used : (!y$w_buff0_used || !y$r_buff0_thd0 && !y$w_buff1_used || !y$r_buff0_thd0 && !y$r_buff1_thd0 ? y$w_buff1_used : (y$w_buff0_used && y$r_buff0_thd0 ? FALSE : FALSE)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$r_buff0_thd0 = weak$$choice2 ? y$r_buff0_thd0 : (!y$w_buff0_used || !y$r_buff0_thd0 && !y$w_buff1_used || !y$r_buff0_thd0 && !y$r_buff1_thd0 ? y$r_buff0_thd0 : (y$w_buff0_used && y$r_buff0_thd0 ? FALSE : y$r_buff0_thd0)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$r_buff1_thd0 = weak$$choice2 ? y$r_buff1_thd0 : (!y$w_buff0_used || !y$r_buff0_thd0 && !y$w_buff1_used || !y$r_buff0_thd0 && !y$r_buff1_thd0 ? y$r_buff1_thd0 : (y$w_buff0_used && y$r_buff0_thd0 ? FALSE : FALSE)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ main$tmp_guard1 = !(y == 2 && __unbuffered_p1_EAX == 1); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y = y$flush_delayed ? y$mem_tmp : y; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ y$flush_delayed = FALSE; __VERIFIER_atomic_end(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ __VERIFIER_assert(main$tmp_guard1); return 0; }
int main() { //cseq: Copies of global variables __CS_type __CS_cp___CS_thread_status[__CS_ROUNDS][__CS_THREADS+1]; __CS_type *__CS_cp___CS_thread_lockedon[__CS_ROUNDS][__CS_THREADS+1]; int __CS_cp_num[__CS_ROUNDS]; __CS_pthread_mutex_t __CS_cp_m[__CS_ROUNDS]; __CS_pthread_cond_t __CS_cp_empty[__CS_ROUNDS]; __CS_pthread_cond_t __CS_cp_full[__CS_ROUNDS]; //cseq: Copy statements for global variables: //cseq: for each global variable x, //cseq: copy into x[1...___CS_ROUNDS] <--- __CS_cp_x[1..___CS_ROUNDS]. //cseq: This is used to fill global variables with non-initialised data. __CS_thread_status[1][0] = __CS_cp___CS_thread_status[1][0]; //cseq: Copy of __CS_thread_status __CS_thread_status[1][1] = __CS_cp___CS_thread_status[1][1]; __CS_thread_status[1][2] = __CS_cp___CS_thread_status[1][2]; __CS_thread_lockedon[1][0] = __CS_cp___CS_thread_lockedon[1][0]; //cseq: Copy of __CS_thread_lockedon __CS_thread_lockedon[1][1] = __CS_cp___CS_thread_lockedon[1][1]; __CS_thread_lockedon[1][2] = __CS_cp___CS_thread_lockedon[1][2]; num[1] = __CS_cp_num[1]; //cseq: Copy of num m[1] = __CS_cp_m[1]; //cseq: Copy of m empty[1] = __CS_cp_empty[1]; //cseq: Copy of empty full[1] = __CS_cp_full[1]; //cseq: Copy of full //cseq: create new thread for the main function __CS_round = 0; __CS_thread_index = 0; __CS_thread_born_round[0] = __CS_round; __CS_thread_status[0][0] = __THREAD_RUNNING; __CS_thread[0] = main_thread; __CS_thread_allocated[0] = 1; //cseq: simulation of the threads if (__CS_thread_allocated[0] == 1) { __CS_round = __CS_thread_born_round[0]; __CS_ret = 0; __CS_thread[0](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][0] = __THREAD_FINISHED; } if (__CS_thread_allocated[1] == 1) { __CS_round = __CS_thread_born_round[1]; __CS_ret = 0; __CS_thread[1](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][1] = __THREAD_FINISHED; } if (__CS_thread_allocated[2] == 1) { __CS_round = __CS_thread_born_round[2]; __CS_ret = 0; __CS_thread[2](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][2] = __THREAD_FINISHED; } //cseq: Consistency checks for global variables: //cseq: for each global variable x, //cseq: check that x[0...___CS_ROUNDS-1] == __CS_cp_x[1..___CS_ROUNDS]. __VERIFIER_assume(__CS_thread_status[0][0] == __CS_cp___CS_thread_status[1][0]); //cseq: Consistency of __CS_thread_status __VERIFIER_assume(__CS_thread_status[0][1] == __CS_cp___CS_thread_status[1][1]); __VERIFIER_assume(__CS_thread_status[0][2] == __CS_cp___CS_thread_status[1][2]); __VERIFIER_assume(__CS_thread_lockedon[0][0] == __CS_cp___CS_thread_lockedon[1][0]); //cseq: Consistency of __CS_thread_lockedon __VERIFIER_assume(__CS_thread_lockedon[0][1] == __CS_cp___CS_thread_lockedon[1][1]); __VERIFIER_assume(__CS_thread_lockedon[0][2] == __CS_cp___CS_thread_lockedon[1][2]); __VERIFIER_assume(num[0] == __CS_cp_num[1]); //cseq: Consistency of num __VERIFIER_assume(m[0] == __CS_cp_m[1]); //cseq: Consistency of m __VERIFIER_assume(empty[0] == __CS_cp_empty[1]); //cseq: Consistency of empty __VERIFIER_assume(full[0] == __CS_cp_full[1]); //cseq: Consistency of full //cseq: Error check __VERIFIER_assert(__CS_error != 1); }
void acquire() { __VERIFIER_atomic_begin(); __VERIFIER_assume(lock == 0); lock = 1; __VERIFIER_atomic_end(); }
void release() { __VERIFIER_atomic_begin(); __VERIFIER_assume(lock == 1); lock = 0; __VERIFIER_atomic_end(); }
void main(void) { int c1 ; int i2 ; { c1 = 0; r1 = __VERIFIER_nondet_char(); id1 = __VERIFIER_nondet_char(); st1 = __VERIFIER_nondet_char(); send1 = __VERIFIER_nondet_msg_t(); mode1 = __VERIFIER_nondet__Bool(); id2 = __VERIFIER_nondet_char(); st2 = __VERIFIER_nondet_char(); send2 = __VERIFIER_nondet_msg_t(); mode2 = __VERIFIER_nondet__Bool(); id3 = __VERIFIER_nondet_char(); st3 = __VERIFIER_nondet_char(); send3 = __VERIFIER_nondet_msg_t(); mode3 = __VERIFIER_nondet__Bool(); id4 = __VERIFIER_nondet_char(); st4 = __VERIFIER_nondet_char(); send4 = __VERIFIER_nondet_msg_t(); mode4 = __VERIFIER_nondet__Bool(); id5 = __VERIFIER_nondet_char(); st5 = __VERIFIER_nondet_char(); send5 = __VERIFIER_nondet_msg_t(); mode5 = __VERIFIER_nondet__Bool(); i2 = init(); __VERIFIER_assume(i2); p1_old = nomsg; p1_new = nomsg; p2_old = nomsg; p2_new = nomsg; p3_old = nomsg; p3_new = nomsg; p4_old = nomsg; p4_new = nomsg; p5_old = nomsg; p5_new = nomsg; i2 = 0; while (1) { { node1(); node2(); node3(); node4(); node5(); p1_old = p1_new; p1_new = nomsg; p2_old = p2_new; p2_new = nomsg; p3_old = p3_new; p3_new = nomsg; p4_old = p4_new; p4_new = nomsg; p5_old = p5_new; p5_new = nomsg; c1 = check(); assert(c1); } } } }
int main(void) { //cseq: Copies of global variables __CS_type __CS_cp___CS_thread_status[__CS_ROUNDS][__CS_THREADS+1]; __CS_type *__CS_cp___CS_thread_lockedon[__CS_ROUNDS][__CS_THREADS+1]; __CS_pthread_mutex_t __CS_cp_m[__CS_ROUNDS]; int __CS_cp_stored_elements[__CS_ROUNDS][20]; _Bool __CS_cp_enqueue_flag[__CS_ROUNDS]; _Bool __CS_cp_dequeue_flag[__CS_ROUNDS]; QType __CS_cp_queue[__CS_ROUNDS]; //cseq: Copy statements for global variables: //cseq: for each global variable x, //cseq: copy into x[1...___CS_ROUNDS] <--- __CS_cp_x[1..___CS_ROUNDS]. //cseq: This is used to fill global variables with non-initialised data. __CS_thread_status[1][0] = __CS_cp___CS_thread_status[1][0]; //cseq: Copy of __CS_thread_status __CS_thread_status[1][1] = __CS_cp___CS_thread_status[1][1]; __CS_thread_status[1][2] = __CS_cp___CS_thread_status[1][2]; __CS_thread_lockedon[1][0] = __CS_cp___CS_thread_lockedon[1][0]; //cseq: Copy of __CS_thread_lockedon __CS_thread_lockedon[1][1] = __CS_cp___CS_thread_lockedon[1][1]; __CS_thread_lockedon[1][2] = __CS_cp___CS_thread_lockedon[1][2]; m[1] = __CS_cp_m[1]; //cseq: Copy of m stored_elements[1][0] = __CS_cp_stored_elements[1][0]; //cseq: Copy of stored_elements stored_elements[1][1] = __CS_cp_stored_elements[1][1]; stored_elements[1][2] = __CS_cp_stored_elements[1][2]; stored_elements[1][3] = __CS_cp_stored_elements[1][3]; stored_elements[1][4] = __CS_cp_stored_elements[1][4]; stored_elements[1][5] = __CS_cp_stored_elements[1][5]; stored_elements[1][6] = __CS_cp_stored_elements[1][6]; stored_elements[1][7] = __CS_cp_stored_elements[1][7]; stored_elements[1][8] = __CS_cp_stored_elements[1][8]; stored_elements[1][9] = __CS_cp_stored_elements[1][9]; stored_elements[1][10] = __CS_cp_stored_elements[1][10]; stored_elements[1][11] = __CS_cp_stored_elements[1][11]; stored_elements[1][12] = __CS_cp_stored_elements[1][12]; stored_elements[1][13] = __CS_cp_stored_elements[1][13]; stored_elements[1][14] = __CS_cp_stored_elements[1][14]; stored_elements[1][15] = __CS_cp_stored_elements[1][15]; stored_elements[1][16] = __CS_cp_stored_elements[1][16]; stored_elements[1][17] = __CS_cp_stored_elements[1][17]; stored_elements[1][18] = __CS_cp_stored_elements[1][18]; stored_elements[1][19] = __CS_cp_stored_elements[1][19]; enqueue_flag[1] = __CS_cp_enqueue_flag[1]; //cseq: Copy of enqueue_flag dequeue_flag[1] = __CS_cp_dequeue_flag[1]; //cseq: Copy of dequeue_flag queue[1].element[0] = __CS_cp_queue[1].element[0]; //cseq: Copy of queue queue[1].element[1] = __CS_cp_queue[1].element[1]; queue[1].element[2] = __CS_cp_queue[1].element[2]; queue[1].element[3] = __CS_cp_queue[1].element[3]; queue[1].element[4] = __CS_cp_queue[1].element[4]; queue[1].element[5] = __CS_cp_queue[1].element[5]; queue[1].element[6] = __CS_cp_queue[1].element[6]; queue[1].element[7] = __CS_cp_queue[1].element[7]; queue[1].element[8] = __CS_cp_queue[1].element[8]; queue[1].element[9] = __CS_cp_queue[1].element[9]; queue[1].element[10] = __CS_cp_queue[1].element[10]; queue[1].element[11] = __CS_cp_queue[1].element[11]; queue[1].element[12] = __CS_cp_queue[1].element[12]; queue[1].element[13] = __CS_cp_queue[1].element[13]; queue[1].element[14] = __CS_cp_queue[1].element[14]; queue[1].element[15] = __CS_cp_queue[1].element[15]; queue[1].element[16] = __CS_cp_queue[1].element[16]; queue[1].element[17] = __CS_cp_queue[1].element[17]; queue[1].element[18] = __CS_cp_queue[1].element[18]; queue[1].element[19] = __CS_cp_queue[1].element[19]; queue[1].head = __CS_cp_queue[1].head; queue[1].tail = __CS_cp_queue[1].tail; queue[1].amount = __CS_cp_queue[1].amount; //cseq: create new thread for the main function __CS_round = 0; __CS_thread_index = 0; __CS_thread_born_round[0] = __CS_round; __CS_thread_status[0][0] = __THREAD_RUNNING; __CS_thread[0] = main_thread; __CS_thread_allocated[0] = 1; //cseq: simulation of the threads if (__CS_thread_allocated[0] == 1) { __CS_round = __CS_thread_born_round[0]; __CS_ret = 0; __CS_thread[0](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][0] = __THREAD_FINISHED; } if (__CS_thread_allocated[1] == 1) { __CS_round = __CS_thread_born_round[1]; __CS_ret = 0; __CS_thread[1](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][1] = __THREAD_FINISHED; } if (__CS_thread_allocated[2] == 1) { __CS_round = __CS_thread_born_round[2]; __CS_ret = 0; __CS_thread[2](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][2] = __THREAD_FINISHED; } //cseq: Consistency checks for global variables: //cseq: for each global variable x, //cseq: check that x[0...___CS_ROUNDS-1] == __CS_cp_x[1..___CS_ROUNDS]. __VERIFIER_assume(__CS_thread_status[0][0] == __CS_cp___CS_thread_status[1][0]); //cseq: Consistency of __CS_thread_status __VERIFIER_assume(__CS_thread_status[0][1] == __CS_cp___CS_thread_status[1][1]); __VERIFIER_assume(__CS_thread_status[0][2] == __CS_cp___CS_thread_status[1][2]); __VERIFIER_assume(__CS_thread_lockedon[0][0] == __CS_cp___CS_thread_lockedon[1][0]); //cseq: Consistency of __CS_thread_lockedon __VERIFIER_assume(__CS_thread_lockedon[0][1] == __CS_cp___CS_thread_lockedon[1][1]); __VERIFIER_assume(__CS_thread_lockedon[0][2] == __CS_cp___CS_thread_lockedon[1][2]); __VERIFIER_assume(m[0] == __CS_cp_m[1]); //cseq: Consistency of m __VERIFIER_assume(stored_elements[0][0] == __CS_cp_stored_elements[1][0]); //cseq: Consistency of stored_elements __VERIFIER_assume(stored_elements[0][1] == __CS_cp_stored_elements[1][1]); __VERIFIER_assume(stored_elements[0][2] == __CS_cp_stored_elements[1][2]); __VERIFIER_assume(stored_elements[0][3] == __CS_cp_stored_elements[1][3]); __VERIFIER_assume(stored_elements[0][4] == __CS_cp_stored_elements[1][4]); __VERIFIER_assume(stored_elements[0][5] == __CS_cp_stored_elements[1][5]); __VERIFIER_assume(stored_elements[0][6] == __CS_cp_stored_elements[1][6]); __VERIFIER_assume(stored_elements[0][7] == __CS_cp_stored_elements[1][7]); __VERIFIER_assume(stored_elements[0][8] == __CS_cp_stored_elements[1][8]); __VERIFIER_assume(stored_elements[0][9] == __CS_cp_stored_elements[1][9]); __VERIFIER_assume(stored_elements[0][10] == __CS_cp_stored_elements[1][10]); __VERIFIER_assume(stored_elements[0][11] == __CS_cp_stored_elements[1][11]); __VERIFIER_assume(stored_elements[0][12] == __CS_cp_stored_elements[1][12]); __VERIFIER_assume(stored_elements[0][13] == __CS_cp_stored_elements[1][13]); __VERIFIER_assume(stored_elements[0][14] == __CS_cp_stored_elements[1][14]); __VERIFIER_assume(stored_elements[0][15] == __CS_cp_stored_elements[1][15]); __VERIFIER_assume(stored_elements[0][16] == __CS_cp_stored_elements[1][16]); __VERIFIER_assume(stored_elements[0][17] == __CS_cp_stored_elements[1][17]); __VERIFIER_assume(stored_elements[0][18] == __CS_cp_stored_elements[1][18]); __VERIFIER_assume(stored_elements[0][19] == __CS_cp_stored_elements[1][19]); __VERIFIER_assume(enqueue_flag[0] == __CS_cp_enqueue_flag[1]); //cseq: Consistency of enqueue_flag __VERIFIER_assume(dequeue_flag[0] == __CS_cp_dequeue_flag[1]); //cseq: Consistency of dequeue_flag __VERIFIER_assume(queue[0].element[0] == __CS_cp_queue[1].element[0]); //cseq: Consistency of queue __VERIFIER_assume(queue[0].element[1] == __CS_cp_queue[1].element[1]); __VERIFIER_assume(queue[0].element[2] == __CS_cp_queue[1].element[2]); __VERIFIER_assume(queue[0].element[3] == __CS_cp_queue[1].element[3]); __VERIFIER_assume(queue[0].element[4] == __CS_cp_queue[1].element[4]); __VERIFIER_assume(queue[0].element[5] == __CS_cp_queue[1].element[5]); __VERIFIER_assume(queue[0].element[6] == __CS_cp_queue[1].element[6]); __VERIFIER_assume(queue[0].element[7] == __CS_cp_queue[1].element[7]); __VERIFIER_assume(queue[0].element[8] == __CS_cp_queue[1].element[8]); __VERIFIER_assume(queue[0].element[9] == __CS_cp_queue[1].element[9]); __VERIFIER_assume(queue[0].element[10] == __CS_cp_queue[1].element[10]); __VERIFIER_assume(queue[0].element[11] == __CS_cp_queue[1].element[11]); __VERIFIER_assume(queue[0].element[12] == __CS_cp_queue[1].element[12]); __VERIFIER_assume(queue[0].element[13] == __CS_cp_queue[1].element[13]); __VERIFIER_assume(queue[0].element[14] == __CS_cp_queue[1].element[14]); __VERIFIER_assume(queue[0].element[15] == __CS_cp_queue[1].element[15]); __VERIFIER_assume(queue[0].element[16] == __CS_cp_queue[1].element[16]); __VERIFIER_assume(queue[0].element[17] == __CS_cp_queue[1].element[17]); __VERIFIER_assume(queue[0].element[18] == __CS_cp_queue[1].element[18]); __VERIFIER_assume(queue[0].element[19] == __CS_cp_queue[1].element[19]); __VERIFIER_assume(queue[0].head == __CS_cp_queue[1].head); __VERIFIER_assume(queue[0].tail == __CS_cp_queue[1].tail); __VERIFIER_assume(queue[0].amount == __CS_cp_queue[1].amount); //cseq: Error check __VERIFIER_assert(__CS_error != 1); }
int calculate_output(int input) { if(((( 80 < a12 && (a24==1)) && (a15==7)) && (a21==6))){ error_54: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==7)) && (a21==8))){ error_41: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==5)) && (a21==9))){ error_12: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==5)) && (a21==9))){ error_2: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==6)) && (a21==10))){ error_28: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==7)) && (a21==6))){ error_44: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==5)) && (a21==10))){ error_8: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==6)) && (a21==9))){ error_22: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==7)) && (a21==10))){ error_58: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==7)) && (a21==10))){ error_43: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==6)) && (a21==6))){ error_29: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==7)) && (a21==8))){ error_56: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==6)) && (a21==9))){ error_37: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==7)) && (a21==7))){ error_40: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==5)) && (a21==10))){ error_18: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==5)) && (a21==8))){ error_11: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==7)) && (a21==9))){ error_52: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==6)) && (a21==8))){ error_31: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==5)) && (a21==10))){ error_13: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==7)) && (a21==6))){ error_39: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==5)) && (a21==6))){ error_14: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==6)) && (a21==6))){ error_34: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==5)) && (a21==7))){ error_10: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==6)) && (a21==9))){ error_27: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==7)) && (a21==9))){ error_57: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==5)) && (a21==6))){ globalError: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==6)) && (a21==10))){ error_23: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==7)) && (a21==9))){ error_47: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==6)) && (a21==8))){ error_21: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==7)) && (a21==8))){ error_51: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==7)) && (a21==7))){ error_45: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==7)) && (a21==7))){ error_50: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==7)) && (a21==10))){ error_48: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==7)) && (a21==8))){ error_46: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==8)) && (a21==6))){ error_59: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==6)) && (a21==6))){ error_24: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==7)) && (a21==9))){ error_42: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==6)) && (a21==7))){ error_30: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==6)) && (a21==7))){ error_35: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==5)) && (a21==6))){ error_9: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==5)) && (a21==8))){ error_16: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==5)) && (a21==9))){ error_7: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==6)) && (a21==8))){ error_36: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==7)) && (a21==10))){ error_53: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==6)) && (a21==10))){ error_38: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==5)) && (a21==10))){ error_3: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==5)) && (a21==6))){ error_4: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==5)) && (a21==7))){ error_0: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==5)) && (a21==8))){ error_1: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==6)) && (a21==9))){ error_32: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==5)) && (a21==9))){ error_17: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==7)) && (a21==7))){ error_55: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==6)) && (a21==10))){ error_33: __VERIFIER_assume(0); } if(((( ((11 < a12) && (80 >= a12)) && (a24==1)) && (a15==7)) && (a21==6))){ error_49: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==6)) && (a21==7))){ error_20: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==5)) && (a21==8))){ error_6: __VERIFIER_assume(0); } if(((( a12 <= -43 && (a24==1)) && (a15==6)) && (a21==6))){ error_19: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==5)) && (a21==7))){ error_5: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==6)) && (a21==7))){ error_25: __VERIFIER_assume(0); } if(((( 80 < a12 && (a24==1)) && (a15==5)) && (a21==7))){ error_15: __VERIFIER_assume(0); } if(((( ((-43 < a12) && (11 >= a12)) && (a24==1)) && (a15==6)) && (a21==8))){ error_26: __VERIFIER_assume(0); } if((((a24==1) && ( ((11 < a12) && (80 >= a12)) && ((input == 5) && (a15==8)))) && (a21==9))){ a12 = ((((a12 + 555500) * -1)/ 10) * 5); a15 = 5; a21 = 6; return -1; } else if((((a15==9) && ((((a21==9) || ((a21==7) || (a21==8))) && (input == 5)) && a12 <= -43 )) && (a24==1))){ a15 = 5; a21 = 6; return -1; } else if(((a15==9) && (( ((-43 < a12) && (11 >= a12)) && ((a24==1) && (input == 2))) && (a21==8)))){ a12 = (((a12 - -571629) / 5) + -404132); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((a15==8) && ( ((11 < a12) && (80 >= a12)) && ((input == 1) && ((a21==7) || (a21==8))))))){ a12 = (((a12 - 268644) + -323718) + -3883); a15 = 5; a21 = 6; return -1; } else if((((((a21==10) && ( 80 < a12 && (a15==8))) || (((a15==9) && a12 <= -43 ) && (a21==6))) && (input == 2)) && (a24==1))){ a12 = (((a12 / 5) + -345781) / 5); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((a15==9) && ((((a21==6) && 80 < a12 ) || (((a21==9) && ((11 < a12) && (80 >= a12)) ) || ( ((11 < a12) && (80 >= a12)) && (a21==10)))) && (input == 5))))){ a12 = (((((a12 % 34)+ 23) - -139662) - 547970) - -408298); a15 = 6; a21 = 6; return -1; } else if((( a12 <= -43 && ((((a21==9) || ((a21==7) || (a21==8))) && (input == 4)) && (a24==1))) && (a15==9))){ a15 = 5; a21 = 6; return -1; } else if((((((input == 2) && (a24==1)) && ((11 < a12) && (80 >= a12)) ) && (a21==9)) && (a15==8))){ a12 = (((a12 - -334333) + 32000) / 5); a21 = 8; return 22; } else if(((((( ((-43 < a12) && (11 >= a12)) && (a21==10)) || ( ((11 < a12) && (80 >= a12)) && (a21==6))) && (input == 2)) && (a24==1)) && (a15==8))){ a12 = ((((a12 - 438298) * 1) + 564710) - 684902); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && (((input == 1) && ((( a12 <= -43 && (a21==10)) || ((a21==6) && ((-43 < a12) && (11 >= a12)) )) || ( ((-43 < a12) && (11 >= a12)) && (a21==7)))) && (a24==1)))){ a12 = ((((a12 % 299978)+ -300020) * 1) - 3); a15 = 5; a21 = 6; return -1; } else if((((a24==1) && (((input == 6) && ((a21==7) || (a21==8))) && 80 < a12 )) && (a15==9))){ a21 = 9; return 26; } else if(( ((-43 < a12) && (11 >= a12)) && ((a15==9) && ((a24==1) && (((a21==9) || (a21==10)) && (input == 2)))))){ a15 = 6; a21 = 9; return -1; } else if((((((input == 5) && (a15==8)) && ((-43 < a12) && (11 >= a12)) ) && (a21==9)) && (a24==1))){ a21 = 10; return 24; } else if((( 80 < a12 && ((a15==8) && (((a21==8) || (a21==9)) && (input == 3)))) && (a24==1))){ a12 = ((((a12 * -6)/ 10) - 40423) + -165586); a15 = 5; a21 = 6; return -1; } else if(((input == 4) && ((((a15==9) && ((a24==1) && 80 < a12 )) && (a21==10)) || ((a21==6) && ((a15==5) && ((a24==2) && a12 <= -43 )))))){ a12 = ((((a12 / 5) % 26)+ -16) + 1); a24 = 1; a15 = 6; a21 = 10; return -1; } else if(((((a24==1) && ((input == 3) && a12 <= -43 )) && (a21==7)) && (a15==8))){ a15 = 5; a21 = 6; return -1; } else if(((a24==1) && (((( 80 < a12 && (a15==8)) && (a21==10)) || (((a15==9) && a12 <= -43 ) && (a21==6))) && (input == 3)))){ a12 = ((((a12 - 0) - 0) / 5) + -200550); a15 = 5; a21 = 6; return -1; } else if((((a24==1) && ((a15==9) && (((a21==7) || (a21==8)) && (input == 3)))) && 80 < a12 )){ a12 = ((((a12 * 9)/ 10) / 5) + -505559); a15 = 7; a21 = 10; return -1; } else if((((((((a21==8) || (a21==9)) || (a21==10)) && (input == 5)) && a12 <= -43 ) && (a15==8)) && (a24==1))){ a15 = 5; a21 = 6; return -1; } else if(((((a15==9) && ((input == 1) && (a21==8))) && (a24==1)) && ((-43 < a12) && (11 >= a12)) )){ a12 = (((a12 + -386239) - 148442) - -217864); a15 = 5; a21 = 6; return -1; } else if((((((((a21==8) || (a21==9)) || (a21==10)) && (input == 3)) && (a15==8)) && a12 <= -43 ) && (a24==1))){ a15 = 5; a21 = 6; return -1; } else if(((a24==1) && (((a15==8) && ((input == 1) && (a21==9))) && ((11 < a12) && (80 >= a12)) ))){ a12 = (((a12 / 5) + -16723) / 5); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && ( 80 < a12 && ((a24==1) && (((a21==7) || (a21==8)) && (input == 4)))))){ a15 = 7; a21 = 10; return -1; } else if(( 80 < a12 && ((a15==9) && (((input == 2) && ((a21==7) || (a21==8))) && (a24==1))))){ a12 = (((((a12 * 9)/ 10) / 5) * 10)/ -3); a15 = 6; a21 = 9; return -1; } else if((((((input == 6) && ((11 < a12) && (80 >= a12)) ) && (a21==9)) && (a15==8)) && (a24==1))){ a12 = (((a12 + -285349) + -46510) + -209836); a15 = 5; a21 = 6; return -1; } else if(((((a24==1) && ((input == 1) && ((a21==8) || ((a21==6) || (a21==7))))) && (a15==9)) && ((11 < a12) && (80 >= a12)) )){ a15 = 6; a21 = 8; return -1; } else if(((((a21==10) && (( 80 < a12 && (a24==1)) && (a15==9))) || (((a15==5) && ((a24==2) && a12 <= -43 )) && (a21==6))) && (input == 3))){ a12 = ((((a12 % 26)- 15) + 426288) + -426288); a24 = 1; a15 = 7; a21 = 6; return -1; } else if(((((((a21==7) && ((-43 < a12) && (11 >= a12)) ) || (((a21==10) && a12 <= -43 ) || ( ((-43 < a12) && (11 >= a12)) && (a21==6)))) && (input == 5)) && (a24==1)) && (a15==9))){ a12 = ((((a12 % 299978)- 300020) + -1) + -1); a15 = 5; a21 = 6; return -1; } else if((((((input == 1) && (((a21==7) || (a21==8)) || (a21==9))) && (a15==9)) && a12 <= -43 ) && (a24==1))){ a15 = 5; a21 = 6; return -1; } else if(((a15==9) && ((a24==1) && (((input == 6) && ((-43 < a12) && (11 >= a12)) ) && (a21==8))))){ a12 = (((a12 * 5) / 5) + -316852); a15 = 5; a21 = 6; return -1; } else if((((a24==1) && ((a15==9) && ((input == 5) && ((a21==8) || ((a21==6) || (a21==7)))))) && ((11 < a12) && (80 >= a12)) )){ a15 = 5; a21 = 8; return -1; } else if(((((a15==8) && ((((a21==6) || (a21==7)) || (a21==8)) && (input == 5))) && ((-43 < a12) && (11 >= a12)) ) && (a24==1))){ a12 = (((a12 - 529036) / 5) * 5); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && ((((input == 3) && (((a21==6) || (a21==7)) || (a21==8))) && (a24==1)) && ((11 < a12) && (80 >= a12)) ))){ a12 = ((((((a12 * 10)/ -2) * 5) - -29976) * -1)/ 10); a15 = 7; a21 = 6; return -1; } else if((( ((-43 < a12) && (11 >= a12)) && ((a15==8) && (((a21==8) || ((a21==6) || (a21==7))) && (input == 3)))) && (a24==1))){ a12 = (((a12 - 239513) * 2) - 118149); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && ((a24==1) && ((((a21==9) || (a21==10)) && (input == 5)) && ((-43 < a12) && (11 >= a12)) )))){ a12 = (((a12 + -382503) - -833715) - -74843); a15 = 5; a21 = 6; return -1; } else if(( ((11 < a12) && (80 >= a12)) && (((a24==1) && ((((a21==6) || (a21==7)) || (a21==8)) && (input == 4))) && (a15==9)))){ a15 = 5; a21 = 10; return -1; } else if(((a15==9) && ((a24==1) && (((input == 6) && 80 < a12 ) && (a21==9))))){ a12 = (((((a12 - 600066) * 1) / 5) * 34)/ 10); a15 = 7; a21 = 8; return -1; } else if((((a24==1) && (((input == 2) && ((a21==10) || ((a21==8) || (a21==9)))) && a12 <= -43 )) && (a15==8))){ a15 = 5; a21 = 6; return -1; } else if(((a24==1) && (((input == 4) && (( ((-43 < a12) && (11 >= a12)) && (a21==7)) || (( a12 <= -43 && (a21==10)) || ( ((-43 < a12) && (11 >= a12)) && (a21==6))))) && (a15==9)))){ a12 = (((((a12 % 299978)+ -300020) - 3) - -109194) + -109193); a15 = 5; a21 = 6; return -1; } else if((((((input == 6) && ((a21==9) || ((a21==7) || (a21==8)))) && (a24==1)) && (a15==9)) && a12 <= -43 )){ a15 = 5; a21 = 6; return -1; } else if(((( a12 <= -43 && ((input == 6) && ((a21==10) || ((a21==8) || (a21==9))))) && (a24==1)) && (a15==8))){ a12 = ((((a12 % 26)+ -1) / 5) / 5); a21 = 7; return 25; } else if((((((a21==7) && (input == 5)) && a12 <= -43 ) && (a24==1)) && (a15==8))){ a21 = 10; return 22; } else if((((a15==9) && ((((a21==9) || (a21==10)) && (input == 4)) && ((-43 < a12) && (11 >= a12)) )) && (a24==1))){ a12 = (((a12 / 5) + 176111) * 3); a15 = 7; a21 = 9; return -1; } else if(((((( 80 < a12 && (a24==1)) && (a15==9)) && (a21==10)) || ((( a12 <= -43 && (a24==2)) && (a15==5)) && (a21==6))) && (input == 2))){ a12 = (((((a12 % 299959)- -300039) / 5) / 5) + 204292); a24 = 1; a15 = 9; a21 = 9; return -1; } else if(((( ((-43 < a12) && (11 >= a12)) && (((a21==9) || (a21==10)) && (input == 3))) && (a15==9)) && (a24==1))){ a12 = (((a12 + 66) - 3) + -2); a21 = 8; return 21; } else if((((a15==8) && ( 80 < a12 && (((a21==8) || (a21==9)) && (input == 6)))) && (a24==1))){ a12 = ((((a12 + 0) * 9)/ 10) - 558346); a15 = 5; a21 = 6; return -1; } else if((((((( a12 <= -43 && (a21==10)) || ( ((-43 < a12) && (11 >= a12)) && (a21==6))) || ((a21==7) && ((-43 < a12) && (11 >= a12)) )) && (input == 3)) && (a24==1)) && (a15==9))){ a12 = (((a12 + 101173) / 5) - 185122); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((input == 1) && (((a21==10) && ((a15==8) && 80 < a12 )) || (( a12 <= -43 && (a15==9)) && (a21==6)))))){ a12 = ((((a12 % 299978)+ -300020) * 1) - 2); a15 = 5; a21 = 6; return -1; } else if((( ((-43 < a12) && (11 >= a12)) && ((a24==1) && (((a21==8) || ((a21==6) || (a21==7))) && (input == 1)))) && (a15==8))){ a21 = 9; return 21; } else if((((a24==1) && ( a12 <= -43 && ((((a21==7) || (a21==8)) || (a21==9)) && (input == 3)))) && (a15==9))){ a21 = 10; return 22; } else if((((a24==1) && ((input == 4) && ((((a21==9) && ((11 < a12) && (80 >= a12)) ) || ((a21==10) && ((11 < a12) && (80 >= a12)) )) || ((a21==6) && 80 < a12 )))) && (a15==9))){ a12 = (((((a12 * 9)/ 10) - 589907) - -649897) + -606113); a15 = 7; a21 = 7; return -1; } else if(((a15==8) && (((a21==7) && ((input == 2) && (a24==1))) && a12 <= -43 ))){ a15 = 5; a21 = 6; return -1; } else if(((a15==8) && (((input == 4) && (( ((-43 < a12) && (11 >= a12)) && (a21==10)) || ((a21==6) && ((11 < a12) && (80 >= a12)) ))) && (a24==1)))){ a12 = ((((a12 - 357209) * 1) - -928336) - 1022569); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && (( a12 <= -43 && (((a21==9) || ((a21==7) || (a21==8))) && (input == 2))) && (a24==1)))){ a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((a15==8) && ((((a21==10) && ((-43 < a12) && (11 >= a12)) ) || ( ((11 < a12) && (80 >= a12)) && (a21==6))) && (input == 3))))){ a12 = (((a12 + 60189) + -305530) + -244668); a15 = 5; a21 = 6; return -1; } else if((((a15==8) && (((a24==1) && (input == 4)) && ((11 < a12) && (80 >= a12)) )) && (a21==9))){ a12 = (((a12 - 310903) + -128009) + -1314); a15 = 5; a21 = 6; return -1; } else if(((((input == 6) && ((( ((11 < a12) && (80 >= a12)) && (a21==9)) || ( ((11 < a12) && (80 >= a12)) && (a21==10))) || ( 80 < a12 && (a21==6)))) && (a24==1)) && (a15==9))){ a12 = ((((a12 % 299959)- -81) - -194202) - -92066); a21 = 7; return 26; } else if((((a15==8) && ((((a21==10) && ((-43 < a12) && (11 >= a12)) ) || ( ((11 < a12) && (80 >= a12)) && (a21==6))) && (input == 6))) && (a24==1))){ a12 = (((a12 / 5) - 557506) - 18416); a15 = 5; a21 = 6; return -1; } else if(((((a24==1) && (((a21==8) || ((a21==6) || (a21==7))) && (input == 2))) && (a15==9)) && ((11 < a12) && (80 >= a12)) )){ a12 = ((((a12 - -582271) - 436382) - 442400) - -391873); a21 = 6; return 22; } else if((((a21==9) && (((input == 3) && (a24==1)) && 80 < a12 )) && (a15==9))){ return -1; } else if(((((((a21==7) || (a21==8)) && (input == 1)) && (a15==9)) && 80 < a12 ) && (a24==1))){ a12 = ((((a12 / 5) % 26)+ -33) / 5); a15 = 5; a21 = 10; return -1; } else if((((((a15==9) && ( 80 < a12 && (a24==1))) && (a21==10)) || ((a21==6) && (((a24==2) && a12 <= -43 ) && (a15==5)))) && (input == 6))){ a12 = (((((a12 % 299959)- -300039) + -252537) * 1) - -252539); a24 = 1; a15 = 9; a21 = 7; return -1; } else if(((a15==9) && ((a21==9) && ( 80 < a12 && ((input == 2) && (a24==1)))))){ a21 = 8; return -1; } else if(((((a15==8) && (((a21==7) || (a21==8)) && (input == 3))) && (a24==1)) && ((11 < a12) && (80 >= a12)) )){ a12 = ((((a12 / 5) + -439847) * 10)/ 9); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((input == 5) && ((((a15==8) && 80 < a12 ) && (a21==10)) || ((a21==6) && ( a12 <= -43 && (a15==9))))))){ a12 = ((((a12 % 299959)- -300039) * 1) * 1); a15 = 8; a21 = 10; return 26; } else if(((a24==1) && (((( 80 < a12 && (a21==6)) || (((a21==9) && ((11 < a12) && (80 >= a12)) ) || ((a21==10) && ((11 < a12) && (80 >= a12)) ))) && (input == 1)) && (a15==9)))){ a12 = (((((a12 * 9)/ 10) * 1) + -581502) + 599190); a15 = 7; a21 = 8; return -1; } else if((((a24==1) && ( a12 <= -43 && ((((a21==8) || (a21==9)) || (a21==10)) && (input == 1)))) && (a15==8))){ a15 = 5; a21 = 6; return -1; } else if(((a24==1) && (((((a21==7) && ((-43 < a12) && (11 >= a12)) ) || (((a21==10) && a12 <= -43 ) || ((a21==6) && ((-43 < a12) && (11 >= a12)) ))) && (input == 6)) && (a15==9)))){ a12 = ((((a12 % 299978)+ -300020) / 5) + -174067); a15 = 5; a21 = 6; return -1; } else if(((a15==8) && (((a24==1) && ((((a21==6) || (a21==7)) || (a21==8)) && (input == 2))) && ((-43 < a12) && (11 >= a12)) ))){ a12 = (((((a12 - 185217) - 149574) - -494599) * -1)/ 10); a15 = 5; a21 = 6; return -1; } else if((((((input == 6) && (((a21==6) || (a21==7)) || (a21==8))) && (a15==8)) && (a24==1)) && ((-43 < a12) && (11 >= a12)) )){ a12 = (((a12 * 5) - 432359) / 5); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && (((((a21==7) || (a21==8)) && (input == 6)) && (a15==8)) && ((11 < a12) && (80 >= a12)) ))){ a12 = ((((a12 / 5) - 526582) * 10)/ 9); a15 = 5; a21 = 6; return -1; } else if(((((( ((-43 < a12) && (11 >= a12)) && (a21==7)) || (((a21==10) && a12 <= -43 ) || ( ((-43 < a12) && (11 >= a12)) && (a21==6)))) && (input == 2)) && (a15==9)) && (a24==1))){ a12 = (((((a12 % 26)- 16) + 343661) - 46416) - 297244); a21 = 8; return 25; } else if((( ((-43 < a12) && (11 >= a12)) && (((input == 1) && (a15==8)) && (a24==1))) && (a21==9))){ a12 = (((a12 * 5) * 5) + -84619); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((a15==9) && ((input == 2) && (( 80 < a12 && (a21==6)) || (( ((11 < a12) && (80 >= a12)) && (a21==9)) || ( ((11 < a12) && (80 >= a12)) && (a21==10)))))))){ a12 = ((((a12 % 299959)- -81) * 1) * 1); a15 = 6; a21 = 9; return -1; } else if(((a24==1) && ((a15==8) && (((input == 2) && ((a21==7) || (a21==8))) && ((11 < a12) && (80 >= a12)) )))){ a12 = ((((a12 + -453921) * 10)/ 9) - 34620); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((a21==9) && (((input == 5) && (a15==9)) && 80 < a12 )))){ a15 = 7; a21 = 6; return -1; } else if((( a12 <= -43 && (((input == 1) && (a21==7)) && (a24==1))) && (a15==8))){ a15 = 5; a21 = 6; return -1; } else if((((a21==9) && (( ((11 < a12) && (80 >= a12)) && (input == 3)) && (a24==1))) && (a15==8))){ a12 = (((a12 - -195021) - 451510) / 5); a15 = 5; a21 = 6; return -1; } else if((((a15==8) && ((((a21==8) || (a21==9)) && (input == 2)) && (a24==1))) && 80 < a12 )){ a12 = ((((a12 * 9)/ 10) + -545656) * 1); a15 = 5; a21 = 6; return -1; } else if((( 80 < a12 && ((a24==1) && (((a21==8) || (a21==9)) && (input == 4)))) && (a15==8))){ a12 = ((((a12 * 9)/ 10) + -562768) / 5); a15 = 5; a21 = 6; return -1; } else if(((a21==9) && ((a15==9) && ((a24==1) && ( 80 < a12 && (input == 1)))))){ return 26; } else if(((a15==8) && (((input == 3) && ((((a21==10) && ((11 < a12) && (80 >= a12)) ) || ((a21==6) && 80 < a12 )) || ( 80 < a12 && (a21==7)))) && (a24==1)))){ a12 = ((((a12 % 299978)+ -300020) + -247081) * 1); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ( 80 < a12 && ((a21==9) && ((a15==9) && (input == 4)))))){ a12 = ((((a12 + 0) + -318749) % 34)+ 45); a15 = 5; return -1; } else if(((a15==8) && (((input == 6) && (( 80 < a12 && (a21==7)) || (((a21==10) && ((11 < a12) && (80 >= a12)) ) || ( 80 < a12 && (a21==6))))) && (a24==1)))){ a12 = ((((a12 % 299978)- 300020) - 166783) * 1); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && ((a24==1) && ( ((-43 < a12) && (11 >= a12)) && ((input == 1) && ((a21==9) || (a21==10))))))){ a12 = (((((a12 - -56) * 9)/ 10) / 5) + 56); a15 = 5; a21 = 7; return -1; } else if(((((( 80 < a12 && (a15==8)) && (a21==10)) || ((a21==6) && ((a15==9) && a12 <= -43 ))) && (input == 6)) && (a24==1))){ a12 = ((((a12 % 299978)- 300020) * 1) + -2); a15 = 5; a21 = 6; return -1; } else if(((((a15==8) && (((a21==8) || (a21==9)) && (input == 1))) && (a24==1)) && 80 < a12 )){ a12 = ((((a12 - 94512) / 5) / 5) + -533466); a15 = 5; a21 = 6; return -1; } else if((((a24==1) && ((((a21==7) && 80 < a12 ) || (( ((11 < a12) && (80 >= a12)) && (a21==10)) || ((a21==6) && 80 < a12 ))) && (input == 2))) && (a15==8))){ a12 = ((((a12 % 299978)- 300020) + 525887) + -618409); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ( ((-43 < a12) && (11 >= a12)) && (((((a21==6) || (a21==7)) || (a21==8)) && (input == 4)) && (a15==8))))){ a12 = ((((a12 - 87828) * 10)/ 9) - 284434); a15 = 5; a21 = 6; return -1; } else if((((a15==8) && (((a21==7) && (input == 4)) && (a24==1))) && a12 <= -43 )){ a15 = 5; a21 = 6; return -1; } else if(((a21==9) && (((a24==1) && ((input == 2) && ((-43 < a12) && (11 >= a12)) )) && (a15==8)))){ a12 = (((a12 - -61) - -3) - -1); a21 = 8; return 26; } else if(((a15==8) && (( ((-43 < a12) && (11 >= a12)) && ((a21==9) && (input == 4))) && (a24==1)))){ a12 = (((a12 + -564241) - 3500) * 1); a15 = 5; a21 = 6; return -1; } else if((( a12 <= -43 && ((((a21==10) || ((a21==8) || (a21==9))) && (input == 4)) && (a15==8))) && (a24==1))){ a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((a15==8) && ((input == 4) && (( 80 < a12 && (a21==7)) || (( ((11 < a12) && (80 >= a12)) && (a21==10)) || ( 80 < a12 && (a21==6)))))))){ a12 = (((((a12 % 299959)- -81) * 1) / 5) + 165863); a21 = 10; return 22; } else if(( ((11 < a12) && (80 >= a12)) && ((a15==8) && ((a24==1) && (((a21==7) || (a21==8)) && (input == 4)))))){ a12 = (((a12 + -256944) - 53297) - 113637); a15 = 5; a21 = 6; return -1; } else if(((((((a15==8) && 80 < a12 ) && (a21==10)) || ((a21==6) && ( a12 <= -43 && (a15==9)))) && (input == 4)) && (a24==1))){ a12 = (((a12 / 5) + -409994) + 99019); a15 = 5; a21 = 6; return -1; } else if(((((( 80 < a12 && (a24==1)) && (a15==9)) && (a21==10)) || ((( a12 <= -43 && (a24==2)) && (a15==5)) && (a21==6))) && (input == 1))){ a12 = ((((((a12 % 299978)- 300020) / 5) + 194993) * -1)/ 10); a24 = 1; a15 = 5; a21 = 9; return -1; } else if((((a15==8) && (((( ((11 < a12) && (80 >= a12)) && (a21==10)) || ( 80 < a12 && (a21==6))) || ( 80 < a12 && (a21==7))) && (input == 5))) && (a24==1))){ a12 = (((((a12 + -334090) % 299978)+ -300020) / 5) + -383582); a15 = 5; a21 = 6; return -1; } else if(((a21==9) && ((((input == 6) && (a15==8)) && ((-43 < a12) && (11 >= a12)) ) && (a24==1)))){ a12 = (((((a12 + 423400) * 1) * 1) * -1)/ 10); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ((a21==9) && ( ((-43 < a12) && (11 >= a12)) && ((a15==8) && (input == 3)))))){ a12 = (((a12 + -295946) + -243936) * 1); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && (((input == 3) && (((a21==6) && 80 < a12 ) || (((a21==9) && ((11 < a12) && (80 >= a12)) ) || ((a21==10) && ((11 < a12) && (80 >= a12)) )))) && (a24==1)))){ a12 = ((((((a12 % 299959)+ 81) - 332928) / 5) * -1)/ 10); a15 = 5; a21 = 10; return -1; } else if(( a12 <= -43 && ((a21==7) && ((a24==1) && ((a15==8) && (input == 6)))))){ a15 = 5; a21 = 6; return -1; } else if(( ((-43 < a12) && (11 >= a12)) && ((((input == 3) && (a24==1)) && (a21==8)) && (a15==9)))){ a12 = (((a12 * 5) - 497532) - 56570); a15 = 5; a21 = 6; return -1; } else if((((((a15==9) && ((a24==1) && 80 < a12 )) && (a21==10)) || ((((a24==2) && a12 <= -43 ) && (a15==5)) && (a21==6))) && (input == 5))){ a12 = (((((a12 + 0) % 299978)+ -300020) / 5) + -262569); a24 = 2; a15 = 5; a21 = 6; return 25; } else if((((a24==1) && ( ((11 < a12) && (80 >= a12)) && (((a21==7) || (a21==8)) && (input == 5)))) && (a15==8))){ a12 = (((((a12 * 68)/ 10) * 5) + -454858) + 972700); a21 = 6; return 25; } else if(((((((a21==10) && ((-43 < a12) && (11 >= a12)) ) || ( ((11 < a12) && (80 >= a12)) && (a21==6))) && (input == 1)) && (a15==8)) && (a24==1))){ a12 = (((a12 + -298811) + -140133) + -153332); a15 = 5; a21 = 6; return -1; } else if(((a24==1) && ( ((11 < a12) && (80 >= a12)) && (((((a21==6) || (a21==7)) || (a21==8)) && (input == 6)) && (a15==9))))){ a15 = 7; a21 = 9; return -1; } else if(((a24==1) && (((((a21==7) && 80 < a12 ) || (( ((11 < a12) && (80 >= a12)) && (a21==10)) || ( 80 < a12 && (a21==6)))) && (input == 1)) && (a15==8)))){ a12 = ((((a12 + 0) % 299978)+ -300020) * 1); a15 = 5; a21 = 6; return -1; } else if((((a15==8) && ((((a21==10) && ((-43 < a12) && (11 >= a12)) ) || ( ((11 < a12) && (80 >= a12)) && (a21==6))) && (input == 5))) && (a24==1))){ a12 = (((((a12 - -338613) - -126296) * 1) % 34)- -42); a21 = 9; return 25; } else if((( ((-43 < a12) && (11 >= a12)) && (((input == 6) && ((a21==9) || (a21==10))) && (a24==1))) && (a15==9))){ a12 = ((((((a12 - -277912) * 10)/ 9) - 437300) * -1)/ 10); a15 = 6; a21 = 6; return -1; } else if(((a15==8) && ( 80 < a12 && ((a24==1) && (((a21==8) || (a21==9)) && (input == 5)))))){ a12 = (((a12 + -600079) - -316691) - 316661); a15 = 9; a21 = 8; return 26; } else if((((a24==1) && ((a15==9) && (((a21==7) || (a21==8)) && (input == 5)))) && 80 < a12 )){ a21 = 10; return 25; } else if((((((input == 5) && ((-43 < a12) && (11 >= a12)) ) && (a21==8)) && (a24==1)) && (a15==9))){ a12 = (((a12 / 5) - 440689) * 1); a15 = 5; a21 = 6; return -1; } else if(((a15==9) && ((((input == 4) && (a24==1)) && (a21==8)) && ((-43 < a12) && (11 >= a12)) ))){ a21 = 10; return 22; } return -2; }
void __VERIFIER_atomic_begin() { /* reachable */ /* reachable */ /* reachable */ /* reachable */ /* reachable */ __VERIFIER_assume(__global_lock==0); __global_lock=1; return; }
int main(void) { //cseq: Copies of global variables __CS_type __CS_cp___CS_thread_status[__CS_ROUNDS][__CS_THREADS+1]; __CS_type *__CS_cp___CS_thread_lockedon[__CS_ROUNDS][__CS_THREADS+1]; static int __CS_cp_top[__CS_ROUNDS]; static unsigned int __CS_cp_arr[__CS_ROUNDS][5]; __CS_pthread_mutex_t __CS_cp_m[__CS_ROUNDS]; _Bool __CS_cp_flag[__CS_ROUNDS]; //cseq: Copy statements for global variables: //cseq: for each global variable x, //cseq: copy into x[1...___CS_ROUNDS] <--- __CS_cp_x[1..___CS_ROUNDS]. //cseq: This is used to fill global variables with non-initialised data. __CS_thread_status[1][0] = __CS_cp___CS_thread_status[1][0]; //cseq: Copy of __CS_thread_status __CS_thread_status[1][1] = __CS_cp___CS_thread_status[1][1]; __CS_thread_status[1][2] = __CS_cp___CS_thread_status[1][2]; __CS_thread_lockedon[1][0] = __CS_cp___CS_thread_lockedon[1][0]; //cseq: Copy of __CS_thread_lockedon __CS_thread_lockedon[1][1] = __CS_cp___CS_thread_lockedon[1][1]; __CS_thread_lockedon[1][2] = __CS_cp___CS_thread_lockedon[1][2]; top[1] = __CS_cp_top[1]; //cseq: Copy of top arr[1][0] = __CS_cp_arr[1][0]; //cseq: Copy of arr arr[1][1] = __CS_cp_arr[1][1]; arr[1][2] = __CS_cp_arr[1][2]; arr[1][3] = __CS_cp_arr[1][3]; arr[1][4] = __CS_cp_arr[1][4]; m[1] = __CS_cp_m[1]; //cseq: Copy of m flag[1] = __CS_cp_flag[1]; //cseq: Copy of flag //cseq: create new thread for the main function __CS_round = 0; __CS_thread_index = 0; __CS_thread_born_round[0] = __CS_round; __CS_thread_status[0][0] = __THREAD_RUNNING; __CS_thread[0] = main_thread; __CS_thread_allocated[0] = 1; //cseq: simulation of the threads if (__CS_thread_allocated[0] == 1) { __CS_round = __CS_thread_born_round[0]; __CS_ret = 0; __CS_thread[0](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][0] = __THREAD_FINISHED; } if (__CS_thread_allocated[1] == 1) { __CS_round = __CS_thread_born_round[1]; __CS_ret = 0; __CS_thread[1](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][1] = __THREAD_FINISHED; } if (__CS_thread_allocated[2] == 1) { __CS_round = __CS_thread_born_round[2]; __CS_ret = 0; __CS_thread[2](0); if (__CS_ret!=__CS_ret_PREEMPTED) __CS_thread_status[__CS_round][2] = __THREAD_FINISHED; } //cseq: Consistency checks for global variables: //cseq: for each global variable x, //cseq: check that x[0...___CS_ROUNDS-1] == __CS_cp_x[1..___CS_ROUNDS]. __VERIFIER_assume(__CS_thread_status[0][0] == __CS_cp___CS_thread_status[1][0]); //cseq: Consistency of __CS_thread_status __VERIFIER_assume(__CS_thread_status[0][1] == __CS_cp___CS_thread_status[1][1]); __VERIFIER_assume(__CS_thread_status[0][2] == __CS_cp___CS_thread_status[1][2]); __VERIFIER_assume(__CS_thread_lockedon[0][0] == __CS_cp___CS_thread_lockedon[1][0]); //cseq: Consistency of __CS_thread_lockedon __VERIFIER_assume(__CS_thread_lockedon[0][1] == __CS_cp___CS_thread_lockedon[1][1]); __VERIFIER_assume(__CS_thread_lockedon[0][2] == __CS_cp___CS_thread_lockedon[1][2]); __VERIFIER_assume(top[0] == __CS_cp_top[1]); //cseq: Consistency of top __VERIFIER_assume(arr[0][0] == __CS_cp_arr[1][0]); //cseq: Consistency of arr __VERIFIER_assume(arr[0][1] == __CS_cp_arr[1][1]); __VERIFIER_assume(arr[0][2] == __CS_cp_arr[1][2]); __VERIFIER_assume(arr[0][3] == __CS_cp_arr[1][3]); __VERIFIER_assume(arr[0][4] == __CS_cp_arr[1][4]); __VERIFIER_assume(m[0] == __CS_cp_m[1]); //cseq: Consistency of m __VERIFIER_assume(flag[0] == __CS_cp_flag[1]); //cseq: Consistency of flag //cseq: Error check __VERIFIER_assert(__CS_error != 1); }
void __VERIFIER_atomic_take_read_lock() { __VERIFIER_assume(w==0); r = r+1; }
int main() { pthread_t t1970; pthread_create(&t1970, NULL, P0, NULL); pthread_t t1971; pthread_create(&t1971, NULL, P1, NULL); pthread_t t1972; pthread_create(&t1972, NULL, P2, NULL); __VERIFIER_atomic_begin(); main$tmp_guard0 = __unbuffered_cnt == 3; __VERIFIER_atomic_end(); __VERIFIER_assume(main$tmp_guard0); __VERIFIER_atomic_begin(); z = z$w_buff0_used && z$r_buff0_thd0 ? z$w_buff0 : (z$w_buff1_used && z$r_buff1_thd0 ? z$w_buff1 : z); z$w_buff0_used = z$w_buff0_used && z$r_buff0_thd0 ? FALSE : z$w_buff0_used; z$w_buff1_used = z$w_buff0_used && z$r_buff0_thd0 || z$w_buff1_used && z$r_buff1_thd0 ? FALSE : z$w_buff1_used; z$r_buff0_thd0 = z$w_buff0_used && z$r_buff0_thd0 ? FALSE : z$r_buff0_thd0; z$r_buff1_thd0 = z$w_buff0_used && z$r_buff0_thd0 || z$w_buff1_used && z$r_buff1_thd0 ? FALSE : z$r_buff1_thd0; __VERIFIER_atomic_end(); __VERIFIER_atomic_begin(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ weak$$choice0 = __VERIFIER_nondet_pointer(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ weak$$choice2 = __VERIFIER_nondet_pointer(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$flush_delayed = weak$$choice2; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$mem_tmp = z; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z = !z$w_buff0_used || !z$r_buff0_thd0 && !z$w_buff1_used || !z$r_buff0_thd0 && !z$r_buff1_thd0 ? z : (z$w_buff0_used && z$r_buff0_thd0 ? z$w_buff0 : z$w_buff1); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$w_buff0 = weak$$choice2 ? z$w_buff0 : (!z$w_buff0_used || !z$r_buff0_thd0 && !z$w_buff1_used || !z$r_buff0_thd0 && !z$r_buff1_thd0 ? z$w_buff0 : (z$w_buff0_used && z$r_buff0_thd0 ? z$w_buff0 : z$w_buff0)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$w_buff1 = weak$$choice2 ? z$w_buff1 : (!z$w_buff0_used || !z$r_buff0_thd0 && !z$w_buff1_used || !z$r_buff0_thd0 && !z$r_buff1_thd0 ? z$w_buff1 : (z$w_buff0_used && z$r_buff0_thd0 ? z$w_buff1 : z$w_buff1)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$w_buff0_used = weak$$choice2 ? z$w_buff0_used : (!z$w_buff0_used || !z$r_buff0_thd0 && !z$w_buff1_used || !z$r_buff0_thd0 && !z$r_buff1_thd0 ? z$w_buff0_used : (z$w_buff0_used && z$r_buff0_thd0 ? FALSE : z$w_buff0_used)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$w_buff1_used = weak$$choice2 ? z$w_buff1_used : (!z$w_buff0_used || !z$r_buff0_thd0 && !z$w_buff1_used || !z$r_buff0_thd0 && !z$r_buff1_thd0 ? z$w_buff1_used : (z$w_buff0_used && z$r_buff0_thd0 ? FALSE : FALSE)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$r_buff0_thd0 = weak$$choice2 ? z$r_buff0_thd0 : (!z$w_buff0_used || !z$r_buff0_thd0 && !z$w_buff1_used || !z$r_buff0_thd0 && !z$r_buff1_thd0 ? z$r_buff0_thd0 : (z$w_buff0_used && z$r_buff0_thd0 ? FALSE : z$r_buff0_thd0)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$r_buff1_thd0 = weak$$choice2 ? z$r_buff1_thd0 : (!z$w_buff0_used || !z$r_buff0_thd0 && !z$w_buff1_used || !z$r_buff0_thd0 && !z$r_buff1_thd0 ? z$r_buff1_thd0 : (z$w_buff0_used && z$r_buff0_thd0 ? FALSE : FALSE)); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ main$tmp_guard1 = !(z == 2 && __unbuffered_p1_EAX == 1 && __unbuffered_p2_EAX == 1); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z = z$flush_delayed ? z$mem_tmp : z; /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ z$flush_delayed = FALSE; __VERIFIER_atomic_end(); /* Program was expected to be safe for X86, model checker should have said NO. This likely is a bug in the tool chain. */ __VERIFIER_assert(main$tmp_guard1); return 0; }
void __VERIFIER_atomic_end() { __VERIFIER_assume(__global_lock==1); __global_lock=0; return; }
int check(void) { int tmp ; msg_t tmp___0 ; _Bool tmp___1 ; _Bool tmp___2 ; _Bool tmp___3 ; _Bool tmp___4 ; int8_t tmp___5 ; _Bool tmp___6 ; _Bool tmp___7 ; _Bool tmp___8 ; int8_t tmp___9 ; _Bool tmp___10 ; _Bool tmp___11 ; _Bool tmp___12 ; msg_t tmp___13 ; _Bool tmp___14 ; _Bool tmp___15 ; _Bool tmp___16 ; _Bool tmp___17 ; int8_t tmp___18 ; int8_t tmp___19 ; int8_t tmp___20 ; { if (! side1Failed) { tmp = 1; } else if (! side2Failed) { tmp = 1; } else { tmp = 0; } __VERIFIER_assume((_Bool )tmp); tmp___0 = read_manual_selection_history((unsigned char)1); if (! tmp___0) { tmp___1 = read_side1_failed_history((unsigned char)1); if (! tmp___1) { tmp___2 = read_side1_failed_history((unsigned char)0); if (! tmp___2) { tmp___3 = read_side2_failed_history((unsigned char)1); if (! tmp___3) { tmp___4 = read_side2_failed_history((unsigned char)0); if (! tmp___4) { if (! ((int )side1_written == 1)) { if (! ((int )side1_written == 0)) { return (0); } } if (! (! ((int )side1_written == 0))) { if (! ((int )side2_written == 1)) { return (0); } } if (! (! ((int )side1_written == 1))) { if (! ((int )side2_written == 0)) { return (0); } } } } } } } tmp___7 = read_side1_failed_history((unsigned char)1); if (tmp___7) { tmp___8 = read_side2_failed_history((unsigned char)1); if (! tmp___8) { tmp___5 = read_active_side_history((unsigned char)0); if (! ((int )tmp___5 == 2)) { return (0); } tmp___6 = read_side2_failed_history((unsigned char)0); if (! tmp___6) { if (! ((int )side2_written == 1)) { return (0); } } } } tmp___11 = read_side1_failed_history((unsigned char)1); if (! tmp___11) { tmp___12 = read_side2_failed_history((unsigned char)1); if (tmp___12) { tmp___9 = read_active_side_history((unsigned char)0); if (! ((int )tmp___9 == 1)) { return (0); } tmp___10 = read_side1_failed_history((unsigned char)0); if (! tmp___10) { if (! ((int )side1_written == 1)) { return (0); } } } } tmp___20 = read_active_side_history((unsigned char)2); if ((int )tmp___20 > -2) { tmp___13 = read_manual_selection_history((unsigned char)2); if (! tmp___13) { tmp___14 = read_side1_failed_history((unsigned char)2); tmp___15 = read_side1_failed_history((unsigned char)1); if ((int )tmp___14 == (int )tmp___15) { tmp___16 = read_side2_failed_history((unsigned char)2); tmp___17 = read_side2_failed_history((unsigned char)1); if ((int )tmp___16 == (int )tmp___17) { tmp___18 = read_active_side_history((unsigned char)1); tmp___19 = read_active_side_history((unsigned char)0); if (! ((int )tmp___18 == (int )tmp___19)) { return (0); } } } } } return (1); } }
void __VERIFIER_atomic_begin() { __VERIFIER_assume(__global_lock==0); __global_lock=1; return; }
int __cs_join(__cs_t __cs_id, void **__cs_value_ptr) { __VERIFIER_assume(__cs_pc[__cs_id] == __cs_thread_lines[__cs_id]); return 0; }