The rest of this appendix describes the attributes and classes provided by the
modeling library. The attributes label types, members, and parameters in model
program source files. The classes define structural and collection data types for
model programs. As described in Section 10.2, a model program must use these
classes (instead of the usual .NET collection types) in order to work with the
tools.
The final section of this appendix describes how to construct and access the terms
used to represent actions, particularly when writing test harnesses.
A.1 Attributes
A.1.1 Features
Classes defined within a model program may be labeled as belonging to named
feature sets using the [Feature] attribute. A feature is a cluster of related state
variables and actions. Only classes may have the [Feature] attribute. More than one
[Feature] attribute may be used on a given class.
Feature attributes may appear in either of two forms: [Feature] and [Feature
("name")]. If no name is given, then the class name is used as the feature name.
The modeling tools provide a way to selectively load all classes tagged with a
given feature name. A typical use of features is to strengthen enabling conditions
of the model for scenario control. Another use might be to model slices of functionality
in a way that does not require explicit composition of separate model programs.
Pages:
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370