;"Build GDM Schema Directory Contains directory related parser action routines and the routines that create the schema directory. Directory data structure definitions are contained in GDM-DIR.MUD " ;" " ;"CREATE-DB performs context analysis of a data base schema definition command. If no errors are detected, the new entity types defined in the schema are added to the ENTITY-TYPE-TABLE." >) (EV ><>>) (EID-BASE ) I DBMS-ID FV "ACT" ACT) #DECL ((DB EV FV) VECTOR (I VID EID-BASE DBMS-ID) FIX) ;"Check that database name matches name on END statement" <2 .DB>>> .ACT>)>)> ;"Check that database name is unique" > > " is already defined.">> .ACT>)>> ,VIEW-TAB> ;"Check that database name matches an existing DBMS name and save its DBMS id." > <1 .DB>> )>> ,DBMS-TAB>> > ".">> .ACT>)> ;"Build entity type table for database" > > " is defined more than once.">> .ACT>)> > <+ .I .EID-BASE> .VID <2 .E> .DBMS-ID .ACT> ET-LOCAL-SCHEMA] ENTITY-TYPE>>> <3 .DB>> ;"Make a pass through all functions of type F-ENTITY and replace entity type name with ETID. Also set '# chars to print' default for all functions of type F-STRING." )) #DECL ((E) ENTITY-TYPE (FL) VECTOR) ,E-SPELLING >> ) ,F-SPELLING >> F-ENTITY> >> ) (ELSE > " is undefined.">>)>)> F-STRING> ,F-MIN-CHR > ,F-MAX-CHR > ,F-CONV-CHARS >)>> .FL>> .EV> ;"Process mapping information" (EMAP) E-PHY-REP) >>> > " is undefined.">> .ACT>)> > ;"Setup index into EV" >> >> 1>> >> " does not have any keys."> .ACT>)> FOUND> >)> SYS-EP> SETNAME> >) ( <==? <1 .OPTN> ACCESS> ) ( <==? <1 .OPTN> KEYS> >)> > <2 .M> > )> SPELLED> >)> AREA> >)> OWNED> ) >> ) ETID-LIST>>) (ELSE > " is undefined.">> .ACT>)>> <2 .M>>)> PRED-OPTN> ITER-DOMAIN> >)> QUANT-DOMAIN> >)> NO-QUANT> )> > <2 .M>>)> KEY> ) >>> ) (ELSE >> " is not defined in entity type " >>> .ACT>)>> <2 .M>> FCNID-LIST>>)> > <2 .E>> (FMAP) F-PHY-REP) >>> > " is not defined in entity type " >>>> .ACT>)> >> ;"If this is really an integer string then setup correct defaults." INT-STR> >>> >>> >)>> <2 .F>> ACCESS> > ) UNIQUE> ) (<==? <1 .OPTN> SPELLED> >) (<==? <1 .OPTN> SELECTS> >>> ) (ELSE >> " is undefined."> .ACT>)>) (<==? <1 .OPTN> WITH> ) >>> ) (ELSE >> " is not defined in entity type " >>> .ACT>)>> <2 .OPTN>> FCNID-LIST>>)> > <3 .FM>> EQUALITY> 1>> )> INEQUALITY> )> RANGE> )>)> SPELLED> >)> SET> )> REPEAT> )> INT-STR> > >)> PRINTING> >)> BIT> > ASCII> )> BCD> )> ONES> )> TWOS> )>)> AOPS> >)> ROPS> >)> > <2 .F>>> <3 .E>>> <4 .DB>> ;"Add entity type constraints" >> .ACT>)> ;"Now add structures to schema directory" ] VIEW>]> > !.EV]> > > > " added to global schema.">> > ;"CREATE-DB" " " ;"CREATE-DBMS performs context analysis of the local DBMS specification command. If no errors are found a new entry will be created in the DBMS-TABLE." ;"Make one pass to insure unique DBMS name" > > " is already defined.">> )>)>> >> .DBMS-ENTRY]> > > " added to global schema.">>)>> ;" " ;"CREATE-DEFAULT-EREP creates a default physical entity type representation. DBMS-ID is the index into the DBMS-TABLE." <> <> 0 <> <> <> <> <> <> <> <> <>] E-PHY-REP>> ;"CREATE-DEFAULT-FREP creates a default physical function representation. FUNC-TYPE is the function type (string, integer...) and DBMS-ID is the index into the DBMS-TABLE" >)) #DECL ((FUNC-TYPE) ATOM (DBMS-ID) FIX (O) DBMS-OPTIONS) <> <> <> <> <> ,SYS-DEF-INT-BITS 0 0 0 <> <> <> <> <> ] F-PHY-REP>) (ELSE <> <> <> <> <> ,SYS-DEF-INT-BITS ,SYS-DEF-PRINT-INT 0 0 <> <> <> <> <> ] F-PHY-REP>)>> ;" " ;"CREATE-FUNCTIONS creates a vector of entity function specifications." > > " in entity type " " defined more than once.">> .ERROR-EXIT>)>> .V> .DBMS-ID>> > .FL>> ;" " ;"DEMO-COMMAND processes various demo commands." ) (<==? .CMD DEMO-OFF> > >) (ELSE )> ;"tries to make sure there is enough garbage collection room" <>> ;" " ;"All routines beginning with DIR- are DBA command action routines." ;"DIR-AC returns the keyword AC Production: ALPHA_COLLATING " ;"DIR-ACCESS-ENT returns a list which indicates the entity selected by an access path. Production: SELECTS entity-name ; " ;"DIR-ACCESS-FCN returns a list which indicates other functions which must be present to make a complete access path. Production: WITH functin_list ; " ;"DIR-ACCESS-PATH returns a list containing the keyword ACCESS and the type of comparison that can be done. Production: ACCESS PATH VIA compare_type ; " ;"DIR-ACCESS-UNIQUE returns a list indicating that the access path is unique. Production: UNIQUE ; " ;"DIR-AP-OPTIONS returns a list containing the keyword ACCESS and the list of options specified for the access path. Production: ACCESS PATH VIA compare_type access_paht_list " ;"DIR-AYREA creates a list containing the keyword AREA and a list area names. Production: AREAS area_list " )> ;" " ;"DIR-BIT returns a list containing the keyword BIT and the bit size of the function value and its representation. Production: number BIT representation " ;"DIR-CHR-BITS returns a list containing the keyword CHR-BIT and the character size in bits. Production: DEFAULT CHAR BIT SIZE IS number " ;"DIR-CHR-REP returns a list containing the keyword CHR-REP and the character representation. Production: DEFAULT CHAR REP IS representation " ;" " ;"DIR-CONTEXT returns a list containing the keyword FOUND and a string representing the context in which the entity type is found. Production: FOUND UNDER character_string ; " ;"DIR-CONTEXT-DBA is the main entry point for context analysis. Determines the DBA command type and invokes the appropriate routine." (ACT) ACTIVATION) >) ( .ACT>) ( >) ( ) ( >)>> ;" " ;"Production: SHARE entity_name WITH entity_list ; " > ;"DIR-DATABASE-ID is called when a database definition containing a database name on its END statement is recognized. The name is saved and later checked against the database name for consistency. Production: basic_database database_name ; " >> ;"DIR-DB-DEF changes the structure built while parsing a data base definition command to be a vector of type DB-DEF. Production: database_definition " > ;"DIR-DB-MAPPING inserts the list containing entity mapping information into the vector describing the database. Production: DATABASE db_visible_part db_map_part END " > ;"DIR-DBMS-DEF changes the structure built while parsing a local DBMS specification command to be a vector of type DBMS-DEF. Production: dbms_definition " > ;" " ;"DIR-DBMS-OPTIONS builds a complete DBMS-TABLE entry by formating a DBMS options list and adding it to the fixed portion of a DBMS-TABLE entry. The DBMS options list contains information describing which operations are supported on a local DBMS. Production: basic_dbms_definition dbms_option_list ; " <> <> ,SYS-INFINITY ,SYS-INFINITY ,SYS-INFINITY ,SYS-INFINITY <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> > DBMS-OPTIONS>)) #DECL ((DBMS-ENTRY) DBMS (OPTION-LIST) LIST (OPT) DBMS-OPTIONS) ) ( ) ( ) ( ) ( INT-BIT> >) (<==? <1 .O> INT-REP> ONES> ) (<==? <2 .O> TWOS> )>) (<==? <1 .O> CHR-BIT> >) (<==? <1 .O> CHR-REP> ASCII> ) (<==? <2 .O> BCD> )>) (<==? <1 .O> MAX-PRED> >) (<==? <1 .O> MAX-QPRED> >) (<==? <1 .O> MAX-QREL> >) (<==? <1 .O> PRED-OPTN> ) ( ) ( ) ( ) ( ) ( <==? <1 .O> EXIST-OPS>> >) (<==? .O ACCESS> ) (<==? .O RESTRICTED> ) ()>> <2 .O>>) (<==? <1 .O> QPRED-OPTN> ) ( ) ( ) ( ) ( ) ( <==? <1 .O> EXIST-OPS>> >) (<==? .O ACCESS> ) (<==? .O RESTRICTED> ) ()>> <2 .O>>) ()>) (<==? .O MULTIPLE> ) (<==? .O PROPAGATE> ) (<==? .O STRICT> ) ()>> .OPTION-LIST> > ;" " ;"DIR-DBMS-TABLE builds the fixed portion of a DBMS-TABLE entry. Production: LOCAL NODE IS LOCAL SCHEMA IS identifier DBMS IS identifier HOST IS identifier LDI IS procedure_name ldi_choice " .SYS-TYPE .LDI <> ] DBMS>> ;"DIR-DELETE-DB deletes a database specification from the schema directory. Production: DELETE DATABASE identifier ; " <>> ;"DIR-DELETE-DBMS deletes a DBMS specification from the schema directory. Production: DELETE DBMS identifier ; " <>> ;" " ;"DIR-DELETE-DIR deletes the schema directory. Production: DELETE DIRECTORY ; " > DIRECTORY>> ;"poof" ;"Delete the disk file, too" > ;"Read it back in and init various ptrs" ;"DIR-DEMO-CMD is called when a demo command is recognized Production: demo_command " > ;"DIR-DEMO-OFF returns the keyword DEMO-OFF Production: DEMO OFF ; " ;"DIR-DEMO-ON returns the keyword DEMO-ON Production: DEMO ON ; " ;"DIR-DIR-CMD changes the structure built while parsing a directory command to be a vector of type DIR-CMD. Production: directory_command " > ;"DIR-ENTITY-EXTENT creates a list containing an entity name and its associated mapping information plus and empty list since no function mapping was supplied. Production: EXTENT identifier IS db_entity_map db_extent_end " .EMAP ())> ;" " ;"DIR-ENTITY-FUNC-EXTENT creates a list containing an entity name its associated mapping info and its function mapping info. Production: EXTENT identifier IS db_entity_map db_func_map db_extent_end " .EMAP .FMAP)> ;"DIR-ENTITY-PRED-OPTN returns the predicate options of the entity Production: RESTRICTED predicate_option_list " ;"DIR-ENTITY-TYPE creates a two element list containing the entity name and a list describing its functions. Production: TYPE entity_name IS ENTITY entity_body entity_end ; " .EBODY)> ;"Production: TYPE entity_name IS ENTITY entity_end ; " () ) > ;"DIR-FCN-DEF adds the function name to an ENTITY-FUNC vector Production: function_name : value_format ; " >> ;"DIR-FLUSH-DIR deletes the schema directory in memory only. Production: FLUSH DIRECTORY ; or FLUSH ; " ) > DIRECTORY>> ;"poof" > ;"DIR-FOP-CALC returns the keyword FIND-CALC. Production: CALC " ;"DIR-FOP-CUR returns the keyword FIND-CUR. Production: CURRENT " ;"DIR-FOP-KEY returns the keyword FIND-KEY. Production: DATABASE_KEY " ;"DIR-FOP-OWN returns the keyword FIND-OWN. Production: OWNER " ;"DIR-FOP-POS returns the keyword FIND-POS. Production: POSITIONAL " ;"DIR-FOP-USE-CUR returns the keyword FIND-USE-CUR. Production: USING_CURRENT " ;"DIR-FOP-USE-NCUR returns the keyword FIND-USE-NCUR. Production: USING_NON_CURRENT " ;"DIR-FUNC-AOPS returns a list containing the arithmetic operators supported for the specific function. Production: RESTRICTED TO ARITHMETIC OPERATIONS supported_arith_list ; " )> ;"DIR-FUNC-EXTENT creates a list containing the function name and its associated mapping information. Production: identifier IS db_func_map " .MAPPING)> ;"DIR-FUNC-ROPS returns a list containing the relational operators supported for the specific function. Production: RESTRICTED TO RELATIONAL OPERATIONS supported_rel_list ; " )> ;" " ;"DIR-INT-BITS returns a list containing the keyword INT-BIT and the default bit size for integers. Production: DEFAULT INTEGER BIT SIZE IS number " ;"DIR-INT-REP returns a list containing the keyword INT-REP and the default representation for integers. Production: DEFAULT INTEGER REP IS representation " ;"DIR-INT-STR creates a list containing the keyword INT-STR and the min/max number of characters in the integer string. Production: STORED AS STRING ( number_characters ) " <2 .MIN-MAX>)> ;"DIR-KEY returns the key specification for the entity. Production: KEY key_spec ; " ) (KEY ()) ) ;"DATABASE_KEY" (ELSE (KEY .KEY-SPEC) )>> ;"DIR-LOCAL-LDI builds an LDI-DATA vector containing information about a local LDI. Production: LOCAL " <> <>> LDI-DATA>> ;"DIR-MAX-ONLY creates a list containing the range of a STRING. Production: number " ;"DIR-MAX-PRED returns the non-quantified iteration predicate limit. Production: MAXIMUM OF number NON_QUANTIFIED ITERATION PREDICATES " ;"DIR-MAX-QPRED returns the quantified iteration predicate limit. Production: MAXIMUM OF number QUANTIFIED ITERATION PREDICATES " ;"DIR-MAX-QREL returns the quantified relation within a predicate limit. Production: MAXIMUM OF number QUANTIFIED RELATIONS PER ITERATION " ;"DIR-MIN-MAX creates a list containing the range of a STRING. Production: number .. number " ;"DIR-NO-AOPS is called to process a declaration of no arithmetic ops. Production: RESTRICTED TO NO ARITHMETIC OPERATINS ; " ) > ;"DIR-NO-QUANT is called for an entity which cannot be the domain of a quantification. Production: TO NO QUANTIFICATION ; " ;"DIR-NO-ROPS is called to process a declaration of no relational ops. Production: RESTRICTED TO NO RELATIONAL OPERATINS ; " ) > ;"DIR-OPTIONAL is called when a partial function is recognized. Production: range_type PARTIAL " ;"No-op for now" ;"DIR-OWNER creates a list containing the keyword OWNED and a list of entity types that are owners. Production: OWNED BY entity_list ; " ;" " ;"DIR-PRED-ITER returns information on the type of predicates permitted when an entity is the domain of an iteration. Production: WHEN DOMAIN OF ITERATION TO type PREDICATES ; " )> ;"DIR-PRED-OPTN returns the predicate options of the dbms Production: WITHIN NON_QUANTIFIED PREDICATES predicate_option_list " ;"DIR-PRED-QUANT returns information on the type of predicates permitted when an entity is the domain of a quantification. Production: WHEN DOMAIN OF QUANTIFICATION TO type PREDICATES ; " )> ;"DIR-PRINT-CH creates a list containing the keyword PRINTING and the max number of characters required to print a function value. Production: number PRINTING CHARS " ;"DIR-PRINT-DB pretty prints a database or view. Production: PRINT DATABASE identifier ; " > > )>> ,VIEW-TAB>) (> " is undefined.">>)>> ;"DIR-PRINT-DBMS pretty prints a DBMS table entry. Production: PRINT DBMS identifier ; " > )>> ,DBMS-TAB>) (> " is undefined.">>)>> ;" " ;"DIR-PRINT-DIR pretty prints the schema directory. Production: PRINT DIRECTORY ; " <>> ;"Return false to skip context analysis" ;"DIR-PRINT-ET prints an entity type table entry. Note that only the current view context is searched. Production: PRINT ENTITY TYPE identifier ; " ,ET-TABLE>>)>> ;" " ;"DIR-QPRED-OPTN returns the quantified predicate optins. Production: WITHIN QUANTIFIED PREDICATES predicate_option_list " ;" " ;"DIR-RANGE-ENTITY creates a default ENTITY-FUNC vector for a function whose range is entity. Elements in the vector may be changed as more is learned about the function. Production: entity_name " F-ENTITY F-SV <> <> <>] ENTITY-FUNC>> ;"DIR-RANGE-INTEGER creates a default ENTITY-FUNC vector for a function whose range is integer. Elements in the vector may be changed as more is learned about the function. Production: INTEGER " F-INTEGER F-SV -34359738366 34359738367 <> <>> ENTITY-FUNC>> ;"DIR-RANGE-STR creates a default ENTITY-FUNC vector for a function whose range is string. Elements in the vector may be changed as more is learned about the function. Production: STRING ( number_characters ) " F-STRING F-SV <1 .MIN-MAX> <2 .MIN-MAX> <> <>] ENTITY-FUNC>> ;"DIR-READ-DIR reads the schema directory from disk. (24-jun-81) Note that reading the directory with READ-DIRECTORY is, in fact, useless because the atoms ET-TABLE, etc. which all of Multibase uses are not rebound. The directory must be read using INITIALIZE-DIRECTORY, which not only reads the directory, but also rebinds these atoms. Production: READ DIRECTORY ; " > ) > ) (ELSE > <>)> > ;"DIR-REMOTE-LDI builds an LDI-DATA vector containing information about a remote LDI. Production: REMOTE host socket " <> .SOCKET ] LDI-DATA>> ;"DIR-REPEAT-GRP creates a list containing the keyword REPEAT. Production: REPEATING GROUP " ;" " ;"DIR-SET creates a list containing the keyword SET. Production: SET " ;"DIR-SET-OF changes the range of a function to be multi-valued. Production: SET OF range_type " > ;"DIR-SPELLED creates a list with the keyword SPELLED and a string. Production: SPELLED character_string ; " )) #DECL ((STR) STRING) (SPELLED .STR)> ;"Production: WHEN SPELLED string ; " )) #DECL ((STR) STRING) (SPELLED .STR)> ;"Production: CONTAIN entity_name IN entity-list ; " > ;" " ;"DIR-SUPPORTED-AOPS creates a vector describing the arithmetic operations supported by a dbms. Production: SUPPORTED ARITHMETIC OPERATIONS supported_arith_list ; " ] ARITHMETIC-OPS> > ;"DIR-SUPPORTED-COPS creates a vector describing compare operations supported by a DBMS. Production: SUPPORTED COMPARE OPERATIONS supported_comp_list ; " ] COMPARE-OPS>> ;"DIR-SUPPORTED-DOPS creates a vector describing display operations supported by a DBMS. Production: SUPPORTED DISPLAY OPERATIONS supported_comp_list ; " ] DISPLAY-OPS>> ;"DIR-SUPPORTED-EOPS creates a description of the existential logical operations supported by a dbms. Production: SUPPORTED EXISTENTIAL OPERATIONS supported_log_list " )> ;"DIR-SUPPORTED-FOPS creates a vector describing FIND verbs supported by a CODASYL DBMS. Production: SUPPORTED FIND VERBS supported_find_list " ] FIND-OPS>> ;"DIR-SUPPORTED-GOPS creates a vector describing global optimizations supported by a DBMS. Production: SUPPORTED GLOBAL OPTIMIZATIONS global_optimization_list " ] GLOBAL-OPS>> ;"DIR-SUPPORTED-LOPS creates a vector describing logical operations supported by a DBMS. Production: SUPPORTED LOGICAL OPERATIONS supported_log_list " ] LOGICAL-OPS>> ;"DIR-SUPPORTED-PRED-TYPES is an internal entry to decode allowable predicate types." ] PREDICATE-TYPES>> ;"DIR-SUPPORTED-QOPS creates a vector describing the quantificatin operations supported by the dbms. Productin: SUPPORTED QUANTIFIED RELATIONS supported_quant_list " ] QUANTIFIED-OPS> > ;"DIR-SUPPORTED-QNTS creates a vector describing the quantificatin operations supported by the dbms. Productin: SUPPORTED QUANTIFIERS supported_qnt_list " ] QUANTIFIERS-OPS> > ;"DIR-SUPPORTED-ROPS creates a vector describing relational operations supported by a DBMS. Production: SUPPORTED RELATIONAL OPERATIONS supported_rel_list " ) .ROP-LIST> =) .ROP-LIST> ] RELATIONAL-OPS>> ;" " ;"DIR-SYS-EP creates a list containing the keyword SYS-EP. Production: SYSTEM ENTRY POINT ; " ;"DIR-SYS-EP-ACCESS creates a list containing the keyword ACCESS. Productin: BY ACCESS PATH ONLY ; " ;"DIR-SYS-EP-KEYS returns a list of key values to be used in iterating over a system-entry point. Productin: ITERATE USING KEYS key_list ; " )> ;"DIR-SYS-EP-OPTN creates a list containing the keyword SYS-EP and a list of options describing the system entry point. Production: SYSTEM ENTRY POINT sys_ep_clause " ;"DIR-SYS-EP-SET passes the system set name for a system entry point Productin: VIA character_string ; " ;" " ;"DIR-VIEW-DEF changes the structure created by parsing a view definition command into a vector of type VIEW-DEF. Production: view_definition " > ;"DIR-VISIBLE processes the visible part of a view or database definition. A vector is created containing the view/db name, a slot that will be filled in later with the name specified on the END statement, the list of entity definitions, no constraints and a slot that may be filled in later with mapping info. Production: identifier IS group_of_entities " <> .EL <> <>]> ;"DIR-VISIBLE-CONSTRAINTS is just like DIR-VISIBLE except that a list of constraints is added to the vector. Production: identifier IS group_of_entities constraint_list " <> .EL <> .CL]> ;"DIR-WRITE-DIR copies the schema directory to disk. Production: WRITE DIRECTORY ; " > > " " ;"FIND-ETID is used to lookup a given entity type name in a vector of ENTITY-TYPEs. Returns the entity types ETID or false." ) .ENAME> >)>)>> .EV>> ;"FIND-FID is used to lookup a given function name in a vector of ENTITY-FUNCs. Returns the function's FID or false." > .FNAME> )>> .FV>> " " ;"Pretty print routines for directory data structures" ;"PP-DATABASE pretty prints all entity types in a database or view." .VID> )>> ,ET-TABLE>> ;" " ;"PP-DBMS prints one entry in the DBMS-TABLE." ) (O )) #DECL ((D) DBMS (L) LDI-DATA (O) (GOP) (DOP) (FOP) ) > > > > > ) (ELSE > > )> > > > )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> > > > )> )> )> > > > > > > )>> ;" " (COP) (EOP LOP) (QUAN) (REL) (AP-R AP-O) ) )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> )> > ;" " ;"PP-DBMS-TABLE pretty prints the DBMS-TABLE." > )>> .DT>> ;" " ;"PP-DIR pretty prints the entire schema directory." ) > )> > > > >> ) (ELSE )> >> ) (ELSE )> >> ) (ELSE )>> ;" " )> )> )> )> > ;" " ;"PP-ENTITY-TYPE pretty prints an entry in the ENTITY-TYPE-TABLE." ) M) #DECL ((E) ENTITY-TYPE (F) VECTOR (M) ) > > > LIST>> LIST>> LIST>> > > > > > )> > LIST>> > LIST>> )> > )> LIST>> )> > )> > )> )> > ) (ELSE LIST>>)>) (ELSE )> )> > ;" " ;"PP-ENTITY-TYPE-TABLE pretty prints the ENTITY-TYPE-TABLE." > )>> .ET>> ;" " ;"PP-FUNC-TABLE pretty prints an entity type's functions." ) > > > > > > > > > > )> )> )> > )> )> LIST>> )> > )> F-INTEGER> <==? F-STRING>> )> > )> F-STRING> > > > )> F-INTEGER> > > )> > )> )>) (ELSE F-ENTITY>> > > )>)> > )> )> )> )> )> )> )> > )> )> )> )> )> )> )> )> )> )> )>)>> .FT>> ;" " ;"PP-VIEW-TABLE pretty prints the VIEW-TABLE." > > )>> .VT>> ;"BUILD-DIR"