|
|
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: T V
Length: 29131 (0x71cb)
Types: TextFile
Names: »V«
└─⟦5829e5ed5⟧ Bits:30000534 8mm tape, Rational 1000, RCI 2_0_5
└─⟦c9a165082⟧ »DATA«
└─⟦c3895f76e⟧
└─⟦this⟧
with Simple_Status;
package Operational_Characteristics is
-- The Build and Check constructors, as well as the Get selectors, provide
-- storage for the following information:
-- Compile command line
-- Link command line
-- Change context command line
-- Change library command line
-- Command Options
-- General command line formation
-- Filename and directory characteristics
-- Information needed for Target_Builder instantiation
type Compilation_Phase is (Assemble, -- currently unsupported
Promote,
Demote, -- currently unsupported
Link);
type Phase_Map is array (Compilation_Phase) of Boolean;
type Compiler_Properties is
(Generics_Share_Code,
Require_Body_And_Generic_In_Same_Compilation,
Requires_Subunits_And_Generic_In_Same_Compilation,
Implements_Pragma_Inline,
Separate_Subunits_Are_Inefficient);
type Compiler_Property_List is array (Compiler_Properties) of Boolean;
type Filename_Type is (Ada_Name, -- Filename prefix is based on
-- name of corresponding ada unit
File_Name, -- Filename prefix equals filename
-- prefix of corresponding ada unit
Fixed_Name -- File has same name, regardless of
-- ada unit
);
type File_Type is (Text,
Binary);
type Name_Case is (Upper,
Lower,
Capitalize,
Dont_Care);
-- Upper -> THIS_NAME
-- Lower -> this_name
-- Capitalize -> This_Name
-- Dont_Care -> All names are exactly as typed in, with auto-generated
-- names in lower case
type Operating_System is (Unix,
Vms,
Ultrix,
Vm,
Mvs,
Os2,
Dos,
Spare1, Spare2, Spare3, Spare4, Unknown);
type Retrieve_Condition is (On_Normal,
On_Error,
On_Warning,
Always);
type Transfer_Type is (Dtia, Ftp);
type Operation_Mode is (Interactive, Batch);
Invalid_Access : exception;
-- Raised if a Get is attempted on an object that was never built
Build_Failed : exception;
Target_Is_Registered : exception;
Target_Not_Initialized : exception;
-------------
-- Options --
-------------
type Option_Info is private;
Null_Option_Info : constant Option_Info;
function Build (Option_Name : String;
Active_Phases : Phase_Map;
Switch_Dependent : Boolean;
Switch_Name : String;
Default_Value : String;
Option_Takes_Arg : Boolean;
Is_Pre_Option : Boolean;
Help : String := "";
For_Target : String) return Option_Info;
------------- Arguments to build ----------
-- Option_Name : String;
-- Target text for option. Should be unique and non-empty.
-- Active_Phases : Phase_Map;
-- When is option included in target compiler commands
-- Switch_Dependent : Boolean;
-- Is option's presence dependent on a switch being true.
-- Switch_Name : String;
-- If above is false, this is the name of that switch. Should be
-- a valid ada identifier.
-- Default_Value : string;
-- Initial value of switch.
-- This field and the corresponding value in the switch file have
-- different interpretations depending on whether the option in
-- question takes an argument.
-- If Option_Takes_Arg is false, then this value should be either
-- "True" or "False", with "True" meaning that the option is
-- activated and "False" meaning it is not.
-- If Option_Takes_Arg is true, then the following table
-- describes the implications of this value:
--
-- Empty string => Option is not present.
-- "@" => Option is present with no argument.
-- <OTHER_VALUE> => Option is present and it's argument is
-- equal to <OTHER_VALUE>.
--
-- Option_Takes_Arg : Boolean;
-- Can an argument accompany the option
-- Is_Pre_Option : Boolean;
-- True if option is placed before unit name in command line.
-- False if placed after.
-- Help : string;
-- Message to be displayed when user hits EXPLAIN key on
-- corresponding switch.
function Is_Null (The_Option_Info : Option_Info) return Boolean;
function Get_Option_Name (The_Option_Info : Option_Info) return String;
function Get_Active_Phases (The_Option_Info : Option_Info) return Phase_Map;
function Switch_Dependent (The_Option_Info : Option_Info) return Boolean;
function Get_Switch_Name (The_Option_Info : Option_Info) return String;
function Default_Value (The_Option_Info : Option_Info) return String;
function Option_Takes_Arg (The_Option_Info : Option_Info) return Boolean;
function Is_Pre_Option (The_Option_Info : Option_Info) return Boolean;
function Get_Help (The_Option_Info : Option_Info) return String;
-- Alphabetized Option_Info functions:
--
-- Default_Value
-- Get_Active_Phases
-- Get_Option_Name
-- Get_Switch_Name
-- Is_Pre_Option
-- Is_Null
-- Option_Takes_Arg
-- Switch_Dependent
-- Is_Pre_Option
type Option_List is array (Natural range <>) of Option_Info;
-- [Need to customize the algorithm for creating a target name].
-- [Also need to customize the algorithm for formatting a command line].
--
-- command => <pre> <cmd> <options> <filename> [<lib>] <post>
--
-- where:
-- <options> => <separator> <option> [<gets> <value>]
-- <filename> => <unitname> <delimiter> <extension>
-- Compile_Syntax : constant String :=
-- "<pre> <cmd> <options> <filename> [<lib>] <post>";
--
-- Link_Syntax : constant String :=
-- "<pre> <cmd> <options> <filename> [<lib>] <post>";
--
-- Filename_Syntax : constant String := "<unitname> <delimiter> <extension>";
--
-- Option_Syntax : constant String := "<separator> <option> <gets> <value>.";
--
-- Library_Syntax : constant String := "<lib_cmd> <separator> <library>";
--
-- Context_Syntax : constant String := "<dir_cmd> <separator> <directory>";
----------------------
-- Associated Files --
----------------------
type Associated_File_Info is private;
Null_Associated_File_Info : constant Associated_File_Info;
function Is_Null (The_File_Info : Associated_File_Info) return Boolean;
function Build (The_File_Type : File_Type;
The_Retrieve_Condition : Retrieve_Condition;
Retrieve_Phase : Compilation_Phase;
Option_Dependent : Boolean;
Associated_Option_Switch : String;
Host_Filename_Extension : String;
Remote_Filename_Type : Filename_Type;
Argument_Overrides_Fixed_Name : Boolean;
Fixed_Remote_Filename : String;
Remote_Filename_Extension : String;
For_Target : String) return Associated_File_Info;
---------- Parameters for Build ----------
-- The_File_Type : File_Type;
-- See file_type description
-- The_Retrieve_Condition : Retrieve_Condition;
-- After which command results is file retrieved
-- Retrieve_Phase : Compilation_Phase;
-- When is file retrieved
-- Option_Dependent : Boolean;
-- True if file retrieval is dependent on the presence of an
-- option in the command line that creates the file
-- Associated_Option_Switch : String;
-- SWITCH name for the option on who's presence file retrieval
-- depends
-- Host_Filename_Extension : String;
-- Unbracketed file name used in host file creation.
-- eg. "ASM" => "unit.<ASM>"
-- Remote_Filename_Type : Filename_Type;
-- See filename_type description
-- Argument_Overrides_Fixed_Name : Boolean;
-- True if the name of the file to be retrieved is equal to the
-- argument value except when it's empty.
-- Fixed_Remote_Filename : String;
-- Fixed filename prefix to be used when filename type is "fixed" and
-- no overriding factors are present. When the filename type is
-- anything other than "fixed", and the field is non-empty, it
-- will be directly appended to the prefix.
-- Remote_Filename_Extension : String;
-- Portion of target file name that appears "after the dot".
-- Null string implies no dot.
--
--
function Get_File_Type
(The_File_Info : Associated_File_Info) return File_Type;
function Get_Retrieve_Condition (The_File_Info : Associated_File_Info)
return Retrieve_Condition;
function Get_Retrieve_Phase
(The_File_Info : Associated_File_Info) return Compilation_Phase;
function Option_Dependent
(The_File_Info : Associated_File_Info) return Boolean;
function Get_Associated_Option_Switch
(The_File_Info : Associated_File_Info) return String;
function Get_Host_Filename_Extension
(The_File_Info : Associated_File_Info) return String;
function Get_Remote_Filename_Type
(The_File_Info : Associated_File_Info) return Filename_Type;
function Argument_Overrides_Fixed_Name
(The_File_Info : Associated_File_Info) return Boolean;
function Get_Fixed_Remote_Filename
(The_File_Info : Associated_File_Info) return String;
function Get_Remote_Filename_Extension
(The_File_Info : Associated_File_Info) return String;
-- Alphabetized Associated_File_Info functions:
--
-- Argument_Overrides_Fixed_Name
-- Get_Associated_Option_Switch
-- Get_Delete_Phase
-- Get_File_Type
-- Get_Host_Filename_Extension
-- Get_Retrieve_Condition
-- Get_Retrieve_Phase
-- Get_Fixed_Remote_Filename
-- Get_Remote_Filename_Type
-- Get_Remote_Filename_Extension
-- Is_Null
-- Option_Dependent
type Associated_File_List is
array (Natural range <>) of Associated_File_Info;
---------------------------
-- Customization Objects --
---------------------------
type Object is private;
Null_Object : constant Object;
function Is_Null (The_Object : Object) return Boolean;
function Build
(Properties : Compiler_Property_List;
Max_Filename_Length : Natural;
Full_Pathname_Length : Natural;
Spec_Filename_Extension : String;
-- Filename extension for files containing an ada spec
Body_Filename_Extension : String;
-- Filename extension for files containing an ada body
Extension_Separator : String;
-- File format is
-- <filename><EXTENSION_SEPARATOR><appropriate_extension>
Directory_Separator : String;
Directory_Prefix : String;
Directory_Suffix : String;
Directory_Unit_Separator : String;
-- Fully qualified filename would be of this format:
-- <DPREF>dir_name1<DS>dir_name2<DS>dir_name2<DS>....
-- <DS>dir_name_n<DSUF><DUS>unit_name
-- Where <DS> => directory_separator,
-- <DPREF> => directory_prefix,
-- <DSUF> => directory_suffix,
-- <DUS> => directory_unit_separatory.
-- eg. For the VMS file
-- [DHR.TESTS.SUB]file,
-- <DPREF> -> "[",
-- <DS> -> ".",
-- <DSUF> -> "]",
-- <DUS> -> ""
Case_Sensitive : Boolean;
Command_Line_Case : Name_Case;
Max_Command_Line_Length : Natural;
Compiler_Command : String;
Compiler_Pre_Command : String;
-- Command to be executed before compile command
Compiler_Post_Command : String;
-- Command to be executed after compile command
Linker_Command : String;
Linker_Pre_Command : String;
-- Command to be executed before link command
Linker_Post_Command : String;
-- Command to be executed after link command
Executable_Option : String;
-- Compiler option that names the executable file,
-- (Leave empty if no such option exists)
Executable_Option_Is_Pre_Option : Boolean;
-- Option goes before or after unit name in command line
Context_Command : String;
-- Command to change remote context
Library_Command : String;
-- Command to change remote program library
Default_Program_Library_Name : String;
-- Simple name of program_library
-- (Assumed to be contained in source directory)
Parse_Standard_Output : Boolean;
-- True if the RCI must look at standard output to
-- determine remote command execution success/failure
Parse_Standard_Error : Boolean;
-- True if the RCI must look at standard error to
-- determine remote command execution success/failure
Error_Pattern : String;
-- What text sequence indicates an error
-- (Used when parsing standard error or standard output)
Remote_Operating_System : Operating_System;
The_Transfer_Type : Transfer_Type;
-- *Option Information*
Option_Separator : String;
Option_Header : String;
Option_Argument_Separator : String;
-- Format of compile/link command is
-- Command line => <Cmd> <OH>Opt1<OS><OH>Opt2<OS><OH>Opt3 ...
-- Opt => option[<OAS>argument]
-- Where
-- <OH> -> Option_Header,
-- <OS> -> Option_Prefix,
-- <OAS> -> Option_Argument_Separator
-- Note that an option may or may not take an argument. If
-- it does, the option_argument_separator is used to
-- separate the option and argument.
Options : Option_List;
-- The list of available compiler and linker options.
-- *Associated File Information*
Ada_Name_Subunit_Separator : String;
-- Used in lieu of '.' in forming remote file names based
-- on the ada name of subunits.
-- eg, if Ada_Name_Subunit_Separator = "__", and the
-- customizer has defined an associated file with
-- filename_type ADA_NAME and extension, say, "TEST",
-- then when subunit A.B.C is compiled/linked,
-- the RCI will attempt to retrieve A__B__C.TEST from the
-- remote machine.
Ada_Name_Spec_Suffix : String;
-- Similar to Ada_Name_Subunit_Separator, but is appended
-- to the ada_name of specs.
-- In the above example, if Ada_Name_Spec_Suffix is "_",
-- then when A'SPEC is compiled/linked, the RCI will attempt
-- to retrieve the file A_.TEST.
Ada_Name_Body_Suffix : String;
-- Similar to Ada_Name_Subunit_Separator, but is appended
-- to the ada_name of bodies.
-- In the above example, if Ada_Name_Body_Suffix is "_",
-- then when A'BODY is compiled/linked, the RCI will attempt
-- to retrieve the file A_.TEST.
Ada_Name_Is_Lowercase : Boolean := False;
-- "Are associated files based on the Ada name lowercase?"
Associated_Files : Associated_File_List;
-- The list of associated files to be retrieved
The_Operation_Mode : Operation_Mode := Interactive;
-- This field decides on whether the given customization
-- uses the interactive or batch compilation modes.
-- Default value will be set to interactive
Generate_Batch_Compile_Commands : Boolean := True;
-- This field is use only if the operation mode
-- is batch. If set to true this will cause
-- the RCI to write ADA compile commands
-- into the script file
Run_Script_Command : String := "";
-- Command to execute the batch script
Copy_Command : String := "";
-- Command to copy one file to another on the target
Batch_Move_Script_File_Name : String := "";
-- The name of the move script. This is the
-- first file written to the tape when
-- rci.build_script_via_tape is used
Create_Dir_Command : String := "";
-- The command used to create a directory on the target
Date_Command : String := "";
Date_File_Suffix : String := "";
For_Target : String) return Object;
procedure Check (The_Object : Object;
Status : in out Simple_Status.Condition);
procedure Display (The_Object : Object);
function Get_Properties (The_Object : Object) return Compiler_Property_List;
function Get_Max_Filename_Length (The_Object : Object) return Natural;
function Get_Full_Pathname_Length (The_Object : Object) return Natural;
function Get_Spec_Filename_Extension (The_Object : Object) return String;
function Get_Body_Filename_Extension (The_Object : Object) return String;
function Get_Extension_Separator (The_Object : Object) return String;
function Get_Option_Separator (The_Object : Object) return String;
function Get_Option_Header (The_Object : Object) return String;
function Get_Option_Argument_Separator (The_Object : Object) return String;
function Get_Ada_Name_Subunit_Separator (The_Object : Object) return String;
function Get_Ada_Name_Spec_Suffix (The_Object : Object) return String;
function Get_Ada_Name_Body_Suffix (The_Object : Object) return String;
function Get_Ada_Name_Is_Lowercase (The_Object : Object) return Boolean;
function Get_Directory_Separator (The_Object : Object) return String;
function Get_Directory_Prefix (The_Object : Object) return String;
function Get_Directory_Suffix (The_Object : Object) return String;
function Get_Directory_Unit_Separator (The_Object : Object) return String;
function Case_Sensitive (The_Object : Object) return Boolean;
function Get_Command_Line_Case (The_Object : Object) return Name_Case;
function Get_Max_Command_Line_Length (The_Object : Object) return Natural;
function Get_Compiler_Command (The_Object : Object) return String;
function Get_Compiler_Pre_Command (The_Object : Object) return String;
function Get_Compiler_Post_Command (The_Object : Object) return String;
function Get_Linker_Command (The_Object : Object) return String;
function Get_Linker_Pre_Command (The_Object : Object) return String;
function Get_Linker_Post_Command (The_Object : Object) return String;
function Get_Executable_Option (The_Object : Object) return String;
function Executable_Option_Is_Pre_Option
(The_Object : Object) return Boolean;
function Get_Context_Command (The_Object : Object) return String;
function Get_Library_Command (The_Object : Object) return String;
function Get_Default_Program_Library_Name
(The_Object : Object) return String;
function Parse_Standard_Output (The_Object : Object) return Boolean;
function Parse_Standard_Error (The_Object : Object) return Boolean;
function Get_Error_Pattern (The_Object : Object) return String;
function Get_Remote_Operating_System
(The_Object : Object) return Operating_System;
function Get_Transfer_Type (The_Object : Object) return Transfer_Type;
function Get_Options (The_Object : Object) return Option_List;
function Get_Associated_Files
(The_Object : Object) return Associated_File_List;
function Get_Operation_Mode (The_Object : Object) return Operation_Mode;
function Get_Generate_Batch_Compile_Commands
(The_Object : Object) return Boolean;
function Get_Execute_Batch_Script (The_Object : Object) return Boolean;
function Get_Run_Script_Command (The_Object : Object) return String;
function Get_Copy_Command (The_Object : Object) return String;
function Get_Batch_Move_Script_File_Name
(The_Object : Object) return String;
function Get_Create_Dir_Command (The_Object : Object) return String;
function Get_Date_Command (The_Object : Object) return String;
function Get_Date_File_Suffix (The_Object : Object) return String;
-- Alphabetized Object functions:
--
-- Case_Sensitive
-- Executable_Option_Is_Pre_Option
-- Get_Associated_Files
-- Get_Body_Filename_Extension
-- Get_Command_Line_Case
-- Get_Compiler_Command
-- Get_Context_Command
-- Get_Default_Program_Library_Name
-- Get_Directory_Prefix
-- Get_Directory_Separator
-- Get_Directory_Suffix
-- Get_Error_Pattern
-- Get_Executable_Option
-- Get_Full_Pathname_Length
-- Get_Library_Command
-- Get_Linker_Command
-- Get_Max_Command_Line_Length
-- Get_Max_Filename_Length
-- Get_Options
-- Get_Option_Argument_Separator
-- Get_Option_Header
-- Get_Option_Separator
-- Get_Properties
-- Get_Remote_Operating_System
-- Get_Spec_Filename_Extension
-- Get_Extension_Separator
-- Is_Null
-- Parse_Standard_Error
-- Parse_Standard_Output
pragma Module_Name (4, 4142);
pragma Bias_Key (32);
private
type String_Ptr is access String;
pragma Segmented_Heap (String_Ptr);
pragma Short_Pointer (String_Ptr);
type Command_Line_Info is
record
Case_Sensitive : Boolean := True;
Command_Line_Case : Name_Case := Dont_Care;
Max_Command_Line_Length : Natural;
end record;
Null_Command_Line_Info : constant Command_Line_Info :=
(Case_Sensitive => True,
Command_Line_Case => Dont_Care,
Max_Command_Line_Length => 0);
-- Command_Info does NOT include options.
type Command_Info is
record
The_Command : String_Ptr;
Command_Syntax : String_Ptr;
Use_Simple_Name : Boolean := False;
Command_Required : Boolean := True;
end record;
Null_Command_Info : constant Command_Info := (The_Command => null,
Command_Syntax => null,
Use_Simple_Name => False,
Command_Required => False);
type Default_Option_Info is
record
Compiler_Option : String_Ptr;
Linker_Option : String_Ptr;
Context_Option : String_Ptr;
Library_Option : String_Ptr;
end record;
Null_Default_Option_Info : constant Default_Option_Info :=
(Compiler_Option => null,
Linker_Option => null,
Context_Option => null,
Library_Option => null);
type Parse_Info is
record
Parse_Standard_Output : Boolean;
Parse_Error_Output : Boolean;
Error_Pattern : String_Ptr;
end record;
Null_Parse_Info : constant Parse_Info := (Parse_Standard_Output => False,
Parse_Error_Output => False,
Error_Pattern => null);
type Option_Rec is
record
Option_Name : String_Ptr;
Active_Phases : Phase_Map;
Switch_Dependent : Boolean;
Switch_Name : String_Ptr;
Default_Value : String_Ptr;
Option_Takes_Arg : Boolean;
Is_Pre_Option : Boolean;
Help : String_Ptr;
end record;
type Option_Info is access Option_Rec;
pragma Segmented_Heap (Option_Info);
Null_Option_Info : constant Option_Info := null;
type Option_List_Ptr is access Option_List;
pragma Segmented_Heap (Option_List_Ptr);
pragma Short_Pointer (Option_List_Ptr);
type Associated_File_Rec is
record
The_File_Type : File_Type;
The_Retrieve_Condition : Retrieve_Condition;
Retrieve_Phase : Compilation_Phase;
Delete_Phase : Compilation_Phase;
Option_Dependent : Boolean;
Associated_Option_Switch : String_Ptr;
Host_Filename_Extension : String_Ptr;
Remote_Filename_Type : Filename_Type;
Argument_Overrides_Fixed_Name : Boolean;
Fixed_Remote_Filename : String_Ptr;
Remote_Filename_Extension : String_Ptr;
end record;
type Associated_File_Info is access Associated_File_Rec;
pragma Segmented_Heap (Associated_File_Info);
Null_Associated_File_Info : constant Associated_File_Info := null;
type Associated_File_List_Ptr is access Associated_File_List;
pragma Segmented_Heap (Associated_File_List_Ptr);
pragma Short_Pointer (Associated_File_List_Ptr);
type Object_Rec is
record
The_Properties : Compiler_Property_List;
The_Max_Filename_Length : Natural;
The_Full_Pathname_Length : Natural;
The_Spec_Filename_Extension : String_Ptr;
The_Body_Filename_Extension : String_Ptr;
The_Extension_Separator_Info : String_Ptr;
The_Option_Separator_Info : String_Ptr;
The_Option_Header_Info : String_Ptr;
The_Option_Argument_Separator_Info : String_Ptr;
Ada_Name_Subunit_Separator : String_Ptr;
Ada_Name_Spec_Suffix : String_Ptr;
Ada_Name_Body_Suffix : String_Ptr;
Ada_Name_Is_Lowercase : Boolean;
The_Directory_Separator_Info : String_Ptr;
The_Directory_Prefix_Info : String_Ptr;
The_Directory_Suffix_Info : String_Ptr;
Directory_Unit_Separator : String_Ptr;
The_Command_Line_Info : Command_Line_Info;
The_Compiler_Info : Command_Info;
The_Linker_Info : Command_Info;
The_Context_Info : Command_Info;
The_Library_Info : Command_Info;
Linker_Pre_Command : String_Ptr;
Linker_Post_Command : String_Ptr;
Executable_Option : String_Ptr;
Executable_Option_Is_Pre_Option : Boolean;
Compiler_Pre_Command : String_Ptr;
Compiler_Post_Command : String_Ptr;
The_Default_Program_Library_Name : String_Ptr;
The_Parse_Info : Parse_Info;
Remote_Operating_System : Operating_System;
The_Transfer_Type : Transfer_Type;
Options : Option_List_Ptr;
Associated_Files : Associated_File_List_Ptr;
The_Operation_Mode : Operation_Mode;
Generate_Batch_Compile_Commands : Boolean;
Run_Script_Command : String_Ptr;
Copy_Command : String_Ptr;
Batch_Move_Script_File_Name : String_Ptr;
Create_Dir_Command : String_Ptr;
Date_Command : String_Ptr;
Date_File_Suffix : String_Ptr;
end record;
type Object is access Object_Rec;
pragma Segmented_Heap (Object);
Null_Object : constant Object := null;
end Operational_Characteristics;