|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 15555 (0x3cc3)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
separate (Check_Consistency)
procedure Check_Item_Node (This_Item : in Structure.Item;
This_State : in out State;
Control_Result : out Structure.Traversal_Control) is
--
procedure Check_Boilerplate_File_For
(This_Free_Form_Item : in Structure.Item;
This_State : in out State) is
begin
Log.Put_Line ("Checking boilerplate file");
Consistency.Assert_Has_Boilerplate_File (This_Free_Form_Item);
--
exception
when Consistency.Has_No_Boilerplate_File =>
Report ("Item """ & Structure.Name_Of (This_Free_Form_Item) &
""" has no boilerplate file", This_State);
--
when Consistency.Has_Wrong_Kind_Of_Boilerplate_File =>
Report ("Item """ & Structure.Name_Of (This_Free_Form_Item) &
""" has wrong kind of boilerplate file", This_State);
--
end Check_Boilerplate_File_For;
--
procedure Check_Read_Me_File_For (This_Free_Form_Item : in Structure.Item;
This_State : in out State) is
begin
Log.Put_Line ("Checking Read_Me file");
Consistency.Assert_Has_Read_Me_File (This_Free_Form_Item);
--
exception
when Consistency.Has_No_Read_Me_File =>
Report ("Item """ & Structure.Name_Of (This_Free_Form_Item) &
""" has no Read_Me file", This_State, Warnings);
--
end Check_Read_Me_File_For;
--
procedure Check_Model_For (This_Spec_View : in Object_Info.Object;
This_Item : in Structure.Item;
This_State : in out State) is
--
The_Model : Object_Info.Object :=
Object_Info.Cmvc.Model_For (This_Spec_View);
--
The_Catalog : Structure.Catalog :=
Structure.Catalog_Containing (This_Item);
--
begin
Log.Put_Line ("Checking model");
Consistency.Assert_Model_Allowable (The_Model, The_Catalog);
--
exception
when Consistency.Invalid_Model =>
Report ("View """ &
Directory_Tools.Naming.Full_Name (This_Spec_View) &
""" has invalid model """ &
Directory_Tools.Naming.Full_Name (The_Model) & """",
This_State);
--
end Check_Model_For;
--
function Is_Listed (This_Import : in Object_Info.Object;
In_Imports : in Structure.Imports) return Boolean is
--
The_Imports : Structure.Imports := In_Imports;
--
begin
Structure.Reset (The_Imports);
while (not Structure.Done (The_Imports)) loop
if (Directory_Tools.Naming.Full_Name (This_Import) =
Structure.Name_Of (Structure.Current_Object (The_Imports))) then
return (True);
end if;
Structure.Next (The_Imports);
end loop;
return (False);
end Is_Listed;
--
procedure Check_Imports_For (This_View : in Object_Info.Object;
This_Item : in Structure.Item;
This_State : in out State) is
--
Actual_Imports : Object_Info.Objects :=
Object_Info.Cmvc.Imports_For (This_View, Used_Only => False);
--
Listed_Imports : Structure.Imports := Structure.Imports_For (This_Item);
--
begin
--
-- This first loop checks that every import listed in the data file
-- for the specified item actually exists. It also keeps a count of
-- the number of imports in the list.
--
Log.Put_Line ("Checking imports");
Structure.Reset (Listed_Imports);
while (not Structure.Done (Listed_Imports)) loop
declare
The_Physical_Import : Object_Info.Object :=
Structure.Actual_Object_For
(Structure.Current_Object (Listed_Imports));
begin
if (Object_Info.Any.Is_Bad (The_Physical_Import)) then
Report ("Import """ &
Structure.Name_Of (Structure.Current_Object
(Listed_Imports)) &
""" listed in data file for item """ &
Structure.Name_Of (This_Item) &
""" cannot be resolved", This_State);
end if;
end;
Structure.Next (Listed_Imports);
end loop;
--
-- This second loop checks that every import in the specified view
-- is listed in the data file for the specified item.
--
Directory_Tools.Object.Reset (Actual_Imports);
while (not Directory_Tools.Object.Done (Actual_Imports)) loop
if (not Is_Listed (Directory_Tools.Object.Value (Actual_Imports),
Listed_Imports)) then
Report ("Imported view """ &
Directory_Tools.Naming.Full_Name
(Directory_Tools.Object.Value (Actual_Imports)) &
""" is not listed as import in data file for item """ &
Structure.Name_Of (This_Item) & """", This_State);
end if;
Directory_Tools.Object.Next (Actual_Imports);
end loop;
end Check_Imports_For;
--
procedure Check_Boilerplate_File_For (This_View : in Object_Info.Object;
This_Item : in Structure.Item;
This_State : in out State) is
begin
Log.Put_Line ("Checking boilerplate file");
Consistency.Assert_Has_Boilerplate_File (This_View, This_Item);
--
exception
when Consistency.Has_No_Boilerplate_File =>
Report ("View """ & Directory_Tools.Naming.Full_Name (This_View) &
""" has no boilerplate file", This_State);
--
when Consistency.Has_Wrong_Kind_Of_Boilerplate_File =>
Report ("View """ & Directory_Tools.Naming.Full_Name (This_View) &
""" has wrong kind of boilerplate file", This_State);
--
end Check_Boilerplate_File_For;
--
procedure Check_Read_Me_File_For (This_View : in Object_Info.Object;
This_State : in out State) is
begin
Log.Put_Line ("Checking Read_Me file");
Consistency.Assert_Has_Read_Me_File (This_View);
--
exception
when Consistency.Has_No_Read_Me_File =>
Report ("View """ & Directory_Tools.Naming.Full_Name (This_View) &
""" has no Read_Me file", This_State, Warnings);
--
end Check_Read_Me_File_For;
--
procedure Check_Spec_Views_In
(This_Item : in Structure.Item; This_State : in out State) is
--
The_Spec_Views : Structure.Spec_Views :=
Structure.Spec_Views_For (This_Item);
--
begin
Log.Put_Line ("Checking spec views");
Structure.Reset (The_Spec_Views);
if (Structure.Done (The_Spec_Views)) then
Report ("No spec views are listed in data file for item """ &
Structure.Name_Of (This_Item) & """", This_State, Warnings);
else
while (not Structure.Done (The_Spec_Views)) loop
declare
The_Spec_View : Structure.Object :=
Structure.Current_Object (The_Spec_Views);
The_Physical_Spec_View : Object_Info.Object :=
Structure.Actual_Object_For (The_Spec_View);
begin
if (Object_Info.Any.Is_Bad (The_Physical_Spec_View)) then
Report ("Non-existent spec view """ &
Structure.Name_Of (The_Spec_View) &
""" is listed in data file for item """ &
Structure.Name_Of (This_Item) & """",
This_State);
elsif (not Object_Info.Any.Is_Spec_View
(The_Physical_Spec_View)) then
Report ("Object """ &
Structure.Name_Of (The_Spec_View) &
""" listed in data file for item """ &
Structure.Location_Of (This_Item) &
""" is not a spec view", This_State);
else
Check_Model_For (The_Physical_Spec_View,
This_Item, This_State);
Check_Imports_For (The_Physical_Spec_View,
This_Item, This_State);
Check_Boilerplate_File_For
(The_Physical_Spec_View, This_Item, This_State);
Check_Read_Me_File_For
(The_Physical_Spec_View, This_State);
end if;
end;
Structure.Next (The_Spec_Views);
end loop;
end if;
end Check_Spec_Views_In;
--
procedure Check_Load_Views_In
(This_Item : in Structure.Item; This_State : in out State) is
--
The_Load_Views : Structure.Load_Views :=
Structure.Load_Views_For (This_Item);
--
Found_View_With_Visible_Units : Boolean := False;
--
begin
Log.Put_Line ("Checking load views");
Structure.Reset (The_Load_Views);
if (Structure.Done (The_Load_Views)) then
Report ("No load views are listed in data file for item """ &
Structure.Name_Of (This_Item) & """", This_State);
else
while (not Structure.Done (The_Load_Views)) loop
declare
The_Load_View : Structure.Object :=
Structure.Current_Object (The_Load_Views);
The_Physical_Load_View : Object_Info.Object :=
Structure.Actual_Object_For (The_Load_View);
begin
if (Object_Info.Any.Is_Bad (The_Physical_Load_View)) then
Report ("Non-existent load view """ &
Structure.Name_Of (The_Load_View) &
""" is listed in data file for item """ &
Structure.Name_Of (This_Item) & """",
This_State);
elsif (not Object_Info.Any.Is_Load_View
(The_Physical_Load_View)) then
Report ("Object """ &
Structure.Name_Of (The_Load_View) &
""" listed in data file for item """ &
Structure.Name_Of (This_Item) &
""" is not a load view", This_State);
else
if (Structure.Kind_Of (This_Item) =
Syntax.Visible_Units) then
if (not Object_Info.Any.Is_Code_Only_Load_View
(The_Physical_Load_View)) then
Found_View_With_Visible_Units := True;
end if;
if (Object_Info.Any.Is_Working_Load_View
(The_Physical_Load_View)) then
Report
("Load view """ &
Structure.Name_Of (The_Load_View) &
""" is a working view rather than released view for item """ &
Structure.Name_Of (This_Item) & """",
This_State, Warnings);
end if;
else
if (not Object_Info.Any.Is_Code_Only_Load_View
(The_Physical_Load_View)) then
Report
("Load view """ &
Structure.Name_Of (The_Load_View) &
""" is not a code view for Code_Only item """ &
Structure.Name_Of (This_Item) & """",
This_State);
end if;
end if;
Check_Model_For (The_Physical_Load_View,
This_Item, This_State);
Check_Imports_For (The_Physical_Load_View,
This_Item, This_State);
Check_Boilerplate_File_For
(The_Physical_Load_View, This_Item, This_State);
Check_Read_Me_File_For
(The_Physical_Load_View, This_State);
end if;
Structure.Next (The_Load_Views);
end;
end loop;
if ((Structure.Kind_Of (This_Item) = Syntax.Visible_Units) and then
(not Found_View_With_Visible_Units)) then
Report
("Never found view containing visible units for Visible_Units item """ &
Structure.Name_Of (This_Item) & """",
This_State);
end if;
end if;
end Check_Load_Views_In;
--
begin
if (Should_Be_Skipped (This_Item, This_State)) then
Control_Result := Structure.Abandon_Children;
else
Log.Put_Line ("Checking item node """ &
Structure.Name_Of (This_Item) & """",
Profile.Auxiliary_Msg);
case (Structure.Kind_Of (This_Item)) is
when Syntax.Free_Form =>
Consistency.Assert_Is_Major_Class_World (This_Item);
Check_Boilerplate_File_For (This_Item, This_State);
Check_Read_Me_File_For (This_Item, This_State);
--
when Syntax.Visible_Units | Syntax.Code_Only =>
Consistency.Assert_Is_Subsystem (This_Item);
Check_Spec_Views_In (This_Item, This_State);
Check_Load_Views_In (This_Item, This_State);
--
when others =>
null;
--
end case;
if (Located_Objective (This_Item, This_State)) then
Report_Objective_Located (This_State);
end if;
Control_Result := Structure.Continue;
Log.Put_Line ("Item node checked", Profile.Positive_Msg);
end if;
--
exception
when Consistency.No_Such_Item =>
Report ("Unable to resolve item", This_State);
Control_Result := Structure.Abandon_Children;
--
when Consistency.Not_Major_Class_World =>
Report ("Item is not of major class ""World""", This_State);
Control_Result := Structure.Abandon_Children;
--
when Consistency.Not_A_Subsystem =>
Report ("Item is not a subsystem", This_State);
Control_Result := Structure.Abandon_Children;
--
end Check_Item_Node;