#include /* * Command line execution: * civl verify -inputTHREADS_BOUND=10 -inputN_BOUND=40 fig4.98-threadprivate.cvl -enablePrintf=false */ #include $input int THREADS_BOUND; // upper bound of number of threads $input int NTHREADS;// number of threads $assume(0 < NTHREADS && NTHREADS <=THREADS_BOUND); $input int N_BOUND; // upper bound of N $input int N; // the value of the variable n $assume(0 < N && N <=N_BOUND); #define OWNS(numIters, threadId, index) ((index)%NTHREADS==threadId) $proc threads[NTHREADS]; $scope root = $here; int calculate_sum(int length, int *_pglobal) { int sum = 0; for (int j=0; j