// c::P0 // file mix172.c line 15 void * P0(void *); // c::P1 // file mix172.c line 24 void * P1(void *); // c::P2 // file mix172.c line 33 void * P2(void *); // c::P3 // file mix172.c line 42 void * P3(void *); // c::__CPROVER_initialize // file line 14 void __CPROVER_initialize(void); // c::main // file mix172.c line 51 int _main(void); #include #include // c::__unbuffered_p1_r1 // file mix172.c line 4 int __unbuffered_p1_r1; // c::__unbuffered_p1_r3 // file mix172.c line 5 int __unbuffered_p1_r3; // c::__unbuffered_p2_r1 // file mix172.c line 6 int __unbuffered_p2_r1; // c::__unbuffered_p2_r3 // file mix172.c line 7 int __unbuffered_p2_r3; // c::__unbuffered_p3_r1 // file mix172.c line 8 int __unbuffered_p3_r1; // c::__unbuffered_p3_r3 // file mix172.c line 9 int __unbuffered_p3_r3; // c::a // file mix172.c line 10 int a; // c::x // file mix172.c line 11 int x; // c::y // file mix172.c line 12 int y; // c::z // file mix172.c line 13 int z; // c::main$tmp_guard0 // _Bool tmp_guard; // c::main$tmp_guard1 // _Bool tmp_guard1; // c::x$w_buff0 // int cxw_buff0; // c::x$w_buff1 // int cxw_buff1; // c::x$w_buff0_used // _Bool cxw_buff0_used; // c::x$w_buff1_used // _Bool cxw_buff1_used; // c::x$mem_tmp // int cxmem_tmp; // c::x$flush_delayed // _Bool cxflush_delayed; // c::x$read_delayed // _Bool cxread_delayed; // c::x$read_delayed_var // int * cxread_delayed_var; // c::x$r_buff0_thd0 // _Bool cxr_buff0_thd0; // c::x$r_buff1_thd0 // _Bool cxr_buff1_thd0; // c::x$r_buff0_thd1 // _Bool cxr_buff0_thd1; // c::x$r_buff1_thd1 // _Bool cxr_buff1_thd1; // c::x$r_buff0_thd2 // _Bool cxr_buff0_thd2; // c::x$r_buff1_thd2 // _Bool cxr_buff1_thd2; // c::x$r_buff0_thd3 // _Bool cxr_buff0_thd3; // c::x$r_buff1_thd3 // _Bool cxr_buff1_thd3; // c::x$r_buff0_thd4 // _Bool cxr_buff0_thd4; // c::x$r_buff1_thd4 // _Bool cxr_buff1_thd4; // weak::choice0 // _Bool weakchoice0; // weak::choice2 // _Bool weakchoice2; // c::__unbuffered_p1_r1$w_buff0 // int c__unbuffered_p1_r1w_buff0; // c::__unbuffered_p1_r1$w_buff1 // int c__unbuffered_p1_r1w_buff1; // c::__unbuffered_p1_r1$w_buff0_used // _Bool c__unbuffered_p1_r1w_buff0_used; // c::__unbuffered_p1_r1$w_buff1_used // _Bool c__unbuffered_p1_r1w_buff1_used; // c::__unbuffered_p1_r1$mem_tmp // int c__unbuffered_p1_r1mem_tmp; // c::__unbuffered_p1_r1$flush_delayed // _Bool c__unbuffered_p1_r1flush_delayed; // c::__unbuffered_p1_r1$read_delayed // _Bool c__unbuffered_p1_r1read_delayed; // c::__unbuffered_p1_r1$read_delayed_var // int * c__unbuffered_p1_r1read_delayed_var; // c::__unbuffered_p1_r1$r_buff0_thd0 // _Bool c__unbuffered_p1_r1r_buff0_thd0; // c::__unbuffered_p1_r1$r_buff1_thd0 // _Bool c__unbuffered_p1_r1r_buff1_thd0; // c::__unbuffered_p1_r1$r_buff0_thd1 // _Bool c__unbuffered_p1_r1r_buff0_thd1; // c::__unbuffered_p1_r1$r_buff1_thd1 // _Bool c__unbuffered_p1_r1r_buff1_thd1; // c::__unbuffered_p1_r1$r_buff0_thd2 // _Bool c__unbuffered_p1_r1r_buff0_thd2; // c::__unbuffered_p1_r1$r_buff1_thd2 // _Bool c__unbuffered_p1_r1r_buff1_thd2; // c::__unbuffered_p1_r1$r_buff0_thd3 // _Bool c__unbuffered_p1_r1r_buff0_thd3; // c::__unbuffered_p1_r1$r_buff1_thd3 // _Bool c__unbuffered_p1_r1r_buff1_thd3; // c::__unbuffered_p1_r1$r_buff0_thd4 // _Bool c__unbuffered_p1_r1r_buff0_thd4; // c::__unbuffered_p1_r1$r_buff1_thd4 // _Bool c__unbuffered_p1_r1r_buff1_thd4; // weak::choice1 // _Bool weakchoice1; // c::__unbuffered_cnt // file mix172.c line 1 int __unbuffered_cnt; // c::__unbuffered_p0_r1 // file mix172.c line 2 int __unbuffered_p0_r1; // c::__unbuffered_p0_r3 // file mix172.c line 3 int __unbuffered_p0_r3; // main // int main(void) { c__unbuffered_p1_r1w_buff0_used=false; c__unbuffered_p1_r1w_buff1_used=false; c__unbuffered_p1_r1flush_delayed=false; c__unbuffered_p1_r1read_delayed=false; c__unbuffered_p1_r1read_delayed_var=0; c__unbuffered_p1_r1r_buff0_thd0=false; c__unbuffered_p1_r1r_buff0_thd1=false; c__unbuffered_p1_r1r_buff0_thd2=false; c__unbuffered_p1_r1r_buff0_thd3=false; c__unbuffered_p1_r1r_buff0_thd4=false; c__unbuffered_p1_r1r_buff1_thd0=false; c__unbuffered_p1_r1r_buff1_thd1=false; c__unbuffered_p1_r1r_buff1_thd2=false; c__unbuffered_p1_r1r_buff1_thd3=false; c__unbuffered_p1_r1r_buff1_thd4=false; cxw_buff0_used=false; cxw_buff1_used=false; cxflush_delayed=false; cxread_delayed=false; cxread_delayed_var=0; cxr_buff0_thd0=false; cxr_buff0_thd1=false; cxr_buff0_thd2=false; cxr_buff0_thd3=false; cxr_buff0_thd4=false; cxr_buff1_thd0=false; cxr_buff1_thd1=false; cxr_buff1_thd2=false; cxr_buff1_thd3=false; cxr_buff1_thd4=false; __CPROVER_initialize(); _main(); } // c::P0 // file mix172.c line 15 void * P0(void * arg) { // file mix172.c line 16 function P0 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 16 function P0 __unbuffered_p0_r1=a; // file mix172.c line 16 function P0 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 17 function P0 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 17 function P0 __unbuffered_p0_r3=1; // file mix172.c line 17 function P0 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 18 function P0 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 18 function P0 x=__unbuffered_p0_r3; // file mix172.c line 18 function P0 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 20 function P0 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 20 function P0 x=((cxw_buff0_used && cxr_buff0_thd1)? cxw_buff0:((cxw_buff1_used && cxr_buff1_thd1)? cxw_buff1:x)); // file mix172.c line 20 function P0 cxw_buff0_used=((cxw_buff0_used && cxr_buff0_thd1)? false:cxw_buff0_used); // file mix172.c line 20 function P0 cxw_buff1_used=(((cxw_buff0_used && cxr_buff0_thd1) || (cxw_buff1_used && cxr_buff1_thd1))? false:cxw_buff1_used); // file mix172.c line 20 function P0 cxr_buff0_thd1=((cxw_buff0_used && cxr_buff0_thd1)? false:cxr_buff0_thd1); // file mix172.c line 20 function P0 cxr_buff1_thd1=(((cxw_buff0_used && cxr_buff0_thd1) || (cxw_buff1_used && cxr_buff1_thd1))? false:cxr_buff1_thd1); // file mix172.c line 20 function P0 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 21 function P0 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 21 function P0 __unbuffered_cnt=((__unbuffered_cnt+1)); // file mix172.c line 21 function P0 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 22 function P0 return nondet_ptr(); // file mix172.c line 22 function P0 } // c::P1 // file mix172.c line 24 void * P1(void * arg1) { // file mix172.c line 25 function P1 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 25 function P1 weakchoice0=nondet_bool(); // file mix172.c line 25 function P1 weakchoice2=nondet_bool(); // file mix172.c line 25 function P1 cxflush_delayed=weakchoice2; // file mix172.c line 25 function P1 cxmem_tmp=x; // file mix172.c line 25 function P1 x=(((!cxw_buff0_used) || (((!cxr_buff0_thd2) && (!cxw_buff1_used)) || ((!cxr_buff0_thd2) && (!cxr_buff1_thd2))))? x:((cxw_buff0_used && cxr_buff0_thd2)? cxw_buff0:cxw_buff1)); // file mix172.c line 25 function P1 cxw_buff0=(weakchoice2? cxw_buff0:(((!cxw_buff0_used) || (((!cxr_buff0_thd2) && (!cxw_buff1_used)) || ((!cxr_buff0_thd2) && (!cxr_buff1_thd2))))? cxw_buff0:((cxw_buff0_used && cxr_buff0_thd2)? cxw_buff0:cxw_buff0))); // file mix172.c line 25 function P1 cxw_buff1=(weakchoice2? cxw_buff1:(((!cxw_buff0_used) || (((!cxr_buff0_thd2) && (!cxw_buff1_used)) || ((!cxr_buff0_thd2) && (!cxr_buff1_thd2))))? cxw_buff1:((cxw_buff0_used && cxr_buff0_thd2)? cxw_buff1:cxw_buff1))); // file mix172.c line 25 function P1 cxw_buff0_used=(weakchoice2? cxw_buff0_used:(((!cxw_buff0_used) || (((!cxr_buff0_thd2) && (!cxw_buff1_used)) || ((!cxr_buff0_thd2) && (!cxr_buff1_thd2))))? cxw_buff0_used:((cxw_buff0_used && cxr_buff0_thd2)? false:cxw_buff0_used))); // file mix172.c line 25 function P1 cxw_buff1_used=(weakchoice2? cxw_buff1_used:(((!cxw_buff0_used) || (((!cxr_buff0_thd2) && (!cxw_buff1_used)) || ((!cxr_buff0_thd2) && (!cxr_buff1_thd2))))? cxw_buff1_used:((cxw_buff0_used && cxr_buff0_thd2)? false:false))); // file mix172.c line 25 function P1 cxr_buff0_thd2=(weakchoice2? cxr_buff0_thd2:(((!cxw_buff0_used) || (((!cxr_buff0_thd2) && (!cxw_buff1_used)) || ((!cxr_buff0_thd2) && (!cxr_buff1_thd2))))? cxr_buff0_thd2:((cxw_buff0_used && cxr_buff0_thd2)? false:cxr_buff0_thd2))); // file mix172.c line 25 function P1 cxr_buff1_thd2=(weakchoice2? cxr_buff1_thd2:(((!cxw_buff0_used) || (((!cxr_buff0_thd2) && (!cxw_buff1_used)) || ((!cxr_buff0_thd2) && (!cxr_buff1_thd2))))? cxr_buff1_thd2:((cxw_buff0_used && cxr_buff0_thd2)? false:false))); // file mix172.c line 25 function P1 c__unbuffered_p1_r1read_delayed=true; // file mix172.c line 25 function P1 c__unbuffered_p1_r1read_delayed_var=(&x); // file mix172.c line 25 function P1 __unbuffered_p1_r1=x; // file mix172.c line 25 function P1 x=(cxflush_delayed? cxmem_tmp:x); // file mix172.c line 25 function P1 cxflush_delayed=false; // file mix172.c line 25 function P1 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 26 function P1 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 26 function P1 __unbuffered_p1_r3=1; // file mix172.c line 26 function P1 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 27 function P1 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 27 function P1 y=__unbuffered_p1_r3; // file mix172.c line 27 function P1 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 29 function P1 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 29 function P1 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 30 function P1 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 30 function P1 __unbuffered_cnt=((__unbuffered_cnt+1)); // file mix172.c line 30 function P1 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 31 function P1 return nondet_ptr(); // file mix172.c line 31 function P1 } // c::P2 // file mix172.c line 33 void * P2(void * arg2) { // file mix172.c line 34 function P2 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 34 function P2 __unbuffered_p2_r1=y; // file mix172.c line 34 function P2 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 35 function P2 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 35 function P2 __unbuffered_p2_r3=1; // file mix172.c line 35 function P2 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 36 function P2 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 36 function P2 z=__unbuffered_p2_r3; // file mix172.c line 36 function P2 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 38 function P2 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 38 function P2 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 39 function P2 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 39 function P2 __unbuffered_cnt=((__unbuffered_cnt+1)); // file mix172.c line 39 function P2 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 40 function P2 return nondet_ptr(); // file mix172.c line 40 function P2 } // c::P3 // file mix172.c line 42 void * P3(void * arg3) { // file mix172.c line 43 function P3 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 43 function P3 __unbuffered_p3_r1=z; // file mix172.c line 43 function P3 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 44 function P3 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 44 function P3 __unbuffered_p3_r3=1; // file mix172.c line 44 function P3 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 45 function P3 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 45 function P3 a=__unbuffered_p3_r3; // file mix172.c line 45 function P3 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 47 function P3 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 47 function P3 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 48 function P3 // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 48 function P3 __unbuffered_cnt=((__unbuffered_cnt+1)); // file mix172.c line 48 function P3 // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 49 function P3 return nondet_ptr(); // file mix172.c line 49 function P3 } // c::__CPROVER_initialize // file line 14 void __CPROVER_initialize(void) { // file line 26 // file line 27 // file line 28 // file line 29 // file line 38 // file mix172.c line 1 __unbuffered_cnt=0; // file mix172.c line 2 __unbuffered_p0_r1=0; // file mix172.c line 3 __unbuffered_p0_r3=0; // file mix172.c line 4 __unbuffered_p1_r1=0; // file mix172.c line 5 __unbuffered_p1_r3=0; // file mix172.c line 6 __unbuffered_p2_r1=0; // file mix172.c line 7 __unbuffered_p2_r3=0; // file mix172.c line 8 __unbuffered_p3_r1=0; // file mix172.c line 9 __unbuffered_p3_r3=0; // file mix172.c line 10 a=0; // file mix172.c line 11 x=0; // file mix172.c line 12 y=0; // file mix172.c line 13 z=0; } // c::main // file mix172.c line 51 int _main(void) { pthread_t __pt0; pthread_t __pt1; pthread_t __pt2; pthread_t __pt3; // file mix172.c line 52 function main // START_THREAD pthread_create(&__pt0, 0, P0, 0); // file mix172.c line 53 function main L1: // START_THREAD pthread_create(&__pt1, 0, P1, 0); // file mix172.c line 54 function main L2: // START_THREAD pthread_create(&__pt2, 0, P2, 0); // file mix172.c line 55 function main L3: // START_THREAD pthread_create(&__pt3, 0, P3, 0); // file mix172.c line 56 function main L4: // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 56 function main tmp_guard=(__unbuffered_cnt==4); // file mix172.c line 56 function main // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 56 function main __CPROVER_assume(tmp_guard); // file mix172.c line 57 function main // ATOMIC_BEGIN __CPROVER_atomic_begin(); // file mix172.c line 57 function main weakchoice1=nondet_bool(); // file mix172.c line 57 function main __unbuffered_p1_r1=(c__unbuffered_p1_r1read_delayed? (weakchoice1? (*c__unbuffered_p1_r1read_delayed_var):__unbuffered_p1_r1):__unbuffered_p1_r1); // file mix172.c line 57 function main tmp_guard1=(!((((__unbuffered_p0_r1==1) && (__unbuffered_p1_r1==1)) && (__unbuffered_p2_r1==1)) && (__unbuffered_p3_r1==1))); // file mix172.c line 57 function main // ATOMIC_END __CPROVER_atomic_end(); // file mix172.c line 57 function main assert(tmp_guard1); // file mix172.c line 58 function main return 0; // file mix172.c line 59 function main }