Modeltron-logo-black-transparent-3444x1908.png

Hello!

Welcome to Modeltron, the elements of systems modeling.

Static and Read-only Properties of a «block»

Static and Read-only Properties of a «block»

Read-only properties of a «block» are designated with the phrase “readOnly” in curly braces after the Value Property type and default value. Read-only properties may not receive a new value after the «block» has been initialized. Friedenthal, Moore, and Steiner also described read-only properties as properties whose values “cannot change during the lifetime of their owner.”

A related concept is that of the static property. If a property is marked as static, then all instances of the «block» which owns the property have the same value for the static value property. The static property is indicated as such by underlining it.

Example of Read-only & Static Properties of a Block

Example of Read-only & Static Properties of a Block

It is possible for a property of a «block» to be both read-only and static.

In the example, the value property myValueProperty is read-only, myOtherValueProperty is static, and yetAnotherValueProperty is both read-only and static.

Reference:

Friedenthal, S., Moore, A., & Steiner, R. (2012) A Practical Guide to SysML. Waltham, MA: Morgan Kaufmann.

Property Redefinition on a «block»

Property Redefinition on a «block»

Classifier & Owned Behavior

Classifier & Owned Behavior