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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A sample run with the initial environment ((light, OF F ), (switch, UP )) yields<br />

one update set:<br />

U 1 = ((light, ON))<br />

After the update set is produced and applied to the environment, the machine halts<br />

its execution because it no longer has any enabled rules.<br />

<strong>The</strong> final state of the environment after the machine run is: ((light, ON), (switch,<br />

UP )).<br />

Formally:<br />

• S 0 = ((light, OF F ), (switch, UP ))<br />

• U 1 = ((light, ON))<br />

• S 1 = S 0 ◦ U 1 = ((light, OF F ), (switch, UP )) ◦ ((light, ON)) = ((light, ON),<br />

(switch, UP ))<br />

2.3 Time<br />

<strong>The</strong> basic ASM definition does not address time explicitly. A few attempts have been<br />

made to extend the ASM formalism with timing concepts [5, 7, 16]. <strong>The</strong>se attempts<br />

have their merits but they have focused on the verification of ASM behavior without<br />

explicitly addressing how time is to be specified. In these approaches, time is viewed<br />

as just another external dynamic function that can be used in rule guards.<br />

<strong>The</strong> <strong>TASM</strong> approach to time specification is to specify the duration of a rule execution.<br />

In the <strong>TASM</strong> world, this means that each step of a machine will last a finite<br />

amount of time before an update set is produced and atomically applied to global state.<br />

<strong>The</strong> semantics of rule execution are that of a delay followed by an instantaneous state<br />

update. <strong>The</strong>se semantics are analogous to the principle of durative actions, where an<br />

action takes a finite amount of time to complete before its effects are visible in the environment.<br />

At the specification level, time gets specified for each rule. <strong>The</strong> specification<br />

of time can take the form of a single value t, or can be specified as an interval [t min ,<br />

t max ]. <strong>The</strong> lack of a time annotation for a rule is assumed to mean t = 0. <strong>The</strong> specification<br />

of time using an interval is useful to capture the uncertain nature of specifying<br />

time during the early stages of system design. Furthermore, using interval specification<br />

adequately captures the interval nature of real-time systems to express worst-case and<br />

best-case execution times. For sequential execution, the worst-case execution time is<br />

defined as the longest executing path that code can take. <strong>The</strong> computation time is affected<br />

by branching decisions and algorithmic concerns. <strong>The</strong> best-case execution time<br />

is the opposite, that is, the fastest executing path that the code can take.<br />

Formally, the set of rules R in the machine definition becomes:<br />

• R = {(n, t, r) | where n and r are defined in Section 2.2, and t denotes the duration<br />

of the rule execution and can be a single value, an interval, or the keyword<br />

next}<br />

12

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

Saved successfully!

Ooh no, something went wrong!