|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 9216 (0x2400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Analyze_Record_Types, seg_0043f9
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Ada_Traversal; with Simple_Status; with Errors; with Common; with Abstract_Document; with Log; with Profile; with Ada_Program; with Declarations; with Type_Information; with Directory_Tools; with Record_Analysis; with Lrm_Renames; use Lrm_Renames; procedure Analyze_Record_Types (In_Units : String := ""; To_Preview_Object : String := "Record_Type_Info"; Response : String := "<PROFILE>") is package Ad renames Abstract_Document; package Ad_Specify renames Abstract_Document.Specify; package Object renames Directory_Tools.Object; package Naming renames Directory_Tools.Naming; Bad_Input_String : exception; Old_Profile : Profile.Response_Profile := Profile.Get; New_Profile : Profile.Response_Profile; Db : Record_Analysis.Data_Base; Units_Iter : Object.Iterator := Naming.Resolution (In_Units); Paragraph_Count : Positive := 1; Document : Abstract_Document.Handle; Current_Context : constant String := Naming.Default_Context; Object_Status : Object.Error_Code; Status : Errors.Condition; procedure Pre_Op (Program_Element : Ada.Element; State : in out Record_Analysis.Data_Base; Control : in out Ada.Traversal_Control) is begin case Declarations.Kind (Program_Element) is when Declarations.A_Type_Declaration => case Type_Information.Kind (Declarations.Type_Specification (Program_Element)) is when Type_Information.A_Record_Type_Definition => Record_Analysis.Add (Program_Element, State); when others => null; end case; when others => null; end case; Control := Ada.Continue; end Pre_Op; procedure Post_Op (Program_Element : Ada.Element; State : in out Record_Analysis.Data_Base; Control : in out Ada.Traversal_Control) is begin Control := Ada.Continue; end Post_Op; procedure Lrm_Traverse is new Ada.Depth_First_Traversal (Record_Analysis.Data_Base, Pre_Op, Post_Op); procedure Traverse (Unit : Object.Handle) is begin Lrm_Traverse (Ada.Conversion.To_Compilation_Unit (Unit), Db, False); end Traverse; procedure Traverse_All_Ada is new Ada_Traversal (Traverse); begin if Object.Is_Bad (Units_Iter) then raise Bad_Input_String; end if; New_Profile := Profile.Value (Response); Profile.Set (New_Profile); Ad.Create (Document, To_Preview_Object, Status); Naming.Set_Default_Context (Current_Context, Object_Status); case Errors.Severity (Status) is when Simple_Status.Problem | Simple_Status.Fatal => Log.Put_Line ("Problem creating object " & To_Preview_Object & ". " & Errors.Info (Status), Profile.Error_Msg); return; -- exit when others => null; end case; Record_Analysis.Initialize (Db); Traverse_All_Ada (Units_Iter); Ad_Specify.Cover (Document, "RECORD TYPE INFORMATION"); Ad_Specify.Cover_Item (Document, ""); Ad_Specify.Paragraph (Document, Paragraph_Count, "SORTED BY RECORD NAME; COMPONENTS IN ORDER"); Paragraph_Count := Paragraph_Count + 1; Record_Analysis.Display (Db, Record_Analysis.By_Record_Name, Record_Analysis.In_Order, Document); Ad_Specify.Paragraph (Document, Paragraph_Count, "SORTED BY NUMBER OF COMPONENTS; COMPONENTS SORTED BY NUMBER REFERENCE"); Paragraph_Count := Paragraph_Count + 1; Record_Analysis.Display (Db, Record_Analysis.By_Size, Record_Analysis.By_Name, Document); Ad_Specify.Paragraph (Document, Paragraph_Count, "SORTED BY NUMBER OF COMPONENTS; COMPONENTS SORTED BY FREQUENCY OF OCCURRENCE"); Paragraph_Count := Paragraph_Count + 1; Record_Analysis.Display (Db, Record_Analysis.By_Size, Record_Analysis.By_Component_Frequency, Document); Ad_Specify.Paragraph (Document, Paragraph_Count, "SORTED BY COMPONENT NAME; COMPONENTS BY NAME"); Paragraph_Count := Paragraph_Count + 1; Record_Analysis.Display (Db, Record_Analysis.By_Component_Name, Record_Analysis.By_Name, Document); Ad_Specify.Paragraph (Document, Paragraph_Count, "SORTED BY COMPONENT NAME; COMPONENTS BY FREQUENCY OF OCCURRENCE"); Paragraph_Count := Paragraph_Count + 1; Record_Analysis.Display (Db, Record_Analysis.By_Component_Name, Record_Analysis.By_Component_Frequency, Document); Ad.Close (Document); Common.Definition (To_Preview_Object); Profile.Set (Old_Profile); exception when Bad_Input_String => Profile.Set (Old_Profile); Ad.Close (Document); end Analyze_Record_Types;
nblk1=8 nid=0 hdr6=10 [0x00] rec0=24 rec1=00 rec2=01 rec3=040 [0x01] rec0=01 rec1=00 rec2=08 rec3=002 [0x02] rec0=16 rec1=00 rec2=02 rec3=00a [0x03] rec0=02 rec1=00 rec2=07 rec3=004 [0x04] rec0=1f rec1=00 rec2=03 rec3=01c [0x05] rec0=19 rec1=00 rec2=04 rec3=02a [0x06] rec0=14 rec1=00 rec2=05 rec3=070 [0x07] rec0=0d rec1=00 rec2=06 rec3=001 tail 0x215003286815c636b250c 0x42a00088462061e03