2.7.3 Hierarchical behavior of special-purpose behaviors

Special purpose behaviors are optional. If they are missing from a component, the corresponding behaviors of all subcomponents of the component are called recursively. If you specify a special purpose behavior, it is responsible for explicitly calling the subcomponents, using the composition keyword.

Calling a subcomponent
behavior reset(int level)
{
   // reset subcomponents
   composition.reset(level);
   // reset state variables
   status = 0;
   counter = 0;
   control = 0;
}

A missing special purpose behavior B is equivalent to:

behavior B
{
   composition.B();
}

Note:

  • If the composition statement is not present in a special purpose behavior, the corresponding behaviors of the subcomponents are never called and this might have undesirable effects.
  • A missing special purpose behavior is not equivalent to an empty special purpose behavior.
Non-ConfidentialPDF file icon PDF version101092_0100_03_en
Copyright © 2014–2018 Arm Limited or its affiliates. All rights reserved.