Closed seidewitz closed 2 years ago
defaultClock->localClock a good idea. In Objects:
The suboccurrences of this Object that are themselves Objects.
would be less geeky as
The suboccurrences of this Object that are also Objects.
I don't have any problem sounding geeky! But I don't seem to have used the "that are themselves" wording elsewhere (at least that I can find on a quick look). I can change it.
My comments in code are showing as Pending again, and Outlook isn't letting me search emails right now to find the one where you figured out the problem. Can you remember?
You need to create a review and ask for changes.
That seems to want me to finish all code comments and submit. Is there a way to do incrementally, like my comment above about Objects?
I don't think so.
Found an option to make a single comment after starting review, then "re-request review" next to my name in the reviewer list.
@conradbock Do you have any more comments? I would like to wrap up this PR.
BTW, Richard was really happy about this one. :)
This PR updates the model library to allow each occurrence to have a "local clock", which is used as the default clock for triggers within an occurrence. This update allows, for example, the following:
Kernel Model Library
defaultClock
touniversalClock
.clock
parameter ofTimeOf
andDurationOf
fromdefaultClock
tolocalClock
.localClock
feature toOccurrence
withClocks::universalClock
as its default.suboccurrences
feature toOccurrence
to include all composite suboccurrences of an occurrence and pass thelocalClock
of an occurrence down as the default for thelocalClock
of itssuboccurrences
.Object::subobjects
andObject::ownedPerformances
subsets ofsuboccurrences
.Performance::subperformances
a subset ofsuboccurrences
.clock
parameter of various functions fromdefaultClock
toframe.localClock
.clock
parameter ofTriggerAt
andTriggerWhen
to theirlocalClock
(which, by default, will be bound to thelocalClock
of some containing "context" of the usages of these functions).Systems Model Library
Item::subitems
a subset ofsubobjects
.Item::checkedConstraints
composite and a subset ofownedPerformances
.Quantities and Units Domain Library
defaultClock
touniversalClock
, defaulting toClocks::universalClock
.clock
parameter ofTimeOf
andDurationOf
fromdefaultClock
tolocalClock
.Geometry Domain Library
localClock
forSpatialItem
to redefineOccurrences::localClock
and default toTime::universalClock
. (Note that this cannot be done inItem
, because theTime
package is in the Quantities and Units Domain library.)Implicit Specializations
The following are just the changes to the implicit specialization implementation. Unchanged rules are not included.
Occurrence::suboccurrences
.Object::subobjects
.Occurrence::suboccurrences
.Occurrence::suboccurrences
. (Item::subitems
subsetssubobjects
which already subsetssuboccurrences
.)Occurrence::suboccurrences
. (Action::subactions
subsetssubperformances
which already subsetssuboccurrences
.)Item::checkedConstraints
. (This fixes the required specialization for constraints, which was broken.)