COMPILATION LISTING OF SEGMENT show_declaration Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1625.4 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 show_declaration: proc; 12 13 /* Modified: 29 Nov 1979 by PCK to print tree level indented listing */ 14 /* Modified: 25 Jun 1980 by PCK to properly indent block listing */ 15 16 dcl missing(10) bit(1) int static, 17 (i,j,n,code) fixed bin(17), 18 tree_level fixed bin initial(0), 19 p ptr, 20 display_symbol ext entry(ptr,fixed bin), 21 symb(10) char(68) varying int static, 22 cu_$arg_count ext entry(fixed bin(17)), 23 cu_$arg_ptr ext entry(fixed bin(17),ptr,fixed bin(17),fixed bin(17)), 24 n_args fixed bin(17) int static, 25 ioa_ ext entry options(variable), 26 pl1_stat_$root ptr ext static; 27 28 dcl (length,null) builtin; 29 30 dcl arg_string char(n) based; 31 1 1 /* BEGIN INCLUDE FILE ... block.incl.pl1 */ 1 2 /* Modified 22 Ocober 1980 by M. N. Davidoff to increase max block.number to 511 */ 1 3 /* format: style3,idind30 */ 1 4 1 5 declare 1 block aligned based, 1 6 2 node_type bit (9) unaligned, 1 7 2 source_id structure unaligned, 1 8 3 file_number bit (8), 1 9 3 line_number bit (14), 1 10 3 statement_number bit (5), 1 11 2 father ptr unaligned, 1 12 2 brother ptr unaligned, 1 13 2 son ptr unaligned, 1 14 2 declaration ptr unaligned, 1 15 2 end_declaration ptr unaligned, 1 16 2 default ptr unaligned, 1 17 2 end_default ptr unaligned, 1 18 2 context ptr unaligned, 1 19 2 prologue ptr unaligned, 1 20 2 end_prologue ptr unaligned, 1 21 2 main ptr unaligned, 1 22 2 end_main ptr unaligned, 1 23 2 return_values ptr unaligned, 1 24 2 return_count ptr unaligned, 1 25 2 plio_ps ptr unaligned, 1 26 2 plio_fa ptr unaligned, 1 27 2 plio_ffsb ptr unaligned, 1 28 2 plio_ssl ptr unaligned, 1 29 2 plio_fab2 ptr unaligned, 1 30 2 block_type bit (9) unaligned, 1 31 2 prefix bit (12) unaligned, 1 32 2 like_attribute bit (1) unaligned, 1 33 2 no_stack bit (1) unaligned, 1 34 2 get_data bit (1) unaligned, 1 35 2 flush_at_call bit (1) unaligned, 1 36 2 processed bit (1) unaligned, 1 37 2 text_displayed bit (1) unaligned, 1 38 2 number fixed bin (9) unsigned unaligned, 1 39 2 free_temps dimension (3) ptr, /* these fields are used by the code generator */ 1 40 2 temp_list ptr, 1 41 2 entry_list ptr, 1 42 2 o_and_s ptr, 1 43 2 why_nonquick aligned, 1 44 3 auto_adjustable_storage bit (1) unaligned, 1 45 3 returns_star_extents bit (1) unaligned, 1 46 3 stack_extended_by_args bit (1) unaligned, 1 47 3 invoked_by_format bit (1) unaligned, 1 48 3 format_statement bit (1) unaligned, 1 49 3 io_statements bit (1) unaligned, 1 50 3 assigned_to_entry_var bit (1) unaligned, 1 51 3 condition_statements bit (1) unaligned, 1 52 3 no_owner bit (1) unaligned, 1 53 3 recursive_call bit (1) unaligned, 1 54 3 options_non_quick bit (1) unaligned, 1 55 3 options_variable bit (1) unaligned, 1 56 3 never_referenced bit (1) unaligned, 1 57 3 pad_nonquick bit (5) unaligned, 1 58 2 prologue_flag bit (1) unaligned, 1 59 2 options_main bit (1) unaligned, 1 60 2 pad bit (16) unaligned, 1 61 2 number_of_entries fixed bin (17), 1 62 2 level fixed bin (17), 1 63 2 last_auto_loc fixed bin (17), 1 64 2 symbol_block fixed bin (17), 1 65 2 entry_info fixed bin (18), 1 66 2 enter structure unaligned, 1 67 3 start fixed bin (17), 1 68 3 end fixed bin (17), 1 69 2 leave structure unaligned, 1 70 3 start fixed bin (17), 1 71 3 end fixed bin (17), 1 72 2 owner ptr; 1 73 1 74 declare max_block_number fixed bin internal static options (constant) initial (511); 1 75 1 76 /* END INCLUDE FILE ... block.incl.pl1 */ 32 2 1 /* BEGIN INCLUDE FILE ... symbol.incl.pl1 */ 2 2 2 3 dcl 1 symbol based aligned, 2 4 2 node_type bit(9) unal, 2 5 2 source_id structure unal, 2 6 3 file_number bit(8), 2 7 3 line_number bit(14), 2 8 3 statement_number bit(5), 2 9 2 location fixed(18) unal unsigned, 2 10 2 allocated bit(1) unal, 2 11 2 dcl_type bit(3) unal, 2 12 2 reserved bit(6) unal, 2 13 2 pix unal, 2 14 3 pic_fixed bit(1) unal, 2 15 3 pic_float bit(1) unal, 2 16 3 pic_char bit(1) unal, 2 17 3 pic_scale fixed(7) unal, 2 18 3 pic_size fixed(7) unal, 2 19 2 level fixed(8) unal, 2 20 2 boundary fixed(3) unal, 2 21 2 size_units fixed(3) unal, 2 22 2 scale fixed(7) unal, 2 23 2 runtime bit(18) unal, 2 24 2 runtime_offset bit(18) unal, 2 25 2 block_node ptr unal, 2 26 2 token ptr unal, 2 27 2 next ptr unal, 2 28 2 multi_use ptr unal, 2 29 2 cross_references ptr unal, 2 30 2 initial ptr unal, 2 31 2 array ptr unal, 2 32 2 descriptor ptr unal, 2 33 2 equivalence ptr unal, 2 34 2 reference ptr unal, 2 35 2 general ptr unal, 2 36 2 father ptr unal, 2 37 2 brother ptr unal, 2 38 2 son ptr unal, 2 39 2 word_size ptr unal, 2 40 2 bit_size ptr unal, 2 41 2 dcl_size ptr unal, 2 42 2 symtab_size ptr unal, 2 43 2 c_word_size fixed(24), 2 44 2 c_bit_size fixed(24), 2 45 2 c_dcl_size fixed(24), 2 46 2 47 2 attributes structure aligned, 2 48 3 data_type structure unal, 2 49 4 structure bit(1) , 2 50 4 fixed bit(1), 2 51 4 float bit(1), 2 52 4 bit bit(1), 2 53 4 char bit(1), 2 54 4 ptr bit(1), 2 55 4 offset bit(1), 2 56 4 area bit(1), 2 57 4 label bit(1), 2 58 4 entry bit(1), 2 59 4 file bit(1), 2 60 4 arg_descriptor bit(1), 2 61 4 storage_block bit(1), 2 62 4 unused_1 bit(1), 2 63 4 condition bit(1), 2 64 4 format bit(1), 2 65 4 builtin bit(1), 2 66 4 generic bit(1), 2 67 4 picture bit(1), 2 68 2 69 3 misc_attributes structure unal, 2 70 4 dimensioned bit(1), 2 71 4 initialed bit(1), 2 72 4 aligned bit(1), 2 73 4 unaligned bit(1), 2 74 4 signed bit(1), 2 75 4 unsigned bit(1), 2 76 4 precision bit(1), 2 77 4 varying bit(1), 2 78 4 local bit(1), 2 79 4 decimal bit(1), 2 80 4 binary bit(1), 2 81 4 real bit(1), 2 82 4 complex bit(1), 2 83 4 variable bit(1), 2 84 4 reducible bit(1), 2 85 4 irreducible bit(1), 2 86 4 returns bit(1), 2 87 4 position bit(1), 2 88 4 internal bit(1), 2 89 4 external bit(1), 2 90 4 like bit(1), 2 91 4 member bit(1), 2 92 4 non_varying bit(1), 2 93 4 options bit(1), 2 94 4 variable_arg_list bit(1), /* options(variable) */ 2 95 4 alloc_in_text bit(1), /* options(constant) */ 2 96 2 97 3 storage_class structure unal, 2 98 4 auto bit(1), 2 99 4 based bit(1), 2 100 4 static bit(1), 2 101 4 controlled bit(1), 2 102 4 defined bit(1), 2 103 4 parameter bit(1), 2 104 4 param_desc bit(1), 2 105 4 constant bit(1), 2 106 4 temporary bit(1), 2 107 4 return_value bit(1), 2 108 2 109 3 file_attributes structure unal, 2 110 4 print bit(1), 2 111 4 input bit(1), 2 112 4 output bit(1), 2 113 4 update bit(1), 2 114 4 stream bit(1), 2 115 4 reserved_1 bit(1), 2 116 4 record bit(1), 2 117 4 sequential bit(1), 2 118 4 direct bit(1), 2 119 4 interactive bit(1), /* env(interactive) */ 2 120 4 reserved_2 bit(1), 2 121 4 reserved_3 bit(1), 2 122 4 stringvalue bit(1), /* env(stringvalue) */ 2 123 4 keyed bit(1), 2 124 4 reserved_4 bit(1), 2 125 4 environment bit(1), 2 126 2 127 3 compiler_developed structure unal, 2 128 4 aliasable bit(1), 2 129 4 packed bit(1), 2 130 4 passed_as_arg bit(1), 2 131 4 allocate bit(1), 2 132 4 set bit(1), 2 133 4 exp_extents bit(1), 2 134 4 refer_extents bit(1), 2 135 4 star_extents bit(1), 2 136 4 isub bit(1), 2 137 4 put_in_symtab bit(1), 2 138 4 contiguous bit(1), 2 139 4 put_data bit(1), 2 140 4 overlayed bit(1), 2 141 4 error bit(1), 2 142 4 symtab_processed bit(1), 2 143 4 overlayed_by_builtin bit(1), 2 144 4 defaulted bit(1), 2 145 4 connected bit(1); 2 146 2 147 /* END INCLUDE FILE ... symbol.incl.pl1 */ 33 34 35 call cu_$arg_count(n_args); 36 if n_args=0 then return; 37 38 j = 0; 39 do i = 1 to n_args; 40 call cu_$arg_ptr(i,p,n,code); 41 42 if code ^= 0 43 then do; 44 call ioa_("NO ARG ^d",i); 45 return; 46 end; 47 48 if n = 0 then go to loop; 49 50 if j >= 10 51 then do; 52 call ioa_("Only 10 symbols allowed"); 53 n_args = 10; 54 goto l; 55 end; 56 57 j = j + 1; 58 symb(j) = p -> arg_string; 59 missing(j) = "1"b; 60 loop: end; 61 62 if j = 0 then return; 63 n_args=j; 64 65 l: call search(pl1_stat_$root,tree_level+1); 66 67 do i = 1 to n_args; 68 if missing(i) 69 then call ioa_("No declaration found for ^a",symb(i)); 70 end; 71 72 return; 73 74 search: proc(pt,tree_level); 75 76 dcl pt ptr; /* points at block node */ 77 dcl tree_level fixed bin; 78 79 dcl (p,q) ptr; 80 3 1 /* BEGIN INCLUDE FILE ... token.incl.pl1 */ 3 2 3 3 dcl 1 token based aligned, 3 4 2 node_type bit(9) unaligned, 3 5 2 type bit(9) unaligned, 3 6 2 loc bit(18) unaligned, /* symtab offset for identifiers, "p" flag for constants */ 3 7 2 declaration ptr unaligned, 3 8 2 next ptr unaligned, 3 9 2 size fixed(9), 3 10 2 string char(n refer(token.size)); 3 11 3 12 /* END INCLUDE FILE ... token.incl.pl1 */ 81 82 83 if pt = null then return; 84 85 call ioa_("^/^vxStart of block ^p",tree_level,pt); 86 87 p = pt -> block.declaration; 88 do while(p ^= null); 89 90 q = p -> symbol.token; 91 n = q -> token.size; 92 93 do i = 1 to n_args; 94 if n = length(symb(i)) 95 then if symb(i) = q -> token.string 96 then do; 97 missing(i) = "0"b; 98 call display_symbol(p,tree_level+1); 99 goto do_next; 100 end; 101 end; 102 103 do_next: p = p -> symbol.next; 104 end; 105 106 q = pt -> block.son; 107 108 do while(q^=null); 109 call search((q),tree_level+1); 110 q = q -> block.brother; 111 end; 112 113 call ioa_("^vxEnd of block ^p^/",tree_level,pt); 114 end; 115 116 end show_declaration; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1503.7 show_declaration.pl1 >dumps>old>recomp>show_declaration.pl1 32 1 08/13/81 2043.5 block.incl.pl1 >ldd>include>block.incl.pl1 33 2 07/21/80 1546.3 symbol.incl.pl1 >ldd>include>symbol.incl.pl1 81 3 09/14/77 1705.7 token.incl.pl1 >ldd>include>token.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. arg_string based char unaligned dcl 30 ref 58 block based structure level 1 dcl 1-5 brother 2 based pointer level 2 packed unaligned dcl 1-5 ref 110 code 000103 automatic fixed bin(17,0) dcl 16 set ref 40* 42 cu_$arg_count 000300 constant entry external dcl 16 ref 35 cu_$arg_ptr 000302 constant entry external dcl 16 ref 40 declaration 4 based pointer level 2 packed unaligned dcl 1-5 ref 87 display_symbol 000276 constant entry external dcl 16 ref 98 i 000100 automatic fixed bin(17,0) dcl 16 set ref 39* 40* 44* 67* 68 68* 93* 94 94 97* ioa_ 000304 constant entry external dcl 16 ref 44 52 68 85 113 j 000101 automatic fixed bin(17,0) dcl 16 set ref 38* 50 57* 57 58 59 62 63 length builtin function dcl 28 ref 94 missing 000010 internal static bit(1) array unaligned dcl 16 set ref 59* 68 97* n 000102 automatic fixed bin(17,0) dcl 16 set ref 40* 48 58 91* 94 n_args 000275 internal static fixed bin(17,0) dcl 16 set ref 35* 36 39 53* 63* 67 93 next 6 based pointer level 2 packed unaligned dcl 2-3 ref 103 null builtin function dcl 28 ref 83 88 108 p 000100 automatic pointer dcl 79 in procedure "search" set ref 87* 88 90 98* 103* 103 p 000106 automatic pointer dcl 16 in procedure "show_declaration" set ref 40* 58 pl1_stat_$root 000306 external static pointer dcl 16 set ref 65* pt parameter pointer dcl 76 set ref 74 83 85* 87 106 113* q 000102 automatic pointer dcl 79 set ref 90* 91 94 106* 108 109 110* 110 size 3 based fixed bin(9,0) level 2 dcl 3-3 ref 91 94 son 3 based pointer level 2 packed unaligned dcl 1-5 ref 106 string 4 based char level 2 dcl 3-3 ref 94 symb 000011 internal static varying char(68) array dcl 16 set ref 58* 68* 94 94 symbol based structure level 1 dcl 2-3 token based structure level 1 dcl 3-3 in procedure "search" token 5 based pointer level 2 in structure "symbol" packed unaligned dcl 2-3 in procedure "show_declaration" ref 90 tree_level parameter fixed bin(17,0) dcl 77 in procedure "search" set ref 74 85* 98 109 113* tree_level 000104 automatic fixed bin(17,0) initial dcl 16 in procedure "show_declaration" set ref 16* 65 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. max_block_number internal static fixed bin(17,0) initial dcl 1-74 NAMES DECLARED BY EXPLICIT CONTEXT. do_next 000424 constant label dcl 103 ref 99 l 000216 constant label dcl 65 ref 54 loop 000210 constant label dcl 60 ref 48 search 000272 constant entry internal dcl 74 ref 65 109 show_declaration 000046 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 606 1116 512 616 Length 1342 512 310 210 73 266 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME show_declaration 106 external procedure is an external procedure. search 92 internal procedure calls itself recursively. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 missing show_declaration 000011 symb show_declaration 000275 n_args show_declaration STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME search 000100 p search 000102 q search show_declaration 000100 i show_declaration 000101 j show_declaration 000102 n show_declaration 000103 code show_declaration 000104 tree_level show_declaration 000106 p show_declaration THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$arg_count cu_$arg_ptr display_symbol ioa_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. pl1_stat_$root LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000045 16 000053 35 000054 36 000062 38 000065 39 000066 40 000074 42 000111 44 000113 45 000134 48 000135 50 000137 52 000142 53 000161 54 000164 57 000165 58 000166 59 000204 60 000210 62 000212 63 000214 65 000216 67 000231 68 000241 70 000266 72 000270 74 000271 83 000277 85 000304 87 000332 88 000337 90 000343 91 000346 93 000351 94 000362 97 000401 98 000405 99 000421 101 000422 103 000424 104 000427 106 000430 108 000435 109 000441 110 000460 111 000463 113 000464 114 000511 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved