UsingDependenciesDoc.tioga
Michael Plass, June 28, 1985 4:04:55 pm PDT
Pier, November 27, 1985 1:31:30 pm PST
UsingDependencies
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
UsingDependencies
Michael Plass
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: Command for generating a list of interface-item dependencies from a collection of BCDs.
Created by: Michael Plass
Maintained by: Michael Plass <Plass.pa>
Keywords: Dependencies, Lister, USING
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
Problem
You need to know who in the world uses a particular procedure in an interface. Actually you need to know this for a whole bunch of procedures. And, you might like to know who implements that particular procedure. And, you might like the whole thing formatted with Tioga node breaks and pretty formatting. Before you get too excited, read Pitfalls, below.
Usage
UsingDependencies [switches] <output> {<bcd pattern>}
where [switches] => optional selections:
-i => include implementors as well as users for all procedures
-f => format prettily when done constructing
Examples:
UsingDependencies -if FooDepends.tioga ← Foo*Impl.bcd!H
UsingDependencies -f FooDependsNoImpls.tioga ← Foo*Impl*.bcd!H
UsingDependencies FooQuickieDepends.tioga ← Foo*Impl*.bcd!H
Action
Creates a text file that tells, for each interface item used in any of the BCDs, all of the places it is used. It works by invoking the UsingLister command of the Lister for each BCD, and massaging the resulting data into the desired form. If -i is set, calls the interpreter to attempt to find the implementor of each interface item. If -f is set, formats with node breaks, interface items in boldface and implementors in italics. Setting -i slows down the action a lot; that's why it is an option.
Pitfalls
The using lists are created on the current working directory, so it is best to use a scratch directory that can be cleaned up easily. If the program finds a foo.usingList already exists, and it is newer than foo.bcd, the program assumes it is correct and does not generate a new one. This speeds things up a bit if you need to restart, but there is a potential for confusion.
The UsingLister sometimes gets confused when types are copied from one interface to another, and this confusion will get carried through to the dependencies listing.
In order to find implementors successfully, they must be loaded and their respective exports must also be exported by the configurations in which they appear. This may be a bit of a nuisance. If the interpreter cannot find an implementor then "??" is printed for the implementor. If the interpreter finds something other than a matching implementor, say a type or a structure definition, then "!!" is printed for the implementor. Using the interpreter gets you what you want, but is slow.
You should invoke UsingDependencies with a !H on the end of the bcd pattern or do a KillExcess *.bcd in your directory first or you will get duplicate entries.
Dependencies
If you need to know about dependencies only at the interface level, use the Dependencies package instead - it's faster and probably more accurate.