Hop - modelint/shlaer-mellor-metamodel GitHub Wiki

Given a set of instance references typed by some Class, a Hop traverses a single Relationship defined on that Class to arrive at the same or a different Class and yields a set of instance references related to the source set across that Relationship.

Thinking of a Relationship as a function mapping one set of instance references to another set of instance references, a Hop simply applies that function to yield its output.

The information required to make an unambiguous traversal depends on the type of Relationship as well as the roles of the source and target Classes in that Relationship.

For example, hopping from a superclass instance in a Generalization Relationship requires both the Relationship name (the Rnum) and the name of the target Subclass. This can be visualized as a data flow diagram:

images/hop-10.png

Each type of Hop can be described by its own data flow diagram indicating the input necessary to execute an unambiguous traversal.

Identifiers

  1. Path + Number + Domain

Since the same Relationship may appear more than once in a Path, the Relationship number does not form part of an Identifier. (Not an irreducible one, at any rate).

Attributes

Number

Each Hop is numbered in sequence within its Path starting at 1. A Path traversing Relationships /R7/R13/R8/Aircraft consists of three Hops numbered 1, 2, 3 proceeding left to right.

Type: Hop Number based on Ordinal