Appendix A: xUML Summary

Here is a quick reference to the key features of the Executable UML we use in this book. At the time of this writing, the most complete description is available in the book. Executable UML: A Foundation for Model-Driven Architecture by Stephen J. Mellor and Marc J. Balcer (AddisonWesley Professional, 2002). Resources can also be found in the sites mentioned on the Contact Us page in the back of this book.

xUML

xUML is a subset of UML notation with platform-independent execution semantics.

 
 

xUML supports object/data-oriented analysis without assuming any sort of object-oriented implementation.

All model elements are executable in a platform-independent context.

 
 

This means that you don’t need anything extra (for example, code inserted somewhere) to run a model.

If you have a tool that executes the model rules, you can test a model on the computer. Otherwise, you must apply the rules by hand. Either way, the rules of execution are the same. They are never subject to interpretation!

 
A421575_1_En_BookBackmatter_Figa_HTML.gif

Domain

A domain is a subject matter representing the rules and vocabulary of a real or abstract world.

A421575_1_En_BookBackmatter_Figb_HTML.gif

Bridge

A bridge is a relationship between two domains: one domain requires a capability that it cannot perform itself from another domain.

The domain that requires the capability plays the role of a client. The domain that provides the needed capability plays the role of a service.

A421575_1_En_BookBackmatter_Figc_HTML.gif
A421575_1_En_BookBackmatter_Figd_HTML.gif

Domain Chart

The set of domains and their connecting bridges necessary to build an entire software system is shown on a domain chart.

A421575_1_En_BookBackmatter_Fige_HTML.gif

A domain may be modeled in xUML, partially modeled in xUML, modeled in another language, hand coded, created in existing legacy software, or acquired from a third party.

Remember, any domain can be split across many processor/thread/task boundaries, or multiple domains can be put in the same implementation unit.

A domain chart is platform independent, so platform- and other technology-specific boundaries are not shown on the domain chart

A421575_1_En_BookBackmatter_Figf_HTML.gif

Class

A class is a definition of a set of instances such that all members of the set:

  • Have the same characteristics

  • Have the same behavior

  • Are subject to the same rules and policies

A421575_1_En_BookBackmatter_Figg_HTML.gif

Attribute

An attribute is a characteristic of something that has been abstracted as a class. It follows from the class definition that each instance must have a meaningful value for each of its attributes at all times.

At all times : The meaning and use is explained in an associated attribute description.

The values that may be assigned to an attribute are constrained by a data type.

A421575_1_En_BookBackmatter_Figh_HTML.gif

Data Type

A data type is a constraint on the real-world values that may be assigned to an attribute and the operations that may be applied to those values.

Examples:

  • Pressure, mpa Count

    • Count can be defined as an integer [0..maxint]

    • Even though it is based on integer, the only supported operations are increment, decrement, and reset.

  • Aircraft tail number

    • This is not defined as string, because many strings would be illegal. A regular expression could be defined to describe legal tail number names.

    • Also, most string operations would not be allowed on such a value.

  • Point

    • A 2D point type could be defined with operations that produce either a Cartesian or polar point, thus encapsulating the internal representation.

      r, theta = Track.Origin.Polar
      x, y = Track.Origin.Cartesian
  • Definition of types (type theory) is orthogonal to relational theory used for defining class and association structures and behavior.

Identifier

An identifier is a constraint on a set of one or more attributes on the same class such that no two instances of a class share the same value.

Real-world identifier

Invented identifier

An identifier can be a real-world identifier such as Tail Number. Real-world agencies establish this constraint.

Or it can be an arbitrary value invented for the purpose of uniqueness. In this case, the modeler establishes the constraint.

Formalizes a real-world constraint.

It is useful in conjunction with referential attributes to formalize relationships and other constraints.

Symbol

Identifiers are numbered starting at 1 for each class. Each attribute component of an identifier is tagged with {I} or {In}, where {I} means ID 1 and {In} indicates the participating ID number. An identifier attribute may participate in one or more of its class’s identifiers.

A421575_1_En_BookBackmatter_Figi_HTML.gif

The greater UML community encourages the implicit assumption of an architecture-supplied handle to manage links among instances. In xUML, we rely on at least one explicit identifier on each class. This ensures that we have a consistent system of relationship references, and it gives us a powerful tool for expressing restrictive constraints on relationships.

Association

An association is a relationship that holds systematically among instances.

A421575_1_En_BookBackmatter_Figj_HTML.gif

Association Class

An association class formalizes an association between two other classes.

A421575_1_En_BookBackmatter_Figk_HTML.gif

Always use an association class for many-to-many and any conditional-to-conditional or many-to-0..1 association to ensure that a referential attribute always has a non-null value.

Generalization/Specialization

A set of instances may share properties and rules and at the same time have exceptions. To handle this situation, the set definition established by a class is partitioned into mutually exclusive subsets.

At all times:

An ATC cannot exist without being On or Off Duty.

An On or Off Duty Controller is certainly an ATC.

A421575_1_En_BookBackmatter_Figl_HTML.gif

Each real-world object has simultaneous membership in the superclass and subclass sets. Consequently, one object = two connected instances in a generalization.

Generalization, in this case, is employed to establish an exclusive OR constraint.

Other Activity Types

In xUML, activities are primarily state activities. But they are also written in class methods, external entity operations, and domain operations.

Class Method

There are several reasons to put an activity in a class method rather than in a state. For example, an activity might be triggered from multiple states. Or a class may not have a state model, but still be subject to state-less processing.

A421575_1_En_BookBackmatter_Figm_HTML.gif
A421575_1_En_BookBackmatter_Fign_HTML.gif

The model merely states that when a derived attribute is accessed, it provides a correct value according to a platform-independent formula. When and how frequently the value is updated, on the other hand, is platform specific and, hence, not in the model.

Domain Operation

  • A domain operation provides a runtime, model-level API to external domains. The activities should do nothing more than validate incoming data, locate relevant model elements, and then issue an appropriate event or invoke a class method.

  • Limitations: Cannot refer to self attributes because there are none.

Domain operation in Lubrication domain invoked via bridge from UI domain

A421575_1_En_BookBackmatter_Figo_HTML.gif

State Model (Instance Lifeycle)

By definition, all instances of a class share the same behavior. This behavior follows a common life cycle that can be formalized with a state model. (There are many other uses of state models in software, but in xUML, we use them exclusively to capture instance life cycles).

State Machine Behavior

  • An instance remains in a state of its state machine for events to occur.

  • When one or more events occur, one of them will be consumed according to the event synchronization rules.

  • A consumed event results in one of three responses:

    • Follow a transition (as shown on the state model diagram)

    • The instance follows the transition and immediately begins executing the activity in the destination state (which may be the same state).

    • Ignore the event

    • The event is consumed and exists no longer.

    • Can’t happen

    • The event is not anticipated and constitutes an unrecoverable error in the model. The model execution domain is responsible for handling the error outside the model.

Platform Independent Synchronization Rules

Events

At some time after an event is generated, it is made available to the destination instance or external entity.

Events are never lost: every event will be delivered to an instance or external entity to which it is directed.

After an event is consumed by an instance, it no longer exists.

Multiple events can be pending for a given instance.

  • (For example, events may arrive for an instance while it is executing an activity. Or, multiple events may simply arrive concurrently.)

If events are pending for an instance that were generated by different senders, it is indeterminate which event will be consumed first.

An event to self is always consumed by the instance that sent it before that instance consumes any other event.

If an instance generates multiple events to a target instance, the events will be received in the order generated.

Activities

An activity takes time, possibly none, to execute. (The actual duration depends on the platform.)

Once initiated, an instance’s state activity must complete before another signal can be accepted by the same instance.

An activity always runs to completion in xUML. So, if you need the ability to interrupt behavior at the model level, break it down into multiple activities spread across one or more state models.

Only one state activity of a given instance can be in execution at any time, because an instance is in only one state at a time.

Multiple actions in an activity can execute concurrently. Activities in different instances can be executing concurrently.

When an activity completes, it must leave the system consistent.

State Model (Assigner)

An assigner is a special state model that manages a competitive association. It follows all of the synchronization rules, but has no instances. Instead, a token moves through the states.

We need them when competition among instances makes it impossible for instances on either side of the association to avoid linking to the same instance.

Single Assigner

A421575_1_En_BookBackmatter_Figp_HTML.gif

Multiple Assigner

Now let’s expand the scope to consider multiple departments in a store. In this case, there is localized competition among customers and employees within each department. This requires a multiple assigner.

A421575_1_En_BookBackmatter_Figq_HTML.gif

The important concepts are 1) a single point of control is necessary to resolve competition in an asynchronous world and 2) the xUML synchronization rules make it possible to specify a platform-independent solution. The solution is not left as an “implementation detail.”

Polymorphic Events

A polymorphic event is declared on a superclass that does not define a response to the event and need not have a state model at all.

The event is delegated through each specialization branch originating from that superclass.

Each encountered subclass in each specialization hierarchy must either further delegate the event or respond to that event in its own state model.

In a single, or repeated specialization (same direction), exactly one state machine must respond to any runtime instance of the event.

A421575_1_En_BookBackmatter_Figr_HTML.gif

If there are multiple specializations (different directions), the event is received by one state machine instance in each.

A421575_1_En_BookBackmatter_Figs_HTML.gif

External Entity

An external entity serves as a proxy for runtime communication with external domains. It can be named to match the domain or it can represent a large-scale or abstract entity handled by the domain. (Care should be taken to avoid naming a specific model or code element in the other domain subject to change.)

An external entity operation is triggered by a synchronous or asynchronous call from inside a domain. The activity typically invokes a domain operation provided by another domain.

A421575_1_En_BookBackmatter_Figt_HTML.gif

Appendix B: Scrall Overview

Scrall (Starr’s concise relational action language) is the psuedo-action language that we use in this book to specify model actions. You can find the most complete and current description of the language at www.executableuml.com . For now, we present those aspects of the language used in this book to provide more context than the running explanations in the text.

Principles

As with the class and state model facets of xUML, the action language must be executable and platform independent. Scrall is designed to be consistent with xUML execution semantics. At the same time, it strives to be easy to read and write.

Names

Scrall is designed to be readable without being needlessly verbose, delegating the hard work to the parser and advanced editing tools. The names of model elements, variables, and values may contain spaces, though care must be taken not to incorporate keywords delimited by spaces into names. To maximize the comfortable use of whitespace, effort is made to define as few keywords as possible. A variable name such as the shift spec is, therefore, perfectly legal. This approach differs from the design of a language that attempts to be readable by introducing wordy keyword phrases.

Variable Types

There are three kinds of variables: instance set, scalar, and relation. Only the first two are used in this book, so we only lightly describe the relation variable in this appendix.

Instance Set Variable

An instance set variable is typed as a class in the local domain and refers to zero, one, or many instances of that class.

Relation Variable

A relation is a set of attribute/data type pairs crossed with a set of tuples, each of which supplies a value for every attribute. There may be zero, one, or many tuples assigned, and zero, one, or many attribute, data type pairs. A relation variable holds a relation that can be visualized as a table (even though a relation really isn’t a table). A tuple is a simple case of a relation, so there is no need for an additional tuple variable type. Here is an example of an assignment to such a variable:

acdata #= /R8/Aircraft.(ID, Altitude, Airspeed)

Here the acdata relation variable holds a relation with the attribute:data type pairs ID: Tail Number, Altitude:MSL Altitude, and Airspeed:K, and a tuple supplying a set of corresponding values for each instance of Aircraft. Again, it is easy to visualize this as a table with attributes in the heading and each row representing an instance of Aircraft. The #= assignment operator implicitly types acdata as a relation variable.

Scalar Variable

The term scalar in our context means “not a relation.” A scalar variable holds a single value belonging to a set defined by a data type. The definition of data types is orthogonal to the relational organization of instance data in classes. Examples of system-supplied scalar data types are integer, real, rational, and string. By convention, system types are lowercase names. An example user type might be GPS Coordinate. By convention, user types are all initials uppercase—for example, Compass Heading .

Data Types

A data type defines a set of scalar values and the operations that can be performed on members of that set. System-supplied data types are typically boolean, integer, real, and string. User types such as GPS Coordinate, Pressure, or License Number can be constructed based on restrictions, extensions, and structural combinations of these types.

Operations can be performed by using infix, prefix, and suffix operators and with names accessed using . notation. For example, the Count data type may be defined as an integer in the range [0..maxint] with the supported operations being incr , decr , and reset .

++cars passed or cars passed.incr might both invoke the increment operation defined for the Count type. cars passed.reset could set the value to zero.

current latitude = position.latitude invokes the latitude accessor on the GPS position type.

System Variables

System-supplied variables are prefaced with an underscore. _now , for example, provides the current time to models in any xUML domain. So that the models can be run on as many MX domains as possible, there are few system variables.

Time logged in = _now.HMS

Here the _now system variable invokes the system-defined HMS operator, which returns time in hours, minutes, and seconds. The assignment implicitly types the scalar variable on the left side.

No Literals

Literal values may not be specified in actions. The idea is to eliminate the encoding of data into action language rather than where it usually belongs, as instance data in the class models. Mechanisms are provided for allowing access to special values such as pi, zero, and so forth. In all cases, though, these are named values defined outside the action language itself. For example, default initial values can be specified with the standard UML notation on the class diagram. Double underscores reference a named value defined somewhere outside the state models __pi , __0 . Note that with a variable typed as Count described earlier, you can set it to zero by invoking the reset operation.

Boolean Values

The set and unset operations are used instead of explicit assignment to literal true and false values.

Examples:

  • Injecting.set ⇒ set to true

  • Injecting.unset ⇒ set to false

  • if not Injecting ... ⇒ to test state

Enumerated Values

Although literal values are forbidden, you can define enumerated data type values. A Fluid State data type might enumerate the values low , very low , empty , and normal . To refer to an enumerated value, put a . in front of it.

Level = .very low

If the left side is an attribute, it is already typed, presumably as Fluid State in this example. With a scalar variable, it may be necessary to explicitly type it with the :: type declaration operator.

level var::Fluid State = .full

Spaces are allowed in enumerated values.

Attribute References

An instance refers to its own attribute values without qualification. So an ATC instance can refer to its Last shift ended attribute without the need for any kind of self-qualification. Input parameters are distinguished with the in . preface to avoid name collisions. And a variable name may not match any attribute name of the local class.

Assignment Operators

Variables are implicitly typed when first introduced on the left side of an assignment operator. It is also possible to explicitly type them by using the :: operator, though this is rarely necessary.

Operator

Meaning

.=

Assigns zero or one instance. If multiple instances are found, an error results. Normally used in conjunction with a set of identifier values to select an instance.

..=

Assigns zero, one, or multiple instances to an instance set variable.

.=.

Assigns an arbitrary single instance from a set of instances, or no instance if none is found.

=

Assigns a scalar value.

#=

Assigns a relation.

Instance Selection

To select an instance, specify a class name followed by optional selection criteria in parentheses.

Selection with No Criteria

No critiera is required to select a singleton instance of a class.

the shift spec .= Shift Specification

The preceding statement selects one instance of the Shift Specification class. Because no criteria is supplied, and because there is only one instance in a singleton class, that instance is selected. If none is found, an error occurs.

Or you can select all instances of a class:

all aircraft ..=Aircraft

Because no criteria is specified, the all aircraft instance set variable will contain references to all instances of Aircraft . If there are presently no instances of Aircraft , zero instances will be referenced by the variable.

Selection with Criteria

The usual comparison operators ( > , >= , and so forth) are supported. The : symbol stands in for == because in the most common case, you want to match a value, such as selecting the instance with a matching ID. Conceptually, you are looking for a match, so a single symbol is used. Read it as matches .

For example:

my station .= Duty Station( Number: in.Station )

This selects a single instance of Duty Station whose Duty Station.Number matches an input parameter value.

Boolean operators such as and , not , and or may be mixed in. For convenience, the , separator is interpreted as an and operator. The combination of the : and . operators make it easy to select a single instance based on a set of matching values without the clutter of a series of and and == symbols.

landing runway .= Runway( Airport: in.airport code, Runway ID: in.runway )

This selects an instance of Runway that matches two values. Presumably, the two values taken together are supposed to be unique for the Runway class. If more than one instance is found, an error results.

high fast aircraft ..= Aircraft( Altitude > high alt and Airspeed > high speed )

This selects all aircraft above a certain altitude and faster than a certain speed.

Relationship Navigation

The / symbol delimits hops across class model relationships. The leftmost / indicates the beginning of a relationship path expression beginning at the local instance.

hoff zone .= /R2/Control Zone( Name: in.Zone )

The path expression on the right-hand side starts at the local instance and hops across R2 to all related instances in the Control Zone class. The selection criteria narrows the set to the single instances whose Name attribute matches the in.Zone value. Assuming that the Name attribute is the identifier of Control Zone , either zero or one instances should be assigned to the left side.

Relationship names (R1, R2, and so forth), verb phrases, and class names may appear between the hop delimiters to define an unambiguous selection path.

Signaling

To send a signal, use the following expression:

<event name>(params) [after <duration>] -> instance set

For example:

Low injection pressure -> /R3/Reservoir

Here an event is sent to the linked instance. If multiple instances are in the target instance set, a separate event will be delivered to each.

An instance can send an event to itself by using the me keyword. This keyword represents the local state machine.

Injection canceled -> me

An assigner state model does not refer to any local instance, but because the me keyword refers to the local state machine, it can be used there also for self-directed events.

A delay can be specified as shown:

Good injection -> me after /R4/Injector Design.Good injection duration

Here the Good injection event is sent after the duration specified in the related Injector Design. The relationship along R4 is presumably to one unconditional. An error occurs if the path expression does not select exactly one instance.

Link/Unlink

The association operators are link & , unlink !& , and swap .

The form is as follows:

[<instance set>] & <association>/<instance set>

Each instance in the optional leftmost instance set is linked to each instance referenced by the set on the right across the path. If the instance set on the left is not specified, it is assumed to be the local instance.

& /R3/my station

This links the local instance to each instance referenced by the variable across R3.

If the association is formalized by an association class, an instance of the association class will be created for each link. The required referential attributes will be set to values referring to each participating class instance as appropriate. Any other attributes will be set to their default initial values.

Another way to link is to set the values of a set of each referential attribute on the association to match the values of corresponding identifier attributes on the other side of an association. In general, it is safer to use the link action.

The unlink operator is !& and uses the same form as the link action:

!& /R5/takeoff runway

This unlinks the local instance from all instances referred to by the takeoff runway variable across R5 .

Another way to unlink is to simply delete the instance holding the referential attributes referring to the other side of an association.

With an unconditional one association, it is important not to leave the association unconnected. To avoid this situation, use the swap operator instead of a pair of link and unlink actions:

swap /<association>/<old instance> with <new instance> [on <association>]
    !new missing: <action block>
    !old missing: <action block>


swap /R2/hoff zone with new controller    [handed  off]
    !new missing: UI.Unknown controller( Controller: in.Controller)
    !old missing: UI.Zone not handled by( Controller: ID)
!handed off {
    // further actions assuming handoff succeeded
}

The error conditions underneath the swap operation are explained next.

Error Handling

Some actions may trigger unrecoverable errors. Each such error sets a named guard. The names are predefined for the action. If the error is, in fact, recoverable, the modeler can specify an internal response and set an optional user-defined guard, with the [] guard set brackets to regulate downstream processing.

In the swap action example, two guards, new missing and old missing , are predefined for the action. A user-defined guard is set to the right of the swap action, which will be disabled if any error occurs. A single action is specified for each of the two possible errors, making them both recoverable. If neither error occurs, the handed off guard is not disabled, and an action block may be specified associated with that guard.

my station .= Duty Station( Number: in.Station ) [station OK]
    !empty: UI.No such station( Number: in.Station )
!station OK {
    // actions that assume a station has been selected
}

Here the .= assignment action has two errors predefined: empty and many . If both are ignored, they are unrecoverable. By inserting the !empty clause, the modeler indicates that the empty case is okay and there is a response. Note that in the earlier singleton selection example, the error should be unrecoverable. The station OK guard is disabled if empty occurs and can be used to enable further processing.

If there are several actions to perform, they can be enclosed in brackets to form an action block. Otherwise, a : follows the error name.

Subclass Migration

The migrate operation deletes the local instance in one subclass, creates it in another, and relates the new subclass instance to its parent superclass:

migrate [<instance set>] to <subclass name>

All instances in the set are migrated to the destination subclass. If the instance set is omitted, the local instance only is migrated:

migrate to On Duty Controller

If the local instance is an Off Duty Controller , it will be migrated to the On Duty Controller subclass.

This is a convenience action that replaces the corresponding create and delete actions that would be otherwise necessary and ensures that a correct migration occurs without breaking the integrity of the model by, say, leaving an illegal orphaned subclass instance behind.

Interaction with External Domains

Other than special access provided to system-supplied underscore variables, there are two ways to interact with other domains at runtime.

Asynchronous: Signal to External Entity

Here a signal is sent to an external entity, which is then responsible for mediating that signal out to another domain in some form. Unlike a regular event, an asynchronous signal is not directed to any particular instance in the external domain. It is simply addressed to the external entity.

Start monitoring => SIO
<signal name><parameter list> => <ext entity name>

This is used when you want to signal an activity in an external domain with the expectation of an asynchronous response at an undetermined point in the future.

Here the warning signal is sent to the UI external entity acting as a proxy, presumably for the UI domain.

Synchronous: Invoke Operation on External Entity

Here there is an immediate and complete interaction with an external domain. A value may or may not be returned, but there is no further activity triggered externally.

UI.Warning( MSG Control Zones Active, ID )
<EENAME>.<operation name><parameter list>

Self Reference

When sending a signal to self, the me keyword refers to the current state machine instance. In an instance life-cycle state activity, this corresponds to the local instance’s state machine. In an assigner state activity, there is no class instance, so me refers to the assigner state machine instance.

Events to Assigner State Machines

An assigner state machine is attached to a competitive association—that is, an association with constrained multiplicity (a 1 on one or both sides), where instances on both sides are concurrently attempting to link to one another.

In such a case, the association is bound to one or more state machines that resolve the competition. This is called a single assigner association . If all instances on one side can link to all instances on the other side, a single assigner suffices. But if an instance on one side of the association may link to only a subset of instances on the other side, a separate assigner state machine is required for each subset. This is called a multiple assigner association .

The format for sending an event to an assigner state machine depends on whether the target competitive association is a single or multiple assigner.

For a single assigner, do this:

<event name> -> <path to association>/assigner
Customer waiting -> /R2/assigner

For a multiple assigner:

<event name> -> <assigner association>(<partitioning instance>)
Group ready -> /R6/assigner(/R5/Signal Converter)

The partitioning instance is the one that breaks, via some association, one class participating in the competitive association into subsets.

In both cases, the event is addressed to a single assigner state machine and not to any instance life-cycle state machine.

Class Method

A class method is invoked by using dot notation on an instance set variable. If the set contains multiple instances, each instance’s local method is invoked.

allAircraft ..= Aircraft // All aircraft selected
allAircraft.verifyPosition() // is applied concurrently to each instance
Aircraft.verifyPosition() // does the same thing without the instance set variable

Parameters input to an activity are available, as in.<parameter name> .

When specifying a parameter list for a class method invocation or any other action that takes a parameter list, the format is as follows:

( <parameter name>: value, ... )

There are some shortcuts to reduce verbosity. If the parameter name and the name of the variable supplying the value are the same, the parameter name can be omitted.

More Commands

Only the subset of Scrall necessary to follow the examples in this book has been covered in this appendix. A more complete (and evolving) specification is available online at www.executableuml.org .

Appendix C: Pycca Language Overview

This appendix summarizes the pycca domain-specific language and the most important C preprocessor macros used for translating state activities. Complete documentation can be found at the book’s website, www.modelstocode.com .

Invocation

pycca ?OPTIONS? FILE ?FILE FILE ...?

The pycca program translates a specification of a domain into C code that is suitable for use with the ST/MX Model Execution domain. The language that pycca translates is a simple configuration language that allows the specification of domains, classes, state machines, and other model elements. Any associated processing is specified in ordinary C code.

Pycca generates two files from its input. One file is the generated C code, named by appending a .c suffix to the basename of the first input file. The other file is a generated header file that has an .h suffix. More than one input file may be given in the invocation. Subsequent files are processed as if all the files had been concatenated together. Typically, second and subsequent files hold domain population information so that a domain may be populated differently without modifying the file containing the translation of structural aspects.

Options

-help or -?

Print the help message.

-version

Print the version number and license for pycca, and then exit.

-noline

Do not output #line directives in the generated file that reference the pycca source file. Normally, the generated C code contains line directives too, so that compiler error messages reference the pycca source rather than the generated code. However, some debuggers are confused by these directives.

-output filename

Output the results to filename . This option allows finer control of the output file names. By default, pycca derives the output file names from the source name by substituting any suffix in first FILE argument with .c and .h . If filename is a directory, the output file names will be constructed as usual, except with filename as the leading part of the path. Otherwise, filename is used as the base for constructing the output file names by substituting .c and .h for any suffix that filename may have.

-instrument pattern

Insert instrumentation code for all classes that match pattern . To instrument everything, specify pattern as an asterisk (*). Pattern is a list of simple wildcard-type string-matching expressions. Any functions for a class whose name matches any of the given patterns will have instrumentation code inserted at the beginning of the function that is intended to help trace code execution. Note that pattern is interpreted as a list of whitespace-separated elements and that any wildcard specifications in the pattern will usually require quoting to prevent interpretation by the invoking command shell.

-noC99

By default, pycca produces code intended for a C compiler that meets the C99 standard. Supplying this option removes any C99 constructs in the generated code. This is for the benefit of old compilers. Note, however, that pycca does not examine any of the passed-through code, and it may well contain constructs that a particular “C” compiler does not accept.

-dataportal

Insert into the generated code file a set of data structures and encodings that allows certain model-level operations to be invoked from outside the domain. This data is used with the portal code to support bridging into the domain.

-portalcode

Create the files pycca_portal.h and pycca_portal.c in the current directory. Pycca exits successfully after creating the files. These two files are the C code used in conjunction with the data structures generated with the -dataportal option.

Lexical Conventions

Pycca uses a several lexical conventions to distinguish language constructs for C code constructs.

Comments

Start with a sharp character ( # ) and continue to the end of the line.

Whitespace

Is generally ignored, and no constructs depend on any particular arrangement of whitespace.

C Variables

Any text appearing between matching parentheses, (…), is taken to be a list of comma-separated C variable or parameter declarations. The C declarations of parameter lists and attribute declarations are parsed. Because of the inherent ambiguity of typedef type aliases and the complexity of certain C declarations that involve constant expressions, it is possible for pycca to incorrectly parse the declaration. These issues can usually be solved with an appropriate typedef included in the implementation prolog section.

C Code

Any text appearing between matching braces, {…} is taken to be a C code sequence and is otherwise uninterpreted. The determination of the matching enclosing brace accounts for the syntax of the C language. Note that comments in C code must follow C language comment conventions, because any code is passed through to the C compiler.

Name

A sequence of a letter followed by an arbitrary number of letters, decimal digits, or underscore characters that is not also a keyword. This is the same convention used for C identifiers.

Number

A sequence of decimal digits.

Keywords

The tokens in Table A-1 are keywords and may not be used where an arbitrary name is required.

Table A-1. Pycca keywords

attribute

class

constant

constructor

default

destructor

domain

dynamic

end

epilog

event

external

final

implementation

initial

instance

interface

machine

operation

polymorphic

population

prolog

reference

set

slots

state

static

subtype

Other Tokens

The strings in Table A-2 are also lexical tokens.

Table A-2. Other Pycca Tokens

->>

->>c

->>n

->>l

-ddd>> , where ddd is a sequence of decimal digits

->

Domain Definition

The pycca language allows the definition of domains . Domains consist of a set of components such as classes and operations. In this section, we show the syntax for defining domains.

domain

Domain definitions start with the domain keyword followed by the name of the domain and stops at the matching end keyword.

domain lube
    # Put your domain definition here
end

The remaining statements in this section may appear inside the domain definition. For brevity, we assume that the statements are enclosed in the domain statement.

class

A class is a template for data and behavior. A class name must be a valid C identifier. A class definition starts with the class keyword and stops at the matching end keyword. See the class definition section for statements to define the properties of classes.

class Air_Traffic_Controller
    # statements defining the Air Traffic Controller class
end

domain operation

The procedural interface to a domain consists of a set of domain operations . Domain operations are converted into ordinary C functions. They are made external in scope, and their prototype is inserted into the generated header file. If a domain operation returns a value, the type is specified by following the interface with a colon (:) and a variable type. If no return type is specified, the function is typed as void . To help manage the global namespace, the name of the domain and an underscore are prepended to the C function that is generated for a domain operation.

domain operation
Injector_max_pressure(
    InstId_t injId)
{
    PYCCA_checkId(Injector, injId) ;
    ClassRefVar(Injector, inj) = PYCCA_refOfId(Injector, injId) ;
    if (IsInstInUse(inj)) {
        InstOp(Injector, Max_system_pressure)(inj) ;
    }
}

external operation

Complementary to domain operations are external operations. They are defined similarly to domain operations. External operations define the external function dependencies of the domain.

external operation
SIO_Inject(InstId_t injectorId)
{
    // any code here is not passed through
}

The domain expects these functions to be supplied from elsewhere. The preceding example places the following external declaration into the generated header file (assuming the operation is defined in the lube domain).

extern int eop_lube_SIO_Inject(InstId_t injectorId) ;

interface prolog, implementation prolog, interface epilog, implementation epilog

Additional code can be placed in the generated files either at the beginning ( prolog ) or at the end ( epilog ). The interface prolog statement places code near the beginning of the generated header file, and implementation prolog places code near the beginning of the generated code file. Replacing prolog with epilog causes the code to be included at the end of the respective generated files. There may be multiple prolog or epilog statements, and the contents are accumulated across all such statements to be placed in the generated files at the appropriate place.

interface prolog {
    #include "pycca_portal.h"
    #include <stdint.h>
    // Any additional interface includes, etc.
    typedef uint32_t Count ;
}


implementation prolog {
    struct Point {
        int x ;
        int y ;
    } ;
    static int multPoint(int a, Point *p) ;
}


interface epilog {
    #define POINT_DEFINED 1
}


implementation epilog {
    static int multPoint(
        int a,
        Point *p)
    {
        // implementation of multPoint
        p->x *= a ;
        p->y *= a ;
    }
}
end

instance

The instance statement is used to define initial class instances. Instances are given names specified as class@name. The values of all attributes that do not have a defined default value must be specified. For attributes that have a defined default value, they are given that default value if not mentioned in the instance definition. Otherwise, the default value is overridden with any value given in the instance definition.

instance
Injector_Design@ihn4
    (Model_Name Model)                  {"IHN4"}
    (MPa Min_delivery_pressure)         {19}
    (MPa Max_system_pressure)           {35}
    (MPa Max_dissipation_pressure)      {32}
    (Seconds Delivery_window)           {90}
    (Seconds Good_injection_duration)   {9}
end

table

When there are a number of instances of a particular class, the instance statement can be tedious to use and obscures the nature of the instances as a group. In this case, the table command allows many instances to be defined in a tabular arrangement. Default values for attributes can be specified by using a hyphen (-).

table
Lubrication_Schedule
    (Name_t Name)
    (Duration Wait_interval)
    (Duration Monitor_interval)
    (Count Max_low_lube_cycles)
    (bool Default_continuous_operation)
    (Count Default_max_cycles)


@gearbox    {"Gearbox"}     {210}   {45}   {8}    {true}   {5000}
@generator  {"Generator"}   {120}   {25}   {10}   {true}   {10000}
@shaft      {"Shaft"}       {90}    {30}   {10}   {true}   {10000}
@test2      {"Test2"}       {20}    {15}   {1}    {false}  {200}
end

Class Definition

In this section, we describe the pycca statements that are used to define the properties of classes. Class definitions are contained within enclosing class and end statements. For brevity, from here on we omit the surrounding class and end statements.

attribute

Attributes are declared in the same way as structure members in C, but without any punctuation. Following the lexical conventions, the C declarations appear in parentheses. The default value of an instance can also be specified. The default value is used only if no value is specified when an initial instance of the class is defined. Default values are used only when specifying the set of initial instances. For dynamically created instances, all attribute values are set by running code. The default value must evaluate to a valid C compile-time constant expression (because it will be used as an initializer). Because default value specifications are passed through to the compiler, they must be enclosed in braces ({}).

attribute (Model_Name Model)
attribute (MPa Min_delivery_pressure)
attribute (MPa Max_system_pressure)
attribute (MPa Max_dissipation_pressure)
attribute (Seconds Delivery_window) default {30}
attribute (Seconds Good_injection_duration)

reference

A reference is a special kind of attribute that is turned into a pointer to a specific class structure. The reference is given a name, which generally will be the same name as the relationship it implements (perhaps augmented with an annotation if the relationship is reflexive). The type of the attribute need not be specified because it can be deduced as a pointer to a structure that matches the class name.

Singular References

A single valued reference is used to implement traversal of a relationship on the side that is one or one-conditional . In the case of a singular reference, a simple pointer member holds the address of the referenced instance, and NULL may be used to indicate conditionality.

reference R4 -> Injector_Design
Multiple References

A multiple reference implements a relationship traversal for a side that is many or many-conditional . Using the ->> symbol will cause pycca to insert an array of pointers. The ->> notation comes in several alternate forms that are used to control the details of how the array of pointers is allocated. If ->> or ->>n is used to define the multiple reference, the class structure has a pointer member defined for it that will point to a NULL terminated array of class references. For example, the class fragment:

reference R2 ->> c1

If ->>c is used to define the reference, the array of class references is counted , and the class structure will have two members defined for it, a pointer to the array and a count value.

reference R3 ->>c c5

For dynamic relationships, two alternatives are provided. If the reference specification is of the form - ddd>> , where the ddd stands for a set of decimal digits, then an array of class references is allocated in nonconstant memory. When the count form is used, the class instances will have an array of pointers of the specified size defined as part of their class structure.

reference R4 -20>> c7

If the reference specification is of the form ->>l , a doubly linked list is set up to manage the multiple relationship. The memory for the links is easily managed, and referenced instances may be easily added and removed from the list. A set of macros, defined later in this appendix, is provided to hide the details of the linking, unlinking, and traversal mechanism.

reference R2 ->>l Control_Zone

subtype

The subtype statement is used to declare the necessary data structures to hold generalization relationship information in class structures. Generalization relationships can be implemented as either a reference or union generalization.

Reference Generalization

A class defines storage for a generalization relationship implemented by reference using the subtype ... reference statement. This statement gives a list of classes that are to be considered as the subtype classes.

subtype R1 reference
    Off_Duty_Controller
    On_Duty_Controller
end
Union Generalizations

In simple cases, typically a generalization hierarchy that is only a single level deep, it is usually more convenient to hold the subclasses of the superclass directly in the storage of the superclass instances as a union data type.

subtype R1 union
    Off_Duty_Controller
    On_Duty_Controller
end

machine

The machine statement is used to define a state model for a class to capture its life-cycle behavior. The statements used within the machine statement to define the state model are given in the State Model Definition section.

machine
    # statements to define a state model for the enclosing class
end

population

The population statement defines the storage characteristics of the instance population of a class. Class populations can be declared as dynamic, static , or constant . If no population clause is present, population static is assumed. A class population is dynamic if instances are created and deleted at runtime. Class populations that are not created and deleted at runtime are termed static . This implies that the number of instances does not change over the course of running the domain. A special case of static is a class population that is constant . A constant population is both static and read-only (its attributes are not updated).

population dynamic

slots

The slots statement defines the number of class instance storage slots that are allocated beyond those occupied by initial instances. Additional slots only be defined only for class populations that are dynamic.

population dynamic
slots 5

class operation

A class may define class-based operations by using the class operation statement. Class operations do not arise from model elements, but are implementation constructs provided to factor common code into a single function.

class operation
findByName(
    char const *name) : (struct Lubrication_Schedule *) {
    ThisClassRefVar(ls) ;
    PYCCA_selectOneStaticInstOfThisClassWhere(ls, strcmp(ls->Name, name) == 0)
    return ls == ThisClassEndStorage ? NULL : ls ;
}

instance operation

The instance operation statement is used to translate instance-based operations. Instance operations have an implicit first parameter that is a pointer to the instance on which the operation is to be performed. It is not necessary to declare the self variable, as pycca will insert it. However, because this is C, it is necessary to supply a value for the implied self parameter when invoking an instance operation.

instance operation Max_system_pressure() {
    ExternalOp(ALARM_Set_pressure_error)(PYCCA_idOfSelf)    ;
    ClassRefVar(Autocycle_Session, acs) = self->R2 ;
    InstOp(Autocycle_Session, Deactivate)(acs) ;
}

polymorphic event

The polymorphic event statement declares one or more events to be polymorphic. A polymorphic event can be declared only for a superclass.

polymorphic event
    e1
    e2
end

constructor

The constructor statement defines a constructor function for a class. This function is invoked with only the implicit self parameter whenever any instance of the class is created at runtime. If any class that contains a constructor also has an initial instance population specified, pycca will generate a function of the form <domain name>_Ctor, where <domain name> is replaced by the name of the domain. This function will invoke the constructor for all initial instances of all classes that have defined a set of initial instances and also have defined a constructor. It is up to the user to invoke this function during the application initialization phase (for example, in a domain operation that is invoked at initialization time).

attribute (int count)
constructor {
    self->count = 0 ;
}

destructor

The destructor statement defines a destructor function for a class. This function is invoked with only the implicit self parameter whenever any instance of the class is created at runtime.

attribute (int count)
destructor {
    reportCount(self->count) ;
}

State Model Definition

The statements in this section are used to define a state model for a class. State model definition statements must appear in enclosing machine and end statements. For brevity, we omit the enclosing machine and end statements.

state

The state statement defines a state in a state model. A state has a name and may have parameters that are passed to it as part of the event that causes the transition into the state. These parameters, if any, are listed in parentheses following the state name. A state has C code associated with it that is run when the state is entered. A set of preprocessor macros are provided to facilitate interfacing with the ST/MX runtime. The macros are discussed in the “Activity Macros” section.

state BUILDING_PRESSURE()
{
    if (self->Pressure > self->R4->Min_delivery_pressure) {
        PYCCA_generateToSelf(Above_inject_pressure) ;
    }
}

transition

The transition statement is used to specify the transition behavior of a state model. This statement lists the current state, event, and new state. Note that there is no separate list of events that are specified. Event names are defined when they appear in transition statements. The state name consisting of a period character (.) is the pseudo-initial state and defines the event in the transition to be a creation event.

transition BUILDING_PRESSURE - Above_inject_pressure -> INJECTING_AT_PRESSURE

default transition

The default transition statement defines the behavior of any transition not explicitly mentioned in a transition statement. The default transition can be IG and the event is ignored, or CH and the event causes an error condition. If no default transition statement is given in the definition of the state model, CH is assumed.

default transition IG     # ignore unexpected events

initial state

The initial state statement defines a default initial state for the state machines. If no initial state statement is given in a state model definition, the first state defined is taken to be the default initial state.

initial state SLEEPING

final state

The final state statement defines a state in which the instance of the class is automatically deleted by the runtime after the activity of the state has been executed.

final state perish

Activity Macros

This section gives a summary of the most frequently used preprocessor macros. This list is not comprehensive, and the full list can be found in the online materials. We divide the interface descriptions into groups according to the model elements upon which they operate.

Instance References

Frequently, there is a need to declare C variables that will hold a reference to class instances or refer to sets of class instances.

ClassRefVar(c, v)

Declare a variable suitable for holding a reference to a class instance.

c

The name of the class to which the instance refers.

v

The name of a C variable.

ClassConstRefVar(c, v)

Declare a variable suitable for holding a reference to a class instance whose instance population is constant.

c

The name of the class to which the instance refers.

v

The name of a C variable.

ClassRefSetVar(c, v)

Declare a variable suitable for referring to a set of class instances.

c

The name of the class to which the instance set refers.

v

The name of a C variable.

ClassConstRefSetVar(c, v)

Declare a variable suitable for referring to a set of class instances whose instance population is constant.

c

The name of the class to which the instance set refers

v

The name of a C variable

Events

Signaling events is a common action for a state activity.

Events with No Parameters

For the common case where the event carries no additional parameters, several macros are provided to handle the three event types.

PYCCA_generate(e, c, i, s)

Signal an event to an instance.

e

The name of the event to signal.

c

The name of the class of the instance receiving the event.

i

A pointer to the instance that is to receive the event.

s

A pointer to the instance signaling the event. This may be NULL if the event originates from outside an instance context.

PYCCA_generateToSelf(e)

Signal an event to self.

e

The name of the event to generate

PYCCA_generatePolymorphic(e, c, i, s)

Signal a polymorphic event.

e

The name of the polymorphic event to signal.

c

The name of the class of the instance receiving the event.

i

A pointer to the instance that is to receive the event.

s

A pointer to the instance signaling the event. This may be NULL if the event originates from outside an instance context.

PYCCA_generateCreation(e, c, s)

Signal a creation event.

e

The name of the creation event to signal.

c

The name of the class of the instance receiving the event.

s

A pointer to the instance that is sending the event. This may be NULL if the event originates from outside an instance context.

PYCCA_generateDelayed(e, c, i, s, d)

Signal a delayed event.

e

The name of the event to signal.

c

The name of the class of the instance receiving the event.

i

A pointer to the instance that is to receive the event.

s

A pointer to the instance signaling the event. This may be NULL if the event originates from outside an instance context.

d

The delay time, in milliseconds.

PYCCA_generateDelayedToSelf(e, d)

Signal a delayed event to self .

e

The name of the event to generate.

d

The delay time, in milliseconds.

Events with Parameters

Because events can carry supplemental data, to signal such an event is a three-step process:

Obtain an event control block (ECB). A different macro is used to obtain an ecb for each of the three event types.

Fill in the event data.

Post the event to the appropriate event queue.

As an example, assume that dog is an instance of class Dog and that the Bark event takes a single parameter, howLoud . Then the following will signal the Bark event to the dog instance of Dog .

MechEcb bark = PYCCA_newEvent(Bark, Dog, dog, self) ;
PYCCA_eventParam(bark, Dog, Bark, howLoud) = 20 ;
PYCCA_postEvent(bark) ;
PYCCA_newEvent(e, c, i, s)

Returns a MechEcb for an ordinary event.

e

The name of the event to signal.

c

The name of the class of the instance receiving the event.

i

A pointer to the instance that is to receive the event.

s

A pointer to the instance that is sending the event. This may be NULL if the event originates from outside an instance context.

PYCCA_newEventToSelf(e)

Returns a MechEcb for an ordinary event where the target instance and the signaling instance are self .

e

The name of the event to signal.

PYCCA_newPolymorphicEvent(e, c, i, s)

Returns a MechEcb for a polymorphic event.

e

The name of the event to signal.

c

The name of the class of the instance receiving the event.

i

A pointer to the instance that is to receive the event.

s

A pointer to the instance signaling the event. This may be NULL if the event originates from outside an instance context.

PYCCA_newCreationEvent(e, c, s)

Returns a MechEcb for a creation event.

e

The name of the event to signal.

c

The name of the class from which an instance is to be created.

s

A pointer to the instance that is sending the event. This may be NULL if the event originates from outside an instance context.

PYCCA_eventParam(ecb, c, e, p)

Retrieve the value of an event parameter.

ecb

A pointer to an event control block.

c

The name of the class of the instance receiving the event.

e

The name of the event to generate.

p

The name of the event parameter.

PYCCA_postEvent(ecb)

Place ecb on the non-self-directed event queue.

ecb

A pointer to an event control block.

PYCCA_postSelfEvent(ecb)

Place ecb on the self-directed event queue. Note that creation events should not be posted to the self-directed event queue.

ecb

A pointer to an event control block.

PYCCA_postDelayedEvent(ecb, d)

Post a delayed signal.

ecb

A pointer to an event control block.

d

The delay time in milliseconds.

Delayed Signal Operations

Delayed signals support both canceling and obtaining the remaining delay time.

PYCCA_cancelDelayed(e, c, i, s)

Cancel a delayed signal.

e

The name of the event to cancel.

c

The name of the class of the instance receiving the event.

i

A pointer to the instance that is to receive the event.

s

A pointer to the instance signaling the event. This may be NULL if the event originates from outside an instance context.

PYCCA_cancelDelayedToSelf(e)

Cancel a delayed event that was sent to self .

e

The name of the event to cancel.

PYCCA_remainDelayed(e, c, i, s)

Retrieve the time remaining on a delayed signal.

e

The name of the event to query.

c

The name of the class of the instance receiving the event.

i

A pointer to the instance that is to receive the event.

s

A pointer to the instance signaling the event. This may be NULL if the event originates from outside an instance context.

PYCCA_remainDelayedToSelf(e)

Retrieve the time remaining on a self-directed delayed signal.

e

The name of the event to query.

Instance Creation and Deletion

Class instances may be created and destroyed at runtime. These macros help with the interface to the mechanisms to handle instance management.

PYCCA_newInstance(c)

Create an instance of a class in the default initial state.

c

The name of the class of the instance to be created.

PYCCA_destroyInstance(i)

Destroy an instance of a class.

i

A pointer to the instance to be deleted.

Instance Selection

Pycca provides macros to iterate across instances and select them based on a certain criteria.

PYCCA_selectOneInstWhere(i, c, expr)

This macro expands to a linear search of class named c for the first instance where expr is true. The expanded code searches the storage pool for c stopping at the first instance that is in use and that satisfies expr. Expr is presumed to contain accesses to the attributes of c in the form of i->a . The value of the i variable is modified and at the end of the loop will either point to the first instance of c where expr evaluates to nonzero or will point past the end of the storage pool for the class (as given by the EndStorage(c) macro, that is, if i >= EndStorage(c) , then the search failed). Note that this macro tests whether the instance is currently allocated and therefore is useful only for classes that are either dynamically allocated or have a state machine.

i

The name of a variable that is a pointer to c class instances.

c

The name of the class of the instance corresponding to i .

expr

A C expression that will be interpreted as a Boolean.

PYCCA_forAllInst(i, c)

This macro is a convenience macro that sets up a loop that iterates across all instances of a class. The macro should be followed by a statement (possibly compound and enclosed in braces ({}). In the statement, i will iteratively take on the value of every instance defined for the class c .

i

The name of a variable that is a pointer to c class instances.

c

The name of the class of the instance corresponding to i .

ClassRefVar(Autocycle_Session, acs) ;
PYCCA_forAllInst(acs, Autocycle_Session) {
    if (IsInstInUse(acs)) {
        PYCCA_generate(Created, Autocycle_Session, acs, NULL) ;
    }
}
PYCCA_forAllRelated(v, i, r)

This macro is a convenience macro that sets up a loop that iterates across the instances related to the class. This macro assumes that the related instances were declared using the ->>c , syntax (the related instances are of the counted type). The macro should be followed by a statement (possibly compound and enclosed in braces ({}). In the macro, v should be declared as ClassRefSetVar or a ClassRefConstSetVar . Then v is iterated over the set of related instances.

v

The name of a reference set variable.

i

The name of an instance reference variable.

r

The name of the relationship across which the iteration occurs.

ClassRefConstSetVar(Injector, myinjs) ;
    PYCCA_forAllRelated(myinjs, self, R5) {
        ClassRefVar(Injector, inj) = *myinjs ;
        ClassRefVar(Autocycle_Session, acs) = inj->R2 ;
        InstOp(Autocycle_Session, Deactivate)(acs) ;
    }
}
PYCCA_forAllRelatedTerm(v, i, r)

This macro is the same as PYCCA_forAllRelated() except that the relationship must have been declared by using the ->>n syntax (the relationship storage consists of a NULL terminated array of instance pointers).

v

The name of a reference set variable.

i

The name of an instance reference variable.

r

The name of the relationship across which the iteration occurs.

PYCCA_forAllLinkedInst(o, r, l)

Iterate over the instances of a one-to-many relationship implemented using linked lists. This macro is similar to PYCC A_forAllRelated except that the relationship must have been declared by using the ->>l syntax (the relationship storage is implemented with linked lists). This macro expands to a loop construct in which all the instances related to o across r are visited. The link variable, l , is successively assigned values of the links related on the many side to o . The value of the link variable, l , is not a pointer to an instance. The instance pointer must be recovered by using the PYCCA_linkToInstRef() macros described here.

o

A pointer to a one-side instance.

r

The name of the relationship.

l

The name of a variable of type rlink_t * .

rlink_t *czlink ;
PYCCA_forAllLinkedInst(ondc, R2, czlink) {
    ClassRefVar(Control_Zone, found) =
            PYCCA_linkToInstRef(czlink, Control_Zone, R2) ;
    if (strcmp(rcvd_evt->zone, found->Name) == 0) {
        hoff_zone = found ;
        break ;
    }
}
PYCCA_linkToInstRef(l, c, r)

This macro converts a link pointer of type rlink_t * that is a link in relationship r to a pointer to an instance of class c .

l

The name of a variable of type rlink_t * .

c

The name of the class on the many side of the relationship to which l refers.

r

The name of the relationship.

Instance Identifiers

When invoking external operations, it is useful to use have a means to identify an instance of a particular class outside a domain. The pointer value of the instance is not suitable for this purpose, but the array index of the instance in its storage pool is satisfactory. The macros in this group provide a means of generating a small integer value for an instance that can be used as an identifier external to the domain or to translate an instance identifier into a pointer reference to the instance.

PYCCA_idOfSelf

Generate an integer identifier for the self reference.

ExternalOp(ALARM_Clear_lube_level_very_low)(PYCCA_idOfSelf) ;
PYCCA_idOfRef(c, r)

Generate an integer identifier for a reference r of class c .

c

The name of the class.

r

The reference value for a member of class c .

PYCCA_refOfId(c, i)

Return an instance reference to an instance of class c that is identified by the integer identifier i .

c

The name of the class.

i

An integer identifier for an instance of the class.

PYCCA_checkId(c, i)

Generate an invocation of the assert() macro to test that the identifier i is valid for class c . This is useful if a domain operation accepts an integer identifier for an instance and wants to assert its validity.

c

The name of the class.

i

An integer identifier for an instance of the class.

PYCCA_checkId(Autocycle_Session, sessionId) ;
ClassRefVar(Autocycle_Session, session) =
        PYCCA_refOfId(Autocycle_Session, sessionId) ;
if (IsInstInUse(session)) {
    InstOp(Autocycle_Session, Suspend)(session) ;
}

Navigating Generalizations

When a generalization relationship is implemented as a union data type, the instances of the subtypes do not use a pointer to navigate to the supertype. Rather, it is necessary only to up cast the self pointer to obtain the pointer to the supertype.

PYCCA_unionSupertype(sub, supc, r)

Navigate to the supertype for instances contained in a union.

sub

A pointer to the subtype instance. This is frequently self .

supc

The name of the supertype class.

r

The name of the relationship.

Warning

Up casting in this context is just as dangerous and error prone as up casting in any other context. If sub is not a subtype of the class supc , this macro will silently yield an incorrect result because it involves an explicit cast that the compiler cannot check.

Navigation to the subtype is achieved by taking the address of the subtype member within the generated structure. This macro hides the naming conventions for the subtype member.

PYCCA_unionSubtype(sup, r, subc)

Navigate to the subtype instance contained in a union.

sup

A pointer to the supertype instance. This is frequently self .

r

The name of the relationship.

subc

The name of the subtype class.

ClassRefVar(On_Duty_Controller, new_ondc) =
        PYCCA_unionSubtype(new_controller, R1, On_Duty_Controller) ;
PYCCA_referenceSubtype(sup, r, subc)

Navigate to the subtype instance by pointer reference.

sup

A pointer to the supertype instance. This is frequently self .

r

The name of the relationship.

subc

The name of the subtype class.

PYCCA_isSubtypeRelated(sup, supc, r, subc)

Determine whether a supertype instance is currently related to an instance of the given subtype. Returns true if sup is related to an instance of the subtype class subc across the relationship r .

sup

A pointer to the supertype instance. This is frequently self .

supc

The name of the supertype class.

r

The name of the relationship.

subc

The name of the subtype class.

PYCCA_migrateSubtype(i, supc, r, subc)

Change the subtype of a supertype instance. For a generalization relationship, the supertype maintains an encoded value of the subtype to which it is currently related. This macro changes that encoded value.

i

Instance pointer to a supertype.

supc

Name of the supertype class.

r

Name of the generalization relationship.

subc

Name of the subtype class.

PYCCA_migrateSubtype(self, Air_Traffic_Controller, R1, Off_Duty_Controller) ;
PYCCA_initUnionInstance(sup, r, subc)

Initialize a subtype instance that is contained in a union-based supertype to its default initial state. When subtype migration happens in subtypes contained in a union, if the subtype has a state model, then it is necessary to initialize the architectural structures to be those of the new subtype. This macro accomplishes that. Note that this macro does not run any constructor of the subtype. For subtypes that have a constructor, an explicit call is required.

sup

A pointer to the supertype instance. This is frequently self .

r

The name of the relationship.

subc

The name of the subtype class.

PYCCA_relateSubtypeByRef(s, supc, r, t, subc)

Relate a supertype instance to a subtype instance when the relationship is being stored by reference.

s

A pointer to the supertype instance. This is frequently self .

supc

The name of the supertype class.

r

The name of the relationship.

t

A pointer to the target subclass instance.

subc

The name of the subtype class.

Appendix D: Bibliography

Books

  • Stephen J. Mellor and Marc J. Balcer, Executable UML: A Foundation for Model-Driven Architecture , Addison-Wesley (2002), ISBN 0-201-74804-5.

  • Chris Raistrick et al., Model Driven Architecture with Executable UML , Cambridge University Press (2004), ISBN 0-521-53771-1.

  • Leon Starr, Executable UML: How to Build Class Models , Prentice Hall (2001), ISBN 0-13-067479-6. Note: This edition is out of print, but a new, extended edition covering all the model facets is in the works for 2018, publisher to be determined.

  • Sally Shlaer and Stephen J. Mellor, Object-Oriented Systems Analysis: Modeling the World in Data , Prentice Hall (1988), ISBN 0-13-629023-X.

  • Sally Shlaer and Stephen J. Mellor, Object Lifecycles: Modeling the World in States , Prentice Hall (1991), ISBN 0-13-629940-7.

  • Lex de Hann and Toon Koppelaars, Applied Mathematics for Database Professionals , Apress (2011), ISBN 1-43024-248-1. 1430242841.

  • Fredrick P. Brooks, The Mythical Man Month (Anniversary Edition with four new chapters ed.) , Addison-Wesley (1995).

  • ACM Letters on Programming Languages and Systems 1, 3 (Sep. 1992), 213–226.

Papers

  • E.F. Moore, “Gedanken-Experiments on Sequential Machines,” Automata Studies , Princeton University Press, Princeton, N.J. (1956), pp. 129–153.

  • George H. Mealy, “A Method for Synthesizing Sequential Circuits,” Bell System Technical Journal (1955), pp. 1045–1079.

  • Christopher W. Fraser, David R. Hanson and Todd A. Proebsting, Engineering a Simple, Efficient Code Generator Generator , ACM Letters on Programming Languages and Systems 1, 3 (Sep. 1992), 213-226.

  • http://faculty.salisbury.edu/~xswang/Research/Papers/SERelated/no-silver-bullet.pdf

Articles

Online Resources and Author Contact Info

A421575_1_En_BookBackmatter_Figu_HTML.gif

Index

Symbols

  1. #=

  2. ..=

  3. .=.

  4. =

A

  1. abort()

  2. abort() C function

  3. Action

    1. model script

    2. parallel execution

    3. on sets

    4. translation

  4. Action function

    1. pointer to

  5. Action language

    1. Alf (Action Language for Foundational UML)

    2. ASL (Action Specification Language)

    3. to C

    4. vs. coding

    5. desirable characteristics

    6. implementation bias

    7. mapping to code

    8. OAL (Object Action Language)

    9. predicate logic

    10. vs. programming language

    11. relational algebra

    12. Scrall (Starr’s Concise Relational Action Language)

    13. sequence

      1. small

    14. sequence of computation

    15. set at a time

    16. Small (Shlaer-Mellor Action Language)

    17. syntax and semantics

    18. text vs. diagram

    19. text vs. graphics

  6. Action translation

    1. commented out

    2. preprocessor macros

  7. Activity

    1. class based operation

      1. for implementation only

    2. class method

    3. concurrency

    4. data flow diagram

    5. derived attribute definition

    6. domain operation

    7. entry/

    8. external entity operation

    9. state

    10. synchronization

    11. translation

  8. ADC (analog to digital converter)

    1. block diagram

  9. Ad hoc queries

    1. database management system

  10. Aggregation

  11. Agile

    1. iteration

    2. Manifesto

  12. Aircraft classes

    1. airplane

    2. Fixed Wing aircraft

    3. helicopter

    4. Rotary Wing aircraft

    5. VTOL aircraft

  13. Air Traffic Control

SeeATC (Air Traffic Control)
  1. ALS (Automated Lubrication System)

    1. code size

    2. description

    3. initial population

  2. ALS classes

    1. Autocycle Session

    2. injector

    3. Injector Design

    4. Lubrication Schedule

    5. machinery

    6. Reservoir

  3. ALS domains

    1. Alarms

    2. Lubrication

      1. description

      2. translating

    3. SIO (Signal I/O)

    4. user-interface

  4. ALS state models

    1. Autocycle Session

    2. Injector

    3. Reservoir

  5. ALS state tables

    1. Autocycle Session

    2. Injector

    3. Reservoir

  6. Analysis paralysis

  7. Analysis skill

    1. vs. modeling

  8. Application logic

  9. Aspect oriented programming (AOP)

  10. Assigner

    1. example

    2. implementation

    3. multiple

    4. state model

      1. definition

  11. Assignment operator (.=)

  12. Association

    1. access direction

    2. conditionality

    3. decomposition

    4. definition

    5. implementation choices

    6. implementation considerations

    7. link

    8. model script

    9. multiplicity

    10. phrase

    11. referential attribute

    12. translation

    13. verb phrase vs. role

  13. Association class

    1. See alsoAssociative relationship

    2. decomposition

    3. definition

    4. translation

  14. Association translation

    1. to many linked list

    2. unconditional data integrity

  15. Associative relationship

    1. code

    2. decomposition

    3. navigating

  16. ATC (Air Traffic Control)

    1. application

    2. class model

    3. execution scenario

    4. limitations

  17. ATC classes

    1. Air Traffic Controller

    2. Control Zone

    3. On Duty Controller

    4. Duty Station

    5. Off Duty Controller

    6. Shift Specification

  18. ATC domains

    1. Radar Tracking

  19. ATC state models

    1. Duty Station

  20. ATC translation

    1. Air Traffic Controller state model

    2. Air Traffic Controller superclass

    3. conditional association using NULL

    4. On Duty Controller subclass

    5. Duty Station class

    6. Duty Station class to C structure

    7. Duty Station state model

    8. generalization to C union

    9. identifier

    10. Logging In activity

    11. Logging Out activity

    12. to one association to pointer

  21. Attribute

    1. definition

    2. descriptive

    3. I and R tags

    4. identifying

    5. notation

    6. referential

    7. uninitialized

B

  1. Battery-operated environment

  2. Berkeley DB

    1. Btree

    2. cursor

      1. for navigation

    3. database

    4. environment

    5. foreign key index

    6. join

      1. for navigation

    7. key

    8. mapping domain data

    9. model alternate identifiers

    10. model identifiers

    11. navigation

    12. secondary index

    13. using C struct

  3. Bridge

    1. assertions in code

    2. asynchronous signals

    3. bridge table

    4. code

    5. counterpart instance

    6. definition

    7. half tables

    8. ID parameters

    9. implementation

    10. implicit vs. explicit

    11. instance bridge table

    12. mapping optimization

    13. mapping tables

    14. pull strategy

    15. push strategy

    16. semantic gap

    17. table search

      1. array indexing

  4. Bridging

  5. bsearch()

    1. for performance

C

  1. C

    1. familiarity

    2. files

    3. passed through

    4. preprocessor macros

    5. in this book

  2. C++

    1. elaboration

    2. high-level

    3. why not

  3. Can’t happen

SeeTransition
  1. C99 designated initializer

    1. for bridge initialization

  2. Class

    1. abstraction

    2. definition

    3. diagram

    4. implementation

    5. model script

    6. notation

    7. translation

    8. unassociated

    9. without state model

  3. Class based operation

    1. none in xUML

  4. Class collaboration diagram

  5. Class method

  6. Class model

    1. model script

  7. Class operation

    1. implementation specific code

  8. C main function

  9. Code

    1. derivation

  10. Code generation

    1. template driven

  11. Code generator

    1. task of designing

  12. Competitive association

    1. first come first served

  13. Computations

    1. long duration

  14. const

    1. for immutable values

  15. Constraints

    1. relational vs. OCL

  16. Creation

    1. asynchronous

    2. event

      1. model script

      2. translation

  17. Cross platform development

D

  1. Database

  2. Data flow

    1. UNIX pipe syntax

  3. Data flow diagram

SeeActivity
  1. Data type

    1. definition

    2. 2D Point

    3. examples

    4. matrix algebra

    5. model script

    6. model vs. implementation

    7. operations

    8. typedef

  2. Data type translation

    1. typedef

  3. Debugging

  4. Delayed event

    1. queue

  5. Deletion

    1. asynchronous

  6. Desktop computer vs. micro-controller environment

  7. Device access entity

  8. Device units

  9. Diagnostic

    1. lubrication schedule

  10. Documentation

    1. literate programming

    2. useful

  11. Domain

    1. application

    2. application level

    3. benefits

    4. as black box

    5. client and service roles

    6. configuration data

    7. delegation

    8. dependency

    9. distinct subject matter

    10. element

      1. identifier

    11. high level and low level

    12. interaction

    13. layering view

    14. lubrication

      1. class model

      2. external entity

    15. Lubrication domain

      1. marking

    16. populate mapping

    17. portal

    18. requirements source

    19. reuse

    20. satisfies requirement for service

    21. semantic gap

    22. separation of concerns

    23. specifies need for service

    24. subject matter vs. functional partitioning

    25. vocabulary

  12. Domain chart

    1. for ALS

    2. dependency arrows

    3. platform independence

    4. refactoring

  13. Domain operation

    1. C function

    2. defined

    3. naming convention

    4. Write point

  14. DSL (domain-specific language)

    1. pycca

    2. Tcl or Python

      1. internal

E

  1. Edge detection

    1. falling

    2. rising

  2. EEPROM

  3. Elaboration

    1. abrupt failure

    2. action language

    3. failure of

    4. gradual failure

    5. model destruction

  4. Encapsulation

    1. domain level

  5. Engineering units

  6. Error

    1. fatal

      1. custom handler

    2. handling

    3. types

  7. Event

    1. calculate sequences

    2. cancel delayed

    3. consuming

    4. data to dispatch diagram

    5. delayed

    6. delayed event queue

    7. dispatch

      1. data

      2. delayed

      3. generated code

      4. locating action table

      5. locating transition table

    8. in flight error

    9. ignored

      1. Boolean attribute trick

      2. self-directed

      3. software lock

      4. transitory state

    10. local and non-local

    11. numbering

    12. parameters

      1. pass by value

      2. pointer to

    13. pending

    14. polymorphic

See(Polymorphic event)
  1. response possibilities

  2. self and non self-directed

  3. signaling

  4. too late or too early

  5. tracing dispatch

  6. types

    1. enum

  7. unexpected

  1. Event control block (ECB)

    1. MechEcb

    2. polymorphic event

  2. Event, delayed

  3. Event map

    1. generated code

    2. index into

    3. polymorphic event dispatch

  4. Event queue

    1. free

    2. imminent

    3. main loop

  5. Event specification

  6. Example external entities

    1. NOTIFY

    2. SIO

      1. functions

  7. Executability

  8. Execution cycles

    1. limited

  9. External bus

  10. External entity

    1. asynchronous signals

    2. definition

    3. functions

      1. injection control

      2. pressure alert

      3. pressure attribute

      4. pressure monitor

    4. implicit ID

    5. operation

      1. naming convention

    6. portal function

    7. as proxy for service domain

    8. synchronous operation

  11. External entity function

    1. implementation of EE operation

  12. External entity operation

    1. C function

    2. inject

    3. parameter

      1. mapping

    4. return value

    5. synchronous and asynchronous

  13. External operation

    1. defined

F

  1. Facet

    1. actions

    2. class model

    3. pycca workflow

    4. state model

    5. translation order

  2. Faults

    1. modeled

  3. Final pseudo-state

    1. instance deletion

  4. Final states

    1. array

  5. fUML (Foundational UML)

    1. and xUML

  6. Functional

    1. decomposition

    2. partitioning

G

  1. Gap

    1. bridging

  2. Generalization

    1. composed form

      1. compound generalization

      2. multiple generalization

      3. repeated specialization

    2. disjoint/complete tags

    3. disjoint set interpretation

    4. disjoint union

    5. example

    6. implementation alternatives

    7. migration

      1. state model

    8. model script

    9. navigation

      1. empty reference

      2. pycca

    10. pointer references

      1. pycca

    11. polymorphism

    12. reference

    13. reference implementation

    14. referential attribute

    15. relating super and subclass instances

    16. spanning subclass

    17. state models in subclasses

    18. subclass determination

      1. Launch type

    19. translation

    20. type inheritance

    21. union

    22. union implementation

    23. XOR (exclusive or) constraint

    24. xUML and UML

  3. Go language

    1. target for concurrency

H

  1. Half table

    1. attribute to attribute

    2. generic model elements

    3. inject ID parameter

    4. inject instance

    5. inject operation

    6. instance to instance

    7. instance to instance mapping

    8. parameter to attribute

    9. parameter to parameter

    10. population

    11. pressure monitor

    12. pressure update

    13. runtime and static population

  2. Hardware access library

  3. Hardware controls

  4. Hardware engineering

    1. modeling analogy

    2. workflow

  5. Hash table

    1. for performance

  6. HierarchyDispatch

    1. typdef

  7. Hierarchy dispatch block (HDB)

  8. Hop operator (/)

  9. Human intervention

    1. pycca workflow

I

  1. Identifier

    1. definition

    2. discarded

    3. implementation-defined

    4. invented vs. UML implicit

    5. notation

    6. real world meaning

    7. real world vs. invented

  2. Identifying attribute

    1. referenced

  3. Identity constraint

  4. Ignore event

SeeTransition
  1. Impedance mismatch elimination

    1. TclRAL

  2. Implementation detail

  3. Implementation technology

    1. choosing

  4. in.

    1. input parameter prefix

  5. Inheritance

  6. Initial instance population

    1. DSL

    2. non-modelers

    3. tables vs. action language

  7. Initial pseudo-state

    1. instance creation

  8. Injection sequence

  9. Instance

    1. class data

    2. current state

    3. data structure

    4. dynamic

    5. memory

    6. pre-existing

    7. slot allocation

    8. slot in use

    9. ST/MX view

  10. Instance creation

    1. asynchronous

    2. migration

  11. Instance mapping

    1. initialized C array variable

  12. Instance operation

    1. translation of class method

  13. Instance search

    1. generic vs. specific strategy

  14. Intellectual property

  15. Interchange

    1. format

    2. relational database

    3. UML vs. xUML

    4. XMI

    5. XML or JSON

  16. Interrupts

    1. handling

J

  1. Java

    1. elaboration

    2. high-level

    3. target language

K

  1. Key/value pair

    1. store

L

  1. #line directive

  2. Link action (&)

  3. Linked list

    1. iteration

  4. Link type

    1. linked list

    2. in reference statement

  5. Lockout

    1. machinery

  6. Lubrication cycle

M

  1. Magic

    1. modeling tools

    2. model translation

  2. Main loop

    1. activity diagram

  3. Management vs. technical process

  4. Mapping

    1. input points

    2. range limits

  5. Marking

    1. actuator control

    2. alert event

    3. annotations

    4. platform model

    5. pressure monitor

    6. in pycca

    7. repository

    8. sensor attribute

    9. task

    10. threshold attribute

    11. transparent sheet

  6. Marking and mapping

  7. Mars climate orbiter

  8. Mars probe classes

    1. Mars Probe

    2. Nulear Powered

    3. Rover

    4. Solar Powered

    5. Stationary

  9. Mathematical foundations

  10. MBSE (model-based software engineering)

  11. me

    1. self instance action keyword

  12. MechEcb

    1. typedef

  13. MechEventType

    1. enum

  14. MechInstance

    1. struct

    2. typedef

  15. Memory

    1. limited

  16. Memory map

  17. Memory usage

    1. example application

    2. model execution domain

    3. RAM and flash

  18. Metamodel

    1. BridgePoint-xtUML

    2. constraints

    3. database schema

    4. iUML

    5. miUML

      1. tool independent

    6. relational theory

    7. SQL

    8. tool independent

    9. xUML

  19. Migrate

    1. action

  20. Model

    1. application logic

    2. deriving code

    3. destruction of

    4. detail

    5. executable

    6. high level

    7. intellectual property

    8. language

    9. mental execution

    10. platform-independent

    11. running

    12. translation

    13. uses

    14. value of

  21. Model descriptions

  22. Model editor

    1. draw tools

  23. Model execution

    1. configurable

    2. domain

      1. implementation

    3. microcontroller constraints

    4. no universal domain

    5. performance

    6. persistent non-volatile storage

    7. rules

      1. invariance

    8. runtime

      1. C preprocessor macros

    9. subject matter of

  24. Model execution run-time

SeeMX run-time
  1. Model facets

  2. Modeling

    1. required skills

  3. Model parsing

    1. analogy

  4. Model repository

  5. Model script

  6. Model script statements

SeePycca statements
  1. Model validation

    1. using metamodel database

  2. Monitoring interval

    1. lubrication

  3. Monitor pressure

  4. Moore state diagrams

  5. Multiplexer

  6. MX

SeeModel execution
  1. MX run-time

N

  1. Navigation

    1. generalization

    2. pointer arithmetic

    3. pointers

  2. Next state

    1. determine

  3. Non-xUML models

  4. Notation and complexity

O

  1. Object

SeeInstance
  1. ObjectDispatchBlock

    1. typedef

  2. Object files

  3. Object-oriented

    1. vs. mathematical foundations

    2. perspective

    3. programming

    4. semantics

  4. OCL (Object Constraint Language)

  5. ODB (object dispatch block)

P, Q

  1. Pair programming

  2. Panic

    1. on can’t happen

  3. Parallel processing

  4. Parsing actions

    1. AST (abstract syntax tree)

  5. PDB (polymorphic dispatch block)

    1. locating

  6. Perfect hash function

  7. Performance

    1. code size

    2. execution speed

    3. immutable values

    4. initialization

    5. measurement vs. guessing

    6. model execution domain

    7. optimization

    8. pointers

    9. pycca

    10. scale

    11. trade-off

  8. Platform

    1. ARM Cortex-M3

    2. Linux

    3. macOS

    4. other targets

    5. POSIX

    6. server/desktop target

    7. supporting diverse and challenging

    8. TI MSP-430

    9. Windows

  9. Platform constraints

    1. microcontroller

  10. Platform independence

  11. Platform-independent

    1. execution rules

    2. model

    3. synchronization

  12. Platform-independent and specific tasks

  13. Platform model

    1. Attribute

    2. Berkeley DB

    3. class

    4. ClassRef

    5. code generation

      1. two step process

    6. Data Element

    7. domain

    8. vs. executable model

    9. File and Line attributes

    10. vs. metamodel

    11. populate with DSL

    12. relational schema

    13. SingClassRef

    14. SubtypeRef

    15. task

  14. Platform-specific features

  15. PolyDispatchBlock

    1. struct

  16. PolyEventMap

    1. typedef

  17. Polymorphic event

    1. definition

    2. delegation

    3. dispatch

      1. data used

      2. event map

      3. eventType

      4. generated code

      5. PDB (polymorphic dispatch block)

    4. enumeration

    5. event map

    6. example

      1. Arming distance

      2. Cleared tube

      3. Fire

      4. Hitch load

      5. Hover

      6. Park

      7. Pass

      8. Recall

      9. Sleep mode

      10. Taxi

    7. model script

    8. parameters

    9. signaling

      1. pycca

    10. translation

  18. Polymorphism

    1. model vs. programming

    2. simple dynamic

  19. PolyStorageType

    1. enum

  20. Populating models

  21. Population

    1. attribute initialization

    2. constant

    3. dynamic

    4. identifying attribute

      1. Berkeley DB example

    5. initial instance

      1. C array

      2. model script

      3. translation

    6. relationship initialization

    7. runtime vs. translation time

    8. static

  22. Population instance name (@)

  23. Population instance reference

  24. Portal

    1. capabilities

    2. class information

    3. element numbering

    4. function

    5. how it works

    6. limitations

    7. variable

  25. Postgres

    1. miUML metamodel

  26. Programming language

    1. as a domain

  27. Pycca

    1. availability

    2. DSL (domain-specific language)

    3. file

    4. implementation

      1. lex and yacc equivalents

      2. Tcl language

      3. TclRAL (Tcl relational algebra language)

    5. language overview

    6. overview

    7. parser

    8. pass your C code along

    9. platform specificity

    10. program

      1. design

      2. DSL (domain-specific language)

      3. platform model

      4. source code and documentation

    11. syntax

      1. code

      2. comments

      3. symbol name

      4. variable declaration

    12. transparency

  28. Pycca language

    1. comments

    2. C variables

    3. keywords and tokens

    4. pass along C code

    5. whitespace

  29. Pycca macros

    1. ClassConstRefSetVar

    2. ClassConstRefVar

    3. ClassRefSetVar

    4. ClassRefVar

    5. PYCCA_cancelDelayed

    6. PYCCA_cancelDelayedToSelf

    7. PYCCA_checkId

    8. PYCCA_createInstance

    9. PYCCA_destroyInstance

    10. PYCCA_eventParam

    11. PYCCA_forAllInst

    12. PYCCA_forAllLinkedInst

    13. PYCCA_forAllRelated

    14. PYCCA_forAllRelatedTerm

    15. PYCCA_generate

    16. PYCCA_generateCreation

    17. PYCCA_generateDelayed

    18. PYCCA_generateDelayedToSelf

    19. PYCCA_generatePolymorphic

    20. PYCCA_generateToSelf

    21. PYCCA_idOfRef

    22. PYCCA_idOfSelf

    23. PYCCA_initUnionInstance

    24. PYCCA_isSubtypeRelated

    25. PYCCA_linkToInstRef

    26. PYCCA_migrateSubtype

    27. PYCCA_newCreationEvent

    28. PYCCA_newEvent

    29. PYCCA_newEventToSelf

    30. PYCCA_newInstance

    31. PYCCA_newPolymorphicEvent

    32. PYCCA_postDelayedEvent

    33. PYCCA_postEvent

    34. PYCCA_postSelfEvent

    35. PYCCA_referenceSubtype

    36. PYCCA_refOfId

    37. PYCCA_relateSubtypeByRef

    38. PYCCA_remainDelayed

    39. PYCCA_remainDelayedToSelf

    40. PYCCA_selectOneInstWhere

    41. PYCCA_selectOneStaticInstWhere

    42. PYCCA_unionSubtype

    43. PYCCA_unionSupertype

  30. Pycca program

    1. options

    2. output file

  31. Pycca script

    1. lexical conventions

  32. Pycca statements

    1. attribute

    2. class

    3. class operation

    4. constructor

    5. default transition

    6. destructor

    7. domain

    8. domain operation

    9. external operation

    10. final state

    11. grouping

      1. cumulative

      2. order

    12. implementation epilog

    13. implementation prolog

    14. initial state

    15. instance

    16. instance operation

    17. interface epilog

    18. interface prolog

    19. machine

    20. polymorphic event

    21. population

      1. constant

      2. dynamic

      3. static

    22. reference

      1. multiplicity

    23. state

    24. subtype

      1. reference

      2. union

    25. table

    26. transition

  33. Python

R

  1. Range

    1. in and out of states

  2. Raw device value

  3. RDMS (relational database management system)

  4. Referential attribute

    1. pointer substitution

  5. Referential integrity

    1. foreign-key index

  6. Relational theory

    1. complex values

    2. model of data

  7. Requirements

    1. modeling and translation

  8. Response time

    1. real-time constraints

  9. Reuse

    1. bridging

    2. domains

    3. rule of three

    4. xUML

  10. Risk analysis

  11. Round trip

  12. RTOS and ST/MX

    1. memory comparison

  13. RTOS (real-time operating system)

  14. Run to completion

S

  1. Sampling

    1. hysteresis

    2. jitter

    3. period

  2. Satellite classes

    1. Satellite

    2. Station

    3. Track

      1. association class

  3. Scale

    1. binary search

    2. hash table

  4. Schematic

  5. Scrall (Starr’s concise relational action language)

    1. assignment operators

    2. attribute references

    3. class method

    4. data types

    5. error handling

    6. event to assigner

    7. event to me

    8. external entity

      1. asynchronous signal

      2. synchronous operation

    9. instance selection

      1. with criteria

      2. with no criteria

    10. link and unlink

    11. navigation

    12. online reference

    13. signaling

    14. subclass migration

    15. symbol names

    16. values

      1. Boolean

      2. enumerated

      3. literals not supported

    17. variable

      1. instance set

      2. relation

      3. scalar

      4. system

    18. variable types

  6. Self C variable

    1. translation of `me` keyword

  7. Sequence diagram

    1. signal converter assignment

  8. Shlaer-Mellor Action Language

  9. Shlaer-Mellor methodology

  10. Signal

SeeEvent
  1. Signal an event action (->)

  2. Simulation

    1. desktop model execution

  3. SIO classes

    1. Continuous Input Point

    2. Conversion

    3. Conversion Group

    4. I/O Point

    5. Point Threshold

    6. Range Limitation

    7. Signal Converter

  4. SIO (Signal I/O domain)

    1. sensing and controlling signals

    2. sensors and actuators

    3. side effects

  5. SOC (system on a chip)

  6. Software architecture

  7. Specialization

    1. project teams

  8. Specification class

    1. modeling pattern

    2. subclass determination

      1. Torpedo Spec

  9. Spreadsheets

    1. for bridge tables

    2. for initial population

  10. State

    1. event signature rule

    2. model script

    3. naming

  11. State activity

    1. as C function

    2. preprocessor macros and hand code

  12. State coverage

    1. spanning tree

  13. State machine

    1. diagram

    2. for each instance

  14. State model

    1. action

    2. activity

    3. behavior

    4. definition

    5. entry activity

    6. event

    7. event parameter

    8. execution

    9. generated code

    10. lifecycle

    11. model script

    12. polymorphism

    13. signal

    14. state

    15. table

    16. transition

    17. translation

  15. State model diagram

    1. Moore and Mealy

  16. State transition table

    1. transitory state

    2. wait state

  17. ST/MX (single threaded model execution)

    1. C library

    2. instance management

    3. memory usage

  18. Subclass

    1. state model

    2. translation

  19. Subclass migration

    1. preprocessor macro

  20. Subject matter experts

  21. Superclass

    1. model script

  22. Synchronization

    1. activities

    2. concurrency

    3. events

    4. platform independent

  23. Sync queue

    1. main loop

  24. System executable

  25. System on a chip (SOC)

SeeSOC (system on a chip)
  1. System partitioning

    1. functional vs. subject matter

    2. platform independent vs. specific

T

  1. Target platform

    1. hardware

      1. Arm Cortex-M3

      2. Giant Gecko

    2. implementation language

    3. micro-controller

    4. programming language

    5. reactive applications

    6. software

      1. Silicon Labs Simplicity Studio

    7. technology

  2. Textual vs. graphical layout

  3. Third party code

  4. Threshold limit

  5. Time

    1. platform specific

    2. POSIX

  6. Timeout

    1. modeling

  7. Timer

    1. See alsoEvent, delayed

    2. platform resource

  8. Tools

    1. complexity

    2. misuse of "real-time" term

    3. monolithic vs. tool chains

  9. Torpedo classes

    1. Active Launch Torpedo

    2. Fired Torpedo

    3. Loaded Torpedo

      1. model script

    4. Passive Launch Torpedo

    5. storage rack

    6. Stored Torpedo

      1. model script

    7. Torpedo

      1. pycca

    8. torpedo design

    9. Torpedo Spec

    10. torpedo tube

    11. Tube

  10. Torpedo class method

    1. arm

    2. disarm

  11. Torpedo launch example

    1. polymorphism

  12. Torpedo state model

    1. Active Torpedo

    2. Fired Torpedo

    3. Passive Launch Torpedo

    4. Stored Torpedo

  13. Traceability

  14. Trace execution

  15. Transaction

    1. data model integrity

  16. Transducer

  17. Transition

    1. can’t happen (CH)

    2. ignore (IG)

    3. matrix

      1. as array

    4. normal

    5. table

  18. Translation

    1. actions

    2. basic workflow

    3. class model

    4. data types

    5. decisions

    6. environment

    7. human intervention

    8. processing

    9. pycca workflow

    10. three facets

    11. working backwards

  19. Translation workflow

    1. pycca

U

  1. UML

    1. lingua franca

    2. standards

  2. Unicorns

  3. Unlink action (!&)

V

  1. Value threshold

  2. Variable initializers

  3. Vehicle classes

    1. Box Truck

    2. Bus

    3. Car

    4. Semi Truck

    5. Truck

    6. Vehicle

  4. Vendor tools

    1. target technology

W

  1. Watchdog timer

  2. Web application

  3. Wind turbine

  4. Workflow

    1. pycca

    2. reference

X, Y, Z

  1. xUML

    1. executability

    2. language

    3. lean notation

    4. mathematical foundation

    5. notation

    6. platform independent execution semantics

    7. semantics

    8. synchronization

    9. and UML

    10. why use it

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset