Ticc guarded commands occur in action blocks. They have the following generic format:

  guard ==> command

Syntactically, we need to distinguish between two kinds of guarded commands:

This because, as detailed in the FROCOS 2005 Paper, the local portion of an input rule needs to be deterministic.

Let us examine the structure of these commands.

Guarded Commands for Output and Local Rules, and for the Global Part of Input Rules

For an action a, these have the following formats:

We refer to a block of the form

{   guard_1 ==> command_1;
    guard_2 ==> command_2; 
    ... 
    guard_n ==> command_n }

as a block of guarded commands. Each of these blocks indicates a way in which the variables can be updated, according to the following rules:

Local Portion of Input Commands

As explained in the FROCOS 2005 Paper, the local part of input transitions must be deterministic. To ensure this, the guarded commands for the local portion of an input action have the following modified syntax:

  input a : { 
    global: ... ; 
    local: guard_1 ==> var_1_1' := expr_1_1, var_1_2' := expr_1_2, ..., var_1_m' := expr_1_m 
      else guard_2 ==> var_2_1' := expr_2_1, var_2_2' := expr_2_2, ..., var_2_n' := expr_2_n
      else ... 
      else guard_k ==> var_k_1' := expr_k_1, var_k_2' := expr_k_2, ..., var_k_l' := expr_k_l

The else clauses above give a prioritization of the guards, so that guard_i+1 is checked only if the guards guard_0, guard_1, ..., guard_i are all false. Moreover, in a command

   ... ==> var_1_1' := expr_1_1, var_1_2' := expr_1_2, ..., var_1_m' := expr_1_m 

we require that expr_1_j mentions only primed variables in the following sets:

Interaction Between the Local and Global Guarded Commands for an Input Action

An input action has both a local and a global set of guarded commands. If the global portion is false, then the input action cannot be accepted. <!> What if the local portion is false? Also in this case the input action cannot be accepted! Hence, in the following example:

input a : { 
  global: t > 0 ==> t' = t - 1 
  local:  s = 2 ==> s' := 0    }

the action a can be received only when t > 0 and s = 2. If you wish to leave s unchanged when different from 2, you have to write instead:

input a : { 
  global: t > 0 ==> t' = t - 1 

  local:  s = 2 ==> s' := 0 
    else  true  ==>         }

Which Variables Can Change Value?

What happens to the variables that are not mentioned in a guarded command?

Example

For instance, consider the following guarded command, as part of an output rule:

  busy & size > 4 ==> not busy'

As size' is not mentioned in the command, the value of the variable size does not change as the guarded command is executed. Likewise, if the Ticc program contains a variable x, then the value of x would be equally unaffected.

How to encode full nondeterminism

How can we let a variable x be free to change in a fully nondeterministic fashion, if failure to mention x ensures that x does not change value?

Abbreviations

Commands and whole rule bodies can be left empty to express common conditions.

Ticc/Guarded Commands (last edited 2006-01-27 11:51:15 by LucaDeAlfaro)