Yet another MTF question.

Kurt Stirewalt ([email protected])
Fri, 9 Jun 1995 10:13:05 -0400

I have a question regarding the name scoping rules and inheritance in MTF
declarations. This one is kinda convoluted, so I'll give an example.

In the context of our running example Generate_Report, I was considering
adding another subtask called Specify_second_account which I want to be like
the object Specify_account prior to it in the sub-task sequencing.

Generate_Report : Task {
subtask_connection = :And_Connection {
subtasks = Specify_account [MY_TAG],
Specify_second_account : Specify_account,
Specify_perion : Account {
}; // specify period
}; // and connection
}; // generate report

Can I specify this? That is, can the type of Specify_second_account be an
object that is not top-level? I would think so, but when the prototype
object (Specify_account) lives in the same containing object
(Generate_Report.subtask_connection) as the instance object
(Specify_second_account), it leads to an interesting prototype inheritance.
situation. For brevity, I will only show is-like inheritance here.

The situation arises when we have a declaration like:

NT_Generate_Report : Generate_Report {
};

what do the inheritance links look like now? I think they look like:

-----------------------------------------------------------------------
| Generate_Report Specify_account <--- Specify_second_account
| ^ (d) ^
| | |
-----------------------------------------------------------------------
^ | |
| (a) | (b) | (c)
| | |
-----------------------------------------------------------------------
| | |
| | |
| NT_Generate_Report Specify_account Specify_second_account
|
-----------------------------------------------------------------------

where:
(a) is the link between the object NT_Generate_Report and the
object Generate_Report,
(b) is the link between the object NT_Generate_Report...Specify_account
and Generate_Report...Specify_account,
(c) is the link between the object
NT_Generate_Report...Specify_second_account and
Generate_Report...Specify_second_account, and
(d) is the link between the object
Generate_Report.Specify_second_account and the object
Generate_Report.Specify_account

Is what I have here a correct understanding of what would happen in this case?

Note that there is no link between:
NT_Generate_Report.Specify_second_account and the object
NT_Generate_Report.Specify_account
Should there be? Thanks.

-- kurt.