DIRECTORY CD USING [Design, Instance, InstanceList, PropList], Rope USING [ROPE]; CDSatellites: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; InstanceList: TYPE = CD.InstanceList; satellitesProp: ATOM; maxGroupIdProp: ATOM; groupIdProp: ATOM; AddSatellite: PROC [design: CD.Design, master: CD.Instance, satellite: CD.Instance]; RemoveSatellite: PROC [world: InstanceList, satellite: CD.Instance]; GetSatellites: PROC [master: CD.Instance] RETURNS [satellites: InstanceList _ NIL]; GetSatelliteRopes: PROC [masterProps: CD.PropList] RETURNS [ropes: LIST OF ROPE _ NIL]; EnforceInvariants: PROC [design: CD.Design, world: InstanceList] RETURNS [ok: BOOL _ TRUE]; END. vCDSatellites.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Written by Pradeep Sindhu December 20, 1985 1:22:54 pm PST This module is descended from the early implementation of satellites by Monier. It has been rewritten a number of times since then by Sindhu and Serlet to find an implementation that works and is comfortable to use both from programs and interactively. This last version is a complete rewrite, one hopes for the last time! Pradeep Sindhu December 22, 1985 2:08:56 pm PST Abstract A satellite is a text CD.Instance associated with another CD.Instance called the satellite's master. A master along with its satellites forms a satellite group. It is useful to think of satellites simply as visible properties attatched to the master. However, three things distinguish satellites from ordinary properties: 1) satellites are always visible, 2) the user can control their looks and placement to suit his taste, and 3) satellites are untypedas far as clients are concerned satellites are simply pieces of text. Clients of this interface should be aware of the set of invariants maintained for satellites, so they may avoid violating these invariants inadvertently. The description below uses the notion of a world, which is a list of CD.Instance belonging to a cell or to the top level of the design: I1) A master must be a non-text CD.Instance with a non-nil groupIDProp. I2) A satellite must be a text CD.Instance with a non-nil groupIDProp. I3) Every satellite in a given world must have a corresponding master. That is, if n is the value of its groupIDProp (its groupID), then there must be a master in world that also has n as its groupID. I4) A design may have at most one master with a given groupID. I5) Each master must have a satellitesProp property that points to a list instances that are the master's satellites. These invariants are enforced by the procedure EnforceInvariants, which should be called whenever one or more of them could have been violated. This property hangs on a master. Its value is the list of the master's satellites. This property hangs on a design. Its value is the highest numbered satellite group in the design. This property hangs on each instance that is in a satellite group. Its value is the group's groupId. Adds satellite to master if satellite isn't already present; old satellites are preserved. Caller must guarantee that satellite is in master's world. Removes satellite from its master. Returns the satellites for master. Convenience proc that returns the list of satellite ropes for masterProps. Enforces the satellite invariants listed above. This procedure is fascist! Κ#˜šœ™Jšœ Οmœ1™<™:J™\J™ZJ™]J™.—Icode™/—headšœ™IbodyšœΟi œRžœ.žœπ™šœΖžœW™’MšœžBœ™GMšœžAœ™FMšœžΔœ™ΙMšœž9œ™>Mšœžpœ™u—Mšœ™—J˜šΟk œ˜ JšŸœŸœ-˜5JšœŸœŸœ˜—J˜šΠbl œŸœŸ œŸœ˜(J˜JšŸœŸœŸœ˜JšœŸœŸœ˜%K˜šœŸœ˜JšœS™S—šœŸœ˜Jšœb™b—šœ Ÿœ˜Jšœe™e—˜J˜—š Οn œŸœ ŸœŸœŸœ ˜TJ™–J™—š‘œŸœ"Ÿœ ˜DJ™"J™—š ‘ œŸœ Ÿœ ŸœŸœ˜SJ™"J™—š‘œŸœŸœ Ÿœ ŸœŸœŸœŸœ˜WJšœL™LK˜—š ‘œŸœ ŸœŸœŸœŸœ˜[JšœJ™JK˜——JšŸœ˜—…—ͺC