“…int arrayInsert(int[] A, int len, int h) { int i=0; 1: while (i < len && A[i] < h) i++; 2: len = shift_array(A, i, 1); A[i] = h; 3: while (i < len) i++; 4: return i; } predicates: i1 = i2, i1 < len1, i2 < len2, A1[i1] < h1, A2[i2] < h2, len1 = len2, len1 = len2 + 1, len2 = len1 + 1 composition: if(pc1 < 3 && (pc2 > 0 || !cond1) && (pc2 == 3||(pc2 == 0 && cond2))) step (1); else if (pc2 < 3 && (pc1 > 0 || !cond2) && (pc1 == 3 || (pc1 == 0 && cond1))) step(2); else step (1,2); In contrast, when verifying the 2-safety property, PDSC directs its search towards a composition function for which an inductive invariant in L does exist. As such, it infers the composition function depicted in Figure 1, as well as an inductive invariant in L. The invariant for this composition implies that i 1 = i 2 at every state.…”