| 45 | | 1. abstract function call: `f(e0,e1, ...)` |
| 46 | | `sub(f(e0,e1, ...)) = {e0, e1, ...}` |
| 47 | | 2. address-of: `&le` |
| 48 | | `sub(&le)={le} U sub(le)` |
| 49 | | 3. array literal: `{e0, e1, ...}` |
| 50 | | `sub({e0, e1, ...}) = {e0, e1, ...}`` |
| 51 | | 4. binary expression: `e0 op e1` |
| 52 | | `sub(e0 op e1) = e0.type== pointer ? {e1} : {e0, e1}` |
| 53 | | 5. bound variable expression: `eb` |
| 54 | | `sub(eb)=\empty` |
| 55 | | 6. cast expression: `(T)e` |
| 56 | | `sub((T)e)={e}` |
| | 49 | for(int i=0; i<10; i++){ |
| | 50 | a[i]=b[i]; |
| | 51 | } |
| | 52 | }}} |
| | 53 | A precise analysis should say that: |
| | 54 | `obj(a[0])={b[0]}`\\ |
| | 55 | `obj(a[1])={b[1]}`\\ |
| | 56 | ...\\ |
| | 57 | but a less-precise analysis could say that: |
| | 58 | `obj(a[0])={b[0], b[1], ...}`\\ |
| | 59 | `obj(a[1])={b[0], b[1], ...}`\\ |
| | 60 | ... |
| | 61 | |
| | 62 | A more intersting example: |
| | 63 | {{{ |
| | 64 | $parfor(int i: 0 .. 9){ |
| | 65 | a[i]=b[i]; |
| | 66 | } |
| | 67 | }}} |
| | 68 | |