20.01.2015 Views

The TASM Language Reference Manual Version 1.1 - Synrc

The TASM Language Reference Manual Version 1.1 - Synrc

The TASM Language Reference Manual Version 1.1 - Synrc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RC 1 ⊙ RC 2 = (rc 11 , . . . , rc 1n ) ⊙ (rc 21 , . . . , rc 2n )<br />

= (rc 11 ⊙ rc 21 , . . . , rc 1n ⊙ rc 2n )<br />

= ((rr 11 , rac 11 ) ⊙ (rr 21 , rac 21 ), . . . ,<br />

(rr 1n , rac 1n ) ⊙ (rr 2n , rac 2n ))<br />

= ((rr 11 , rac 11 ⊙ rac 21 ), ...<br />

((rr 1n , rac 1n ⊙ rac 2n ))<br />

<strong>The</strong> parallel composition of resources is assumed to be additive, as in the case of<br />

hierarchical composition using the ⊗ operator:<br />

⎧<br />

⎪⎨ rac 1<br />

rac 1 ⊙ rac 2 = rac 2<br />

⎪⎩<br />

rac 1 + rac 2<br />

if rac 2 = ⊥<br />

if rac 1 = ⊥<br />

otherwise<br />

At each global step of the simulation, a list of pending update sets are kept in an<br />

ordered list, sorted by time of application. At each global step of the simulation, the<br />

update set at the front of the list is composed in parallel with other update sets, using<br />

the ⊙ operator and the resulting update set is applied to the environment. Once an<br />

update set is applied to the environment, the step is completed and the global time of<br />

the simulation progresses according to the duration of the applied update set.<br />

Because each ASM step can take arbitrarily long, checking consistency of the update<br />

sets involves a few more criteria (t ij denotes the duration of step i of machine j,<br />

T RU ij denotes the update set for step i of machine j):<br />

• For any pair of update sets occurring at the same global time t: ((t in , RC in , U in ), (t jm , RC jm , U jm ))<br />

if t in < t jm then for all future update sets (t kn , RC kn , U kn ) such that ∑ p<br />

k=i t kn ≤ t jm ,<br />

the update sets ((t jm , RC jm , U jm ), (t kn , RC kn , U kn )) must be consistent.<br />

What this criterion means is that consistency of updates made to global state must<br />

be preserved through overlapping time intervals of parallel machines. For example,<br />

if two machines write to the same environment variable, they need to do so at different<br />

non-overlapping global times. For execution to be well-defined, there must be<br />

no conflicting writes, meaning that overlapping update sets must be consistent. Parallel<br />

composition, combined with time specification, enables the specification of both<br />

synchronous and asynchronous systems.<br />

<strong>The</strong> extreme cases of this modified formalism resolve to the base case multi-agent<br />

ASMs. In the timed multi-agent ASM formalism, if all concurrent machines take the<br />

same positive amount of time for each step (For all i, j, k : t ij > 0 and t kj > 0 and<br />

t ij = t kj ) at every step, then the system is essentially a synchronous multi-agent ASM<br />

system with linear time progression (with dt = t ij ). If all agents take a zero amount of<br />

time at every step (For all i, j : t ij = 0), then the system is essentially an asynchronous<br />

multi-agent ASM system with no time progression.<br />

25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!