DFDependencies.Mesa
Mike Spreitzer August 21, 1986 4:01:14 pm PDT
DIRECTORY Commander, DFOperations, FileSets, Graphs, IO, Rope;
DFDependencies: CEDAR DEFINITIONS = {
ROPE: TYPE = Rope.ROPE;
RopeList: TYPE = LIST OF ROPE;
FileSet: TYPE = FileSets.FileSet;
DependencyGraph: TYPE = Graphs.Graph;
Analyze: PROC [dfs: FileSet, filter: FileSets.Filter ← NIL] RETURNS [dg: DependencyGraph];
Returns the graph of the dependencies of the DF-files in dfs and the things they depend on that pass the filter.
PrintToFile: PROC [fileName: ROPE, dg: DependencyGraph, wDir: ROPENIL];
Print: PROC [to: IO.STREAM, dg: DependencyGraph, wDir: ROPENIL];
Prints full names, except those that begin with wDir.
ReadFromFile: PROC [fileName: ROPE, wDir: ROPENIL] RETURNS [dg: DependencyGraph];
Read: PROC [from: IO.STREAM, wDir: ROPENIL] RETURNS [dg: DependencyGraph];
Track: PROC [dg: DependencyGraph, from: ROPE, parent: Commander.Handle, boo: BringOverOp] RETURNS [failures: RopeList];
Updates each (transitive) dependent Bar.DF of the DF-file whose base is from,
and returns a list of the dependents that had errors. No transitive dependents of a DF-file that fails gets processed.
BringOverOp: TYPE = RECORD [
doBringOver: BOOL,
filter: DFOperations.BringOverFilter ← []];
Update: PROC [subject: ROPE, cmd: Commander.Handle, boo: BringOverOp] RETURNS [success: BOOL];
For subject.DF, executes
IF doBringOver THEN Bringover subject.DF
MakeDo -dr subject.DF
IF changes THEN {
SModel subject.DF
VerifyDF subject.DF
}
and succeeds if all succeed.
}.