| | 4 | |
| | 5 | Concepts: |
| | 6 | |
| | 7 | Assume that all statements are "atomic" actions, for simplicity. |
| | 8 | |
| | 9 | dyscope: a dynamic instance of a lexical scope, with values assigned to each variable declared in the lexical scope |
| | 10 | |
| | 11 | call frame: a call frame contains a function and a location of the function (and the corresponding dyscope of the location can be obtained) |
| | 12 | |
| | 13 | call stack: a stack of call frames |
| | 14 | |
| | 15 | process: the state of a process includes its call stacks and its current program location (and thus the current dyscope) |
| | 16 | |
| | 17 | state: a state contains a dyscope tree and a number of processes |
| | 18 | |
| | 19 | independent statements: two statements `s1` and `s2` are said to be independent if for any state `S` where `s1` and `s2` are enabled, |
| | 20 | 1. `s2` is still enabled in `exec(S, s1)` and vice versa; and |
| | 21 | 2. `exec(exec(S, s1), s2) = exec(exec(S, s2), s1) ` |
| | 22 | where `exec(S, s)` denotes the state resulted by executing statement `s` at state `S`. |
| | 23 | Two independent statements commute. |
| | 24 | |
| | 25 | ample set: a set of processes at a certain state such that for all processes not in the ample set, all their reachable statements commute with any enabled statement of any process in the ample set |
| | 26 | |
| | 27 | The key of the POR is to find out the minimal ample set for a state. Usually, the dependency of statements |