Multics Technical Bulletin MTB-735-02 Language Archive Support To: Distribution From: Richard Gray Date: 24 April 1986 Subject: The Implications of Archive Component Support for Multics Languages 1. Abstract This MTB proposes the addition of support to languages for accessing sources that are components of archives. The MTB is intended for language and related utility developers/maintainers. The MTB focusses on (a) adding support for explicit archive component pathnames, (b) defining and adding support for a new implicit archive component pathname convention, and (c) discussing the implications/effects of (a) and (b) on language use of source segments. Comments on this MTB should be sent to the author - via Multics mail: JRGray.Multics on System M via posted mail: Richard Gray Advanced Computing Technology Center Foothills Professional Building Room #301, 1620 - 29th Street N.W. Calgary, Alberta T2N 4L7 CANADA via telephone: (403)-284-6400 (403)-284-6410 via forum: >udd>Multics>JRGray>meetings>Archive_Component_Support (ac_sup) _________________________________________________________________ Multics project internal documentation; not to be reproduced or distributed outside the Multics project. MTB-735-02 Multics Technical Bulletin Language Archive Support TABLE OF CONTENTS Section Page Subject ======= ==== ======= 1 i Abstract 2 1 Preface 3 2 Introduction 4 3 Definitions 4.1 3 . . Explicit Archive Component Pathnames 4.2 3 . . Implicit Archive Pathnames 5 4 Advantages 6 4 Disadvantages 7 5 Language Use of Pathnames 8 6 Notes Multics Technical Bulletin MTB-735-02 Language Archive Support 2. Preface This MTB proposes the addition of support to languages for accessing sources that are components of archives. The MTB is intended for language and related utility developers. This MTB is not designed to be a comprehensive evaluation on all of the many possible methods of accessing archive components; it just discusses some aspects of special value for languages. In the first section, explicit and implicit archive component pathnames are defined. The next two sections describe the advantages and disadvantages of each. This is followed by a section describing how languages will access sources utilizing these changes. Finally, there is a section on related considerations. MTB-735-02 Multics Technical Bulletin Language Archive Support 3. Introduction Since source segments are usually stored in archives, it would be convenient if languages could access these sources directly. Currently languages (translators, debuggers) access source files as simple storage system segments. We intend to extend this behaviour to include archive components. This MTB describes the current way some programs refer to archive components (the explicit archive component convention), and also proposes a new mechanism called the implicit archive component convention. This MTB will describe the implications of these mechanisms and their implementation. Multics Technical Bulletin MTB-735-02 Language Archive Support 4. Definitions 4.1. Explicit Archive Component Pathnames An archive component is specified explicitly when the description of the file includes an archive name, followed by a double colon (::), followed by a component name. This is the archive component pathname that is currently supported by many of the system routines and is documented in the MPM Reference Manual (AG 91). Example: >udd>Ex_proj>Ex_person>foo::bar.pl1 4.2. Implicit Archive Pathnames An archive component is referenced implicitly when the entryname includes no archive specification but one is deduced using the following rules: 1. There is no explicit archive component (no double colon). 2. A storage system segment does exist with the specified entryname. 3. The segment is an archive (it has a valid archive header). 4. There is a valid archive component in the archive with the same name as the entryname. 5. The entryname does not have the '.archive' suffix. MTB-735-02 Multics Technical Bulletin Language Archive Support 5. Advantages Explicit archive component pathnames allow the unambiguous reference to archive components, and are upwardly compatible with current usage. The explicit convention will also allow related internal include files (sources only referenced within a subsystem) to be stored in one archive. This will help prevent name-space pollution for include files. Implicit archive component pathnames will allow sources to be archived and still referenced in the same manner as when they were normal storage system segments (assuming the sourcename is an addname on the archive). The user does not have to know that the source is a component of an archive. 6. Disadvantages The explicit archive component convention has the disadvantage (compared to the implicit convention) that the user must specify that the source is a component of a particular archive. There are a few minor disadvantages in connection with the use of the implicit archive component convention. (i) We are precluding the use of implicit archive components that have the ".archive" suffix to allow references to entire archives. (ii) An attempt to refer to an entire archive by a name that does not have a ".archive" suffix will result in an unintentional implicit archive component reference. This will probably result in the status code error_table_$no_component being returned by the appropriate routine. Multics Technical Bulletin MTB-735-02 Language Archive Support 7. Language Use of Pathnames Languages use two types of sources: the main source segment and include files. The main source segment is found directly via a pathname argument. Include files are found using entrynames that refer to sources indirectly via the search_path mechanism ('translator' search path). We propose to add archive component support to the module find_source_file_. This module is used by most of the translators to reference the main source segment. We also propose that we add archive component support to the module find_include_file_. This module is used by most languages to reference include files. When an explicit archive is specified, then the search path mechanism is used to find the archive. Example: %include alm::sthedr The use of the explicit archive components could group all those include files that are used internally by ALM that are of no interest to outside programs. Modifying initiate_file_$component to support the implicit archive component convention will automatically extend this support to any module that uses initiate_file_$component to support the explicit component convention. This includes find_source_file_ and find_include_file_ . Some translators regenerate source pathnames and related information from pointer values via the translator_info_ routine. This routine will be modified to allow for the return of archive component pathnames. MTB-735-02 Multics Technical Bulletin Language Archive Support 8. Notes The widespread use of the implicit archive convention will result in more archives that have addnames on them. The incorrect use of addnames on archives by some commands can currently result in the destruction of the archive. These commands should be modified to prevent such tragic occurrences. For example, a user editing a source in qedx, types: w blat_util_.pl1 If he is in the directory that contains bound_blat_.s.archive that has blat_util_.pl1 as an addname, then blat_util_.pl1 will overwrite the entire archive.