Style Guidelines and Best Practices : Activity Chart Conventions : Combinational Assignments, Mini-Specs, Subroutines, and Truthtables

Combinational Assignments, Mini-Specs, Subroutines, and Truthtables

Combinational Assignments should not be used since there is no visible indication in the Properties window once combinational assignments are defined. Mini-Specs starting with “started” should be used instead.

For reading and debug purposes, mini-specs are usually no longer than one page. Also for readability reasons indents and tabs should be added to show nested loops. If the mini-spec code is longer than a screen page, it might be more suitable to implement the action line with a subroutine, described by the action language. By this the Micro Step Debugger of the simulator can be used to debug the single step of behavior. In cases where mini-specs consist of complex netted “if .. then .. else” constructs, a more suitable approach would be the use of truth tables (refer to the following figure).

Mini-Spec and Truth Table Description

Sometimes Statecharts are used instead of truth tables because of their graphical debug capabilities through simulation. However, from the methodical point of view, keep in mind that, as in most cases “if .. then else” constructs might not be associated with “real” states (refer to Describing States).