|
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 - metrics - download
Length: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Program_Analysis, seg_004561
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Lrm_Utilities; with Lrm_Renames; use Lrm_Renames; package body Program_Analysis is package Ada renames Ada_Program; function Is_Predefined_Type_Defintion (Elem : Ada.Element) return Boolean is Ground : Ada.Element; begin if Types.Kind (Elem) /= Types.Not_A_Type_Definition then Ground := Types.Ground_Type (Elem); case Types.Kind (Ground) is when Types.An_Integer_Type_Definition | Types.A_Float_Type_Definition => return Types.Is_Predefined (Ground); when others => return False; end case; else return False; end if; end Is_Predefined_Type_Defintion; function Is_Anonymous_Array_Type_Defintion (Elem : Ada.Element) return Boolean is Enclosing_Decl : Ada.Element := Decls.Enclosing_Declaration (Elem); begin case Types.Kind (Elem) is when Types.An_Array_Type_Definition => case Decls.Kind (Enclosing_Decl) is when Decls.A_Variable_Declaration | Decls.A_Constant_Declaration => return True; when others => return False; end case; when others => return False; end case; end Is_Anonymous_Array_Type_Defintion; procedure Pre_Op (Program_Element : Ada.Element; State : in out Unit_Data; Control : in out Ada.Traversal_Control) is begin case Ada.Kind (Program_Element) is when Ada.A_Statement => case Stmts.Kind (Program_Element) is when Stmts.A_Goto_Statement => Ada.Append (Program_Element, State.Gotos); Control := Ada.Abandon_Children; when others => Control := Ada.Continue; end case; when Ada.A_Declaration => case Decls.Kind (Program_Element) is when Decls.A_Variable_Declaration => if Lrm_Utilities.Is_Actual_Declaration (Program_Element) and then Lrm_Utilities.Is_Actual_Variable_Declaration (Program_Element) and then not (Lrm_Utilities.Is_Initialized (Program_Element)) then Ada.Append (Program_Element, State.Vars); end if; Control := Ada.Continue; when others => Control := Ada.Continue; end case; when others => case Comp_Units.Context_Clause_Kind (Program_Element) is when Comp_Units.A_Use_Clause => Ada.Append (Program_Element, State.Uses); when others => null; end case; if Is_Predefined_Type_Defintion (Program_Element) then Ada.Append (Decls.Enclosing_Declaration (Program_Element), State.Pre_Defineds); else null; end if; if Is_Anonymous_Array_Type_Defintion (Program_Element) then Ada.Append (Decls.Enclosing_Declaration (Program_Element), State.Anons); else null; end if; Control := Ada.Continue; end case; end Pre_Op; procedure Post_Op (Program_Element : Ada.Element; State : in out Unit_Data; Control : in out Ada.Traversal_Control) is begin Control := Ada.Continue; end Post_Op; procedure Traverse is new Ada.Depth_First_Traversal (Unit_Data, Pre_Op, Post_Op); function Analyze (Comp_Unit : Ada_Program.Element) return Unit_Data is Data : Unit_Data; begin Traverse (Comp_Unit, Data, False); return Data; end Analyze; function Anonymous_Array_Decls (In_Unit : Unit_Data) return Ada_Program.Element_List is begin return In_Unit.Anons; end Anonymous_Array_Decls; function Use_Clauses (In_Unit : Unit_Data) return Ada_Program.Element_List is begin return In_Unit.Uses; end Use_Clauses; function Go_Tos (In_Unit : Unit_Data) return Ada_Program.Element_List is begin return In_Unit.Gotos; end Go_Tos; function Predefined_Numerics (In_Unit : Unit_Data) return Ada_Program.Element_List is begin return In_Unit.Pre_Defineds; end Predefined_Numerics; function Uninitialized_Variables (In_Unit : Unit_Data) return Ada_Program.Element_List is begin return In_Unit.Vars; end Uninitialized_Variables; end Program_Analysis;
nblk1=6 nid=0 hdr6=c [0x00] rec0=1d rec1=00 rec2=01 rec3=030 [0x01] rec0=17 rec1=00 rec2=02 rec3=04e [0x02] rec0=16 rec1=00 rec2=03 rec3=04c [0x03] rec0=1b rec1=00 rec2=04 rec3=03c [0x04] rec0=1e rec1=00 rec2=05 rec3=034 [0x05] rec0=0f rec1=00 rec2=06 rec3=000 tail 0x217001eca815c64d9c4d7 0x42a00088462061e03