Producers and consumers

A composite unit (diagram
ALT

Producers and consumers in definitions

Producers and consumers exist on two different levels in CertSAFE. At the definition level, CertSAFE evaluates the rules listed above for producers and consumers and generates errors and warnings within each definition as appropriate. These rules are checked entirely within the diagram or stitch, using only the information from the definition and any definitions it directly references.

ALT

CertSAFE provides features to help you understand producer/consumer relationships in complicated diagrams. Right-clicking a component or wire (or a selected group of components and wires) in a diagram gives you options to “Trace Upstream From Selected” and “Trace Downstream From Selected”. Choosing “Trace Downstream From Selected” will select everything that uses the values produced by the selected elements, and everything that uses the values produced by those, and so on. Choosing “Trace Upstream From Selected” will do the reverse, selecting everything that is needed to produce the values of the selected elements. For complex diagrams, including diagrams that uses local variables, this provides a method of quickly seeing what is and is not relevant to a particular piece of logic.

Producers and consumers in instances

There is also a notion of producers and consumers at the instance level in CertSAFE. For any merged variable in a model without errors, the value of the variable must come from either a non-composite unit (a primitive or a table
ALT

When you mouse over the name of an instance variable (such when a diagram is in instance mode, or while the user is in Instance view) CertSAFE will display a list of the composite unit instances where the variable is referenced. These are categorized as “Producer”, “Consumer”, or “Alias”. * A “Producer” instance is a diagram that contains a non-composite unit that produces the variable. * A “Consumer” instance is a diagram that contains a non-composite unit that consumes the variable. * An “Alias” instance is a diagram or stitch that only passes the variable around without itself performing any logic on it.

Occasionally you may see a diagram instance that is categorized as “Producer/Consumer”; this means that the diagram contains both a non-composite unit that produces the variable and one or more non-composite units that consume the variable.

This list is the fastest way to navigate an instance hierarchy across data dependencies, since each item in the list is a hyperlink that will take you to that instance when clicked. So, for example, if you see a variable and you don’t know where it is produced, you can simply mouse over the variable and then click on the “Producer” entry to go directly to the diagram that actually computes the variable’s value.

Variable usage icons

ALT

CertSAFE displays icons and other visual cues to help you understand the producer/consumer relationships of variables in your model. See the article on variable usage icons for more information.