|
|
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: 13312 (0x3400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Build_Rpc_Servers, seg_020c1f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Ada_Program;
with Links;
with Log;
with Profile;
with System_Utilities;
with Io;
with Compilation;
with Rpc_Io;
with Interface_Analysis;
with Time_Utilities;
with Directory_Tools;
with Library;
procedure Build_Rpc_Servers (For_Package : String := "<SELECTION>";
Promote : Boolean := True;
In_Library : String := "<REGION>";
Response : String := "<PROFILE>") is
package Object renames Directory_Tools.Object;
package Ada_Object renames Directory_Tools.Ada_Object;
package Naming renames Directory_Tools.Naming;
package Analysis renames Interface_Analysis;
Ref_Iter : Analysis.Reference_Iterator;
function Time_Stamp
(Date : Time_Utilities.Time := Time_Utilities.Get_Time;
Date_Style : Time_Utilities.Date_Format := Time_Utilities.Ada;
Time_Style : Time_Utilities.Time_Format := Time_Utilities.Ada;
Contents : Time_Utilities.Image_Contents :=
Time_Utilities.Both) return String
renames Time_Utilities.Image;
The_Package : Object.Handle := Naming.Resolution (For_Package);
Destination_Library : Object.Handle := Naming.Resolution (In_Library);
Package_Name : constant String := Naming.Unique_Full_Name (For_Package);
Root_Name : constant String := Naming.Simple_Name (The_Package);
Remote : constant String :=
Naming.Unique_Full_Name (Destination_Library) & ".Remote_Host_Units";
Local : constant String :=
Naming.Unique_Full_Name (Destination_Library) & ".R1000_Units";
Output : Io.File_Type;
Db : Interface_Analysis.Database;
-- File_Name : constant String :=
-- "!machine.temporary.rpc_" &
-- System_Utilities.User_Name & "_" & Time_Stamp;
--
function Filename return String is
begin
return "!MACHINE.TEMPORARY.RPC_" &
System_Utilities.User_Name & "_" & Time_Stamp;
end Filename;
function Is_Library_Level_Package
(The_Package : Object.Handle) return Boolean is
Comp_Kind : Ada_Object.Compilation_Kind :=
Ada_Object.Kind (The_Package);
Kind : Ada_Object.Unit_Kind := Ada_Object.Kind (The_Package);
begin
case Comp_Kind is
when Ada_Object.Library_Unit =>
null;
when others =>
return False;
end case;
case Kind is
when Ada_Object.Package_Spec =>
return True;
when others =>
return False;
end case;
end Is_Library_Level_Package;
begin
if Object.Is_Bad (The_Package) then
Log.Put_Line (For_Package & " is not a valid pathname",
Profile.Error_Msg);
elsif not Ada_Object.Is_Installed (The_Package) then
Log.Put_Line (For_Package & " is not installed", Profile.Error_Msg);
elsif not Is_Library_Level_Package (The_Package) then
Log.Put_Line (For_Package & " is not a library level package",
Profile.Error_Msg);
elsif Object.Is_Bad (Destination_Library) then
Log.Put_Line (In_Library & " is not a valid pathname",
Profile.Error_Msg);
else
Library.Create_World (Name => Local,
Kind => Library.World,
Vol => Library.Nil,
Model => "!Model.R1000_IMPLEMENTATION",
Response => Response);
Library.Create_World (Name => Remote,
Kind => Library.World,
Vol => Library.Nil,
Model => "!Model.R1000_IMPLEMENTATION",
Response => Response);
Library.Copy (From => Package_Name,
To => Local,
Response => Response);
Library.Copy (From => Package_Name, To => Remote, Response => Response);
Interface_Analysis.Analyze (Package_Name, Db);
Analysis.Init (Db, Ref_Iter);
while not Analysis.Done (Ref_Iter) loop
declare
Obj : Object.Handle :=
Ada_Program.Conversion.To_Directory_Object
(Analysis.Referenced_Unit (Ref_Iter));
Unit_Name : constant String := Naming.Unique_Full_Name (Obj);
begin
if not Object.Equal (Obj, The_Package) then
Links.Replace (Source => Unit_Name,
Link => "#",
World => Local,
Response => Response);
Links.Replace (Source => Unit_Name,
Link => "#",
World => Remote,
Response => Response);
end if;
end;
Analysis.Next (Ref_Iter);
end loop;
declare
File_Name : constant String := Filename;
begin
Io.Create (Output, Io.Out_File, File_Name);
Rpc_Io.Build_Interchange_Package_Spec (Db, Root_Name, Output);
Rpc_Io.Build_Interchange_Package_Body (Db, Root_Name, Output);
Io.Close (Output);
Compilation.Parse (File_Name => File_Name,
Directory => Local,
Response => Response);
Compilation.Parse (File_Name => File_Name,
Directory => Remote,
Response => Response);
end;
declare
File_Name : constant String := Filename;
begin
Io.Create (Output, Io.Out_File, File_Name);
Rpc_Io.Build_Local_Package_Body (Db, Root_Name, Output);
Io.Close (Output);
Compilation.Parse (File_Name => File_Name,
Directory => Local,
Response => Response);
end;
declare
File_Name : constant String := Filename;
begin
Io.Create (Output, Io.Out_File, File_Name);
Rpc_Io.Build_Defs_Package (Db, Root_Name, Output);
Io.Close (Output);
Compilation.Parse (File_Name => File_Name,
Directory => Local,
Response => Response);
if Promote then
Compilation.Make (Unit => Local,
Goal => Compilation.Installed,
Response => Response);
end if;
Io.Append (Output, File_Name);
Rpc_Io.Build_Server_Package_Spec (Db, Root_Name, Output);
Rpc_Io.Build_Server_Package_Body (Db, Root_Name, Output);
Io.Close (Output);
Compilation.Parse (File_Name => File_Name,
Directory => Remote,
Response => Response);
if Promote then
Compilation.Make (Unit => Remote,
Goal => Compilation.Installed,
Response => Response);
end if;
end;
end if;
end Build_Rpc_Servers;
nblk1=c
nid=0
hdr6=18
[0x00] rec0=1d rec1=00 rec2=01 rec3=05a
[0x01] rec0=00 rec1=00 rec2=0c rec3=014
[0x02] rec0=19 rec1=00 rec2=02 rec3=00c
[0x03] rec0=00 rec1=00 rec2=0b rec3=020
[0x04] rec0=1d rec1=00 rec2=03 rec3=064
[0x05] rec0=00 rec1=00 rec2=0a rec3=00a
[0x06] rec0=13 rec1=00 rec2=04 rec3=052
[0x07] rec0=19 rec1=00 rec2=05 rec3=02e
[0x08] rec0=00 rec1=00 rec2=09 rec3=010
[0x09] rec0=19 rec1=00 rec2=06 rec3=008
[0x0a] rec0=18 rec1=00 rec2=07 rec3=03a
[0x0b] rec0=15 rec1=00 rec2=08 rec3=000
tail 0x2171d33ea838d45e2d57e 0x42a00088462061e03