[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Priorities of the ALT and PRIALT are under the presence of the PRIPAR



The priorities of the ALT and PRIALT are under the presence of the PRIPAR
not very clear to me. 

In the following example, the properties of 

EXAMPLE 1:

PAR
  PAR
    a!
    b!
  ALT
    a?
      Pa
    b?
      Pb

is the same as 

ALT
  SKIP
    PAR
      b!
      Pa
  SKIP
    PAR
      a!
      Pb

The ALT selects a guarded process non-deterministically. Under the presence
of a PRIPAR things may become more deterministically. In the next example
the ALT should *always* choose guard a? in favor of b? so that the highest
process (a!) will be served first -- the highest process has a real-time
service to full-fill.

EXAMPLE 2:

PAR
  PRIPAR
    a!
    b!
  ALT
    a?
      Pa
    b?
      Pb

is the same as

PAR
  b!
  Pa

This property is similar to the following example that uses a PRIALT.

EXAMPLE 3:

PAR
  PRIPAR
    a!
    b!
  PRIALT
    a?
      Pa
    b?
      Pb

is the same as 

PAR
  b!
  Pa

What will be the properties of the left program when we swap the guards of
the PRIALT as shown in the following example? 

EXAMPLE 4:

PAR
  PRIPAR
    a!
    b!
  PRIALT
    b?
      Pb
    a?
      Pa

Is this example the same as 

PAR
  b!
  Pa

or  as 

PAR
  a!
  Pb

?????

The first is most efficient.

Mapping the guards like this may seem silly, but for reusing objects (or
processes) that contains a PRIALT somewhere inside this situation can occur
easily. For example, in Java we could take an existing process from the
shelf and reuse it in a new project. This process could include a PRIALT
somewhere in the code and we are unlucky if the priorities of the guards do
not match the PRIPAR construction. If the source code is missing (only the
class file exists) then we cannot change the order of the guard list -- we
are in trouble! If a PRIPAR construct is allowed to overrule the guard
priorities then we have a solution. Therefore, it may be convenient that the
ALT and PRIALT semantics can adapt themselves to the priority-relations of
the surrounding PRIPAR construction.

I would say that 

PAR
  b!
  Pa

is the same as example 4, but I may be wrong? 

Suggestions?

Gerald.

<<attachment: winmail.dat>>