CDSatellitesDoc.tioga
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Written by: Pradeep Sindhu, December 23, 1985 4:23:09 pm PST
Pradeep Sindhu, February 20, 1986 7:08:11 pm PST
Bertrand Serlet August 3, 1986 8:05:09 pm PDT
CDSATELLITES: WYSIWYG CHIPNDALE PROPERTIES
CDSATELLITES: WYSIWYG CHIPNDALE PROPERTIES
CDSATELLITES: WYSIWYG CHIPNDALE PROPERTIES
DATOOLS — FOR INTERNAL XEROX USE ONLY
DATOOLS — FOR INTERNAL XEROX USE ONLY
DATOOLS — FOR INTERNAL XEROX USE ONLY
CDSatellites: WYSIWYG ChipNDale Properties
Release as [DATools]<DATools6.1>PW>CDSatellitesDoc.tioga, .press

© Copyright 1985, 1986 Xerox Corporation. All rights reserved.
Abstract: CDSatellites provide a way to associate arbitrary textual information such as names and expressions with Chipndale cells and Chipndale instances. A useful way to think about satellites is that they are visible properties. However, satellites differ from properties in three important ways: they require no explicit action on the part of a user to display them, their looks and placement are entirely under user control, and they are ordinary text strings with no hidden semantics.
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304



For Internal Xerox Use Only
Contents
Basics
Programming Interface
User Interface
Running CDSatellites
Acknowledgements
Appendix A: Problems with the Instance List Method
Basics
Satellites provide a way to associate arbitrary textual information such as names and expressions with Chipndale instances and Chipndale cells. This document describes all users need to know about satellites in order to use them.
Satellites come in two flavors: instance and object. An instance satellite is a Chipndale text instance that has been associated explicitly with another (non-text) Chipndale instance called the satellite's master; a master along with its satellites is called an instance group. An instance group exists in a world, which is a list of Chipndale instances that is either the contents of some Chipndale cell or of the top level of the design. Any text instance that has not been associated explicitly with another Chipndale instance is an object satellite. The object to which an object satellite is bound is the container of the world in which the satellite exists—if the text is inside a cell then the container is the cell; if the text is at the top level of the design then the container is the design. Object satellites along with their host object (if any) are called an object group. Either flavor of satellite can be marked to be a comment, permitting it to be ignored if desired.
A useful model of satellites is that they are visible properties attached to a master or to an object. However, there are three important differences between satellites and properties: First, satellites are always visible, while a user must do something explicit to display properties. Second, the user has complete control over the looks and placement of satellites, while properties are displayed in a fixed way. Finally, satellites are simply text strings; this is in contrast with properties, which have type information associated with them.
The association between a master and its satellites is made via a special groupIdProp property attached to each. The value of this property is an integer that is unique (within the design) to the instance group in question. This method of associating group members is convenient for interactive purposes, but unfortunately is not sufficient for a reasonable programming interface. The problem is that in order to find an instance's satellites we need to know the world in which these satellites exist. For some applications carrying around the world is inconvenient, so it behooves us to provide a way to find an instance's satellites given just the instance. This more convenient way is provided by putting a satellitesProp property on the master, which has as its value the list of text instances that are the master's satellites. (If you're wondering why just having the list of text instances alone does not suffice see Appendix A.)
Satellites satisfy a number of invariants which may be taken as defining properties:
1. A master must be a non-text CD.Instance with a non-nil groupIdProp.
2. A satellite must be a text CD.Instance with a non-nil groupIdProp.
3. Every satellite in a given world must have a corresponding master in that world.
4. A design may have at most one master with a given groupId.
5. Each master must have a satellitesProp property that gives its list of satellites.
6. All text instances that don't have a groupIdProp are object satellites.
7. Each CD.Cell must have a satellitesProp property that gives its list of object satellites.
Programming Interface
The programming interface provides procedures to add and retrieve satellites from a given master. A final procedure allows clients to guarantee that the defining invariants are preserved after manipulation. See CDSatellites.mesa for more information.
User Interface
Satellite Commands
The user interface consists of eight commands divided into three groups: instance satellite commands, object satellite commands, and comment commands. All eight commands are available via the satellites and expressions menu (Space-L).
The instance and object satellite commands are Select Group, Add Satellite, and Set Satellites.
Show Satellites selects the group to which the currently selected instance belongs. Multiple selections are not allowed. This command may also be executed directly via I-LeftClick for instance satellites and via O-LeftClick for object satellites.
Add Satellite prompts for text and makes that text a satellite of the currently selected instance. Multiple selections are not allowed, and the current selection must not be a text instance. This command may also be executed directly via I-MiddleClick for instance satellites and via O-MiddleClick for object satellites.
Set Satellites takes a single non-text instance and zero or more text instances and makes the text instances satellites of the non-text instance. If the non-text instance was a master already, it loses its old satellites. Multiple non-text instances are not allowed in the selection. This command may also be executed directly via I-RightClick for instance satellites and via O-RightClick for object satellites.
Comment and UnComment Commands
Comment satellites are satellites with a special property that makes them invisble to client code. The two commands are CTRL-\ and SHIFT-CTRL-\ (as in Cedar).
Subtleties
Considerable care has been taken in the design of satellites to ensure that they mesh well with other Chipndale commands. In almost all cases the "right" thing will happen when these commands are used on instances that are in a satellite group:
Copy: If the selection contains just satellites, then the new copies are added to the master's list of satellites. If the selection contains a master, then a new group is created, with the new satellites being associated with the new master and the old ones with the old.
Delete: If the deleted instance is a master then its satellites will become ordinary pieces of text. If the deleted instance is a satellite then that satellite will get removed from its group.
Undelete: The undelete will preserve all satellite groupings back up until the last satellite command was executed. So, for example, if you delete a master and then do a number of non-satellite commands and then undelete that master, the master's group will be reincarnated.
Stretch: If the instance being stretched is a master, it remains a master.
Replace Text: If the text was a satellite of some master then the replaced text replaces the old satellite of that master.
Design satellites
Uniformity of concepts provide a good way to have design satellites: the design can be viewed as a top-level object, and so commands for showing, adding or setting object properties will affect the design when there is no object pushed in.
Running CDSatellites
CDSatellites is part of PW. So, to run CDSatellites you need to do the following:
1. Bringover [Datools]<Datools6.1>Top>PW.df (or use BringDAUser)
2. Add the following line to your profile:
ChipNDale.CMosB.TIP: /DATools/DATools6.1/PW/CDSatellites.TIP Default
3. Type "PW"
Acknowledgements
The current version of satellites has gone through a number of redesigns and reimplementations as deficiencies were discovered and fixed, and several people have contributed their ideas and time. An initial implementation was by Louis Monier. A complete redesign was done by Bertrand Serlet and Pradeep Sindhu, followed by several iterations over this design. It took one more complete redesign and reimplmentation (by Pradeep Sindhu) to get to the current version.
Appendix A: Problems with the Instance List Method
There are two problems with just having a list of instances that records a master's satellites: the first takes a small matter of programming to fix, while the second is basic. The SMOP problem is that properties that have Cedar LIST's as values cannot be written out to Chipndale files. The basic problem is that Chipndale instances are not permanent entities—they can disappear and be replaced by an identical instance at any time (well, not any time, but you get the idea). Therefore we cannot cache REF's to instances.