|
|
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: 15360 (0x3c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Sizing_Parameters, seg_004631
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Errors;
with Io;
with Parameter_Parser;
package body Sizing_Parameters is
package Flt_Io is new Io.Float_Io (Float);
type Variable_Names is (Nil,
The_Short_Short_Integer_Lower_Bound,
The_Short_Short_Integer_Upper_Bound,
The_Short_Short_Integer_Size,
The_Short_Integer_Lower_Bound,
The_Short_Integer_Upper_Bound,
The_Short_Integer_Size,
The_Integer_Lower_Bound,
The_Integer_Upper_Bound,
The_Integer_Size,
The_Long_Integer_Lower_Bound,
The_Long_Integer_Upper_Bound,
The_Long_Integer_Size,
The_Short_Float_Lower_Bound,
The_Short_Float_Upper_Bound,
The_Short_Float_Digits,
The_Short_Float_Size,
The_Float_Lower_Bound,
The_Float_Upper_Bound,
The_Float_Digits,
The_Float_Size,
The_Long_Float_Lower_Bound,
The_Long_Float_Upper_Bound,
The_Long_Float_Digits,
The_Long_Float_Size,
The_Boolean_Size,
The_Character_Size,
The_Access_Type_Size,
The_Task_Type_Size,
The_Short_Enumeration_Length,
The_Short_Enumeration_Size,
The_Enumeration_Length,
The_Enumeration_Size,
The_Long_Enumeration_Length,
The_Long_Enumeration_Size,
The_Record_Component_Alignment,
The_Array_Component_Alignment,
The_Object_Declaration_Alignment,
The_Discriminated_Record_Overhead);
package Variable_Name_Parser is
new Parameter_Parser (Option_Id => Variable_Names,
First => Variable_Names'First);
function Integer_Type_Size
(Lower, Upper : Long_Integer; Is_Packed : Boolean := False)
return Long_Natural is
begin
if Lower >= Short_Short_Integer_Lower_Bound and then
Upper <= Short_Short_Integer_Upper_Bound then
return Short_Short_Integer_Size;
elsif Lower >= Short_Integer_Lower_Bound and then
Upper <= Short_Integer_Upper_Bound then
return Short_Integer_Size;
elsif Lower >= Integer_Lower_Bound and then
Upper <= Integer_Upper_Bound then
return Integer_Size;
else
return Long_Integer_Size;
end if;
end Integer_Type_Size;
function Float_Type_Size
(Lower, Upper : Float; Number_Of_Digits : Long_Natural)
return Long_Natural is
begin
if Lower >= Short_Float_Lower_Bound and then
Upper <= Short_Float_Upper_Bound and then
Number_Of_Digits <= Short_Float_Digits then
return Short_Float_Size;
elsif Lower >= Float_Lower_Bound and then
Upper <= Float_Upper_Bound and then
Number_Of_Digits <= Float_Digits then
return Float_Size;
else
return Long_Float_Size;
end if;
end Float_Type_Size;
function Enumeration_Type_Size
(Lower_Bound, Upper_Bound : Long_Integer;
Is_Packed : Boolean := False) return Long_Natural is
Length : Long_Natural := Long_Natural (Upper_Bound - Lower_Bound);
begin
if Length <= Short_Enumeration_Length then
return Short_Enumeration_Size;
elsif Length <= Enumeration_Length then
return Enumeration_Size;
else
return Long_Enumeration_Size;
end if;
end Enumeration_Type_Size;
function Float_Value (Image : String) return Float is
Num : Float;
Last : Positive;
begin
Flt_Io.Get (Image, Num, Last);
return Num;
end Float_Value;
procedure Initialize (File : String) is
Var_Iter : Variable_Name_Parser.Iterator;
begin
Var_Iter := Variable_Name_Parser.Parse (File);
while not Variable_Name_Parser.Done (Var_Iter) loop
declare
Current_Rule : constant Variable_Names :=
ariable_Name_Parser.Name (Var_Iter);
Val : constant String :=
Variable_Name_Parser.Get_Image (Var_Iter);
begin
case Current_Rule is
when Nil =>
null;
when The_Short_Short_Integer_Lower_Bound =>
Short_Short_Integer_Lower_Bound :=
Long_Integer'Value (Val);
when The_Short_Short_Integer_Upper_Bound =>
Short_Short_Integer_Upper_Bound :=
Long_Integer'Value (Val);
when The_Short_Short_Integer_Size =>
Short_Short_Integer_Size := Long_Integer'Value (Val);
when The_Short_Integer_Lower_Bound =>
Short_Integer_Lower_Bound := Long_Integer'Value (Val);
when The_Short_Integer_Upper_Bound =>
Short_Integer_Upper_Bound := Long_Integer'Value (Val);
when The_Short_Integer_Size =>
Short_Integer_Size := Long_Integer'Value (Val);
when The_Integer_Lower_Bound =>
Integer_Lower_Bound := Long_Integer'Value (Val);
when The_Integer_Upper_Bound =>
Integer_Upper_Bound := Long_Integer'Value (Val);
when The_Integer_Size =>
Integer_Size := Long_Integer'Value (Val);
when The_Long_Integer_Lower_Bound =>
Long_Integer_Lower_Bound := Long_Integer'Value (Val);
when The_Long_Integer_Upper_Bound =>
Long_Integer_Upper_Bound := Long_Integer'Value (Val);
when The_Long_Integer_Size =>
Long_Integer_Size := Long_Integer'Value (Val);
when The_Short_Float_Lower_Bound =>
Short_Float_Lower_Bound :=
Float_Value (Variable_Name_Parser.Get_Image
(Var_Iter));
when The_Short_Float_Upper_Bound =>
Short_Float_Upper_Bound :=
Float_Value (Variable_Name_Parser.Get_Image
(Var_Iter));
when The_Short_Float_Digits =>
Short_Float_Digits := Long_Integer'Value (Val);
when The_Short_Float_Size =>
Short_Float_Size := Long_Integer'Value (Val);
when The_Float_Lower_Bound =>
Float_Lower_Bound :=
Float_Value (Variable_Name_Parser.Get_Image
(Var_Iter));
when The_Float_Upper_Bound =>
Float_Upper_Bound :=
Float_Value (Variable_Name_Parser.Get_Image
(Var_Iter));
when The_Float_Digits =>
Float_Digits := Long_Integer'Value (Val);
when The_Float_Size =>
Float_Size := Long_Integer'Value (Val);
when The_Long_Float_Lower_Bound =>
Long_Float_Lower_Bound :=
Float_Value (Variable_Name_Parser.Get_Image
(Var_Iter));
when The_Long_Float_Upper_Bound =>
Long_Float_Upper_Bound :=
Float_Value (Variable_Name_Parser.Get_Image
(Var_Iter));
when The_Long_Float_Digits =>
Long_Float_Digits := Long_Integer'Value (Val);
when The_Long_Float_Size =>
Long_Float_Size := Long_Integer'Value (Val);
when The_Boolean_Size =>
Boolean_Size := Long_Integer'Value (Val);
when The_Character_Size =>
Character_Size := Long_Integer'Value (Val);
when The_Access_Type_Size =>
Access_Type_Size := Long_Integer'Value (Val);
when The_Task_Type_Size =>
Task_Type_Size := Long_Integer'Value (Val);
when The_Short_Enumeration_Length =>
Short_Enumeration_Length := Long_Integer'Value (Val);
when The_Short_Enumeration_Size =>
Short_Enumeration_Size := Long_Integer'Value (Val);
when The_Enumeration_Length =>
Enumeration_Length := Long_Integer'Value (Val);
when The_Enumeration_Size =>
Enumeration_Size := Long_Integer'Value (Val);
when The_Long_Enumeration_Length =>
Long_Enumeration_Length := Long_Integer'Value (Val);
when The_Long_Enumeration_Size =>
Long_Enumeration_Size := Long_Integer'Value (Val);
when The_Record_Component_Alignment =>
Record_Component_Alignment := Long_Integer'Value (Val);
when The_Array_Component_Alignment =>
Array_Component_Alignment := Long_Integer'Value (Val);
when The_Object_Declaration_Alignment =>
Object_Declaration_Alignment :=
Long_Integer'Value (Val);
when The_Discriminated_Record_Overhead =>
Discriminated_Record_Overhead :=
Long_Integer'Value (Val);
end case;
exception
when others =>
Errors.Report ("", "had problem interpreting entry" &
Variable_Names'Image (Current_Rule) &
" => " & Val, Errors.Error, False);
raise;
end;
Variable_Name_Parser.Next (Var_Iter);
end loop;
exception
when Constraint_Error =>
Errors.Report ("", "Had Problem parsing " & File,
Errors.Error, False);
raise;
end Initialize;
end Sizing_Parameters;
nblk1=e
nid=0
hdr6=1c
[0x00] rec0=1b rec1=00 rec2=01 rec3=05a
[0x01] rec0=1a rec1=00 rec2=02 rec3=010
[0x02] rec0=17 rec1=00 rec2=03 rec3=026
[0x03] rec0=1c rec1=00 rec2=04 rec3=06a
[0x04] rec0=1d rec1=00 rec2=05 rec3=026
[0x05] rec0=00 rec1=00 rec2=0e rec3=002
[0x06] rec0=13 rec1=00 rec2=06 rec3=01c
[0x07] rec0=00 rec1=00 rec2=0d rec3=022
[0x08] rec0=12 rec1=00 rec2=07 rec3=05a
[0x09] rec0=12 rec1=00 rec2=08 rec3=046
[0x0a] rec0=12 rec1=00 rec2=09 rec3=03c
[0x0b] rec0=14 rec1=00 rec2=0a rec3=03e
[0x0c] rec0=13 rec1=00 rec2=0b rec3=004
[0x0d] rec0=12 rec1=00 rec2=0c rec3=000
tail 0x2150044a2815c660deb8d 0x42a00088462061e03