| OCR Text |
Show 113 and fxy are initialized to the corresponding partial derivatives for logical AND. Variable iv a l is set to the initial value which is 0 in the case of a logical AND. The value of variable mask denotes the bit used to evaluate this particular condition. It is assumed that many basic Boolean expressions in the form of D are calculated for each event. In that case, the code for each algorithm must be executed separately for each Boolean expression, with appropriate values for addr_0, addr_l, memory, and value. However, in the Unison algorithm many Boolean expressions can share the evaluation of tempi, temp2, and D, since they occupy different bits in the same cl = PC > addr.O; c2 = PC < addr.l; c3 = memory = addr_2; c4 = value != 0; tempi = f[cl+2*c2]; temp2 = f[c3+2*c4]; D = f[templ+2*temp2]; Figure 4.22. Interpreted Evaluation cl = 0; c2 = 0; c3 = 0; c4 = 0; if (PC > addr_0) cl |= mask; if (PC < addr_l) c2 |= mask; if (memory == addr_2) c3 |= mask; if (value != 0) c4 |= mask; tempi = (cl & fx) ~ (c2 & (fy * (cl & fxy))); temp2 = (c3 & fx) ~ (c4 & (fy ~ (c3 & fxy))); D = (tempi & fx) ~ (temp2 & (fy * (tempi & fxy))) ~ ival; Figure 4.23. The Unison Algorithm |