COMPILATION LISTING OF SEGMENT linus_lila_build_scfn_str Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 1002.6 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 linus_lila_build_scfn_str: 19 proc (lcb_ptr, lsh_ptr, td_ptr, fn_ptr, fn_var, code); 20 21 /* DESCRIPTION: 22* 23* This procedure translates a linus scalar function into an equivalent MRDS 24* scalar function string, suitable for inclusion in a MRDS -where clause. 25* 26* 27* 28* HISTORY: 29* 30* 77-08-01 J. A. Weeldreyer: Initially written. 31* 32* 78-04-01 J. A. Weeldreyer: Modified to give better diagnostics for 33* constant expr. of scalar fun. 34* 35* 78-08-02 J. A. Weeldreyer: Modified to conform to new token data. 36* 37* 80-03-13 Rickie E. Brinegar: Modified to base a work area on 38* lcb.lila_area_ptr instead of getting system free area. 39* 40* 81-06-17 Rickie E. Brinegar: Modified to remove calls to 41* dsl_v1_$get_fn_info. 42* 43* 81-07-15 Rickie E. Brinegar: Removed useless cleanup condition handler. 44* 45**/ 46 1 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 1 7* install(86-07-29,MR12.0-1106): 1 8* Added general_work_area_ptr and renamed sfr_ptr to 1 9* force_retrieve_scope_ptr. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* HISTORY: 1 14* 1 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 1 16* 1 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 1 18* a part of the attribute level control work. 1 19* 1 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 1 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 1 22* scope information. 1 23* 1 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 1 25* retaining various vcpu times to be collected when in timing mode. The 1 26* times to be collected are: LINUS parsing time, LINUS processing time, and 1 27* MRDS processing time. 1 28* 1 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 1 30* part of the line numbering implementation. This allows for possible later 1 31* LINUS control of the build defaults. 1 32* 1 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 1 34* information is now retained by ssu_. Removed parse_timer as no longer 1 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 1 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 1 37* 1 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 1 39* subsystem_invocation_level, and selection_expression_identifier. 1 40* 1 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 1 42* table_control_info_ptr. 1 43* 1 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 1 45* 1 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 1 47* 1 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 1 49* 1 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 1 51**/ 1 52 1 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 1 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 1 55 2 rb_len fixed bin (21), /* length of request buffer */ 1 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 1 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 1 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 1 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 1 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 1 61 2 test_flag bit (1) unal, /* on if in test mode */ 1 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 1 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 1 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 1 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 1 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 1 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 1 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 1 69 2 reserved bit (27) unal, 1 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 1 71 2 rb_ptr ptr, /* ptr to request buffer */ 1 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 1 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 1 74 2 ttn_ptr ptr, /* pointer to table info structure */ 1 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 1 76 2 lv_ptr ptr, /* pointer linus variables */ 1 77 2 si_ptr ptr, /* pointer to select_info structure */ 1 78 2 setfi_ptr ptr, /* pointer to set function information */ 1 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 1 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 1 81 2 lit_ptr ptr, /* pointer to literal pool */ 1 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 1 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 1 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 1 85* (MR7.0) */ 1 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 1 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 1 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 1 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 1 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 1 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 1 92* for current lila expression */ 1 93 2 unused_timer float bin (63), /* future expansion */ 1 94 2 request_time float bin (63), /* How much request time was spent 1 95* in LINUS. (-1 = user has just enabled 1 96* timing, do not report) */ 1 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 1 98 2 build_increment fixed bin, /* default increment for build mode */ 1 99 2 build_start fixed bin, /* default start count for build mode */ 1 100 2 linus_version char (4), /* current version of LINUS */ 1 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 1 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 1 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 1 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 1 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 1 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 1 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 1 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 1 109 2 word_pad (6) bit (36) unal, 1 110 /* procedures that will be optionally */ 1 111 /* replaced by the user. Saved so they */ 1 112 /* can be reinstated if desired. */ 1 113 2 ssu_abort_line entry options (variable), 1 114 2 ssu_post_request_line variable entry (ptr), 1 115 2 ssu_pre_request_line variable entry (ptr), 1 116 1 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 1 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 1 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 1 120 1 121 dcl lcb_ptr ptr; 1 122 1 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 47 48 2 1 /* BEGIN INCLUDE FILE linus_ls_header.incl.pl1 -- jaw 7/28/77 */ 2 2 2 3 dcl 1 ls_header aligned based (lsh_ptr), /* header for LILA stack */ 3 1 /* BEGIN INCLUDE FILE linus_ls_common.incl.pl1 -- jaw 7/12/77 */ 3 2 3 3 2 type fixed bin, /* type of frame: 3 4* 1 => header, 3 5* 2 => set value, 3 6* 3 => lila set, 3 7* 4 => lila block */ 3 8 2 back_ptr ptr, /* pointer to previous frame */ 3 9 2 fwd_ptr ptr, /* pointer to next frame */ 3 10 3 11 /* END INCLUDE FILE linus_ls_common.incl.pl1 */ 2 4 2 5 2 cur_ptr ptr, /* pointer to current frame */ 2 6 2 src_ptr ptr, /* pointer to LILA source string */ 2 7 2 trans_failed bit (1) unal, /* on if translate failed */ 2 8 2 from_token bit (1) unal, /* on if the calling routine is linus_lila_from */ 2 9 2 reserved bit (34) unal, 2 10 2 cur_pos fixed bin (35), /* current position in source string */ 2 11 2 line_data (0 : lcb.lila_count), /* data for each source line */ 2 12 3 lno char (4), /* line number */ 2 13 3 last_char fixed bin (35); /* index of last char */ 2 14 2 15 dcl lsh_ptr ptr; 2 16 2 17 /* END INCLUDE FILE linus_ls_header.incl.pl1 */ 49 50 4 1 /* BEGIN INCLUDE FILE linus_ls_block.incl.pl1 -- jaw 8/7/78 */ 4 2 4 3 dcl 1 ls_block aligned based (lsb_ptr), /* lila stack frame for outer lila block */ 5 1 /* BEGIN INCLUDE FILE linus_ls_common.incl.pl1 -- jaw 7/12/77 */ 5 2 5 3 2 type fixed bin, /* type of frame: 5 4* 1 => header, 5 5* 2 => set value, 5 6* 3 => lila set, 5 7* 4 => lila block */ 5 8 2 back_ptr ptr, /* pointer to previous frame */ 5 9 2 fwd_ptr ptr, /* pointer to next frame */ 5 10 5 11 /* END INCLUDE FILE linus_ls_common.incl.pl1 */ 4 4 4 5 2 reserved bit (36) unal, 4 6 2 ib_level fixed bin, /* current depth of inner blocks */ 4 7 2 nrs_chars fixed bin, /* total chars. in range strings */ 4 8 2 nritems fixed bin, /* current number of range items */ 4 9 2 range_items (linus_data_$max_range_items), 4 10 3 tup_var char (32) var, /* name of linus tuple variable */ 4 11 3 mrds_var char (32) var, /* name of mrds tuple variable */ 4 12 3 rel_name char (32) var, /* name of relation */ 4 13 3 rel_index fixed bin (35), /* rel. index if temp tab */ 4 14 3 level fixed bin, /* level of block generating item */ 4 15 3 arg_ptr ptr, 4 16 3 desc_ptr ptr, 4 17 2 nselects fixed bin, /* number of select items currently defined */ 4 18 2 sel_items (mrds_data_$max_select_items) char (mrds_data_$max_token_size) var, /* the mrds select items */ 4 19 2 nprops fixed bin, /* number of operators in pred stack */ 4 20 2 pred_op_stack (linus_data_$max_pred_stack_size), 4 21 3 key fixed bin (17) unal, 4 22 3 p_cnt fixed bin (17) unal, /* current paren count */ 4 23 2 pred_pcnt fixed bin, /* current paren. count in predicate */ 4 24 2 term_op fixed bin, /* rel. op. for current term */ 4 25 2 nterms fixed bin, /* no. of terms currently in term stack */ 4 26 2 dflt_ritem fixed bin, /* index of range item to be used for default */ 4 27 2 nrange_args fixed bin, /* no. of args for temp rel indexes */ 4 28 2 rs_hd_ptr ptr, /* pointer to head of range strings */ 4 29 2 term_hd_ptr ptr, /* pointer to top item in term stack */ 4 30 2 leaf_ptr (2) ptr; /* ptr to mrds block for each leaf of current term */ 4 31 4 32 dcl lsb_ptr ptr; 4 33 4 34 /* END INCLUDE FILE linus_ls_block.incl.pl1 */ 51 52 6 1 /* BEGIN INCLUDE FILE linus_token_data.incl.pl1 -- jaw 8/7/78 */ 6 2 6 3 dcl 1 token_data aligned based (td_ptr), /* data for lila tokens */ 6 4 2 key fixed bin (17) unal, /* key of token */ 6 5 2 must_free bit (1) unal, /* on if value must be freed */ 6 6 2 temp_tab bit (1) unal, /* on if temporary table */ 6 7 2 reserved bit (16) unal, 6 8 2 mvar char (32) var, /* mrds variable if identifier */ 6 9 2 lvar char (32) var, /* linus variable if identifier */ 6 10 2 length fixed bin (35), /* char length of token value */ 6 11 2 t_ptr ptr; /* points to token value */ 6 12 6 13 dcl ((NULL init (0)), 6 14 (RP init (1)), 6 15 (COL_SPEC init (2)), 6 16 (LINUS_VAR init (3)), 6 17 (CONST init (4)), 6 18 (SET_FN init (5)), 6 19 (SCAL_FN init (6)), 6 20 (LP init (7)), 6 21 (STAR init (8)), 6 22 (DIV init (9)), 6 23 (PLUS init (10)), 6 24 (MINUS init (11)), 6 25 (TAB_NAME init (12)), 6 26 (ROW_TAB_PAIR init (13)), 6 27 (UNION init (14)), 6 28 (INTER init (15)), 6 29 (DIFFER init (16)), 6 30 (ROW_DES init (17)), 6 31 (LB init (18)), 6 32 (RB init (19)), 6 33 (SELECT init (20)), 6 34 (NOT init (21)), 6 35 (AND init (22)), 6 36 (OR init (23)), 6 37 (EQ init (24)), 6 38 (NE init (25)), 6 39 (GT init (26)), 6 40 (GE init (27)), 6 41 (LT init (28)), 6 42 (LE init (29)), 6 43 (FROM init (30)), 6 44 (WHERE init (31)), 6 45 (DUP init (32)), 6 46 (UNIQUE init (33)), 6 47 (COMMA init (34))) fixed bin int static options (constant); 6 48 6 49 dcl td_ptr ptr; 6 50 6 51 /* END INCLUDE FILE linus_token_data.incl.pl1 */ 53 54 7 1 /* BEGIN INCLUDE FILE linus_set_fn.incl.pl1 -- jaw 7/13/77 7 2* 7 3* 81-10-26 Rickie E. Brinegar: Modified to have entry variables instead of 7 4* entry pointers. This change included the addition of bit switches inorder 7 5* to be able to tell if the entry variable had been set yet. Also changed 7 6* the name of the structure from set_fn to linus_set_fn and the name of the 7 7* variable that it was based on from setf_ptr to linus_set_fn_ptr. 7 8* 7 9* 81-11-05 Rickie E. Brinegar: Changed the entry pointers to entry variables 7 10* and added bit switches to determine when the entries have or have not been 7 11* set. Renamed set_fn sturcture to linus_set_fn, setf_ptr to 7 12* linus_set_fn_ptr, and nset_fn_init_args to 7 13* initial_number_of_linus_set_fn_args. 7 14* 7 15**/ 7 16 7 17 dcl 1 linus_set_fn aligned based (linus_set_fn_ptr), /* internal rep. of set fun. */ 7 18 2 fwd_ptr ptr, /* pointer to next set function to be eval. 7 19* at this level */ 7 20 2 prior_ptr ptr, /* pointer to head of list of set functions 7 21* to be evaluated prior to this one */ 7 22 2 assign_entry entry variable, /* pointer to assign entry */ 7 23 2 calc_entry entry variable, /* pointer to calc entry */ 7 24 2 init_entry entry variable, /* pointer to initialization entry */ 7 25 2 assign_al_ptr ptr, /* pointer to assign entry arg list */ 7 26 2 calc_al_ptr ptr, /* pointer to calc entry arg list */ 7 27 2 rtrv_al_ptr ptr, /* pointer to arg list for dsl_$retrieve */ 7 28 2 flags, 7 29 3 assign_entry_set bit (1) unaligned, /* 0 => null, 1 => not null */ 7 30 3 calc_entry_set bit (1) unaligned, /* 0 => null, 1 => not null */ 7 31 3 init_entry_set bit (1) unaligned, /* 0 => null, 1 => not null */ 7 32 3 pad_bits bit (33) unaligned, 7 33 2 rslt_desc bit (36), /* descriptor for result */ 7 34 2 nargs fixed bin, /* number of input args to calc entry */ 7 35 2 arg (initial_number_of_linus_set_fn_args refer (linus_set_fn.nargs)), 7 36 3 type fixed bin (4) unal, /* 1 => constant 7 37* 2 => linus variable 7 38* 3 => scalar function 7 39* 4 => set function 7 40* 5 => expression 7 41* 6 => data base item */ 7 42 3 must_convert bit (1) unal, /* on if must convert prior to call */ 7 43 3 reserved bit (30) unal, 7 44 3 desc bit (36), /* descriptor of source data */ 7 45 3 assn_ptr ptr, /* assign_ ptr for source data */ 7 46 3 assn_type fixed bin, /* assign_ type for source data */ 7 47 3 assn_len fixed bin (35), /* assign_ length for source data */ 7 48 3 arg_desc bit (36), /* descriptor for converted arg */ 7 49 3 arg_assn_ptr ptr, /* assign_ ptr for converted arg */ 7 50 3 arg_assn_type fixed bin, /* assign_ type code for converted arg */ 7 51 3 arg_assn_len fixed bin (35), /* assign_ length for converted arg */ 7 52 3 ef_ptr ptr; /* pointer to express. or function structure */ 7 53 7 54 dcl initial_number_of_linus_set_fn_args fixed bin; 7 55 dcl linus_set_fn_ptr ptr; 7 56 7 57 /* END INCLUDE FILE linus_set_fn.incl.pl1 */ 55 56 8 1 /* BEGIN INCLUDE FILE linus_ef_data.incl.pl1 -- jaw 7/21/77 */ 8 2 8 3 dcl 1 ef_data aligned based (ed_ptr), /* structure for passing expr. and fun. data among programs */ 8 4 2 var_name char (32), /* name of tuple variable */ 8 5 2 bit_length fixed bin (35), /* bit length of result */ 8 6 2 desc bit (36), /* descriptor of result */ 8 7 2 assn_ptr ptr, /* pointer to result value */ 8 8 2 assn_type fixed bin, /* assign_ type code of result */ 8 9 2 assn_len fixed bin (35), /* assign_ length */ 8 10 2 nmrds_items fixed bin, /* number of mrds items returned */ 8 11 2 mrds_items (linus_data_$max_expr_items), /* previously unselected mrds items referenced 8 12* in the expression */ 8 13 3 attr_name char (32), /* name of attribute */ 8 14 3 domain_name char (32), /* domain of attribute */ 8 15 3 bit_length fixed bin (35), /* attrib. bit length */ 8 16 3 desc bit (36), /* attrib. descriptor */ 8 17 3 assn_ptr ptr, /* pointer to receiving field of attr. */ 8 18 3 assn_type fixed bin, /* assign_ type code of attr */ 8 19 3 assn_len fixed bin (35), /* assign_ length for attr. */ 8 20 2 ef_ptr ptr; /* pointer to expr. status */ 8 21 8 22 dcl ed_ptr ptr; 8 23 8 24 /* END INCLUDE FILE linus_ef_data.incl.pl1 */ 57 58 9 1 /* BEGIN INCLUDE FILE linus_mrds_block.incl.pl1 -- jaw 7/21/77 */ 9 2 9 3 dcl 1 mrds_block aligned based (mblk_ptr), /* partial mrds selection expr */ 9 4 2 fwd_ptr ptr, /* pointer to previous item in stack */ 9 5 2 sel_offset fixed bin (35), /* offset of first select item in mrds_string */ 9 6 2 sel_length fixed bin (35), /* length of first select list in mrds string */ 9 7 2 nval_args fixed bin, /* number of value args */ 9 8 2 val_args (nval_args_init refer (mrds_block.nval_args)), 9 9 3 arg_ptr ptr, 9 10 3 desc_ptr ptr, 9 11 2 ms_len fixed bin (35), /* length of the mrds string */ 9 12 2 mrds_string char (ms_len_init refer (mrds_block.ms_len)) var; 9 13 9 14 dcl nval_args_init fixed bin; 9 15 dcl ms_len_init fixed bin (35); 9 16 dcl mblk_ptr ptr; 9 17 9 18 /* END INCLUDE FILE linus_mrds_block.incl.pl1 */ 59 60 10 1 /* BEGIN INCLUDE FILE linus_variables.incl.pl1 -- jaw 7/19/77 */ 10 2 10 3 dcl 1 variables aligned based (lv_ptr), /* info for all variables */ 10 4 2 nvars_alloc fixed bin, /* no. var. slots alloc. */ 10 5 2 nvars fixed bin, /* no. of variables currently defined */ 10 6 2 var_info (nvars_init refer (variables.nvars_alloc)), 10 7 3 name char (32), /* name of variable */ 10 8 3 var_ptr ptr, /* ptr to curr. value */ 10 9 3 bit_len fixed bin (35), /* bit length of current value */ 10 10 3 assn_type fixed bin, /* assign_ type code of current value */ 10 11 3 assn_len fixed bin (35), /* assign_ length of current value */ 10 12 3 desc bit (36); /* descrptor of current value */ 10 13 10 14 dcl lv_ptr ptr; 10 15 dcl nvars_init fixed bin; 10 16 10 17 /* END INCLUDE FILE linus_variables.incl.pl1 */ 61 62 11 1 /* BEGIN INCLUDE FILE mrds_scalfn_info.incl.pl1 -- jaw 5/3/77 */ 11 2 11 3 dcl 1 scalfn_info aligned based (sfi_ptr), /* info for a scalar function */ 11 4 2 fwd_ptr ptr, /* pointer to next function in list */ 11 5 2 name char (32), /* primary name of function */ 11 6 2 info_ent_ptr ptr, /* pointer to info entry for variable function, or null */ 11 7 2 entry_ptr ptr, /* pointer to entry to be called */ 11 8 2 rslt_desc bit (36), /* result descriptor for non_var. funct., or "0"b */ 11 9 2 nargs fixed bin, /* no. of input args for non-var. funct. or 0 */ 11 10 2 arg_desc (nsfi_args_init refer (scalfn_info.nargs)) bit (36); /* descriptors for each input arg */ 11 11 11 12 dcl sfi_ptr ptr; 11 13 dcl nsfi_args_init fixed bin; 11 14 11 15 /* END INCLUDE FILE mrds_scalfn_info.incl.pl1 */ 11 16 63 64 12 1 /* BEGIN mdbm_descriptor.incl.pl1 -- jaw 5/31/78 */ 12 2 /* modified by Jim Gray - - Nov. 1979, to change type from fixed bin(5) to 12 3* unsigned fixed bin(6), so new packed decimal data types could be handled. 12 4* also the duplicate mrds_descriptor.incl.pl1 was eliminated. */ 12 5 12 6 dcl 1 descriptor based (desc_ptr), /* map of Multics descriptor */ 12 7 2 version bit (1) unal, /* DBM handles vers. 1 only */ 12 8 2 type unsigned fixed bin (6) unal, /* data type */ 12 9 2 packed bit (1) unal, /* on if data item is packed */ 12 10 2 number_dims bit (4) unal, /* dimensions */ 12 11 2 size, /* size for string data */ 12 12 3 scale bit (12) unal, /* scale for num. data */ 12 13 3 precision bit (12) unal, /* prec. for num. data */ 12 14 2 array_info (num_dims), 12 15 3 lower_bound fixed bin (35), /* lower bound of dimension */ 12 16 3 upper_bound fixed bin (35), /* upper bound of dimension */ 12 17 3 multiplier fixed bin (35); /* element separation */ 12 18 12 19 dcl desc_ptr ptr; 12 20 dcl num_dims fixed bin init (0) ; /* more useful form of number_dims */ 12 21 12 22 /* END mdbm_descriptor.incl.pl1 */ 12 23 12 24 65 66 67 dcl ( 68 code, /* Output: return code */ 69 icode, /* internal status code */ 70 temp_pos 71 ) fixed bin (35); /* current pos. for look-ahead */ 72 73 dcl ( 74 nargs, /* current fn. arg count */ 75 i 76 ) fixed bin; /* internal index */ 77 78 dcl initial_mrds_vclock float bin (63); 79 80 dcl ( 81 done, /* completion flag */ 82 lp_flag, /* on if need opening paren. */ 83 rp_flag, /* on if closing paren OK */ 84 comma_flag, /* on if comma OK */ 85 arg_flag 86 ) bit (1) unal; /* on if arg OK */ 87 88 dcl ( 89 fn_ptr, /* Output: ptr to mrds block for fun. */ 90 fn_hd_ptr, 91 lss_ptr /* pointer to ls_set structure */ 92 ) ptr; /* pointer to last of fn. args */ 93 94 dcl fn_var char (*); /* Output: var. name for fn. */ 95 dcl ( 96 variable, /* variable name */ 97 master_var 98 ) char (32); /* master variable for comparison */ 99 dcl fn_name char (32) var; /* name of function */ 100 dcl work_area area (sys_info$max_seg_size) based (lcb.lila_area_ptr); 101 dcl token char (token_data.length) based (token_data.t_ptr); 102 dcl 1 temp_tok aligned like token_data; /* for look-ahead */ 103 dcl temp_token char (temp_tok.length) based (temp_tok.t_ptr); 104 /* for look-ahead */ 105 dcl 1 expr_data aligned like ef_data; 106 107 dcl ( 108 linus_error_$scfn_syntax, 109 linus_error_$inv_tup_var, 110 linus_error_$scfn_nargs, 111 linus_error_$const_expr_fn, 112 linus_data_$lila_id, 113 linus_data_$max_range_items, 114 linus_data_$max_pred_stack_size, 115 linus_data_$max_expr_items, 116 mrds_data_$max_select_items, 117 mrds_data_$max_token_size, 118 sys_info$max_seg_size 119 ) fixed bin (35) ext; 120 121 dcl (addr, addrel, fixed, length, null, rel, vclock) builtin; 122 123 dcl linus_lila_get_token entry (ptr, ptr, fixed bin (35), ptr, fixed bin (35)); 124 dcl linus_lila_error entry (ptr, ptr, fixed bin (35), char (*)); 125 dcl linus_lila_set_fn entry (ptr, ptr, ptr, ptr, fixed bin (35)); 126 dcl linus_lila_build_expr_str 127 entry (ptr, ptr, ptr, ptr, char (*), fixed bin (35)); 128 dcl linus_lila_build_scfn_str 129 entry (ptr, ptr, ptr, ptr, char (*), fixed bin (35)); 130 dcl linus_convert_code entry (fixed bin (35), fixed bin (35), fixed bin (35)); 131 dcl dsl_$get_fn_info 132 entry (fixed bin (35), char (*), ptr, ptr, fixed bin (35)); 133 134 sfi_ptr, /* initialize */ 135 fn_hd_ptr, mblk_ptr = null; 136 master_var = ""; 137 num_dims, nargs = 0; 138 lsb_ptr = ls_header.cur_ptr; 139 lss_ptr = ls_block.back_ptr; 140 141 fn_name = token; /* save function name from passed in token */ 142 token_data.key = NULL; /* force new token */ 143 144 lp_flag = "1"b; /* init. state flags */ 145 arg_flag, comma_flag, rp_flag = "0"b; 146 147 done = "0"b; /* init completion flag */ 148 do while (^done); /* main processing loop */ 149 150 if token_data.key = NULL then do; /* if need new token */ 151 call 152 linus_lila_get_token (lcb_ptr, lsh_ptr, ls_header.cur_pos, 153 td_ptr, icode); 154 if icode ^= 0 then 155 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 156 end; 157 158 go to token_proc (token_data.key); 159 160 token_proc (0): /* null */ 161 token_proc (8): /* * */ 162 token_proc (9): /* / */ 163 token_proc (10): /* + */ 164 token_proc (11): /* - */ 165 token_proc (12): /* table name */ 166 token_proc (13): /* row table pair */ 167 token_proc (14): /* union */ 168 token_proc (15): /* inter */ 169 token_proc (16): /* differ */ 170 token_proc (17): /* row designator */ 171 token_proc (18): /* { */ 172 token_proc (19): /* } */ 173 token_proc (20): /* select */ 174 token_proc (21): /* ^ */ 175 token_proc (22): /* & */ 176 token_proc (23): /* | */ 177 token_proc (24): /* = */ 178 token_proc (25): /* ^= */ 179 token_proc (26): /* > */ 180 token_proc (27): /* >= */ 181 token_proc (28): /* < */ 182 token_proc (29): /* <= */ 183 token_proc (30): /* from */ 184 token_proc (31): /* where */ 185 token_proc (32): /* dup */ 186 token_proc (33): /* unique */ 187 call 188 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, token) 189 ; /* we should never see these */ 190 done = "1"b; 191 go to next; 192 193 token_proc (1): /* ) */ 194 if ^rp_flag then /* not expected */ 195 call 196 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 197 token); 198 call finish; /* finish the MRDS scal fn. string */ 199 done = "1"b; 200 token_data.key = NULL; 201 go to next; 202 203 token_proc (2): /* column spec. */ 204 if ^arg_flag then /* if not expected */ 205 call 206 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 207 token); 208 temp_pos = ls_header.cur_pos; 209 call 210 linus_lila_get_token (lcb_ptr, lsh_ptr, temp_pos, addr (temp_tok), 211 icode); /* look ahead at next token */ 212 if icode ^= 0 then 213 call linus_lila_error (lcb_ptr, lsh_ptr, icode, temp_token); 214 if temp_tok.key >= STAR & temp_tok.key <= MINUS then 215 /* if is really expr. */ 216 call process_expr; /* go process it */ 217 else do; /* is really column spec. */ 218 call check_var ((token_data.mvar));/* make sure tup. var. is consistent */ 219 call set_ord_arg (token_data.mvar || "." || token); 220 /* make mrds block and add to arg list */ 221 token_data.key = NULL; /* force new token */ 222 end; /* if column spec. */ 223 comma_flag, rp_flag = "1"b; /* can now accept ) */ 224 arg_flag = "0"b; 225 go to next; 226 227 token_proc (3): /* linus variable */ 228 if ^arg_flag then /* not expected */ 229 call 230 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 231 token); 232 lv_ptr = lcb.lv_ptr; /* get linus var. info */ 233 do i = 1 to variables.nvars 234 while (token ^= variables.var_info.name (i)); 235 end; /* guaranteed to find it */ 236 call 237 set_val_arg (variables.var_info.var_ptr (i), 238 addr (variables.var_info.desc (i))); /* add to arg list */ 239 token_data.key = NULL; 240 comma_flag, rp_flag = "1"b; 241 arg_flag = "0"b; 242 go to next; 243 244 token_proc (4): /* constant */ 245 if ^arg_flag then /* not expected */ 246 call 247 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 248 token); 249 call set_ord_arg (token); /* add to arg list */ 250 token_data.key = NULL; 251 comma_flag, rp_flag = "1"b; 252 arg_flag = "0"b; 253 go to next; 254 255 token_proc (5): /* set function */ 256 if ^arg_flag then /* not expected */ 257 call 258 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 259 token); 260 call 261 linus_lila_set_fn (lcb_ptr, lsh_ptr, td_ptr, addr (expr_data), 262 icode); /* translate the set fn. */ 263 if icode ^= 0 then 264 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 265 call 266 set_val_arg (expr_data.assn_ptr, 267 addr (expr_data.ef_ptr -> linus_set_fn.rslt_desc)); 268 /* add to arg list */ 269 comma_flag, rp_flag = "1"b; 270 arg_flag = "0"b; 271 go to next; 272 273 token_proc (6): /* scalar function */ 274 if ^arg_flag then /* not expected */ 275 call 276 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 277 token); 278 variable = ""; 279 call 280 linus_lila_build_scfn_str (lcb_ptr, lsh_ptr, td_ptr, mblk_ptr, 281 variable, icode); /* translate the fn. */ 282 if icode ^= 0 then 283 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 284 call check_var (variable); /* see if tup var consist. */ 285 mrds_block.fwd_ptr = fn_hd_ptr; /* chain fn. into arg list */ 286 fn_hd_ptr = mblk_ptr; 287 mblk_ptr = null; 288 nargs = nargs + 1; 289 comma_flag, rp_flag = "1"b; 290 arg_flag = "0"b; 291 go to next; 292 293 token_proc (7): /* ( */ 294 if lp_flag then do; /* if opening ( */ 295 lp_flag, /* reset state flags */ 296 comma_flag, rp_flag = "0"b; 297 arg_flag = "1"b; 298 token_data.key = NULL; 299 end; 300 else if arg_flag then do; /* if expr. */ 301 call process_expr; 302 rp_flag = "1"b; 303 end; 304 else call 305 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 306 token); 307 go to next; 308 309 token_proc (34): /* , */ 310 if comma_flag then do; 311 rp_flag, comma_flag = "0"b; 312 arg_flag = "1"b; 313 token_data.key = NULL; 314 end; 315 else call 316 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_syntax, 317 token); 318 go to next; 319 320 next: 321 end; /* main processing loop */ 322 323 fn_var = master_var; /* pass info back to caller */ 324 fn_ptr = fn_hd_ptr; 325 code = 0; 326 return; 327 328 check_var: 329 proc (var); 330 331 /* Procedure to ensure that scal. fn. uses only one tuple variable */ 332 333 dcl var char (*); 334 335 if var = "" then 336 call 337 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$const_expr_fn, 338 ""); 339 if master_var = "" then /* if first time */ 340 master_var = var; 341 else if var ^= master_var then /* not same */ 342 call 343 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_tup_var, var) 344 ; 345 346 end check_var; 347 348 finish: 349 proc; 350 351 /* Procedure to finish up the MRDS function string */ 352 353 dcl ucode fixed bin (35); 354 355 if lcb.timing_mode then 356 initial_mrds_vclock = vclock; 357 call 358 dsl_$get_fn_info (lcb.db_index, (fn_name), lcb.lila_area_ptr, sfi_ptr, 359 icode); 360 if lcb.timing_mode then 361 lcb.mrds_time = lcb.mrds_time + (vclock - initial_mrds_vclock); 362 if icode ^= 0 then do; /* trouble getting info for fn. */ 363 call linus_convert_code (icode, ucode, linus_data_$lila_id); 364 call linus_lila_error (lcb_ptr, lsh_ptr, ucode, (fn_name)); 365 end; 366 if scalfn_info.nargs > 0 then /* if fixed arg fun. */ 367 if nargs ^= scalfn_info.nargs then 368 call 369 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$scfn_nargs, 370 (fn_name)); 371 sfi_ptr = null; 372 do while (nargs > 1); /* put all args into one arg list string */ 373 call combine; 374 end; 375 ms_len_init = 376 length (fn_hd_ptr -> mrds_block.mrds_string) + length (fn_name) + 3; 377 nval_args_init = fn_hd_ptr -> mrds_block.nval_args; /* alloc. and fill in final fn. string */ 378 allocate mrds_block in (work_area); 379 mrds_block.fwd_ptr = null; 380 mrds_block.mrds_string = 381 fn_name || " (" || fn_hd_ptr -> mrds_block.mrds_string || ")"; 382 mrds_block.val_args = fn_hd_ptr -> mrds_block.val_args; 383 fn_hd_ptr = null; 384 fn_hd_ptr = mblk_ptr; 385 mblk_ptr = null; 386 387 combine: 388 proc; 389 390 /* Procedure to combine top two strings in list into one */ 391 392 dcl (b1p, b2p) ptr; 393 dcl i fixed bin; 394 395 b2p = fn_hd_ptr; /* top operand */ 396 b1p = b2p -> mrds_block.fwd_ptr; /* prev. operand */ 397 ms_len_init = 1 + length (b1p -> mrds_block.mrds_string) 398 /* set up and fill in mrds block for combination */ 399 + length (b2p -> mrds_block.mrds_string); 400 nval_args_init = 401 b1p -> mrds_block.nval_args + b2p -> mrds_block.nval_args; 402 allocate mrds_block in (work_area); 403 mrds_block.fwd_ptr = b1p -> mrds_block.fwd_ptr; /* replace top two terms */ 404 mrds_block.mrds_string = 405 b1p -> mrds_block.mrds_string || " " || b2p -> mrds_block.mrds_string; 406 do i = 1 to b1p -> mrds_block.nval_args; /* args from first operand */ 407 mrds_block.val_args.arg_ptr (i) = 408 b1p -> mrds_block.val_args.arg_ptr (i); 409 mrds_block.val_args.desc_ptr (i) = 410 b2p -> mrds_block.val_args.desc_ptr (i); 411 end; 412 do i = b1p -> mrds_block.nval_args + 1 to mrds_block.nval_args; 413 /* args from second operand */ 414 mrds_block.val_args.arg_ptr (i) = 415 b2p 416 -> mrds_block.val_args.arg_ptr (i - b1p -> mrds_block.nval_args); 417 mrds_block.val_args.desc_ptr (i) = 418 b2p 419 -> mrds_block.val_args.desc_ptr (i - b1p -> mrds_block.nval_args); 420 end; 421 nargs = nargs - 1; 422 fn_hd_ptr = mblk_ptr; /* chain in new operand */ 423 mblk_ptr = null; 424 b1p = null; 425 b2p = null; 426 427 end combine; 428 429 end finish; 430 431 set_ord_arg: 432 proc (str); 433 434 /* procedure to fill in a mrds block for arg with no values */ 435 436 dcl str char (*); 437 438 ms_len_init = length (str); 439 nval_args_init = 0; 440 allocate mrds_block in (work_area); 441 mrds_block.fwd_ptr = fn_hd_ptr; 442 mrds_block.mrds_string = str; 443 fn_hd_ptr = mblk_ptr; 444 mblk_ptr = null; 445 nargs = nargs + 1; 446 if token_data.must_free then 447 token_data.t_ptr = null; 448 449 end set_ord_arg; 450 451 set_val_arg: 452 proc (arg_ptr, desc_ptr); 453 454 /* Procedure to fill in and stack a mrds block for an operand with one value */ 455 456 dcl (arg_ptr, desc_ptr) ptr; 457 dcl is_var (22) bit (1) int static unal options (constant) 458 init ((19) (1)"0"b, "1"b, "0"b, "1"b); 459 460 ms_len_init = 3; 461 nval_args_init = 1; 462 allocate mrds_block in (work_area); 463 mrds_block.fwd_ptr = fn_hd_ptr; 464 mrds_block.mrds_string = ".V."; 465 if is_var (desc_ptr -> descriptor.type) then 466 mrds_block.val_args.arg_ptr (1) = addrel (arg_ptr, 1); 467 else mrds_block.val_args.arg_ptr (1) = arg_ptr; 468 mrds_block.val_args.desc_ptr (1) = desc_ptr; 469 fn_hd_ptr = mblk_ptr; 470 mblk_ptr = null; 471 nargs = nargs + 1; 472 473 end set_val_arg; 474 475 process_expr: 476 proc; 477 478 /* Procedure to translate an expression and add to arg. list. */ 479 480 variable = ""; 481 call 482 linus_lila_build_expr_str (lcb_ptr, lsh_ptr, td_ptr, mblk_ptr, 483 variable, icode); /* trans. the expr. */ 484 if icode ^= 0 then 485 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 486 call check_var (variable); /* ensure tup. var. consist. */ 487 mrds_block.fwd_ptr = fn_hd_ptr; /* chain to arg. list */ 488 fn_hd_ptr = mblk_ptr; 489 mblk_ptr = null; 490 nargs = nargs + 1; 491 492 end process_expr; 493 494 end linus_lila_build_scfn_str; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0939.8 linus_lila_build_scfn_str.pl1 >special_ldd>install>MR12.0-1106>linus_lila_build_scfn_str.pl1 47 1 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.incl.pl1 49 2 11/23/82 1327.2 linus_ls_header.incl.pl1 >ldd>include>linus_ls_header.incl.pl1 2-4 3 03/27/82 0434.5 linus_ls_common.incl.pl1 >ldd>include>linus_ls_common.incl.pl1 51 4 03/27/82 0434.5 linus_ls_block.incl.pl1 >ldd>include>linus_ls_block.incl.pl1 4-4 5 03/27/82 0434.5 linus_ls_common.incl.pl1 >ldd>include>linus_ls_common.incl.pl1 53 6 03/27/82 0434.5 linus_token_data.incl.pl1 >ldd>include>linus_token_data.incl.pl1 55 7 11/23/82 1327.2 linus_set_fn.incl.pl1 >ldd>include>linus_set_fn.incl.pl1 57 8 03/27/82 0434.5 linus_ef_data.incl.pl1 >ldd>include>linus_ef_data.incl.pl1 59 9 03/27/82 0434.5 linus_mrds_block.incl.pl1 >ldd>include>linus_mrds_block.incl.pl1 61 10 03/27/82 0434.5 linus_variables.incl.pl1 >ldd>include>linus_variables.incl.pl1 63 11 10/14/83 1608.5 mrds_scalfn_info.incl.pl1 >ldd>include>mrds_scalfn_info.incl.pl1 65 12 10/14/83 1608.6 mdbm_descriptor.incl.pl1 >ldd>include>mdbm_descriptor.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. MINUS constant fixed bin(17,0) initial dcl 6-13 ref 214 NULL constant fixed bin(17,0) initial dcl 6-13 ref 142 150 200 221 239 250 298 313 STAR constant fixed bin(17,0) initial dcl 6-13 ref 214 addr builtin function dcl 121 ref 209 209 236 236 260 260 265 265 addrel builtin function dcl 121 ref 465 arg_flag 000126 automatic bit(1) unaligned dcl 80 set ref 145* 203 224* 227 241* 244 252* 255 270* 273 290* 297* 300 312* arg_ptr parameter pointer dcl 456 in procedure "set_val_arg" ref 451 465 467 arg_ptr 6 based pointer array level 3 in structure "mrds_block" dcl 9-3 in procedure "linus_lila_build_scfn_str" set ref 407* 407 414* 414 465* 467* assn_ptr 12 000214 automatic pointer level 2 dcl 105 set ref 265* b1p 000236 automatic pointer dcl 392 set ref 396* 397 400 403 404 406 407 412 414 417 424* b2p 000240 automatic pointer dcl 392 set ref 395* 396 397 400 404 409 414 417 425* back_ptr 2 based pointer level 2 dcl 4-3 ref 139 code parameter fixed bin(35,0) dcl 67 set ref 18 325* comma_flag 000125 automatic bit(1) unaligned dcl 80 set ref 145* 223* 240* 251* 269* 289* 295* 309 311* cur_pos 13 based fixed bin(35,0) level 2 dcl 2-3 set ref 151* 208 cur_ptr 6 based pointer level 2 dcl 2-3 ref 138 db_index based fixed bin(35,0) level 2 dcl 1-53 set ref 357* desc 17 based bit(36) array level 3 dcl 10-3 set ref 236 236 desc_ptr 10 based pointer array level 3 in structure "mrds_block" dcl 9-3 in procedure "linus_lila_build_scfn_str" set ref 409* 409 417* 417 468* desc_ptr parameter pointer dcl 456 in procedure "set_val_arg" ref 451 465 468 descriptor based structure level 1 unaligned dcl 12-6 done 000122 automatic bit(1) unaligned dcl 80 set ref 147* 148 190* 199* dsl_$get_fn_info 000040 constant entry external dcl 131 ref 357 ef_data based structure level 1 dcl 8-3 ef_ptr 000214 automatic pointer level 2 dcl 105 set ref 265 265 expr_data 000214 automatic structure level 1 dcl 105 set ref 260 260 fn_hd_ptr 000130 automatic pointer dcl 88 set ref 134* 285 286* 324 375 377 380 382 383* 384* 395 422* 441 443* 463 469* 487 488* fn_name 000154 automatic varying char(32) dcl 99 set ref 141* 357 364 366 375 380 fn_ptr parameter pointer dcl 88 set ref 18 324* fn_var parameter char unaligned dcl 94 set ref 18 323* fwd_ptr based pointer level 2 dcl 9-3 set ref 285* 379* 396 403* 403 441* 463* 487* i 000242 automatic fixed bin(17,0) dcl 393 in procedure "combine" set ref 406* 407 407 409 409* 412* 414 414 417 417* i 000116 automatic fixed bin(17,0) dcl 73 in procedure "linus_lila_build_scfn_str" set ref 233* 233* 236 236 236 icode 000113 automatic fixed bin(35,0) dcl 67 set ref 151* 154 154* 209* 212 212* 260* 263 263* 279* 282 282* 357* 362 363* 481* 484 484* initial_mrds_vclock 000120 automatic float bin(63) dcl 78 set ref 355* 360 is_var 000043 constant bit(1) initial array unaligned dcl 457 ref 465 key 000166 automatic fixed bin(17,0) level 2 in structure "temp_tok" packed unaligned dcl 102 in procedure "linus_lila_build_scfn_str" set ref 214 214 key based fixed bin(17,0) level 2 in structure "token_data" packed unaligned dcl 6-3 in procedure "linus_lila_build_scfn_str" set ref 142* 150 158 200* 221* 239* 250* 298* 313* lcb based structure level 1 dcl 1-53 lcb_ptr parameter pointer dcl 1-121 set ref 18 151* 154* 160* 193* 203* 209* 212* 227* 232 244* 255* 260* 263* 273* 279* 282* 304* 315* 335* 341* 355 357 357 360 360 360 364* 366* 378 402 440 462 481* 484* length builtin function dcl 121 in procedure "linus_lila_build_scfn_str" ref 375 375 397 397 438 length 23 000166 automatic fixed bin(35,0) level 2 in structure "temp_tok" dcl 102 in procedure "linus_lila_build_scfn_str" set ref 212 212 length 23 based fixed bin(35,0) level 2 in structure "token_data" dcl 6-3 in procedure "linus_lila_build_scfn_str" ref 141 154 154 160 160 193 193 203 203 219 227 227 233 244 244 249 249 255 255 263 263 273 273 282 282 304 304 315 315 484 484 lila_area_ptr 62 based pointer level 2 dcl 1-53 set ref 357* 378 402 440 462 linus_convert_code 000036 constant entry external dcl 130 ref 363 linus_data_$lila_id 000020 external static fixed bin(35,0) dcl 107 set ref 363* linus_data_$max_expr_items 000022 external static fixed bin(35,0) dcl 107 ref 105 linus_error_$const_expr_fn 000016 external static fixed bin(35,0) dcl 107 set ref 335* linus_error_$inv_tup_var 000012 external static fixed bin(35,0) dcl 107 set ref 341* linus_error_$scfn_nargs 000014 external static fixed bin(35,0) dcl 107 set ref 366* linus_error_$scfn_syntax 000010 external static fixed bin(35,0) dcl 107 set ref 160* 193* 203* 227* 244* 255* 273* 304* 315* linus_lila_build_expr_str 000032 constant entry external dcl 126 ref 481 linus_lila_build_scfn_str 000034 constant entry external dcl 128 ref 279 linus_lila_error 000026 constant entry external dcl 124 ref 154 160 193 203 212 227 244 255 263 273 282 304 315 335 341 364 366 484 linus_lila_get_token 000024 constant entry external dcl 123 ref 151 209 linus_lila_set_fn 000030 constant entry external dcl 125 ref 260 linus_set_fn based structure level 1 dcl 7-17 lp_flag 000123 automatic bit(1) unaligned dcl 80 set ref 144* 293 295* ls_block based structure level 1 dcl 4-3 ls_header based structure level 1 dcl 2-3 lsb_ptr 000100 automatic pointer dcl 4-32 set ref 138* 139 lsh_ptr parameter pointer dcl 2-15 set ref 18 138 151* 151 154* 160* 193* 203* 208 209* 212* 227* 244* 255* 260* 263* 273* 279* 282* 304* 315* 335* 341* 364* 366* 481* 484* lss_ptr 000132 automatic pointer dcl 88 set ref 139* lv_ptr 32 based pointer level 2 in structure "lcb" dcl 1-53 in procedure "linus_lila_build_scfn_str" ref 232 lv_ptr 000106 automatic pointer dcl 10-14 in procedure "linus_lila_build_scfn_str" set ref 232* 233 233 236 236 236 master_var 000144 automatic char(32) unaligned dcl 95 set ref 136* 323 339 339* 341 mblk_ptr 000104 automatic pointer dcl 9-16 set ref 134* 279* 285 286 287* 378* 379 380 382 384 385* 402* 403 404 407 409 412 414 417 422 423* 440* 441 442 443 444* 462* 463 464 465 467 468 469 470* 481* 487 488 489* mrds_block based structure level 1 dcl 9-3 set ref 378 402 440 462 mrds_string based varying char level 2 dcl 9-3 set ref 375 380* 380 397 397 404* 404 404 442* 464* mrds_time 74 based float bin(63) level 2 dcl 1-53 set ref 360* 360 ms_len based fixed bin(35,0) level 2 dcl 9-3 set ref 378* 380 402* 404 440* 442 462* 464 ms_len_init 000103 automatic fixed bin(35,0) dcl 9-15 set ref 375* 378 378 397* 402 402 438* 440 440 460* 462 462 must_free 0(18) based bit(1) level 2 packed unaligned dcl 6-3 ref 446 mvar 1 based varying char(32) level 2 dcl 6-3 ref 218 219 name 2 based char(32) array level 3 dcl 10-3 ref 233 nargs 17 based fixed bin(17,0) level 2 in structure "scalfn_info" dcl 11-3 in procedure "linus_lila_build_scfn_str" ref 366 366 nargs 000115 automatic fixed bin(17,0) dcl 73 in procedure "linus_lila_build_scfn_str" set ref 137* 288* 288 366 372 421* 421 445* 445 471* 471 490* 490 null builtin function dcl 121 ref 134 287 371 379 383 385 423 424 425 444 446 470 489 num_dims 000112 automatic fixed bin(17,0) initial dcl 12-20 set ref 137* 12-20* nval_args 4 based fixed bin(17,0) level 2 dcl 9-3 set ref 375 377 378* 378 380 380 380 382 397 397 400 400 402* 402 404 404 404 404 406 412 412 414 417 440* 440 442 442 462* 462 464 464 nval_args_init 000102 automatic fixed bin(17,0) dcl 9-14 set ref 377* 378 378 400* 402 402 439* 440 440 461* 462 462 nvars 1 based fixed bin(17,0) level 2 dcl 10-3 ref 233 rp_flag 000124 automatic bit(1) unaligned dcl 80 set ref 145* 193 223* 240* 251* 269* 289* 295* 302* 311* rslt_desc 27 based bit(36) level 2 dcl 7-17 set ref 265 265 scalfn_info based structure level 1 dcl 11-3 sfi_ptr 000110 automatic pointer dcl 11-12 set ref 134* 357* 366 366 371* str parameter char unaligned dcl 436 ref 431 438 442 t_ptr 24 000166 automatic pointer level 2 in structure "temp_tok" dcl 102 in procedure "linus_lila_build_scfn_str" set ref 212 t_ptr 24 based pointer level 2 in structure "token_data" dcl 6-3 in procedure "linus_lila_build_scfn_str" set ref 141 154 160 193 203 219 227 233 244 249 255 263 273 282 304 315 446* 484 td_ptr parameter pointer dcl 6-49 set ref 18 141 141 142 150 151* 154 154 154 158 160 160 160 193 193 193 200 203 203 203 218 219 219 219 221 227 227 227 233 233 239 244 244 244 249 249 249 250 255 255 255 260* 263 263 263 273 273 273 279* 282 282 282 298 304 304 304 313 315 315 315 446 446 481* 484 484 484 temp_pos 000114 automatic fixed bin(35,0) dcl 67 set ref 208* 209* temp_tok 000166 automatic structure level 1 dcl 102 set ref 209 209 temp_token based char unaligned dcl 103 set ref 212* timing_mode 15(05) based bit(1) level 2 packed unaligned dcl 1-53 ref 355 360 token based char unaligned dcl 101 set ref 141 154* 160* 193* 203* 219 227* 233 244* 249* 255* 263* 273* 282* 304* 315* 484* token_data based structure level 1 dcl 6-3 type 0(01) based fixed bin(6,0) level 2 packed unsigned unaligned dcl 12-6 ref 465 ucode 000226 automatic fixed bin(35,0) dcl 353 set ref 363* 364* val_args 6 based structure array level 2 dcl 9-3 set ref 382* 382 var parameter char unaligned dcl 333 set ref 328 335 339 341 341* var_info 2 based structure array level 2 dcl 10-3 var_ptr 12 based pointer array level 3 dcl 10-3 set ref 236* variable 000134 automatic char(32) unaligned dcl 95 set ref 278* 279* 284* 480* 481* 486* variables based structure level 1 dcl 10-3 vclock builtin function dcl 121 ref 355 360 work_area based area dcl 100 ref 378 402 440 462 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. AND internal static fixed bin(17,0) initial dcl 6-13 COL_SPEC internal static fixed bin(17,0) initial dcl 6-13 COMMA internal static fixed bin(17,0) initial dcl 6-13 CONST internal static fixed bin(17,0) initial dcl 6-13 DIFFER internal static fixed bin(17,0) initial dcl 6-13 DIV internal static fixed bin(17,0) initial dcl 6-13 DUP internal static fixed bin(17,0) initial dcl 6-13 EQ internal static fixed bin(17,0) initial dcl 6-13 FROM internal static fixed bin(17,0) initial dcl 6-13 GE internal static fixed bin(17,0) initial dcl 6-13 GT internal static fixed bin(17,0) initial dcl 6-13 INTER internal static fixed bin(17,0) initial dcl 6-13 LB internal static fixed bin(17,0) initial dcl 6-13 LE internal static fixed bin(17,0) initial dcl 6-13 LINUS_VAR internal static fixed bin(17,0) initial dcl 6-13 LP internal static fixed bin(17,0) initial dcl 6-13 LT internal static fixed bin(17,0) initial dcl 6-13 NE internal static fixed bin(17,0) initial dcl 6-13 NOT internal static fixed bin(17,0) initial dcl 6-13 OR internal static fixed bin(17,0) initial dcl 6-13 PLUS internal static fixed bin(17,0) initial dcl 6-13 RB internal static fixed bin(17,0) initial dcl 6-13 ROW_DES internal static fixed bin(17,0) initial dcl 6-13 ROW_TAB_PAIR internal static fixed bin(17,0) initial dcl 6-13 RP internal static fixed bin(17,0) initial dcl 6-13 SCAL_FN internal static fixed bin(17,0) initial dcl 6-13 SELECT internal static fixed bin(17,0) initial dcl 6-13 SET_FN internal static fixed bin(17,0) initial dcl 6-13 TAB_NAME internal static fixed bin(17,0) initial dcl 6-13 UNION internal static fixed bin(17,0) initial dcl 6-13 UNIQUE internal static fixed bin(17,0) initial dcl 6-13 WHERE internal static fixed bin(17,0) initial dcl 6-13 desc_ptr automatic pointer dcl 12-19 ed_ptr automatic pointer dcl 8-22 fixed builtin function dcl 121 initial_number_of_linus_set_fn_args automatic fixed bin(17,0) dcl 7-54 linus_data_$max_pred_stack_size external static fixed bin(35,0) dcl 107 linus_data_$max_range_items external static fixed bin(35,0) dcl 107 linus_set_fn_ptr automatic pointer dcl 7-55 mrds_data_$max_select_items external static fixed bin(35,0) dcl 107 mrds_data_$max_token_size external static fixed bin(35,0) dcl 107 nsfi_args_init automatic fixed bin(17,0) dcl 11-13 nvars_init automatic fixed bin(17,0) dcl 10-15 rel builtin function dcl 121 sys_info$max_seg_size external static fixed bin(35,0) dcl 107 NAMES DECLARED BY EXPLICIT CONTEXT. check_var 001424 constant entry internal dcl 328 ref 218 284 486 combine 002114 constant entry internal dcl 387 ref 373 finish 001544 constant entry internal dcl 348 ref 198 linus_lila_build_scfn_str 000064 constant entry external dcl 18 next 001411 constant label dcl 320 ref 191 201 225 242 253 271 291 307 318 process_expr 002550 constant entry internal dcl 475 ref 214 301 set_ord_arg 002335 constant entry internal dcl 431 ref 219 249 set_val_arg 002442 constant entry internal dcl 451 ref 236 265 token_proc 000000 constant label array(0:34) dcl 160 ref 158 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3076 3140 2667 3106 Length 3632 2667 42 456 206 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_lila_build_scfn_str 299 external procedure is an external procedure. check_var 84 internal procedure is called during a stack extension. finish internal procedure shares stack frame of external procedure linus_lila_build_scfn_str. combine internal procedure shares stack frame of external procedure linus_lila_build_scfn_str. set_ord_arg 66 internal procedure is called during a stack extension. set_val_arg internal procedure shares stack frame of external procedure linus_lila_build_scfn_str. process_expr internal procedure shares stack frame of external procedure linus_lila_build_scfn_str. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_lila_build_scfn_str 000100 lsb_ptr linus_lila_build_scfn_str 000102 nval_args_init linus_lila_build_scfn_str 000103 ms_len_init linus_lila_build_scfn_str 000104 mblk_ptr linus_lila_build_scfn_str 000106 lv_ptr linus_lila_build_scfn_str 000110 sfi_ptr linus_lila_build_scfn_str 000112 num_dims linus_lila_build_scfn_str 000113 icode linus_lila_build_scfn_str 000114 temp_pos linus_lila_build_scfn_str 000115 nargs linus_lila_build_scfn_str 000116 i linus_lila_build_scfn_str 000120 initial_mrds_vclock linus_lila_build_scfn_str 000122 done linus_lila_build_scfn_str 000123 lp_flag linus_lila_build_scfn_str 000124 rp_flag linus_lila_build_scfn_str 000125 comma_flag linus_lila_build_scfn_str 000126 arg_flag linus_lila_build_scfn_str 000130 fn_hd_ptr linus_lila_build_scfn_str 000132 lss_ptr linus_lila_build_scfn_str 000134 variable linus_lila_build_scfn_str 000144 master_var linus_lila_build_scfn_str 000154 fn_name linus_lila_build_scfn_str 000166 temp_tok linus_lila_build_scfn_str 000214 expr_data linus_lila_build_scfn_str 000226 ucode finish 000236 b1p combine 000240 b2p combine 000242 i combine THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this_desc return alloc_auto_adj shorten_stack ext_entry_desc int_entry_desc alloc_based vclock THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. dsl_$get_fn_info linus_convert_code linus_lila_build_expr_str linus_lila_build_scfn_str linus_lila_error linus_lila_get_token linus_lila_set_fn THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. linus_data_$lila_id linus_data_$max_expr_items linus_error_$const_expr_fn linus_error_$inv_tup_var linus_error_$scfn_nargs linus_error_$scfn_syntax LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000056 12 20 000077 105 000100 134 000111 136 000115 137 000120 138 000122 139 000127 141 000131 142 000144 144 000146 145 000150 147 000153 148 000154 150 000156 151 000163 154 000204 158 000240 160 000244 190 000274 191 000276 193 000277 198 000331 199 000332 200 000334 201 000341 203 000342 208 000374 209 000401 212 000422 214 000454 218 000465 219 000510 221 000554 223 000562 224 000565 225 000566 227 000567 232 000621 233 000626 235 000651 236 000653 239 000671 240 000676 241 000701 242 000702 244 000703 249 000735 250 000753 251 000760 252 000763 253 000764 255 000765 260 001017 263 001041 265 001075 269 001117 270 001122 271 001123 273 001124 278 001156 279 001161 282 001214 284 001250 285 001260 286 001262 287 001264 288 001266 289 001267 290 001272 291 001273 293 001274 295 001276 297 001301 298 001303 299 001306 300 001307 301 001311 302 001312 303 001314 304 001315 307 001345 309 001346 311 001350 312 001352 313 001354 314 001357 315 001360 318 001410 323 001411 324 001417 325 001421 326 001422 328 001423 335 001437 339 001472 341 001506 346 001543 348 001544 355 001545 357 001557 360 001616 362 001633 363 001635 364 001650 365 001705 366 001706 371 001750 372 001753 373 001757 374 001760 375 001761 377 001770 378 001772 379 002020 380 002022 382 002101 383 002107 384 002111 385 002112 429 002113 387 002114 395 002115 396 002117 397 002122 400 002135 402 002140 403 002166 404 002171 406 002244 407 002255 409 002262 411 002266 412 002270 414 002303 417 002315 420 002321 421 002323 422 002325 423 002327 424 002331 425 002332 427 002333 431 002334 438 002350 439 002352 440 002353 441 002403 442 002405 443 002424 444 002426 445 002430 446 002431 449 002441 451 002442 460 002444 461 002446 462 002450 463 002476 464 002500 465 002515 467 002533 468 002536 469 002542 470 002544 471 002546 473 002547 475 002550 480 002551 481 002554 484 002607 486 002643 487 002653 488 002655 489 002657 490 002661 492 002662 ----------------------------------------------------------- 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