Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346#ifndef AVOID_PRECOMPILED1/* C file produced by GAC */2#include "src/compiled.h"34/* global variables used in handlers */5static GVar G_REREADING;6static Obj GC_REREADING;7static GVar G_SHALLOW__COPY__OBJ;8static Obj GF_SHALLOW__COPY__OBJ;9static GVar G_PRINT__OBJ;10static Obj GC_PRINT__OBJ;11static GVar G_GAPInfo;12static Obj GC_GAPInfo;13static GVar G_IS__FUNCTION;14static Obj GF_IS__FUNCTION;15static GVar G_NAME__FUNC;16static Obj GF_NAME__FUNC;17static GVar G_NARG__FUNC;18static Obj GF_NARG__FUNC;19static GVar G_IS__OPERATION;20static Obj GF_IS__OPERATION;21static GVar G_AINV;22static Obj GF_AINV;23static GVar G_IS__INT;24static Obj GF_IS__INT;25static GVar G_IS__LIST;26static Obj GF_IS__LIST;27static GVar G_ADD__LIST;28static Obj GF_ADD__LIST;29static GVar G_IS__STRING__REP;30static Obj GF_IS__STRING__REP;31static GVar G_Error;32static Obj GF_Error;33static GVar G_TYPE__OBJ;34static Obj GF_TYPE__OBJ;35static GVar G_IMMUTABLE__COPY__OBJ;36static Obj GF_IMMUTABLE__COPY__OBJ;37static GVar G_IS__IDENTICAL__OBJ;38static Obj GF_IS__IDENTICAL__OBJ;39static GVar G_IS__OBJECT;40static Obj GC_IS__OBJECT;41static GVar G_TRY__NEXT__METHOD;42static Obj GC_TRY__NEXT__METHOD;43static GVar G_SUB__FLAGS;44static Obj GF_SUB__FLAGS;45static GVar G_WITH__HIDDEN__IMPS__FLAGS;46static Obj GF_WITH__HIDDEN__IMPS__FLAGS;47static GVar G_IS__SUBSET__FLAGS;48static Obj GF_IS__SUBSET__FLAGS;49static GVar G_TRUES__FLAGS;50static Obj GF_TRUES__FLAGS;51static GVar G_SIZE__FLAGS;52static Obj GF_SIZE__FLAGS;53static GVar G_LEN__FLAGS;54static Obj GF_LEN__FLAGS;55static GVar G_ELM__FLAGS;56static Obj GF_ELM__FLAGS;57static GVar G_FLAG1__FILTER;58static Obj GF_FLAG1__FILTER;59static GVar G_FLAGS__FILTER;60static Obj GF_FLAGS__FILTER;61static GVar G_METHODS__OPERATION;62static Obj GF_METHODS__OPERATION;63static GVar G_CHANGED__METHODS__OPERATION;64static Obj GF_CHANGED__METHODS__OPERATION;65static GVar G_DO__NOTHING__SETTER;66static Obj GC_DO__NOTHING__SETTER;67static GVar G_RETURN__TRUE;68static Obj GC_RETURN__TRUE;69static GVar G_RETURN__FALSE;70static Obj GC_RETURN__FALSE;71static GVar G_LEN__LIST;72static Obj GF_LEN__LIST;73static GVar G_APPEND__LIST__INTR;74static Obj GF_APPEND__LIST__INTR;75static GVar G_CONV__STRING;76static Obj GF_CONV__STRING;77static GVar G_Print;78static Obj GF_Print;79static GVar G_ViewObj;80static Obj GC_ViewObj;81static GVar G_RUN__IMMEDIATE__METHODS__CHECKS;82static Obj GC_RUN__IMMEDIATE__METHODS__CHECKS;83static GVar G_RUN__IMMEDIATE__METHODS__HITS;84static Obj GC_RUN__IMMEDIATE__METHODS__HITS;85static GVar G_BIND__GLOBAL;86static Obj GF_BIND__GLOBAL;87static GVar G_IGNORE__IMMEDIATE__METHODS;88static Obj GC_IGNORE__IMMEDIATE__METHODS;89static GVar G_IMM__FLAGS;90static Obj GC_IMM__FLAGS;91static GVar G_IMMEDIATES;92static Obj GC_IMMEDIATES;93static GVar G_IMMEDIATE__METHODS;94static Obj GC_IMMEDIATE__METHODS;95static GVar G_TRACE__IMMEDIATE__METHODS;96static Obj GC_TRACE__IMMEDIATE__METHODS;97static GVar G_CONSTRUCTORS;98static Obj GC_CONSTRUCTORS;99static GVar G_RankFilter;100static Obj GF_RankFilter;101static GVar G_CHECK__INSTALL__METHOD;102static Obj GC_CHECK__INSTALL__METHOD;103static GVar G_INSTALL__METHOD;104static Obj GF_INSTALL__METHOD;105static GVar G_DeclareGlobalFunction;106static Obj GF_DeclareGlobalFunction;107static GVar G_EvalString;108static Obj GF_EvalString;109static GVar G_WRAPPER__OPERATIONS;110static Obj GC_WRAPPER__OPERATIONS;111static GVar G_INFO__DEBUG;112static Obj GF_INFO__DEBUG;113static GVar G_OPERATIONS;114static Obj GC_OPERATIONS;115static GVar G_NamesFilter;116static Obj GF_NamesFilter;117static GVar G_Ordinal;118static Obj GF_Ordinal;119static GVar G_INSTALL__METHOD__FLAGS;120static Obj GF_INSTALL__METHOD__FLAGS;121static GVar G_LENGTH__SETTER__METHODS__2;122static Obj GC_LENGTH__SETTER__METHODS__2;123static GVar G_InstallAttributeFunction;124static Obj GF_InstallAttributeFunction;125static GVar G_CATS__AND__REPS;126static Obj GC_CATS__AND__REPS;127static GVar G_FILTERS;128static Obj GC_FILTERS;129static GVar G_NUMBERS__PROPERTY__GETTERS;130static Obj GC_NUMBERS__PROPERTY__GETTERS;131static GVar G_InstallOtherMethod;132static Obj GF_InstallOtherMethod;133static GVar G_Tester;134static Obj GF_Tester;135static GVar G_IsPrimeInt;136static Obj GF_IsPrimeInt;137static GVar G_DeclareOperation;138static Obj GF_DeclareOperation;139static GVar G_VALUE__GLOBAL;140static Obj GF_VALUE__GLOBAL;141static GVar G_DeclareAttribute;142static Obj GF_DeclareAttribute;143static GVar G_InstallMethod;144static Obj GF_InstallMethod;145static GVar G_CallFuncList;146static Obj GF_CallFuncList;147148/* record names used in handlers */149static RNam R_MaxNrArgsMethod;150151/* information for the functions */152static Obj NameFunc[16];153static Obj NamsFunc[16];154static Int NargFunc[16];155static Obj DefaultName;156static Obj FileName;157158/* handler for function 2 */159static Obj HdlrFunc2 (160Obj self,161Obj a_obj,162Obj a_flags )163{164Obj l_flagspos = 0;165Obj l_tried = 0;166Obj l_type = 0;167Obj l_j = 0;168Obj l_imm = 0;169Obj l_i = 0;170Obj l_res = 0;171Obj l_newflags = 0;172Obj t_1 = 0;173Obj t_2 = 0;174Obj t_3 = 0;175Obj t_4 = 0;176Obj t_5 = 0;177Obj t_6 = 0;178Obj t_7 = 0;179Obj t_8 = 0;180Obj t_9 = 0;181Obj t_10 = 0;182Obj t_11 = 0;183Obj t_12 = 0;184Obj t_13 = 0;185Obj t_14 = 0;186Obj t_15 = 0;187Obj t_16 = 0;188Obj t_17 = 0;189Bag oldFrame;190OLD_BRK_CURR_STAT191192/* allocate new stack frame */193SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);194REM_BRK_CURR_STAT();195SET_BRK_CURR_STAT(0);196197/* if IGNORE_IMMEDIATE_METHODS then */198t_2 = GC_IGNORE__IMMEDIATE__METHODS;199CHECK_BOUND( t_2, "IGNORE_IMMEDIATE_METHODS" )200CHECK_BOOL( t_2 )201t_1 = (Obj)(UInt)(t_2 != False);202if ( t_1 ) {203204/* return; */205RES_BRK_CURR_STAT();206SWITCH_TO_OLD_FRAME(oldFrame);207return 0;208209}210/* fi */211212/* if IS_SUBSET_FLAGS( IMM_FLAGS, flags ) then */213t_3 = GF_IS__SUBSET__FLAGS;214t_4 = GC_IMM__FLAGS;215CHECK_BOUND( t_4, "IMM_FLAGS" )216t_2 = CALL_2ARGS( t_3, t_4, a_flags );217CHECK_FUNC_RESULT( t_2 )218CHECK_BOOL( t_2 )219t_1 = (Obj)(UInt)(t_2 != False);220if ( t_1 ) {221222/* return; */223RES_BRK_CURR_STAT();224SWITCH_TO_OLD_FRAME(oldFrame);225return 0;226227}228/* fi */229230/* flags := SUB_FLAGS( flags, IMM_FLAGS ); */231t_2 = GF_SUB__FLAGS;232t_3 = GC_IMM__FLAGS;233CHECK_BOUND( t_3, "IMM_FLAGS" )234t_1 = CALL_2ARGS( t_2, a_flags, t_3 );235CHECK_FUNC_RESULT( t_1 )236a_flags = t_1;237238/* flagspos := SHALLOW_COPY_OBJ( TRUES_FLAGS( flags ) ); */239t_2 = GF_SHALLOW__COPY__OBJ;240t_4 = GF_TRUES__FLAGS;241t_3 = CALL_1ARGS( t_4, a_flags );242CHECK_FUNC_RESULT( t_3 )243t_1 = CALL_1ARGS( t_2, t_3 );244CHECK_FUNC_RESULT( t_1 )245l_flagspos = t_1;246247/* tried := [ ]; */248t_1 = NEW_PLIST( T_PLIST, 0 );249SET_LEN_PLIST( t_1, 0 );250l_tried = t_1;251252/* type := TYPE_OBJ( obj ); */253t_2 = GF_TYPE__OBJ;254t_1 = CALL_1ARGS( t_2, a_obj );255CHECK_FUNC_RESULT( t_1 )256l_type = t_1;257258/* flags := type![2]; */259C_ELM_POSOBJ_NLE( t_1, l_type, 2 );260a_flags = t_1;261262/* for j in flagspos do */263t_4 = l_flagspos;264if ( IS_SMALL_LIST(t_4) ) {265t_3 = (Obj)(UInt)1;266t_1 = INTOBJ_INT(1);267}268else {269t_3 = (Obj)(UInt)0;270t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );271}272while ( 1 ) {273if ( t_3 ) {274if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;275t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );276t_1 = (Obj)(((UInt)t_1)+4);277if ( t_2 == 0 ) continue;278}279else {280if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;281t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );282}283l_j = t_2;284285/* if IsBound( IMMEDIATES[j] ) then */286t_7 = GC_IMMEDIATES;287CHECK_BOUND( t_7, "IMMEDIATES" )288CHECK_INT_POS( l_j )289t_6 = C_ISB_LIST( t_7, l_j );290t_5 = (Obj)(UInt)(t_6 != False);291if ( t_5 ) {292293/* imm := IMMEDIATES[j]; */294t_6 = GC_IMMEDIATES;295CHECK_BOUND( t_6, "IMMEDIATES" )296C_ELM_LIST_FPL( t_5, t_6, l_j )297l_imm = t_5;298299/* for i in [ 0, 7 .. LEN_LIST( imm ) - 7 ] do */300t_11 = GF_LEN__LIST;301t_10 = CALL_1ARGS( t_11, l_imm );302CHECK_FUNC_RESULT( t_10 )303C_DIFF_FIA( t_9, t_10, INTOBJ_INT(7) )304t_8 = Range3Check( INTOBJ_INT(0), INTOBJ_INT(7), t_9 );305if ( IS_SMALL_LIST(t_8) ) {306t_7 = (Obj)(UInt)1;307t_5 = INTOBJ_INT(1);308}309else {310t_7 = (Obj)(UInt)0;311t_5 = CALL_1ARGS( GF_ITERATOR, t_8 );312}313while ( 1 ) {314if ( t_7 ) {315if ( LEN_LIST(t_8) < INT_INTOBJ(t_5) ) break;316t_6 = ELMV0_LIST( t_8, INT_INTOBJ(t_5) );317t_5 = (Obj)(((UInt)t_5)+4);318if ( t_6 == 0 ) continue;319}320else {321if ( CALL_1ARGS( GF_IS_DONE_ITER, t_5 ) != False ) break;322t_6 = CALL_1ARGS( GF_NEXT_ITER, t_5 );323}324l_i = t_6;325326/* if IS_SUBSET_FLAGS( flags, imm[i + 4] ) and not IS_SUBSET_FLAGS( flags, imm[i + 3] ) and not imm[i + 6] in tried then */327t_13 = GF_IS__SUBSET__FLAGS;328C_SUM_FIA( t_15, l_i, INTOBJ_INT(4) )329CHECK_INT_POS( t_15 )330C_ELM_LIST_FPL( t_14, l_imm, t_15 )331t_12 = CALL_2ARGS( t_13, a_flags, t_14 );332CHECK_FUNC_RESULT( t_12 )333CHECK_BOOL( t_12 )334t_11 = (Obj)(UInt)(t_12 != False);335t_10 = t_11;336if ( t_10 ) {337t_15 = GF_IS__SUBSET__FLAGS;338C_SUM_FIA( t_17, l_i, INTOBJ_INT(3) )339CHECK_INT_POS( t_17 )340C_ELM_LIST_FPL( t_16, l_imm, t_17 )341t_14 = CALL_2ARGS( t_15, a_flags, t_16 );342CHECK_FUNC_RESULT( t_14 )343CHECK_BOOL( t_14 )344t_13 = (Obj)(UInt)(t_14 != False);345t_12 = (Obj)(UInt)( ! ((Int)t_13) );346t_10 = t_12;347}348t_9 = t_10;349if ( t_9 ) {350C_SUM_FIA( t_14, l_i, INTOBJ_INT(6) )351CHECK_INT_POS( t_14 )352C_ELM_LIST_FPL( t_13, l_imm, t_14 )353t_12 = (Obj)(UInt)(IN( t_13, l_tried ));354t_11 = (Obj)(UInt)( ! ((Int)t_12) );355t_9 = t_11;356}357if ( t_9 ) {358359/* res := IMMEDIATE_METHODS[imm[i + 6]]( obj ); */360t_11 = GC_IMMEDIATE__METHODS;361CHECK_BOUND( t_11, "IMMEDIATE_METHODS" )362C_SUM_FIA( t_13, l_i, INTOBJ_INT(6) )363CHECK_INT_POS( t_13 )364C_ELM_LIST_FPL( t_12, l_imm, t_13 )365CHECK_INT_POS( t_12 )366C_ELM_LIST_FPL( t_10, t_11, t_12 )367CHECK_FUNC( t_10 )368t_9 = CALL_1ARGS( t_10, a_obj );369CHECK_FUNC_RESULT( t_9 )370l_res = t_9;371372/* ADD_LIST( tried, imm[i + 6] ); */373t_9 = GF_ADD__LIST;374C_SUM_FIA( t_11, l_i, INTOBJ_INT(6) )375CHECK_INT_POS( t_11 )376C_ELM_LIST_FPL( t_10, l_imm, t_11 )377CALL_2ARGS( t_9, l_tried, t_10 );378379/* RUN_IMMEDIATE_METHODS_CHECKS := RUN_IMMEDIATE_METHODS_CHECKS + 1; */380t_10 = GC_RUN__IMMEDIATE__METHODS__CHECKS;381CHECK_BOUND( t_10, "RUN_IMMEDIATE_METHODS_CHECKS" )382C_SUM_FIA( t_9, t_10, INTOBJ_INT(1) )383AssGVar( G_RUN__IMMEDIATE__METHODS__CHECKS, t_9 );384385/* if TRACE_IMMEDIATE_METHODS then */386t_10 = GC_TRACE__IMMEDIATE__METHODS;387CHECK_BOUND( t_10, "TRACE_IMMEDIATE_METHODS" )388CHECK_BOOL( t_10 )389t_9 = (Obj)(UInt)(t_10 != False);390if ( t_9 ) {391392/* if imm[i + 7] = false then */393C_SUM_FIA( t_11, l_i, INTOBJ_INT(7) )394CHECK_INT_POS( t_11 )395C_ELM_LIST_FPL( t_10, l_imm, t_11 )396t_11 = False;397t_9 = (Obj)(UInt)(EQ( t_10, t_11 ));398if ( t_9 ) {399400/* Print( "#I immediate: ", NAME_FUNC( imm[i + 1] ), "\n" ); */401t_9 = GF_Print;402C_NEW_STRING( t_10, 15, "#I immediate: " );403t_12 = GF_NAME__FUNC;404C_SUM_FIA( t_14, l_i, INTOBJ_INT(1) )405CHECK_INT_POS( t_14 )406C_ELM_LIST_FPL( t_13, l_imm, t_14 )407t_11 = CALL_1ARGS( t_12, t_13 );408CHECK_FUNC_RESULT( t_11 )409C_NEW_STRING( t_12, 1, "\n" );410CALL_3ARGS( t_9, t_10, t_11, t_12 );411412}413414/* else */415else {416417/* Print( "#I immediate: ", NAME_FUNC( imm[i + 1] ), ": ", imm[i + 7], "\n" ); */418t_9 = GF_Print;419C_NEW_STRING( t_10, 15, "#I immediate: " );420t_12 = GF_NAME__FUNC;421C_SUM_FIA( t_14, l_i, INTOBJ_INT(1) )422CHECK_INT_POS( t_14 )423C_ELM_LIST_FPL( t_13, l_imm, t_14 )424t_11 = CALL_1ARGS( t_12, t_13 );425CHECK_FUNC_RESULT( t_11 )426C_NEW_STRING( t_12, 2, ": " );427C_SUM_FIA( t_14, l_i, INTOBJ_INT(7) )428CHECK_INT_POS( t_14 )429C_ELM_LIST_FPL( t_13, l_imm, t_14 )430C_NEW_STRING( t_14, 1, "\n" );431CALL_5ARGS( t_9, t_10, t_11, t_12, t_13, t_14 );432433}434/* fi */435436}437/* fi */438439/* if res <> TRY_NEXT_METHOD then */440t_10 = GC_TRY__NEXT__METHOD;441CHECK_BOUND( t_10, "TRY_NEXT_METHOD" )442t_9 = (Obj)(UInt)( ! EQ( l_res, t_10 ));443if ( t_9 ) {444445/* IGNORE_IMMEDIATE_METHODS := true; */446t_9 = True;447AssGVar( G_IGNORE__IMMEDIATE__METHODS, t_9 );448449/* imm[i + 2]( obj, res ); */450C_SUM_FIA( t_10, l_i, INTOBJ_INT(2) )451CHECK_INT_POS( t_10 )452C_ELM_LIST_FPL( t_9, l_imm, t_10 )453CHECK_FUNC( t_9 )454CALL_2ARGS( t_9, a_obj, l_res );455456/* IGNORE_IMMEDIATE_METHODS := false; */457t_9 = False;458AssGVar( G_IGNORE__IMMEDIATE__METHODS, t_9 );459460/* RUN_IMMEDIATE_METHODS_HITS := RUN_IMMEDIATE_METHODS_HITS + 1; */461t_10 = GC_RUN__IMMEDIATE__METHODS__HITS;462CHECK_BOUND( t_10, "RUN_IMMEDIATE_METHODS_HITS" )463C_SUM_FIA( t_9, t_10, INTOBJ_INT(1) )464AssGVar( G_RUN__IMMEDIATE__METHODS__HITS, t_9 );465466/* if not IS_IDENTICAL_OBJ( TYPE_OBJ( obj ), type ) then */467t_12 = GF_IS__IDENTICAL__OBJ;468t_14 = GF_TYPE__OBJ;469t_13 = CALL_1ARGS( t_14, a_obj );470CHECK_FUNC_RESULT( t_13 )471t_11 = CALL_2ARGS( t_12, t_13, l_type );472CHECK_FUNC_RESULT( t_11 )473CHECK_BOOL( t_11 )474t_10 = (Obj)(UInt)(t_11 != False);475t_9 = (Obj)(UInt)( ! ((Int)t_10) );476if ( t_9 ) {477478/* type := TYPE_OBJ( obj ); */479t_10 = GF_TYPE__OBJ;480t_9 = CALL_1ARGS( t_10, a_obj );481CHECK_FUNC_RESULT( t_9 )482l_type = t_9;483484/* newflags := SUB_FLAGS( type![2], IMM_FLAGS ); */485t_10 = GF_SUB__FLAGS;486C_ELM_POSOBJ_NLE( t_11, l_type, 2 );487t_12 = GC_IMM__FLAGS;488CHECK_BOUND( t_12, "IMM_FLAGS" )489t_9 = CALL_2ARGS( t_10, t_11, t_12 );490CHECK_FUNC_RESULT( t_9 )491l_newflags = t_9;492493/* newflags := SUB_FLAGS( newflags, flags ); */494t_10 = GF_SUB__FLAGS;495t_9 = CALL_2ARGS( t_10, l_newflags, a_flags );496CHECK_FUNC_RESULT( t_9 )497l_newflags = t_9;498499/* APPEND_LIST_INTR( flagspos, TRUES_FLAGS( newflags ) ); */500t_9 = GF_APPEND__LIST__INTR;501t_11 = GF_TRUES__FLAGS;502t_10 = CALL_1ARGS( t_11, l_newflags );503CHECK_FUNC_RESULT( t_10 )504CALL_2ARGS( t_9, l_flagspos, t_10 );505506/* flags := type![2]; */507C_ELM_POSOBJ_NLE( t_9, l_type, 2 );508a_flags = t_9;509510}511/* fi */512513}514/* fi */515516}517/* fi */518519}520/* od */521522}523/* fi */524525}526/* od */527528/* return; */529RES_BRK_CURR_STAT();530SWITCH_TO_OLD_FRAME(oldFrame);531return 0;532533/* return; */534RES_BRK_CURR_STAT();535SWITCH_TO_OLD_FRAME(oldFrame);536return 0;537}538539/* handler for function 3 */540static Obj HdlrFunc3 (541Obj self,542Obj a_opr,543Obj a_info,544Obj a_rel,545Obj a_flags,546Obj a_rank,547Obj a_method )548{549Obj l_methods = 0;550Obj l_narg = 0;551Obj l_i = 0;552Obj l_k = 0;553Obj l_tmp = 0;554Obj l_replace = 0;555Obj l_match = 0;556Obj l_j = 0;557Obj t_1 = 0;558Obj t_2 = 0;559Obj t_3 = 0;560Obj t_4 = 0;561Obj t_5 = 0;562Obj t_6 = 0;563Obj t_7 = 0;564Obj t_8 = 0;565Bag oldFrame;566OLD_BRK_CURR_STAT567568/* allocate new stack frame */569SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);570REM_BRK_CURR_STAT();571SET_BRK_CURR_STAT(0);572573/* if opr in CONSTRUCTORS then */574t_2 = GC_CONSTRUCTORS;575CHECK_BOUND( t_2, "CONSTRUCTORS" )576t_1 = (Obj)(UInt)(IN( a_opr, t_2 ));577if ( t_1 ) {578579/* if 0 < LEN_LIST( flags ) then */580t_3 = GF_LEN__LIST;581t_2 = CALL_1ARGS( t_3, a_flags );582CHECK_FUNC_RESULT( t_2 )583t_1 = (Obj)(UInt)(LT( INTOBJ_INT(0), t_2 ));584if ( t_1 ) {585586/* rank := rank - RankFilter( flags[1] ); */587t_3 = GF_RankFilter;588C_ELM_LIST_FPL( t_4, a_flags, INTOBJ_INT(1) )589t_2 = CALL_1ARGS( t_3, t_4 );590CHECK_FUNC_RESULT( t_2 )591C_DIFF_FIA( t_1, a_rank, t_2 )592a_rank = t_1;593594}595/* fi */596597}598599/* else */600else {601602/* for i in flags do */603t_4 = a_flags;604if ( IS_SMALL_LIST(t_4) ) {605t_3 = (Obj)(UInt)1;606t_1 = INTOBJ_INT(1);607}608else {609t_3 = (Obj)(UInt)0;610t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );611}612while ( 1 ) {613if ( t_3 ) {614if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;615t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );616t_1 = (Obj)(((UInt)t_1)+4);617if ( t_2 == 0 ) continue;618}619else {620if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;621t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );622}623l_i = t_2;624625/* rank := rank + RankFilter( i ); */626t_7 = GF_RankFilter;627t_6 = CALL_1ARGS( t_7, l_i );628CHECK_FUNC_RESULT( t_6 )629C_SUM_FIA( t_5, a_rank, t_6 )630a_rank = t_5;631632}633/* od */634635}636/* fi */637638/* narg := LEN_LIST( flags ); */639t_2 = GF_LEN__LIST;640t_1 = CALL_1ARGS( t_2, a_flags );641CHECK_FUNC_RESULT( t_1 )642l_narg = t_1;643644/* methods := METHODS_OPERATION( opr, narg ); */645t_2 = GF_METHODS__OPERATION;646t_1 = CALL_2ARGS( t_2, a_opr, l_narg );647CHECK_FUNC_RESULT( t_1 )648l_methods = t_1;649650/* if info = false then */651t_2 = False;652t_1 = (Obj)(UInt)(EQ( a_info, t_2 ));653if ( t_1 ) {654655/* info := NAME_FUNC( opr ); */656t_2 = GF_NAME__FUNC;657t_1 = CALL_1ARGS( t_2, a_opr );658CHECK_FUNC_RESULT( t_1 )659a_info = t_1;660661}662663/* else */664else {665666/* k := SHALLOW_COPY_OBJ( NAME_FUNC( opr ) ); */667t_2 = GF_SHALLOW__COPY__OBJ;668t_4 = GF_NAME__FUNC;669t_3 = CALL_1ARGS( t_4, a_opr );670CHECK_FUNC_RESULT( t_3 )671t_1 = CALL_1ARGS( t_2, t_3 );672CHECK_FUNC_RESULT( t_1 )673l_k = t_1;674675/* APPEND_LIST_INTR( k, ": " ); */676t_1 = GF_APPEND__LIST__INTR;677C_NEW_STRING( t_2, 2, ": " );678CALL_2ARGS( t_1, l_k, t_2 );679680/* APPEND_LIST_INTR( k, info ); */681t_1 = GF_APPEND__LIST__INTR;682CALL_2ARGS( t_1, l_k, a_info );683684/* info := k; */685a_info = l_k;686687/* CONV_STRING( info ); */688t_1 = GF_CONV__STRING;689CALL_1ARGS( t_1, a_info );690691}692/* fi */693694/* i := 0; */695l_i = INTOBJ_INT(0);696697/* while i < LEN_LIST( methods ) and rank < methods[i + (narg + 3)] od */698while ( 1 ) {699t_4 = GF_LEN__LIST;700t_3 = CALL_1ARGS( t_4, l_methods );701CHECK_FUNC_RESULT( t_3 )702t_2 = (Obj)(UInt)(LT( l_i, t_3 ));703t_1 = t_2;704if ( t_1 ) {705C_SUM_FIA( t_6, l_narg, INTOBJ_INT(3) )706C_SUM_FIA( t_5, l_i, t_6 )707CHECK_INT_POS( t_5 )708C_ELM_LIST_FPL( t_4, l_methods, t_5 )709t_3 = (Obj)(UInt)(LT( a_rank, t_4 ));710t_1 = t_3;711}712if ( ! t_1 ) break;713714/* i := i + (narg + 4); */715C_SUM_FIA( t_2, l_narg, INTOBJ_INT(4) )716C_SUM_FIA( t_1, l_i, t_2 )717l_i = t_1;718719}720/* od */721722/* replace := false; */723t_1 = False;724l_replace = t_1;725726/* if REREADING then */727t_2 = GC_REREADING;728CHECK_BOUND( t_2, "REREADING" )729CHECK_BOOL( t_2 )730t_1 = (Obj)(UInt)(t_2 != False);731if ( t_1 ) {732733/* k := i; */734l_k = l_i;735736/* while k < LEN_LIST( methods ) and rank = methods[k + narg + 3] od */737while ( 1 ) {738t_4 = GF_LEN__LIST;739t_3 = CALL_1ARGS( t_4, l_methods );740CHECK_FUNC_RESULT( t_3 )741t_2 = (Obj)(UInt)(LT( l_k, t_3 ));742t_1 = t_2;743if ( t_1 ) {744C_SUM_FIA( t_6, l_k, l_narg )745C_SUM_FIA( t_5, t_6, INTOBJ_INT(3) )746CHECK_INT_POS( t_5 )747C_ELM_LIST_FPL( t_4, l_methods, t_5 )748t_3 = (Obj)(UInt)(EQ( a_rank, t_4 ));749t_1 = t_3;750}751if ( ! t_1 ) break;752753/* if info = methods[k + narg + 4] then */754C_SUM_FIA( t_4, l_k, l_narg )755C_SUM_FIA( t_3, t_4, INTOBJ_INT(4) )756CHECK_INT_POS( t_3 )757C_ELM_LIST_FPL( t_2, l_methods, t_3 )758t_1 = (Obj)(UInt)(EQ( a_info, t_2 ));759if ( t_1 ) {760761/* match := false; */762t_1 = False;763l_match = t_1;764765/* for j in [ 1 .. narg ] do */766CHECK_INT_SMALL( l_narg )767t_2 = l_narg;768for ( t_1 = INTOBJ_INT(1);769((Int)t_1) <= ((Int)t_2);770t_1 = (Obj)(((UInt)t_1)+4) ) {771l_j = t_1;772773/* match := match and methods[k + j + 1] = flags[j]; */774if ( l_match == False ) {775t_3 = l_match;776}777else if ( l_match == True ) {778C_SUM_FIA( t_7, l_k, l_j )779C_SUM_FIA( t_6, t_7, INTOBJ_INT(1) )780CHECK_INT_POS( t_6 )781C_ELM_LIST_FPL( t_5, l_methods, t_6 )782C_ELM_LIST_FPL( t_6, a_flags, l_j )783t_4 = (EQ( t_5, t_6 ) ? True : False);784t_3 = t_4;785}786else {787CHECK_FUNC( l_match )788C_SUM_FIA( t_8, l_k, l_j )789C_SUM_FIA( t_7, t_8, INTOBJ_INT(1) )790CHECK_INT_POS( t_7 )791C_ELM_LIST_FPL( t_6, l_methods, t_7 )792C_ELM_LIST_FPL( t_7, a_flags, l_j )793t_5 = (EQ( t_6, t_7 ) ? True : False);794CHECK_FUNC( t_5 )795t_3 = NewAndFilter( l_match, t_5 );796}797l_match = t_3;798799}800/* od */801802/* if match then */803CHECK_BOOL( l_match )804t_1 = (Obj)(UInt)(l_match != False);805if ( t_1 ) {806807/* replace := true; */808t_1 = True;809l_replace = t_1;810811/* i := k; */812l_i = l_k;813814/* break; */815break;816817}818/* fi */819820}821/* fi */822823/* k := k + narg + 4; */824C_SUM_FIA( t_2, l_k, l_narg )825C_SUM_FIA( t_1, t_2, INTOBJ_INT(4) )826l_k = t_1;827828}829/* od */830831}832/* fi */833834/* if not REREADING or not replace then */835t_4 = GC_REREADING;836CHECK_BOUND( t_4, "REREADING" )837CHECK_BOOL( t_4 )838t_3 = (Obj)(UInt)(t_4 != False);839t_2 = (Obj)(UInt)( ! ((Int)t_3) );840t_1 = t_2;841if ( ! t_1 ) {842t_4 = (Obj)(UInt)(l_replace != False);843t_3 = (Obj)(UInt)( ! ((Int)t_4) );844t_1 = t_3;845}846if ( t_1 ) {847848/* methods{[ narg + 4 + i + 1 .. narg + 4 + LEN_LIST( methods ) ]} := methods{[ i + 1 .. LEN_LIST( methods ) ]}; */849C_SUM_FIA( t_4, l_narg, INTOBJ_INT(4) )850C_SUM_FIA( t_3, t_4, l_i )851C_SUM_FIA( t_2, t_3, INTOBJ_INT(1) )852C_SUM_FIA( t_4, l_narg, INTOBJ_INT(4) )853t_6 = GF_LEN__LIST;854t_5 = CALL_1ARGS( t_6, l_methods );855CHECK_FUNC_RESULT( t_5 )856C_SUM_FIA( t_3, t_4, t_5 )857t_1 = Range2Check( t_2, t_3 );858C_SUM_FIA( t_4, l_i, INTOBJ_INT(1) )859t_6 = GF_LEN__LIST;860t_5 = CALL_1ARGS( t_6, l_methods );861CHECK_FUNC_RESULT( t_5 )862t_3 = Range2Check( t_4, t_5 );863t_2 = ElmsListCheck( l_methods, t_3 );864AsssListCheck( l_methods, t_1, t_2 );865866}867/* fi */868869/* if rel = true then */870t_2 = True;871t_1 = (Obj)(UInt)(EQ( a_rel, t_2 ));872if ( t_1 ) {873874/* methods[i + 1] := RETURN_TRUE; */875C_SUM_FIA( t_1, l_i, INTOBJ_INT(1) )876CHECK_INT_POS( t_1 )877t_2 = GC_RETURN__TRUE;878CHECK_BOUND( t_2, "RETURN_TRUE" )879C_ASS_LIST_FPL( l_methods, t_1, t_2 )880881}882883/* elif rel = false then */884else {885t_2 = False;886t_1 = (Obj)(UInt)(EQ( a_rel, t_2 ));887if ( t_1 ) {888889/* methods[i + 1] := RETURN_FALSE; */890C_SUM_FIA( t_1, l_i, INTOBJ_INT(1) )891CHECK_INT_POS( t_1 )892t_2 = GC_RETURN__FALSE;893CHECK_BOUND( t_2, "RETURN_FALSE" )894C_ASS_LIST_FPL( l_methods, t_1, t_2 )895896}897898/* elif IS_FUNCTION( rel ) then */899else {900t_3 = GF_IS__FUNCTION;901t_2 = CALL_1ARGS( t_3, a_rel );902CHECK_FUNC_RESULT( t_2 )903CHECK_BOOL( t_2 )904t_1 = (Obj)(UInt)(t_2 != False);905if ( t_1 ) {906907/* if CHECK_INSTALL_METHOD then */908t_2 = GC_CHECK__INSTALL__METHOD;909CHECK_BOUND( t_2, "CHECK_INSTALL_METHOD" )910CHECK_BOOL( t_2 )911t_1 = (Obj)(UInt)(t_2 != False);912if ( t_1 ) {913914/* tmp := NARG_FUNC( rel ); */915t_2 = GF_NARG__FUNC;916t_1 = CALL_1ARGS( t_2, a_rel );917CHECK_FUNC_RESULT( t_1 )918l_tmp = t_1;919920/* if tmp < AINV( narg ) - 1 or tmp >= 0 and tmp <> narg then */921t_5 = GF_AINV;922t_4 = CALL_1ARGS( t_5, l_narg );923CHECK_FUNC_RESULT( t_4 )924C_DIFF_FIA( t_3, t_4, INTOBJ_INT(1) )925t_2 = (Obj)(UInt)(LT( l_tmp, t_3 ));926t_1 = t_2;927if ( ! t_1 ) {928t_4 = (Obj)(UInt)(! LT( l_tmp, INTOBJ_INT(0) ));929t_3 = t_4;930if ( t_3 ) {931t_5 = (Obj)(UInt)( ! EQ( l_tmp, l_narg ));932t_3 = t_5;933}934t_1 = t_3;935}936if ( t_1 ) {937938/* Error( NAME_FUNC( opr ), ": <famrel> must accept ", narg, " arguments" ); */939t_1 = GF_Error;940t_3 = GF_NAME__FUNC;941t_2 = CALL_1ARGS( t_3, a_opr );942CHECK_FUNC_RESULT( t_2 )943C_NEW_STRING( t_3, 23, ": <famrel> must accept " );944C_NEW_STRING( t_4, 10, " arguments" );945CALL_4ARGS( t_1, t_2, t_3, l_narg, t_4 );946947}948/* fi */949950}951/* fi */952953/* methods[i + 1] := rel; */954C_SUM_FIA( t_1, l_i, INTOBJ_INT(1) )955CHECK_INT_POS( t_1 )956C_ASS_LIST_FPL( l_methods, t_1, a_rel )957958}959960/* else */961else {962963/* Error( NAME_FUNC( opr ), ": <famrel> must be a function, `true', or `false'" ); */964t_1 = GF_Error;965t_3 = GF_NAME__FUNC;966t_2 = CALL_1ARGS( t_3, a_opr );967CHECK_FUNC_RESULT( t_2 )968C_NEW_STRING( t_3, 49, ": <famrel> must be a function, `true', or `false'" );969CALL_2ARGS( t_1, t_2, t_3 );970971}972}973}974/* fi */975976/* for k in [ 1 .. narg ] do */977CHECK_INT_SMALL( l_narg )978t_2 = l_narg;979for ( t_1 = INTOBJ_INT(1);980((Int)t_1) <= ((Int)t_2);981t_1 = (Obj)(((UInt)t_1)+4) ) {982l_k = t_1;983984/* methods[i + k + 1] := flags[k]; */985C_SUM_FIA( t_4, l_i, l_k )986C_SUM_FIA( t_3, t_4, INTOBJ_INT(1) )987CHECK_INT_POS( t_3 )988C_ELM_LIST_FPL( t_4, a_flags, l_k )989C_ASS_LIST_FPL( l_methods, t_3, t_4 )990991}992/* od */993994/* if method = true then */995t_2 = True;996t_1 = (Obj)(UInt)(EQ( a_method, t_2 ));997if ( t_1 ) {998999/* methods[i + (narg + 2)] := RETURN_TRUE; */1000C_SUM_INTOBJS( t_2, l_narg, INTOBJ_INT(2) )1001C_SUM_FIA( t_1, l_i, t_2 )1002CHECK_INT_POS( t_1 )1003t_2 = GC_RETURN__TRUE;1004CHECK_BOUND( t_2, "RETURN_TRUE" )1005C_ASS_LIST_FPL( l_methods, t_1, t_2 )10061007}10081009/* elif method = false then */1010else {1011t_2 = False;1012t_1 = (Obj)(UInt)(EQ( a_method, t_2 ));1013if ( t_1 ) {10141015/* methods[i + (narg + 2)] := RETURN_FALSE; */1016C_SUM_INTOBJS( t_2, l_narg, INTOBJ_INT(2) )1017C_SUM_FIA( t_1, l_i, t_2 )1018CHECK_INT_POS( t_1 )1019t_2 = GC_RETURN__FALSE;1020CHECK_BOUND( t_2, "RETURN_FALSE" )1021C_ASS_LIST_FPL( l_methods, t_1, t_2 )10221023}10241025/* elif IS_FUNCTION( method ) then */1026else {1027t_3 = GF_IS__FUNCTION;1028t_2 = CALL_1ARGS( t_3, a_method );1029CHECK_FUNC_RESULT( t_2 )1030CHECK_BOOL( t_2 )1031t_1 = (Obj)(UInt)(t_2 != False);1032if ( t_1 ) {10331034/* if CHECK_INSTALL_METHOD and not IS_OPERATION( method ) then */1035t_3 = GC_CHECK__INSTALL__METHOD;1036CHECK_BOUND( t_3, "CHECK_INSTALL_METHOD" )1037CHECK_BOOL( t_3 )1038t_2 = (Obj)(UInt)(t_3 != False);1039t_1 = t_2;1040if ( t_1 ) {1041t_6 = GF_IS__OPERATION;1042t_5 = CALL_1ARGS( t_6, a_method );1043CHECK_FUNC_RESULT( t_5 )1044CHECK_BOOL( t_5 )1045t_4 = (Obj)(UInt)(t_5 != False);1046t_3 = (Obj)(UInt)( ! ((Int)t_4) );1047t_1 = t_3;1048}1049if ( t_1 ) {10501051/* tmp := NARG_FUNC( method ); */1052t_2 = GF_NARG__FUNC;1053t_1 = CALL_1ARGS( t_2, a_method );1054CHECK_FUNC_RESULT( t_1 )1055l_tmp = t_1;10561057/* if tmp < AINV( narg ) - 1 or tmp >= 0 and tmp <> narg then */1058t_5 = GF_AINV;1059t_4 = CALL_1ARGS( t_5, l_narg );1060CHECK_FUNC_RESULT( t_4 )1061C_DIFF_FIA( t_3, t_4, INTOBJ_INT(1) )1062t_2 = (Obj)(UInt)(LT( l_tmp, t_3 ));1063t_1 = t_2;1064if ( ! t_1 ) {1065t_4 = (Obj)(UInt)(! LT( l_tmp, INTOBJ_INT(0) ));1066t_3 = t_4;1067if ( t_3 ) {1068t_5 = (Obj)(UInt)( ! EQ( l_tmp, l_narg ));1069t_3 = t_5;1070}1071t_1 = t_3;1072}1073if ( t_1 ) {10741075/* Error( NAME_FUNC( opr ), ": <method> must accept ", narg, " arguments" ); */1076t_1 = GF_Error;1077t_3 = GF_NAME__FUNC;1078t_2 = CALL_1ARGS( t_3, a_opr );1079CHECK_FUNC_RESULT( t_2 )1080C_NEW_STRING( t_3, 23, ": <method> must accept " );1081C_NEW_STRING( t_4, 10, " arguments" );1082CALL_4ARGS( t_1, t_2, t_3, l_narg, t_4 );10831084}1085/* fi */10861087}1088/* fi */10891090/* methods[i + (narg + 2)] := method; */1091C_SUM_INTOBJS( t_2, l_narg, INTOBJ_INT(2) )1092C_SUM_FIA( t_1, l_i, t_2 )1093CHECK_INT_POS( t_1 )1094C_ASS_LIST_FPL( l_methods, t_1, a_method )10951096}10971098/* else */1099else {11001101/* Error( NAME_FUNC( opr ), ": <method> must be a function, `true', or `false'" ); */1102t_1 = GF_Error;1103t_3 = GF_NAME__FUNC;1104t_2 = CALL_1ARGS( t_3, a_opr );1105CHECK_FUNC_RESULT( t_2 )1106C_NEW_STRING( t_3, 49, ": <method> must be a function, `true', or `false'" );1107CALL_2ARGS( t_1, t_2, t_3 );11081109}1110}1111}1112/* fi */11131114/* methods[i + (narg + 3)] := rank; */1115C_SUM_INTOBJS( t_2, l_narg, INTOBJ_INT(3) )1116C_SUM_FIA( t_1, l_i, t_2 )1117CHECK_INT_POS( t_1 )1118C_ASS_LIST_FPL( l_methods, t_1, a_rank )11191120/* methods[i + (narg + 4)] := IMMUTABLE_COPY_OBJ( info ); */1121C_SUM_INTOBJS( t_2, l_narg, INTOBJ_INT(4) )1122C_SUM_FIA( t_1, l_i, t_2 )1123CHECK_INT_POS( t_1 )1124t_3 = GF_IMMUTABLE__COPY__OBJ;1125t_2 = CALL_1ARGS( t_3, a_info );1126CHECK_FUNC_RESULT( t_2 )1127C_ASS_LIST_FPL( l_methods, t_1, t_2 )11281129/* CHANGED_METHODS_OPERATION( opr, narg ); */1130t_1 = GF_CHANGED__METHODS__OPERATION;1131CALL_2ARGS( t_1, a_opr, l_narg );11321133/* return; */1134RES_BRK_CURR_STAT();1135SWITCH_TO_OLD_FRAME(oldFrame);1136return 0;11371138/* return; */1139RES_BRK_CURR_STAT();1140SWITCH_TO_OLD_FRAME(oldFrame);1141return 0;1142}11431144/* handler for function 4 */1145static Obj HdlrFunc4 (1146Obj self,1147Obj a_arg )1148{1149Obj t_1 = 0;1150Obj t_2 = 0;1151Bag oldFrame;1152OLD_BRK_CURR_STAT11531154/* allocate new stack frame */1155SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);1156REM_BRK_CURR_STAT();1157SET_BRK_CURR_STAT(0);11581159/* INSTALL_METHOD( arg, true ); */1160t_1 = GF_INSTALL__METHOD;1161t_2 = True;1162CALL_2ARGS( t_1, a_arg, t_2 );11631164/* return; */1165RES_BRK_CURR_STAT();1166SWITCH_TO_OLD_FRAME(oldFrame);1167return 0;11681169/* return; */1170RES_BRK_CURR_STAT();1171SWITCH_TO_OLD_FRAME(oldFrame);1172return 0;1173}11741175/* handler for function 5 */1176static Obj HdlrFunc5 (1177Obj self,1178Obj a_arg )1179{1180Obj t_1 = 0;1181Obj t_2 = 0;1182Bag oldFrame;1183OLD_BRK_CURR_STAT11841185/* allocate new stack frame */1186SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);1187REM_BRK_CURR_STAT();1188SET_BRK_CURR_STAT(0);11891190/* INSTALL_METHOD( arg, false ); */1191t_1 = GF_INSTALL__METHOD;1192t_2 = False;1193CALL_2ARGS( t_1, a_arg, t_2 );11941195/* return; */1196RES_BRK_CURR_STAT();1197SWITCH_TO_OLD_FRAME(oldFrame);1198return 0;11991200/* return; */1201RES_BRK_CURR_STAT();1202SWITCH_TO_OLD_FRAME(oldFrame);1203return 0;1204}12051206/* handler for function 6 */1207static Obj HdlrFunc6 (1208Obj self,1209Obj a_arglist,1210Obj a_check )1211{1212Obj l_len = 0;1213Obj l_opr = 0;1214Obj l_info = 0;1215Obj l_pos = 0;1216Obj l_rel = 0;1217Obj l_filters = 0;1218Obj l_info1 = 0;1219Obj l_isstr = 0;1220Obj l_flags = 0;1221Obj l_i = 0;1222Obj l_rank = 0;1223Obj l_method = 0;1224Obj l_req = 0;1225Obj l_reqs = 0;1226Obj l_match = 0;1227Obj l_j = 0;1228Obj l_k = 0;1229Obj l_imp = 0;1230Obj l_notmatch = 0;1231Obj t_1 = 0;1232Obj t_2 = 0;1233Obj t_3 = 0;1234Obj t_4 = 0;1235Obj t_5 = 0;1236Obj t_6 = 0;1237Obj t_7 = 0;1238Obj t_8 = 0;1239Obj t_9 = 0;1240Obj t_10 = 0;1241Obj t_11 = 0;1242Bag oldFrame;1243OLD_BRK_CURR_STAT12441245/* allocate new stack frame */1246SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);1247REM_BRK_CURR_STAT();1248SET_BRK_CURR_STAT(0);12491250/* len := LEN_LIST( arglist ); */1251t_2 = GF_LEN__LIST;1252t_1 = CALL_1ARGS( t_2, a_arglist );1253CHECK_FUNC_RESULT( t_1 )1254l_len = t_1;12551256/* if len < 3 then */1257t_1 = (Obj)(UInt)(LT( l_len, INTOBJ_INT(3) ));1258if ( t_1 ) {12591260/* Error( "too few arguments given in <arglist>" ); */1261t_1 = GF_Error;1262C_NEW_STRING( t_2, 36, "too few arguments given in <arglist>" );1263CALL_1ARGS( t_1, t_2 );12641265}1266/* fi */12671268/* opr := arglist[1]; */1269C_ELM_LIST_FPL( t_1, a_arglist, INTOBJ_INT(1) )1270l_opr = t_1;12711272/* if not IS_OPERATION( opr ) then */1273t_4 = GF_IS__OPERATION;1274t_3 = CALL_1ARGS( t_4, l_opr );1275CHECK_FUNC_RESULT( t_3 )1276CHECK_BOOL( t_3 )1277t_2 = (Obj)(UInt)(t_3 != False);1278t_1 = (Obj)(UInt)( ! ((Int)t_2) );1279if ( t_1 ) {12801281/* Error( "<opr> is not an operation" ); */1282t_1 = GF_Error;1283C_NEW_STRING( t_2, 25, "<opr> is not an operation" );1284CALL_1ARGS( t_1, t_2 );12851286}1287/* fi */12881289/* if IS_STRING_REP( arglist[2] ) then */1290t_3 = GF_IS__STRING__REP;1291C_ELM_LIST_FPL( t_4, a_arglist, INTOBJ_INT(2) )1292t_2 = CALL_1ARGS( t_3, t_4 );1293CHECK_FUNC_RESULT( t_2 )1294CHECK_BOOL( t_2 )1295t_1 = (Obj)(UInt)(t_2 != False);1296if ( t_1 ) {12971298/* info := arglist[2]; */1299C_ELM_LIST_FPL( t_1, a_arglist, INTOBJ_INT(2) )1300l_info = t_1;13011302/* pos := 3; */1303l_pos = INTOBJ_INT(3);13041305}13061307/* else */1308else {13091310/* info := false; */1311t_1 = False;1312l_info = t_1;13131314/* pos := 2; */1315l_pos = INTOBJ_INT(2);13161317}1318/* fi */13191320/* if arglist[pos] = true or IS_FUNCTION( arglist[pos] ) then */1321C_ELM_LIST_FPL( t_3, a_arglist, l_pos )1322t_4 = True;1323t_2 = (Obj)(UInt)(EQ( t_3, t_4 ));1324t_1 = t_2;1325if ( ! t_1 ) {1326t_5 = GF_IS__FUNCTION;1327C_ELM_LIST_FPL( t_6, a_arglist, l_pos )1328t_4 = CALL_1ARGS( t_5, t_6 );1329CHECK_FUNC_RESULT( t_4 )1330CHECK_BOOL( t_4 )1331t_3 = (Obj)(UInt)(t_4 != False);1332t_1 = t_3;1333}1334if ( t_1 ) {13351336/* rel := arglist[pos]; */1337C_ELM_LIST_FPL( t_1, a_arglist, l_pos )1338l_rel = t_1;13391340/* pos := pos + 1; */1341C_SUM_INTOBJS( t_1, l_pos, INTOBJ_INT(1) )1342l_pos = t_1;13431344}13451346/* else */1347else {13481349/* rel := true; */1350t_1 = True;1351l_rel = t_1;13521353}1354/* fi */13551356/* if not IsBound( arglist[pos] ) or not IS_LIST( arglist[pos] ) then */1357CHECK_INT_POS( l_pos )1358t_4 = C_ISB_LIST( a_arglist, l_pos );1359t_3 = (Obj)(UInt)(t_4 != False);1360t_2 = (Obj)(UInt)( ! ((Int)t_3) );1361t_1 = t_2;1362if ( ! t_1 ) {1363t_6 = GF_IS__LIST;1364C_ELM_LIST_FPL( t_7, a_arglist, l_pos )1365t_5 = CALL_1ARGS( t_6, t_7 );1366CHECK_FUNC_RESULT( t_5 )1367CHECK_BOOL( t_5 )1368t_4 = (Obj)(UInt)(t_5 != False);1369t_3 = (Obj)(UInt)( ! ((Int)t_4) );1370t_1 = t_3;1371}1372if ( t_1 ) {13731374/* Error( "<arglist>[", pos, "] must be a list of filters" ); */1375t_1 = GF_Error;1376C_NEW_STRING( t_2, 10, "<arglist>[" );1377C_NEW_STRING( t_3, 27, "] must be a list of filters" );1378CALL_3ARGS( t_1, t_2, l_pos, t_3 );13791380}1381/* fi */13821383/* filters := arglist[pos]; */1384C_ELM_LIST_FPL( t_1, a_arglist, l_pos )1385l_filters = t_1;13861387/* if GAPInfo.MaxNrArgsMethod < LEN_LIST( filters ) then */1388t_3 = GC_GAPInfo;1389CHECK_BOUND( t_3, "GAPInfo" )1390t_2 = ELM_REC( t_3, R_MaxNrArgsMethod );1391t_4 = GF_LEN__LIST;1392t_3 = CALL_1ARGS( t_4, l_filters );1393CHECK_FUNC_RESULT( t_3 )1394t_1 = (Obj)(UInt)(LT( t_2, t_3 ));1395if ( t_1 ) {13961397/* Error( "methods can have at most ", GAPInfo.MaxNrArgsMethod, " arguments" ); */1398t_1 = GF_Error;1399C_NEW_STRING( t_2, 25, "methods can have at most " );1400t_4 = GC_GAPInfo;1401CHECK_BOUND( t_4, "GAPInfo" )1402t_3 = ELM_REC( t_4, R_MaxNrArgsMethod );1403C_NEW_STRING( t_4, 10, " arguments" );1404CALL_3ARGS( t_1, t_2, t_3, t_4 );14051406}1407/* fi */14081409/* if 0 < LEN_LIST( filters ) then */1410t_3 = GF_LEN__LIST;1411t_2 = CALL_1ARGS( t_3, l_filters );1412CHECK_FUNC_RESULT( t_2 )1413t_1 = (Obj)(UInt)(LT( INTOBJ_INT(0), t_2 ));1414if ( t_1 ) {14151416/* info1 := "[ "; */1417C_NEW_STRING( t_1, 2, "[ " );1418l_info1 = t_1;14191420/* isstr := true; */1421t_1 = True;1422l_isstr = t_1;14231424/* for i in [ 1 .. LEN_LIST( filters ) ] do */1425t_3 = GF_LEN__LIST;1426t_2 = CALL_1ARGS( t_3, l_filters );1427CHECK_FUNC_RESULT( t_2 )1428CHECK_INT_SMALL( t_2 )1429for ( t_1 = INTOBJ_INT(1);1430((Int)t_1) <= ((Int)t_2);1431t_1 = (Obj)(((UInt)t_1)+4) ) {1432l_i = t_1;14331434/* if IS_STRING_REP( filters[i] ) then */1435t_5 = GF_IS__STRING__REP;1436C_ELM_LIST_FPL( t_6, l_filters, l_i )1437t_4 = CALL_1ARGS( t_5, t_6 );1438CHECK_FUNC_RESULT( t_4 )1439CHECK_BOOL( t_4 )1440t_3 = (Obj)(UInt)(t_4 != False);1441if ( t_3 ) {14421443/* APPEND_LIST_INTR( info1, filters[i] ); */1444t_3 = GF_APPEND__LIST__INTR;1445C_ELM_LIST_FPL( t_4, l_filters, l_i )1446CALL_2ARGS( t_3, l_info1, t_4 );14471448/* APPEND_LIST_INTR( info1, ", " ); */1449t_3 = GF_APPEND__LIST__INTR;1450C_NEW_STRING( t_4, 2, ", " );1451CALL_2ARGS( t_3, l_info1, t_4 );14521453/* filters[i] := EvalString( filters[i] ); */1454t_4 = GF_EvalString;1455C_ELM_LIST_FPL( t_5, l_filters, l_i )1456t_3 = CALL_1ARGS( t_4, t_5 );1457CHECK_FUNC_RESULT( t_3 )1458C_ASS_LIST_FPL( l_filters, l_i, t_3 )14591460/* if not IS_FUNCTION( filters[i] ) then */1461t_6 = GF_IS__FUNCTION;1462C_ELM_LIST_FPL( t_7, l_filters, l_i )1463t_5 = CALL_1ARGS( t_6, t_7 );1464CHECK_FUNC_RESULT( t_5 )1465CHECK_BOOL( t_5 )1466t_4 = (Obj)(UInt)(t_5 != False);1467t_3 = (Obj)(UInt)( ! ((Int)t_4) );1468if ( t_3 ) {14691470/* Error( "string does not evaluate to a function" ); */1471t_3 = GF_Error;1472C_NEW_STRING( t_4, 38, "string does not evaluate to a function" );1473CALL_1ARGS( t_3, t_4 );14741475}1476/* fi */14771478}14791480/* else */1481else {14821483/* isstr := false; */1484t_3 = False;1485l_isstr = t_3;14861487/* break; */1488break;14891490}1491/* fi */14921493}1494/* od */14951496/* if isstr and info = false then */1497t_2 = (Obj)(UInt)(l_isstr != False);1498t_1 = t_2;1499if ( t_1 ) {1500t_4 = False;1501t_3 = (Obj)(UInt)(EQ( l_info, t_4 ));1502t_1 = t_3;1503}1504if ( t_1 ) {15051506/* info1[LEN_LIST( info1 ) - 1] := ' '; */1507t_3 = GF_LEN__LIST;1508t_2 = CALL_1ARGS( t_3, l_info1 );1509CHECK_FUNC_RESULT( t_2 )1510C_DIFF_FIA( t_1, t_2, INTOBJ_INT(1) )1511CHECK_INT_POS( t_1 )1512t_2 = ObjsChar[32];1513C_ASS_LIST_FPL( l_info1, t_1, t_2 )15141515/* info1[LEN_LIST( info1 )] := ']'; */1516t_2 = GF_LEN__LIST;1517t_1 = CALL_1ARGS( t_2, l_info1 );1518CHECK_FUNC_RESULT( t_1 )1519CHECK_INT_POS( t_1 )1520t_2 = ObjsChar[93];1521C_ASS_LIST_FPL( l_info1, t_1, t_2 )15221523/* info := info1; */1524l_info = l_info1;15251526}1527/* fi */15281529}1530/* fi */15311532/* pos := pos + 1; */1533C_SUM_FIA( t_1, l_pos, INTOBJ_INT(1) )1534l_pos = t_1;15351536/* flags := [ ]; */1537t_1 = NEW_PLIST( T_PLIST, 0 );1538SET_LEN_PLIST( t_1, 0 );1539l_flags = t_1;15401541/* for i in filters do */1542t_4 = l_filters;1543if ( IS_SMALL_LIST(t_4) ) {1544t_3 = (Obj)(UInt)1;1545t_1 = INTOBJ_INT(1);1546}1547else {1548t_3 = (Obj)(UInt)0;1549t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );1550}1551while ( 1 ) {1552if ( t_3 ) {1553if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;1554t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );1555t_1 = (Obj)(((UInt)t_1)+4);1556if ( t_2 == 0 ) continue;1557}1558else {1559if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;1560t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );1561}1562l_i = t_2;15631564/* ADD_LIST( flags, FLAGS_FILTER( i ) ); */1565t_5 = GF_ADD__LIST;1566t_7 = GF_FLAGS__FILTER;1567t_6 = CALL_1ARGS( t_7, l_i );1568CHECK_FUNC_RESULT( t_6 )1569CALL_2ARGS( t_5, l_flags, t_6 );15701571}1572/* od */15731574/* if not IsBound( arglist[pos] ) then */1575CHECK_INT_POS( l_pos )1576t_3 = C_ISB_LIST( a_arglist, l_pos );1577t_2 = (Obj)(UInt)(t_3 != False);1578t_1 = (Obj)(UInt)( ! ((Int)t_2) );1579if ( t_1 ) {15801581/* Error( "the method is missing in <arglist>" ); */1582t_1 = GF_Error;1583C_NEW_STRING( t_2, 34, "the method is missing in <arglist>" );1584CALL_1ARGS( t_1, t_2 );15851586}15871588/* elif IS_INT( arglist[pos] ) then */1589else {1590t_3 = GF_IS__INT;1591C_ELM_LIST_FPL( t_4, a_arglist, l_pos )1592t_2 = CALL_1ARGS( t_3, t_4 );1593CHECK_FUNC_RESULT( t_2 )1594CHECK_BOOL( t_2 )1595t_1 = (Obj)(UInt)(t_2 != False);1596if ( t_1 ) {15971598/* rank := arglist[pos]; */1599C_ELM_LIST_FPL( t_1, a_arglist, l_pos )1600l_rank = t_1;16011602/* pos := pos + 1; */1603C_SUM_FIA( t_1, l_pos, INTOBJ_INT(1) )1604l_pos = t_1;16051606}16071608/* else */1609else {16101611/* rank := 0; */1612l_rank = INTOBJ_INT(0);16131614}1615}1616/* fi */16171618/* if not IsBound( arglist[pos] ) then */1619CHECK_INT_POS( l_pos )1620t_3 = C_ISB_LIST( a_arglist, l_pos );1621t_2 = (Obj)(UInt)(t_3 != False);1622t_1 = (Obj)(UInt)( ! ((Int)t_2) );1623if ( t_1 ) {16241625/* Error( "the method is missing in <arglist>" ); */1626t_1 = GF_Error;1627C_NEW_STRING( t_2, 34, "the method is missing in <arglist>" );1628CALL_1ARGS( t_1, t_2 );16291630}1631/* fi */16321633/* method := arglist[pos]; */1634C_ELM_LIST_FPL( t_1, a_arglist, l_pos )1635l_method = t_1;16361637/* if FLAG1_FILTER( opr ) <> 0 and (rel = true or rel = RETURN_TRUE) and LEN_LIST( filters ) = 1 and (method = true or method = RETURN_TRUE) then */1638t_6 = GF_FLAG1__FILTER;1639t_5 = CALL_1ARGS( t_6, l_opr );1640CHECK_FUNC_RESULT( t_5 )1641t_4 = (Obj)(UInt)( ! EQ( t_5, INTOBJ_INT(0) ));1642t_3 = t_4;1643if ( t_3 ) {1644t_7 = True;1645t_6 = (Obj)(UInt)(EQ( l_rel, t_7 ));1646t_5 = t_6;1647if ( ! t_5 ) {1648t_8 = GC_RETURN__TRUE;1649CHECK_BOUND( t_8, "RETURN_TRUE" )1650t_7 = (Obj)(UInt)(EQ( l_rel, t_8 ));1651t_5 = t_7;1652}1653t_3 = t_5;1654}1655t_2 = t_3;1656if ( t_2 ) {1657t_6 = GF_LEN__LIST;1658t_5 = CALL_1ARGS( t_6, l_filters );1659CHECK_FUNC_RESULT( t_5 )1660t_4 = (Obj)(UInt)(EQ( t_5, INTOBJ_INT(1) ));1661t_2 = t_4;1662}1663t_1 = t_2;1664if ( t_1 ) {1665t_5 = True;1666t_4 = (Obj)(UInt)(EQ( l_method, t_5 ));1667t_3 = t_4;1668if ( ! t_3 ) {1669t_6 = GC_RETURN__TRUE;1670CHECK_BOUND( t_6, "RETURN_TRUE" )1671t_5 = (Obj)(UInt)(EQ( l_method, t_6 ));1672t_3 = t_5;1673}1674t_1 = t_3;1675}1676if ( t_1 ) {16771678/* Error( NAME_FUNC( opr ), ": use `InstallTrueMethod' for <opr>" ); */1679t_1 = GF_Error;1680t_3 = GF_NAME__FUNC;1681t_2 = CALL_1ARGS( t_3, l_opr );1682CHECK_FUNC_RESULT( t_2 )1683C_NEW_STRING( t_3, 35, ": use `InstallTrueMethod' for <opr>" );1684CALL_2ARGS( t_1, t_2, t_3 );16851686}1687/* fi */16881689/* if CHECK_INSTALL_METHOD and check then */1690t_3 = GC_CHECK__INSTALL__METHOD;1691CHECK_BOUND( t_3, "CHECK_INSTALL_METHOD" )1692CHECK_BOOL( t_3 )1693t_2 = (Obj)(UInt)(t_3 != False);1694t_1 = t_2;1695if ( t_1 ) {1696CHECK_BOOL( a_check )1697t_3 = (Obj)(UInt)(a_check != False);1698t_1 = t_3;1699}1700if ( t_1 ) {17011702/* if opr in WRAPPER_OPERATIONS then */1703t_2 = GC_WRAPPER__OPERATIONS;1704CHECK_BOUND( t_2, "WRAPPER_OPERATIONS" )1705t_1 = (Obj)(UInt)(IN( l_opr, t_2 ));1706if ( t_1 ) {17071708/* INFO_DEBUG( 1, "a method is installed for the wrapper operation ", NAME_FUNC( opr ), "\n", "#I probably it should be installed for (one of) its\n", "#I underlying operation(s)" ); */1709t_1 = GF_INFO__DEBUG;1710C_NEW_STRING( t_2, 48, "a method is installed for the wrapper operation " );1711t_4 = GF_NAME__FUNC;1712t_3 = CALL_1ARGS( t_4, l_opr );1713CHECK_FUNC_RESULT( t_3 )1714C_NEW_STRING( t_4, 1, "\n" );1715C_NEW_STRING( t_5, 53, "#I probably it should be installed for (one of) its\n" );1716C_NEW_STRING( t_6, 27, "#I underlying operation(s)" );1717CALL_6ARGS( t_1, INTOBJ_INT(1), t_2, t_3, t_4, t_5, t_6 );17181719}1720/* fi */17211722/* req := false; */1723t_1 = False;1724l_req = t_1;17251726/* for i in [ 1, 3 .. LEN_LIST( OPERATIONS ) - 1 ] do */1727t_7 = GF_LEN__LIST;1728t_8 = GC_OPERATIONS;1729CHECK_BOUND( t_8, "OPERATIONS" )1730t_6 = CALL_1ARGS( t_7, t_8 );1731CHECK_FUNC_RESULT( t_6 )1732C_DIFF_FIA( t_5, t_6, INTOBJ_INT(1) )1733t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(3), t_5 );1734if ( IS_SMALL_LIST(t_4) ) {1735t_3 = (Obj)(UInt)1;1736t_1 = INTOBJ_INT(1);1737}1738else {1739t_3 = (Obj)(UInt)0;1740t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );1741}1742while ( 1 ) {1743if ( t_3 ) {1744if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;1745t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );1746t_1 = (Obj)(((UInt)t_1)+4);1747if ( t_2 == 0 ) continue;1748}1749else {1750if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;1751t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );1752}1753l_i = t_2;17541755/* if IS_IDENTICAL_OBJ( OPERATIONS[i], opr ) then */1756t_7 = GF_IS__IDENTICAL__OBJ;1757t_9 = GC_OPERATIONS;1758CHECK_BOUND( t_9, "OPERATIONS" )1759CHECK_INT_POS( l_i )1760C_ELM_LIST_FPL( t_8, t_9, l_i )1761t_6 = CALL_2ARGS( t_7, t_8, l_opr );1762CHECK_FUNC_RESULT( t_6 )1763CHECK_BOOL( t_6 )1764t_5 = (Obj)(UInt)(t_6 != False);1765if ( t_5 ) {17661767/* req := OPERATIONS[i + 1]; */1768t_6 = GC_OPERATIONS;1769CHECK_BOUND( t_6, "OPERATIONS" )1770C_SUM_FIA( t_7, l_i, INTOBJ_INT(1) )1771CHECK_INT_POS( t_7 )1772C_ELM_LIST_FPL( t_5, t_6, t_7 )1773l_req = t_5;17741775/* break; */1776break;17771778}1779/* fi */17801781}1782/* od */17831784/* if req = false then */1785t_2 = False;1786t_1 = (Obj)(UInt)(EQ( l_req, t_2 ));1787if ( t_1 ) {17881789/* Error( "unknown operation ", NAME_FUNC( opr ) ); */1790t_1 = GF_Error;1791C_NEW_STRING( t_2, 18, "unknown operation " );1792t_4 = GF_NAME__FUNC;1793t_3 = CALL_1ARGS( t_4, l_opr );1794CHECK_FUNC_RESULT( t_3 )1795CALL_2ARGS( t_1, t_2, t_3 );17961797}1798/* fi */17991800/* imp := [ ]; */1801t_1 = NEW_PLIST( T_PLIST, 0 );1802SET_LEN_PLIST( t_1, 0 );1803l_imp = t_1;18041805/* for i in flags do */1806t_4 = l_flags;1807if ( IS_SMALL_LIST(t_4) ) {1808t_3 = (Obj)(UInt)1;1809t_1 = INTOBJ_INT(1);1810}1811else {1812t_3 = (Obj)(UInt)0;1813t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );1814}1815while ( 1 ) {1816if ( t_3 ) {1817if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;1818t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );1819t_1 = (Obj)(((UInt)t_1)+4);1820if ( t_2 == 0 ) continue;1821}1822else {1823if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;1824t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );1825}1826l_i = t_2;18271828/* ADD_LIST( imp, WITH_HIDDEN_IMPS_FLAGS( i ) ); */1829t_5 = GF_ADD__LIST;1830t_7 = GF_WITH__HIDDEN__IMPS__FLAGS;1831t_6 = CALL_1ARGS( t_7, l_i );1832CHECK_FUNC_RESULT( t_6 )1833CALL_2ARGS( t_5, l_imp, t_6 );18341835}1836/* od */18371838/* j := 0; */1839l_j = INTOBJ_INT(0);18401841/* match := false; */1842t_1 = False;1843l_match = t_1;18441845/* notmatch := 0; */1846l_notmatch = INTOBJ_INT(0);18471848/* while j < LEN_LIST( req ) and not match od */1849while ( 1 ) {1850t_4 = GF_LEN__LIST;1851t_3 = CALL_1ARGS( t_4, l_req );1852CHECK_FUNC_RESULT( t_3 )1853t_2 = (Obj)(UInt)(LT( l_j, t_3 ));1854t_1 = t_2;1855if ( t_1 ) {1856t_4 = (Obj)(UInt)(l_match != False);1857t_3 = (Obj)(UInt)( ! ((Int)t_4) );1858t_1 = t_3;1859}1860if ( ! t_1 ) break;18611862/* j := j + 1; */1863C_SUM_FIA( t_1, l_j, INTOBJ_INT(1) )1864l_j = t_1;18651866/* reqs := req[j]; */1867CHECK_INT_POS( l_j )1868C_ELM_LIST_FPL( t_1, l_req, l_j )1869l_reqs = t_1;18701871/* if LEN_LIST( reqs ) = LEN_LIST( imp ) then */1872t_3 = GF_LEN__LIST;1873t_2 = CALL_1ARGS( t_3, l_reqs );1874CHECK_FUNC_RESULT( t_2 )1875t_4 = GF_LEN__LIST;1876t_3 = CALL_1ARGS( t_4, l_imp );1877CHECK_FUNC_RESULT( t_3 )1878t_1 = (Obj)(UInt)(EQ( t_2, t_3 ));1879if ( t_1 ) {18801881/* match := true; */1882t_1 = True;1883l_match = t_1;18841885/* for i in [ 1 .. LEN_LIST( reqs ) ] do */1886t_3 = GF_LEN__LIST;1887t_2 = CALL_1ARGS( t_3, l_reqs );1888CHECK_FUNC_RESULT( t_2 )1889CHECK_INT_SMALL( t_2 )1890for ( t_1 = INTOBJ_INT(1);1891((Int)t_1) <= ((Int)t_2);1892t_1 = (Obj)(((UInt)t_1)+4) ) {1893l_i = t_1;18941895/* if not IS_SUBSET_FLAGS( imp[i], reqs[i] ) then */1896t_6 = GF_IS__SUBSET__FLAGS;1897C_ELM_LIST_FPL( t_7, l_imp, l_i )1898C_ELM_LIST_FPL( t_8, l_reqs, l_i )1899t_5 = CALL_2ARGS( t_6, t_7, t_8 );1900CHECK_FUNC_RESULT( t_5 )1901CHECK_BOOL( t_5 )1902t_4 = (Obj)(UInt)(t_5 != False);1903t_3 = (Obj)(UInt)( ! ((Int)t_4) );1904if ( t_3 ) {19051906/* match := false; */1907t_3 = False;1908l_match = t_3;19091910/* notmatch := i; */1911l_notmatch = l_i;19121913/* break; */1914break;19151916}1917/* fi */19181919}1920/* od */19211922/* if match then */1923t_1 = (Obj)(UInt)(l_match != False);1924if ( t_1 ) {19251926/* break; */1927break;19281929}1930/* fi */19311932}1933/* fi */19341935}1936/* od */19371938/* if not match then */1939t_2 = (Obj)(UInt)(l_match != False);1940t_1 = (Obj)(UInt)( ! ((Int)t_2) );1941if ( t_1 ) {19421943/* if notmatch = 0 then */1944t_1 = (Obj)(UInt)(((Int)l_notmatch) == ((Int)INTOBJ_INT(0)));1945if ( t_1 ) {19461947/* Error( "the number of arguments does not match a declaration of ", NAME_FUNC( opr ) ); */1948t_1 = GF_Error;1949C_NEW_STRING( t_2, 56, "the number of arguments does not match a declaration of " );1950t_4 = GF_NAME__FUNC;1951t_3 = CALL_1ARGS( t_4, l_opr );1952CHECK_FUNC_RESULT( t_3 )1953CALL_2ARGS( t_1, t_2, t_3 );19541955}19561957/* else */1958else {19591960/* Error( "required filters ", NamesFilter( imp[notmatch] ), "\nfor ", Ordinal( notmatch ), " argument do not match a declaration of ", NAME_FUNC( opr ) ); */1961t_1 = GF_Error;1962C_NEW_STRING( t_2, 17, "required filters " );1963t_4 = GF_NamesFilter;1964CHECK_INT_POS( l_notmatch )1965C_ELM_LIST_FPL( t_5, l_imp, l_notmatch )1966t_3 = CALL_1ARGS( t_4, t_5 );1967CHECK_FUNC_RESULT( t_3 )1968C_NEW_STRING( t_4, 5, "\nfor " );1969t_6 = GF_Ordinal;1970t_5 = CALL_1ARGS( t_6, l_notmatch );1971CHECK_FUNC_RESULT( t_5 )1972C_NEW_STRING( t_6, 40, " argument do not match a declaration of " );1973t_8 = GF_NAME__FUNC;1974t_7 = CALL_1ARGS( t_8, l_opr );1975CHECK_FUNC_RESULT( t_7 )1976CALL_6ARGS( t_1, t_2, t_3, t_4, t_5, t_6, t_7 );19771978}1979/* fi */19801981}19821983/* else */1984else {19851986/* for k in [ j + 1 .. LEN_LIST( req ) ] do */1987C_SUM_FIA( t_2, l_j, INTOBJ_INT(1) )1988CHECK_INT_SMALL( t_2 )1989t_4 = GF_LEN__LIST;1990t_3 = CALL_1ARGS( t_4, l_req );1991CHECK_FUNC_RESULT( t_3 )1992CHECK_INT_SMALL( t_3 )1993for ( t_1 = t_2;1994((Int)t_1) <= ((Int)t_3);1995t_1 = (Obj)(((UInt)t_1)+4) ) {1996l_k = t_1;19971998/* reqs := req[k]; */1999CHECK_INT_POS( l_k )2000C_ELM_LIST_FPL( t_4, l_req, l_k )2001l_reqs = t_4;20022003/* if LEN_LIST( reqs ) = LEN_LIST( imp ) then */2004t_6 = GF_LEN__LIST;2005t_5 = CALL_1ARGS( t_6, l_reqs );2006CHECK_FUNC_RESULT( t_5 )2007t_7 = GF_LEN__LIST;2008t_6 = CALL_1ARGS( t_7, l_imp );2009CHECK_FUNC_RESULT( t_6 )2010t_4 = (Obj)(UInt)(EQ( t_5, t_6 ));2011if ( t_4 ) {20122013/* match := true; */2014t_4 = True;2015l_match = t_4;20162017/* for i in [ 1 .. LEN_LIST( reqs ) ] do */2018t_6 = GF_LEN__LIST;2019t_5 = CALL_1ARGS( t_6, l_reqs );2020CHECK_FUNC_RESULT( t_5 )2021CHECK_INT_SMALL( t_5 )2022for ( t_4 = INTOBJ_INT(1);2023((Int)t_4) <= ((Int)t_5);2024t_4 = (Obj)(((UInt)t_4)+4) ) {2025l_i = t_4;20262027/* if not IS_SUBSET_FLAGS( imp[i], reqs[i] ) then */2028t_9 = GF_IS__SUBSET__FLAGS;2029C_ELM_LIST_FPL( t_10, l_imp, l_i )2030C_ELM_LIST_FPL( t_11, l_reqs, l_i )2031t_8 = CALL_2ARGS( t_9, t_10, t_11 );2032CHECK_FUNC_RESULT( t_8 )2033CHECK_BOOL( t_8 )2034t_7 = (Obj)(UInt)(t_8 != False);2035t_6 = (Obj)(UInt)( ! ((Int)t_7) );2036if ( t_6 ) {20372038/* match := false; */2039t_6 = False;2040l_match = t_6;20412042/* break; */2043break;20442045}2046/* fi */20472048}2049/* od */20502051/* if match then */2052t_4 = (Obj)(UInt)(l_match != False);2053if ( t_4 ) {20542055/* INFO_DEBUG( 1, "method installed for ", NAME_FUNC( opr ), " matches more than one declaration" ); */2056t_4 = GF_INFO__DEBUG;2057C_NEW_STRING( t_5, 21, "method installed for " );2058t_7 = GF_NAME__FUNC;2059t_6 = CALL_1ARGS( t_7, l_opr );2060CHECK_FUNC_RESULT( t_6 )2061C_NEW_STRING( t_7, 34, " matches more than one declaration" );2062CALL_4ARGS( t_4, INTOBJ_INT(1), t_5, t_6, t_7 );20632064}2065/* fi */20662067}2068/* fi */20692070}2071/* od */20722073}2074/* fi */20752076}2077/* fi */20782079/* INSTALL_METHOD_FLAGS( opr, info, rel, flags, rank, method ); */2080t_1 = GF_INSTALL__METHOD__FLAGS;2081CHECK_BOUND( l_rank, "rank" )2082CALL_6ARGS( t_1, l_opr, l_info, l_rel, l_flags, l_rank, l_method );20832084/* return; */2085RES_BRK_CURR_STAT();2086SWITCH_TO_OLD_FRAME(oldFrame);2087return 0;20882089/* return; */2090RES_BRK_CURR_STAT();2091SWITCH_TO_OLD_FRAME(oldFrame);2092return 0;2093}20942095/* handler for function 8 */2096static Obj HdlrFunc8 (2097Obj self,2098Obj a_obj )2099{2100Obj l_found = 0;2101Obj l_prop = 0;2102Obj t_1 = 0;2103Obj t_2 = 0;2104Obj t_3 = 0;2105Obj t_4 = 0;2106Obj t_5 = 0;2107Obj t_6 = 0;2108Obj t_7 = 0;2109Obj t_8 = 0;2110Obj t_9 = 0;2111Obj t_10 = 0;2112Obj t_11 = 0;2113Bag oldFrame;2114OLD_BRK_CURR_STAT21152116/* allocate new stack frame */2117SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);2118REM_BRK_CURR_STAT();2119SET_BRK_CURR_STAT(0);21202121/* found := false; */2122t_1 = False;2123l_found = t_1;21242125/* for prop in props do */2126t_4 = OBJ_LVAR_1UP( 2 );2127CHECK_BOUND( t_4, "props" )2128if ( IS_SMALL_LIST(t_4) ) {2129t_3 = (Obj)(UInt)1;2130t_1 = INTOBJ_INT(1);2131}2132else {2133t_3 = (Obj)(UInt)0;2134t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );2135}2136while ( 1 ) {2137if ( t_3 ) {2138if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;2139t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );2140t_1 = (Obj)(((UInt)t_1)+4);2141if ( t_2 == 0 ) continue;2142}2143else {2144if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;2145t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );2146}2147l_prop = t_2;21482149/* if not Tester( prop )( obj ) then */2150t_9 = GF_Tester;2151t_8 = CALL_1ARGS( t_9, l_prop );2152CHECK_FUNC_RESULT( t_8 )2153CHECK_FUNC( t_8 )2154t_7 = CALL_1ARGS( t_8, a_obj );2155CHECK_FUNC_RESULT( t_7 )2156CHECK_BOOL( t_7 )2157t_6 = (Obj)(UInt)(t_7 != False);2158t_5 = (Obj)(UInt)( ! ((Int)t_6) );2159if ( t_5 ) {21602161/* found := true; */2162t_5 = True;2163l_found = t_5;21642165/* if not (prop( obj ) and Tester( prop )( obj )) then */2166CHECK_FUNC( l_prop )2167t_8 = CALL_1ARGS( l_prop, a_obj );2168CHECK_FUNC_RESULT( t_8 )2169CHECK_BOOL( t_8 )2170t_7 = (Obj)(UInt)(t_8 != False);2171t_6 = t_7;2172if ( t_6 ) {2173t_11 = GF_Tester;2174t_10 = CALL_1ARGS( t_11, l_prop );2175CHECK_FUNC_RESULT( t_10 )2176CHECK_FUNC( t_10 )2177t_9 = CALL_1ARGS( t_10, a_obj );2178CHECK_FUNC_RESULT( t_9 )2179CHECK_BOOL( t_9 )2180t_8 = (Obj)(UInt)(t_9 != False);2181t_6 = t_8;2182}2183t_5 = (Obj)(UInt)( ! ((Int)t_6) );2184if ( t_5 ) {21852186/* return TRY_NEXT_METHOD; */2187t_5 = GC_TRY__NEXT__METHOD;2188CHECK_BOUND( t_5, "TRY_NEXT_METHOD" )2189RES_BRK_CURR_STAT();2190SWITCH_TO_OLD_FRAME(oldFrame);2191return t_5;21922193}2194/* fi */21952196}2197/* fi */21982199}2200/* od */22012202/* if found then */2203t_1 = (Obj)(UInt)(l_found != False);2204if ( t_1 ) {22052206/* return getter( obj ); */2207t_2 = OBJ_LVAR_1UP( 1 );2208CHECK_BOUND( t_2, "getter" )2209CHECK_FUNC( t_2 )2210t_1 = CALL_1ARGS( t_2, a_obj );2211CHECK_FUNC_RESULT( t_1 )2212RES_BRK_CURR_STAT();2213SWITCH_TO_OLD_FRAME(oldFrame);2214return t_1;22152216}22172218/* else */2219else {22202221/* return TRY_NEXT_METHOD; */2222t_1 = GC_TRY__NEXT__METHOD;2223CHECK_BOUND( t_1, "TRY_NEXT_METHOD" )2224RES_BRK_CURR_STAT();2225SWITCH_TO_OLD_FRAME(oldFrame);2226return t_1;22272228}2229/* fi */22302231/* return; */2232RES_BRK_CURR_STAT();2233SWITCH_TO_OLD_FRAME(oldFrame);2234return 0;22352236/* return; */2237RES_BRK_CURR_STAT();2238SWITCH_TO_OLD_FRAME(oldFrame);2239return 0;2240}22412242/* handler for function 7 */2243static Obj HdlrFunc7 (2244Obj self,2245Obj a_name,2246Obj a_filter,2247Obj a_getter,2248Obj a_setter,2249Obj a_tester,2250Obj a_mutflag )2251{2252Obj l_flags = 0;2253Obj l_rank = 0;2254Obj l_cats = 0;2255Obj l_i = 0;2256Obj t_1 = 0;2257Obj t_2 = 0;2258Obj t_3 = 0;2259Obj t_4 = 0;2260Obj t_5 = 0;2261Obj t_6 = 0;2262Obj t_7 = 0;2263Bag oldFrame;2264OLD_BRK_CURR_STAT22652266/* allocate new stack frame */2267SWITCH_TO_NEW_FRAME(self,2,0,oldFrame);2268ASS_LVAR( 1, a_getter );2269REM_BRK_CURR_STAT();2270SET_BRK_CURR_STAT(0);22712272/* if not IS_IDENTICAL_OBJ( filter, IS_OBJECT ) then */2273t_4 = GF_IS__IDENTICAL__OBJ;2274t_5 = GC_IS__OBJECT;2275CHECK_BOUND( t_5, "IS_OBJECT" )2276t_3 = CALL_2ARGS( t_4, a_filter, t_5 );2277CHECK_FUNC_RESULT( t_3 )2278CHECK_BOOL( t_3 )2279t_2 = (Obj)(UInt)(t_3 != False);2280t_1 = (Obj)(UInt)( ! ((Int)t_2) );2281if ( t_1 ) {22822283/* flags := FLAGS_FILTER( filter ); */2284t_2 = GF_FLAGS__FILTER;2285t_1 = CALL_1ARGS( t_2, a_filter );2286CHECK_FUNC_RESULT( t_1 )2287l_flags = t_1;22882289/* rank := 0; */2290l_rank = INTOBJ_INT(0);22912292/* cats := IS_OBJECT; */2293t_1 = GC_IS__OBJECT;2294CHECK_BOUND( t_1, "IS_OBJECT" )2295l_cats = t_1;22962297/* props := [ ]; */2298t_1 = NEW_PLIST( T_PLIST, 0 );2299SET_LEN_PLIST( t_1, 0 );2300ASS_LVAR( 2, t_1 );23012302/* for i in [ 1 .. LEN_FLAGS( flags ) ] do */2303t_3 = GF_LEN__FLAGS;2304t_2 = CALL_1ARGS( t_3, l_flags );2305CHECK_FUNC_RESULT( t_2 )2306CHECK_INT_SMALL( t_2 )2307for ( t_1 = INTOBJ_INT(1);2308((Int)t_1) <= ((Int)t_2);2309t_1 = (Obj)(((UInt)t_1)+4) ) {2310l_i = t_1;23112312/* if ELM_FLAGS( flags, i ) then */2313t_5 = GF_ELM__FLAGS;2314t_4 = CALL_2ARGS( t_5, l_flags, l_i );2315CHECK_FUNC_RESULT( t_4 )2316CHECK_BOOL( t_4 )2317t_3 = (Obj)(UInt)(t_4 != False);2318if ( t_3 ) {23192320/* if i in CATS_AND_REPS then */2321t_4 = GC_CATS__AND__REPS;2322CHECK_BOUND( t_4, "CATS_AND_REPS" )2323t_3 = (Obj)(UInt)(IN( l_i, t_4 ));2324if ( t_3 ) {23252326/* cats := cats and FILTERS[i]; */2327if ( l_cats == False ) {2328t_3 = l_cats;2329}2330else if ( l_cats == True ) {2331t_5 = GC_FILTERS;2332CHECK_BOUND( t_5, "FILTERS" )2333C_ELM_LIST_FPL( t_4, t_5, l_i )2334CHECK_BOOL( t_4 )2335t_3 = t_4;2336}2337else {2338CHECK_FUNC( l_cats )2339t_6 = GC_FILTERS;2340CHECK_BOUND( t_6, "FILTERS" )2341C_ELM_LIST_FPL( t_5, t_6, l_i )2342CHECK_FUNC( t_5 )2343t_3 = NewAndFilter( l_cats, t_5 );2344}2345l_cats = t_3;23462347/* rank := rank - RankFilter( FILTERS[i] ); */2348t_5 = GF_RankFilter;2349t_7 = GC_FILTERS;2350CHECK_BOUND( t_7, "FILTERS" )2351C_ELM_LIST_FPL( t_6, t_7, l_i )2352t_4 = CALL_1ARGS( t_5, t_6 );2353CHECK_FUNC_RESULT( t_4 )2354C_DIFF_FIA( t_3, l_rank, t_4 )2355l_rank = t_3;23562357}23582359/* elif i in NUMBERS_PROPERTY_GETTERS then */2360else {2361t_4 = GC_NUMBERS__PROPERTY__GETTERS;2362CHECK_BOUND( t_4, "NUMBERS_PROPERTY_GETTERS" )2363t_3 = (Obj)(UInt)(IN( l_i, t_4 ));2364if ( t_3 ) {23652366/* ADD_LIST( props, FILTERS[i] ); */2367t_3 = GF_ADD__LIST;2368t_4 = OBJ_LVAR( 2 );2369CHECK_BOUND( t_4, "props" )2370t_6 = GC_FILTERS;2371CHECK_BOUND( t_6, "FILTERS" )2372C_ELM_LIST_FPL( t_5, t_6, l_i )2373CALL_2ARGS( t_3, t_4, t_5 );23742375}2376}2377/* fi */23782379}2380/* fi */23812382}2383/* od */23842385/* if 0 < LEN_LIST( props ) then */2386t_3 = GF_LEN__LIST;2387t_4 = OBJ_LVAR( 2 );2388CHECK_BOUND( t_4, "props" )2389t_2 = CALL_1ARGS( t_3, t_4 );2390CHECK_FUNC_RESULT( t_2 )2391t_1 = (Obj)(UInt)(LT( INTOBJ_INT(0), t_2 ));2392if ( t_1 ) {23932394/* InstallOtherMethod( getter, "default method requiring categories and checking properties", true, [ cats ], rank, function ( obj )2395local found, prop;2396found := false;2397for prop in props do2398if not Tester( prop )( obj ) then2399found := true;2400if not (prop( obj ) and Tester( prop )( obj )) then2401return TRY_NEXT_METHOD;2402fi;2403fi;2404od;2405if found then2406return getter( obj );2407else2408return TRY_NEXT_METHOD;2409fi;2410return;2411end ); */2412t_1 = GF_InstallOtherMethod;2413t_2 = OBJ_LVAR( 1 );2414CHECK_BOUND( t_2, "getter" )2415C_NEW_STRING( t_3, 59, "default method requiring categories and checking properties" );2416t_4 = True;2417t_5 = NEW_PLIST( T_PLIST, 1 );2418SET_LEN_PLIST( t_5, 1 );2419SET_ELM_PLIST( t_5, 1, l_cats );2420CHANGED_BAG( t_5 );2421t_6 = NewFunction( NameFunc[8], NargFunc[8], NamsFunc[8], HdlrFunc8 );2422ENVI_FUNC( t_6 ) = TLS(CurrLVars);2423t_7 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );2424STARTLINE_BODY(t_7) = INTOBJ_INT(577);2425ENDLINE_BODY(t_7) = INTOBJ_INT(595);2426FILENAME_BODY(t_7) = FileName;2427BODY_FUNC(t_6) = t_7;2428CHANGED_BAG( TLS(CurrLVars) );2429CALL_6ARGS( t_1, t_2, t_3, t_4, t_5, l_rank, t_6 );24302431}2432/* fi */24332434}2435/* fi */24362437/* return; */2438RES_BRK_CURR_STAT();2439SWITCH_TO_OLD_FRAME(oldFrame);2440return 0;24412442/* return; */2443RES_BRK_CURR_STAT();2444SWITCH_TO_OLD_FRAME(oldFrame);2445return 0;2446}24472448/* handler for function 9 */2449static Obj HdlrFunc9 (2450Obj self,2451Obj a_name,2452Obj a_filter,2453Obj a_getter,2454Obj a_setter,2455Obj a_tester,2456Obj a_mutflag )2457{2458Obj t_1 = 0;2459Obj t_2 = 0;2460Obj t_3 = 0;2461Obj t_4 = 0;2462Obj t_5 = 0;2463Bag oldFrame;2464OLD_BRK_CURR_STAT24652466/* allocate new stack frame */2467SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);2468REM_BRK_CURR_STAT();2469SET_BRK_CURR_STAT(0);24702471/* InstallOtherMethod( setter, "default method, does nothing", true, [ IS_OBJECT, IS_OBJECT ], 0, DO_NOTHING_SETTER ); */2472t_1 = GF_InstallOtherMethod;2473C_NEW_STRING( t_2, 28, "default method, does nothing" );2474t_3 = True;2475t_4 = NEW_PLIST( T_PLIST, 2 );2476SET_LEN_PLIST( t_4, 2 );2477t_5 = GC_IS__OBJECT;2478CHECK_BOUND( t_5, "IS_OBJECT" )2479SET_ELM_PLIST( t_4, 1, t_5 );2480CHANGED_BAG( t_4 );2481t_5 = GC_IS__OBJECT;2482CHECK_BOUND( t_5, "IS_OBJECT" )2483SET_ELM_PLIST( t_4, 2, t_5 );2484CHANGED_BAG( t_4 );2485t_5 = GC_DO__NOTHING__SETTER;2486CHECK_BOUND( t_5, "DO_NOTHING_SETTER" )2487CALL_6ARGS( t_1, a_setter, t_2, t_3, t_4, INTOBJ_INT(0), t_5 );24882489/* return; */2490RES_BRK_CURR_STAT();2491SWITCH_TO_OLD_FRAME(oldFrame);2492return 0;24932494/* return; */2495RES_BRK_CURR_STAT();2496SWITCH_TO_OLD_FRAME(oldFrame);2497return 0;2498}24992500/* handler for function 11 */2501static Obj HdlrFunc11 (2502Obj self,2503Obj a_key )2504{2505Obj t_1 = 0;2506Obj t_2 = 0;2507Obj t_3 = 0;2508Obj t_4 = 0;2509Bag oldFrame;2510OLD_BRK_CURR_STAT25112512/* allocate new stack frame */2513SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);2514REM_BRK_CURR_STAT();2515SET_BRK_CURR_STAT(0);25162517/* if not IsPrimeInt( key ) then */2518t_4 = GF_IsPrimeInt;2519t_3 = CALL_1ARGS( t_4, a_key );2520CHECK_FUNC_RESULT( t_3 )2521CHECK_BOOL( t_3 )2522t_2 = (Obj)(UInt)(t_3 != False);2523t_1 = (Obj)(UInt)( ! ((Int)t_2) );2524if ( t_1 ) {25252526/* Error( name, ": <p> must be a prime" ); */2527t_1 = GF_Error;2528t_2 = OBJ_LVAR_1UP( 1 );2529CHECK_BOUND( t_2, "name" )2530C_NEW_STRING( t_3, 21, ": <p> must be a prime" );2531CALL_2ARGS( t_1, t_2, t_3 );25322533}2534/* fi */25352536/* return; */2537RES_BRK_CURR_STAT();2538SWITCH_TO_OLD_FRAME(oldFrame);2539return 0;25402541/* return; */2542RES_BRK_CURR_STAT();2543SWITCH_TO_OLD_FRAME(oldFrame);2544return 0;2545}25462547/* handler for function 12 */2548static Obj HdlrFunc12 (2549Obj self,2550Obj a_D )2551{2552Obj t_1 = 0;2553Bag oldFrame;2554OLD_BRK_CURR_STAT25552556/* allocate new stack frame */2557SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);2558REM_BRK_CURR_STAT();2559SET_BRK_CURR_STAT(0);25602561/* return [ ]; */2562t_1 = NEW_PLIST( T_PLIST, 0 );2563SET_LEN_PLIST( t_1, 0 );2564RES_BRK_CURR_STAT();2565SWITCH_TO_OLD_FRAME(oldFrame);2566return t_1;25672568/* return; */2569RES_BRK_CURR_STAT();2570SWITCH_TO_OLD_FRAME(oldFrame);2571return 0;2572}25732574/* handler for function 13 */2575static Obj HdlrFunc13 (2576Obj self,2577Obj a_D,2578Obj a_key )2579{2580Obj l_known = 0;2581Obj l_i = 0;2582Obj l_erg = 0;2583Obj t_1 = 0;2584Obj t_2 = 0;2585Obj t_3 = 0;2586Obj t_4 = 0;2587Obj t_5 = 0;2588Bag oldFrame;2589OLD_BRK_CURR_STAT25902591/* allocate new stack frame */2592SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);2593REM_BRK_CURR_STAT();2594SET_BRK_CURR_STAT(0);25952596/* keytest( key ); */2597t_1 = OBJ_LVAR_1UP( 2 );2598CHECK_BOUND( t_1, "keytest" )2599CHECK_FUNC( t_1 )2600CALL_1ARGS( t_1, a_key );26012602/* known := attr( D ); */2603t_2 = OBJ_LVAR_1UP( 4 );2604CHECK_BOUND( t_2, "attr" )2605CHECK_FUNC( t_2 )2606t_1 = CALL_1ARGS( t_2, a_D );2607CHECK_FUNC_RESULT( t_1 )2608l_known = t_1;26092610/* i := 1; */2611l_i = INTOBJ_INT(1);26122613/* while i < LEN_LIST( known ) and known[i] < key od */2614while ( 1 ) {2615t_4 = GF_LEN__LIST;2616t_3 = CALL_1ARGS( t_4, l_known );2617CHECK_FUNC_RESULT( t_3 )2618t_2 = (Obj)(UInt)(LT( l_i, t_3 ));2619t_1 = t_2;2620if ( t_1 ) {2621CHECK_INT_POS( l_i )2622C_ELM_LIST_FPL( t_4, l_known, l_i )2623t_3 = (Obj)(UInt)(LT( t_4, a_key ));2624t_1 = t_3;2625}2626if ( ! t_1 ) break;26272628/* i := i + 2; */2629C_SUM_FIA( t_1, l_i, INTOBJ_INT(2) )2630l_i = t_1;26312632}2633/* od */26342635/* if LEN_LIST( known ) < i or known[i] <> key then */2636t_4 = GF_LEN__LIST;2637t_3 = CALL_1ARGS( t_4, l_known );2638CHECK_FUNC_RESULT( t_3 )2639t_2 = (Obj)(UInt)(LT( t_3, l_i ));2640t_1 = t_2;2641if ( ! t_1 ) {2642CHECK_INT_POS( l_i )2643C_ELM_LIST_FPL( t_4, l_known, l_i )2644t_3 = (Obj)(UInt)( ! EQ( t_4, a_key ));2645t_1 = t_3;2646}2647if ( t_1 ) {26482649/* erg := oper( D, key ); */2650t_2 = OBJ_LVAR_1UP( 3 );2651CHECK_BOUND( t_2, "oper" )2652CHECK_FUNC( t_2 )2653t_1 = CALL_2ARGS( t_2, a_D, a_key );2654CHECK_FUNC_RESULT( t_1 )2655l_erg = t_1;26562657/* known{[ i + 2 .. LEN_LIST( known ) + 2 ]} := known{[ i .. LEN_LIST( known ) ]}; */2658C_SUM_FIA( t_2, l_i, INTOBJ_INT(2) )2659t_5 = GF_LEN__LIST;2660t_4 = CALL_1ARGS( t_5, l_known );2661CHECK_FUNC_RESULT( t_4 )2662C_SUM_FIA( t_3, t_4, INTOBJ_INT(2) )2663t_1 = Range2Check( t_2, t_3 );2664t_5 = GF_LEN__LIST;2665t_4 = CALL_1ARGS( t_5, l_known );2666CHECK_FUNC_RESULT( t_4 )2667t_3 = Range2Check( l_i, t_4 );2668t_2 = ElmsListCheck( l_known, t_3 );2669AsssListCheck( l_known, t_1, t_2 );26702671/* known[i] := key; */2672CHECK_INT_POS( l_i )2673C_ASS_LIST_FPL( l_known, l_i, a_key )26742675/* known[i + 1] := erg; */2676C_SUM_FIA( t_1, l_i, INTOBJ_INT(1) )2677CHECK_INT_POS( t_1 )2678C_ASS_LIST_FPL( l_known, t_1, l_erg )26792680}2681/* fi */26822683/* return known[i + 1]; */2684C_SUM_FIA( t_2, l_i, INTOBJ_INT(1) )2685CHECK_INT_POS( t_2 )2686C_ELM_LIST_FPL( t_1, l_known, t_2 )2687RES_BRK_CURR_STAT();2688SWITCH_TO_OLD_FRAME(oldFrame);2689return t_1;26902691/* return; */2692RES_BRK_CURR_STAT();2693SWITCH_TO_OLD_FRAME(oldFrame);2694return 0;2695}26962697/* handler for function 10 */2698static Obj HdlrFunc10 (2699Obj self,2700Obj a_name,2701Obj a_domreq,2702Obj a_keyreq,2703Obj a_keytest )2704{2705Obj l_str = 0;2706Obj t_1 = 0;2707Obj t_2 = 0;2708Obj t_3 = 0;2709Obj t_4 = 0;2710Obj t_5 = 0;2711Obj t_6 = 0;2712Obj t_7 = 0;2713Bag oldFrame;2714OLD_BRK_CURR_STAT27152716/* allocate new stack frame */2717SWITCH_TO_NEW_FRAME(self,4,0,oldFrame);2718ASS_LVAR( 1, a_name );2719ASS_LVAR( 2, a_keytest );2720REM_BRK_CURR_STAT();2721SET_BRK_CURR_STAT(0);27222723/* if keytest = "prime" then */2724t_2 = OBJ_LVAR( 2 );2725CHECK_BOUND( t_2, "keytest" )2726C_NEW_STRING( t_3, 5, "prime" );2727t_1 = (Obj)(UInt)(EQ( t_2, t_3 ));2728if ( t_1 ) {27292730/* keytest := function ( key )2731if not IsPrimeInt( key ) then2732Error( name, ": <p> must be a prime" );2733fi;2734return;2735end; */2736t_1 = NewFunction( NameFunc[11], NargFunc[11], NamsFunc[11], HdlrFunc11 );2737ENVI_FUNC( t_1 ) = TLS(CurrLVars);2738t_2 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );2739STARTLINE_BODY(t_2) = INTOBJ_INT(732);2740ENDLINE_BODY(t_2) = INTOBJ_INT(736);2741FILENAME_BODY(t_2) = FileName;2742BODY_FUNC(t_1) = t_2;2743CHANGED_BAG( TLS(CurrLVars) );2744ASS_LVAR( 2, t_1 );27452746}2747/* fi */27482749/* str := SHALLOW_COPY_OBJ( name ); */2750t_2 = GF_SHALLOW__COPY__OBJ;2751t_3 = OBJ_LVAR( 1 );2752CHECK_BOUND( t_3, "name" )2753t_1 = CALL_1ARGS( t_2, t_3 );2754CHECK_FUNC_RESULT( t_1 )2755l_str = t_1;27562757/* APPEND_LIST_INTR( str, "Op" ); */2758t_1 = GF_APPEND__LIST__INTR;2759C_NEW_STRING( t_2, 2, "Op" );2760CALL_2ARGS( t_1, l_str, t_2 );27612762/* DeclareOperation( str, [ domreq, keyreq ] ); */2763t_1 = GF_DeclareOperation;2764t_2 = NEW_PLIST( T_PLIST, 2 );2765SET_LEN_PLIST( t_2, 2 );2766SET_ELM_PLIST( t_2, 1, a_domreq );2767CHANGED_BAG( t_2 );2768SET_ELM_PLIST( t_2, 2, a_keyreq );2769CHANGED_BAG( t_2 );2770CALL_2ARGS( t_1, l_str, t_2 );27712772/* oper := VALUE_GLOBAL( str ); */2773t_2 = GF_VALUE__GLOBAL;2774t_1 = CALL_1ARGS( t_2, l_str );2775CHECK_FUNC_RESULT( t_1 )2776ASS_LVAR( 3, t_1 );27772778/* str := "Computed"; */2779C_NEW_STRING( t_1, 8, "Computed" );2780l_str = t_1;27812782/* APPEND_LIST_INTR( str, name ); */2783t_1 = GF_APPEND__LIST__INTR;2784t_2 = OBJ_LVAR( 1 );2785CHECK_BOUND( t_2, "name" )2786CALL_2ARGS( t_1, l_str, t_2 );27872788/* APPEND_LIST_INTR( str, "s" ); */2789t_1 = GF_APPEND__LIST__INTR;2790C_NEW_STRING( t_2, 1, "s" );2791CALL_2ARGS( t_1, l_str, t_2 );27922793/* DeclareAttribute( str, domreq, "mutable" ); */2794t_1 = GF_DeclareAttribute;2795C_NEW_STRING( t_2, 7, "mutable" );2796CALL_3ARGS( t_1, l_str, a_domreq, t_2 );27972798/* attr := VALUE_GLOBAL( str ); */2799t_2 = GF_VALUE__GLOBAL;2800t_1 = CALL_1ARGS( t_2, l_str );2801CHECK_FUNC_RESULT( t_1 )2802ASS_LVAR( 4, t_1 );28032804/* InstallMethod( attr, "default method", true, [ domreq ], 0, function ( D )2805return [ ];2806end ); */2807t_1 = GF_InstallMethod;2808t_2 = OBJ_LVAR( 4 );2809CHECK_BOUND( t_2, "attr" )2810C_NEW_STRING( t_3, 14, "default method" );2811t_4 = True;2812t_5 = NEW_PLIST( T_PLIST, 1 );2813SET_LEN_PLIST( t_5, 1 );2814SET_ELM_PLIST( t_5, 1, a_domreq );2815CHANGED_BAG( t_5 );2816t_6 = NewFunction( NameFunc[12], NargFunc[12], NamsFunc[12], HdlrFunc12 );2817ENVI_FUNC( t_6 ) = TLS(CurrLVars);2818t_7 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );2819STARTLINE_BODY(t_7) = INTOBJ_INT(753);2820ENDLINE_BODY(t_7) = INTOBJ_INT(753);2821FILENAME_BODY(t_7) = FileName;2822BODY_FUNC(t_6) = t_7;2823CHANGED_BAG( TLS(CurrLVars) );2824CALL_6ARGS( t_1, t_2, t_3, t_4, t_5, INTOBJ_INT(0), t_6 );28252826/* DeclareOperation( name, [ domreq, keyreq ] ); */2827t_1 = GF_DeclareOperation;2828t_2 = OBJ_LVAR( 1 );2829CHECK_BOUND( t_2, "name" )2830t_3 = NEW_PLIST( T_PLIST, 2 );2831SET_LEN_PLIST( t_3, 2 );2832SET_ELM_PLIST( t_3, 1, a_domreq );2833CHANGED_BAG( t_3 );2834SET_ELM_PLIST( t_3, 2, a_keyreq );2835CHANGED_BAG( t_3 );2836CALL_2ARGS( t_1, t_2, t_3 );28372838/* ADD_LIST( WRAPPER_OPERATIONS, VALUE_GLOBAL( name ) ); */2839t_1 = GF_ADD__LIST;2840t_2 = GC_WRAPPER__OPERATIONS;2841CHECK_BOUND( t_2, "WRAPPER_OPERATIONS" )2842t_4 = GF_VALUE__GLOBAL;2843t_5 = OBJ_LVAR( 1 );2844CHECK_BOUND( t_5, "name" )2845t_3 = CALL_1ARGS( t_4, t_5 );2846CHECK_FUNC_RESULT( t_3 )2847CALL_2ARGS( t_1, t_2, t_3 );28482849/* InstallOtherMethod( VALUE_GLOBAL( name ), "default method", true, [ domreq, keyreq ], 0, function ( D, key )2850local known, i, erg;2851keytest( key );2852known := attr( D );2853i := 1;2854while i < LEN_LIST( known ) and known[i] < key do2855i := i + 2;2856od;2857if LEN_LIST( known ) < i or known[i] <> key then2858erg := oper( D, key );2859known{[ i + 2 .. LEN_LIST( known ) + 2 ]} := known{[ i .. LEN_LIST( known ) ]};2860known[i] := key;2861known[i + 1] := erg;2862fi;2863return known[i + 1];2864end ); */2865t_1 = GF_InstallOtherMethod;2866t_3 = GF_VALUE__GLOBAL;2867t_4 = OBJ_LVAR( 1 );2868CHECK_BOUND( t_4, "name" )2869t_2 = CALL_1ARGS( t_3, t_4 );2870CHECK_FUNC_RESULT( t_2 )2871C_NEW_STRING( t_3, 14, "default method" );2872t_4 = True;2873t_5 = NEW_PLIST( T_PLIST, 2 );2874SET_LEN_PLIST( t_5, 2 );2875SET_ELM_PLIST( t_5, 1, a_domreq );2876CHANGED_BAG( t_5 );2877SET_ELM_PLIST( t_5, 2, a_keyreq );2878CHANGED_BAG( t_5 );2879t_6 = NewFunction( NameFunc[13], NargFunc[13], NamsFunc[13], HdlrFunc13 );2880ENVI_FUNC( t_6 ) = TLS(CurrLVars);2881t_7 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );2882STARTLINE_BODY(t_7) = INTOBJ_INT(766);2883ENDLINE_BODY(t_7) = INTOBJ_INT(787);2884FILENAME_BODY(t_7) = FileName;2885BODY_FUNC(t_6) = t_7;2886CHANGED_BAG( TLS(CurrLVars) );2887CALL_6ARGS( t_1, t_2, t_3, t_4, t_5, INTOBJ_INT(0), t_6 );28882889/* return; */2890RES_BRK_CURR_STAT();2891SWITCH_TO_OLD_FRAME(oldFrame);2892return 0;28932894/* return; */2895RES_BRK_CURR_STAT();2896SWITCH_TO_OLD_FRAME(oldFrame);2897return 0;2898}28992900/* handler for function 15 */2901static Obj HdlrFunc15 (2902Obj self,2903Obj a_arg )2904{2905Obj t_1 = 0;2906Obj t_2 = 0;2907Obj t_3 = 0;2908Obj t_4 = 0;2909Obj t_5 = 0;2910Obj t_6 = 0;2911Obj t_7 = 0;2912Obj t_8 = 0;2913Obj t_9 = 0;2914Obj t_10 = 0;2915Obj t_11 = 0;2916Obj t_12 = 0;2917Obj t_13 = 0;2918Obj t_14 = 0;2919Obj t_15 = 0;2920Obj t_16 = 0;2921Obj t_17 = 0;2922Obj t_18 = 0;2923Bag oldFrame;2924OLD_BRK_CURR_STAT29252926/* allocate new stack frame */2927SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);2928REM_BRK_CURR_STAT();2929SET_BRK_CURR_STAT(0);29302931/* re := false; */2932t_1 = False;2933ASS_LVAR_1UP( 4, t_1 );29342935/* for i in [ 1 .. LEN_LIST( reqs ) ] do */2936t_6 = GF_LEN__LIST;2937t_7 = OBJ_LVAR_1UP( 2 );2938CHECK_BOUND( t_7, "reqs" )2939t_5 = CALL_1ARGS( t_6, t_7 );2940CHECK_FUNC_RESULT( t_5 )2941t_4 = Range2Check( INTOBJ_INT(1), t_5 );2942if ( IS_SMALL_LIST(t_4) ) {2943t_3 = (Obj)(UInt)1;2944t_1 = INTOBJ_INT(1);2945}2946else {2947t_3 = (Obj)(UInt)0;2948t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );2949}2950while ( 1 ) {2951if ( t_3 ) {2952if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;2953t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );2954t_1 = (Obj)(((UInt)t_1)+4);2955if ( t_2 == 0 ) continue;2956}2957else {2958if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;2959t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );2960}2961ASS_LVAR_1UP( 5, t_2 );29622963/* re := re or IsBound( cond[i] ) and not Tester( cond[i] )( arg[i] ) and cond[i]( arg[i] ) and Tester( cond[i] )( arg[i] ); */2964t_7 = OBJ_LVAR_1UP( 4 );2965CHECK_BOUND( t_7, "re" )2966CHECK_BOOL( t_7 )2967t_6 = (Obj)(UInt)(t_7 != False);2968t_5 = (t_6 ? True : False);2969if ( t_5 == False ) {2970t_12 = OBJ_LVAR_1UP( 3 );2971CHECK_BOUND( t_12, "cond" )2972t_13 = OBJ_LVAR_1UP( 5 );2973CHECK_BOUND( t_13, "i" )2974CHECK_INT_POS( t_13 )2975t_11 = C_ISB_LIST( t_12, t_13 );2976t_10 = (Obj)(UInt)(t_11 != False);2977t_9 = t_10;2978if ( t_9 ) {2979t_15 = GF_Tester;2980t_17 = OBJ_LVAR_1UP( 3 );2981CHECK_BOUND( t_17, "cond" )2982t_18 = OBJ_LVAR_1UP( 5 );2983CHECK_BOUND( t_18, "i" )2984CHECK_INT_POS( t_18 )2985C_ELM_LIST_FPL( t_16, t_17, t_18 )2986t_14 = CALL_1ARGS( t_15, t_16 );2987CHECK_FUNC_RESULT( t_14 )2988CHECK_FUNC( t_14 )2989t_16 = OBJ_LVAR_1UP( 5 );2990CHECK_BOUND( t_16, "i" )2991CHECK_INT_POS( t_16 )2992C_ELM_LIST_FPL( t_15, a_arg, t_16 )2993t_13 = CALL_1ARGS( t_14, t_15 );2994CHECK_FUNC_RESULT( t_13 )2995CHECK_BOOL( t_13 )2996t_12 = (Obj)(UInt)(t_13 != False);2997t_11 = (Obj)(UInt)( ! ((Int)t_12) );2998t_9 = t_11;2999}3000t_8 = t_9;3001if ( t_8 ) {3002t_13 = OBJ_LVAR_1UP( 3 );3003CHECK_BOUND( t_13, "cond" )3004t_14 = OBJ_LVAR_1UP( 5 );3005CHECK_BOUND( t_14, "i" )3006CHECK_INT_POS( t_14 )3007C_ELM_LIST_FPL( t_12, t_13, t_14 )3008CHECK_FUNC( t_12 )3009t_14 = OBJ_LVAR_1UP( 5 );3010CHECK_BOUND( t_14, "i" )3011CHECK_INT_POS( t_14 )3012C_ELM_LIST_FPL( t_13, a_arg, t_14 )3013t_11 = CALL_1ARGS( t_12, t_13 );3014CHECK_FUNC_RESULT( t_11 )3015CHECK_BOOL( t_11 )3016t_10 = (Obj)(UInt)(t_11 != False);3017t_8 = t_10;3018}3019t_7 = t_8;3020if ( t_7 ) {3021t_12 = GF_Tester;3022t_14 = OBJ_LVAR_1UP( 3 );3023CHECK_BOUND( t_14, "cond" )3024t_15 = OBJ_LVAR_1UP( 5 );3025CHECK_BOUND( t_15, "i" )3026CHECK_INT_POS( t_15 )3027C_ELM_LIST_FPL( t_13, t_14, t_15 )3028t_11 = CALL_1ARGS( t_12, t_13 );3029CHECK_FUNC_RESULT( t_11 )3030CHECK_FUNC( t_11 )3031t_13 = OBJ_LVAR_1UP( 5 );3032CHECK_BOUND( t_13, "i" )3033CHECK_INT_POS( t_13 )3034C_ELM_LIST_FPL( t_12, a_arg, t_13 )3035t_10 = CALL_1ARGS( t_11, t_12 );3036CHECK_FUNC_RESULT( t_10 )3037CHECK_BOOL( t_10 )3038t_9 = (Obj)(UInt)(t_10 != False);3039t_7 = t_9;3040}3041t_5 = (t_7 ? True : False);3042}3043ASS_LVAR_1UP( 4, t_5 );30443045}3046/* od */30473048/* if re then */3049t_2 = OBJ_LVAR_1UP( 4 );3050CHECK_BOUND( t_2, "re" )3051CHECK_BOOL( t_2 )3052t_1 = (Obj)(UInt)(t_2 != False);3053if ( t_1 ) {30543055/* return CallFuncList( oper, arg ); */3056t_2 = GF_CallFuncList;3057t_3 = OBJ_LVAR_1UP( 1 );3058CHECK_BOUND( t_3, "oper" )3059t_1 = CALL_2ARGS( t_2, t_3, a_arg );3060CHECK_FUNC_RESULT( t_1 )3061RES_BRK_CURR_STAT();3062SWITCH_TO_OLD_FRAME(oldFrame);3063return t_1;30643065}30663067/* else */3068else {30693070/* return TRY_NEXT_METHOD; */3071t_1 = GC_TRY__NEXT__METHOD;3072CHECK_BOUND( t_1, "TRY_NEXT_METHOD" )3073RES_BRK_CURR_STAT();3074SWITCH_TO_OLD_FRAME(oldFrame);3075return t_1;30763077}3078/* fi */30793080/* return; */3081RES_BRK_CURR_STAT();3082SWITCH_TO_OLD_FRAME(oldFrame);3083return 0;30843085/* return; */3086RES_BRK_CURR_STAT();3087SWITCH_TO_OLD_FRAME(oldFrame);3088return 0;3089}30903091/* handler for function 14 */3092static Obj HdlrFunc14 (3093Obj self,3094Obj a_arg )3095{3096Obj l_info = 0;3097Obj l_fampred = 0;3098Obj l_val = 0;3099Obj t_1 = 0;3100Obj t_2 = 0;3101Obj t_3 = 0;3102Obj t_4 = 0;3103Obj t_5 = 0;3104Obj t_6 = 0;3105Obj t_7 = 0;3106Obj t_8 = 0;3107Obj t_9 = 0;3108Obj t_10 = 0;3109Obj t_11 = 0;3110Obj t_12 = 0;3111Bag oldFrame;3112OLD_BRK_CURR_STAT31133114/* allocate new stack frame */3115SWITCH_TO_NEW_FRAME(self,5,0,oldFrame);3116REM_BRK_CURR_STAT();3117SET_BRK_CURR_STAT(0);31183119/* if LEN_LIST( arg ) = 5 then */3120t_3 = GF_LEN__LIST;3121t_2 = CALL_1ARGS( t_3, a_arg );3122CHECK_FUNC_RESULT( t_2 )3123t_1 = (Obj)(UInt)(EQ( t_2, INTOBJ_INT(5) ));3124if ( t_1 ) {31253126/* oper := arg[1]; */3127C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(1) )3128ASS_LVAR( 1, t_1 );31293130/* info := " fallback method to test conditions"; */3131C_NEW_STRING( t_1, 35, " fallback method to test conditions" );3132l_info = t_1;31333134/* fampred := arg[2]; */3135C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(2) )3136l_fampred = t_1;31373138/* reqs := arg[3]; */3139C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(3) )3140ASS_LVAR( 2, t_1 );31413142/* cond := arg[4]; */3143C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(4) )3144ASS_LVAR( 3, t_1 );31453146/* val := arg[5]; */3147C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(5) )3148l_val = t_1;31493150}31513152/* elif LEN_LIST( arg ) = 6 then */3153else {3154t_3 = GF_LEN__LIST;3155t_2 = CALL_1ARGS( t_3, a_arg );3156CHECK_FUNC_RESULT( t_2 )3157t_1 = (Obj)(UInt)(EQ( t_2, INTOBJ_INT(6) ));3158if ( t_1 ) {31593160/* oper := arg[1]; */3161C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(1) )3162ASS_LVAR( 1, t_1 );31633164/* info := arg[2]; */3165C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(2) )3166l_info = t_1;31673168/* fampred := arg[3]; */3169C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(3) )3170l_fampred = t_1;31713172/* reqs := arg[4]; */3173C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(4) )3174ASS_LVAR( 2, t_1 );31753176/* cond := arg[5]; */3177C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(5) )3178ASS_LVAR( 3, t_1 );31793180/* val := arg[6]; */3181C_ELM_LIST_FPL( t_1, a_arg, INTOBJ_INT(6) )3182l_val = t_1;31833184}31853186/* else */3187else {31883189/* Error( "Usage: RedispatchOnCondition(oper[,info],fampred,reqs,cond,val)" ); */3190t_1 = GF_Error;3191C_NEW_STRING( t_2, 63, "Usage: RedispatchOnCondition(oper[,info],fampred,reqs,cond,val)" );3192CALL_1ARGS( t_1, t_2 );31933194}3195}3196/* fi */31973198/* for i in reqs do */3199t_4 = OBJ_LVAR( 2 );3200CHECK_BOUND( t_4, "reqs" )3201if ( IS_SMALL_LIST(t_4) ) {3202t_3 = (Obj)(UInt)1;3203t_1 = INTOBJ_INT(1);3204}3205else {3206t_3 = (Obj)(UInt)0;3207t_1 = CALL_1ARGS( GF_ITERATOR, t_4 );3208}3209while ( 1 ) {3210if ( t_3 ) {3211if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break;3212t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) );3213t_1 = (Obj)(((UInt)t_1)+4);3214if ( t_2 == 0 ) continue;3215}3216else {3217if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break;3218t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 );3219}3220ASS_LVAR( 5, t_2 );32213222/* val := val - SIZE_FLAGS( WITH_HIDDEN_IMPS_FLAGS( FLAGS_FILTER( i ) ) ); */3223CHECK_BOUND( l_val, "val" )3224t_7 = GF_SIZE__FLAGS;3225t_9 = GF_WITH__HIDDEN__IMPS__FLAGS;3226t_11 = GF_FLAGS__FILTER;3227t_12 = OBJ_LVAR( 5 );3228CHECK_BOUND( t_12, "i" )3229t_10 = CALL_1ARGS( t_11, t_12 );3230CHECK_FUNC_RESULT( t_10 )3231t_8 = CALL_1ARGS( t_9, t_10 );3232CHECK_FUNC_RESULT( t_8 )3233t_6 = CALL_1ARGS( t_7, t_8 );3234CHECK_FUNC_RESULT( t_6 )3235C_DIFF_FIA( t_5, l_val, t_6 )3236l_val = t_5;32373238}3239/* od */32403241/* InstallOtherMethod( oper, info, fampred, reqs, val, function ( arg... )3242re := false;3243for i in [ 1 .. LEN_LIST( reqs ) ] do3244re := re or IsBound( cond[i] ) and not Tester( cond[i] )( arg[i] ) and cond[i]( arg[i] ) and Tester( cond[i] )( arg[i] );3245od;3246if re then3247return CallFuncList( oper, arg );3248else3249return TRY_NEXT_METHOD;3250fi;3251return;3252end ); */3253t_1 = GF_InstallOtherMethod;3254t_2 = OBJ_LVAR( 1 );3255CHECK_BOUND( t_2, "oper" )3256CHECK_BOUND( l_info, "info" )3257CHECK_BOUND( l_fampred, "fampred" )3258t_3 = OBJ_LVAR( 2 );3259CHECK_BOUND( t_3, "reqs" )3260t_4 = NewFunction( NameFunc[15], NargFunc[15], NamsFunc[15], HdlrFunc15 );3261ENVI_FUNC( t_4 ) = TLS(CurrLVars);3262t_5 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3263STARTLINE_BODY(t_5) = INTOBJ_INT(855);3264ENDLINE_BODY(t_5) = INTOBJ_INT(871);3265FILENAME_BODY(t_5) = FileName;3266BODY_FUNC(t_4) = t_5;3267CHANGED_BAG( TLS(CurrLVars) );3268CALL_6ARGS( t_1, t_2, l_info, l_fampred, t_3, l_val, t_4 );32693270/* return; */3271RES_BRK_CURR_STAT();3272SWITCH_TO_OLD_FRAME(oldFrame);3273return 0;32743275/* return; */3276RES_BRK_CURR_STAT();3277SWITCH_TO_OLD_FRAME(oldFrame);3278return 0;3279}32803281/* handler for function 1 */3282static Obj HdlrFunc1 (3283Obj self )3284{3285Obj t_1 = 0;3286Obj t_2 = 0;3287Obj t_3 = 0;3288Obj t_4 = 0;3289Obj t_5 = 0;3290Obj t_6 = 0;3291Bag oldFrame;3292OLD_BRK_CURR_STAT32933294/* allocate new stack frame */3295SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);3296REM_BRK_CURR_STAT();3297SET_BRK_CURR_STAT(0);32983299/* RUN_IMMEDIATE_METHODS_CHECKS := 0; */3300AssGVar( G_RUN__IMMEDIATE__METHODS__CHECKS, INTOBJ_INT(0) );33013302/* RUN_IMMEDIATE_METHODS_HITS := 0; */3303AssGVar( G_RUN__IMMEDIATE__METHODS__HITS, INTOBJ_INT(0) );33043305/* BIND_GLOBAL( "RunImmediateMethods", function ( obj, flags )3306local flagspos, tried, type, j, imm, i, res, newflags;3307if IGNORE_IMMEDIATE_METHODS then3308return;3309fi;3310if IS_SUBSET_FLAGS( IMM_FLAGS, flags ) then3311return;3312fi;3313flags := SUB_FLAGS( flags, IMM_FLAGS );3314flagspos := SHALLOW_COPY_OBJ( TRUES_FLAGS( flags ) );3315tried := [ ];3316type := TYPE_OBJ( obj );3317flags := type![2];3318for j in flagspos do3319if IsBound( IMMEDIATES[j] ) then3320imm := IMMEDIATES[j];3321for i in [ 0, 7 .. LEN_LIST( imm ) - 7 ] do3322if IS_SUBSET_FLAGS( flags, imm[i + 4] ) and not IS_SUBSET_FLAGS( flags, imm[i + 3] ) and not imm[i + 6] in tried then3323res := IMMEDIATE_METHODS[imm[i + 6]]( obj );3324ADD_LIST( tried, imm[i + 6] );3325RUN_IMMEDIATE_METHODS_CHECKS := RUN_IMMEDIATE_METHODS_CHECKS + 1;3326if TRACE_IMMEDIATE_METHODS then3327if imm[i + 7] = false then3328Print( "#I immediate: ", NAME_FUNC( imm[i + 1] ), "\n" );3329else3330Print( "#I immediate: ", NAME_FUNC( imm[i + 1] ), ": ", imm[i + 7], "\n" );3331fi;3332fi;3333if res <> TRY_NEXT_METHOD then3334IGNORE_IMMEDIATE_METHODS := true;3335imm[i + 2]( obj, res );3336IGNORE_IMMEDIATE_METHODS := false;3337RUN_IMMEDIATE_METHODS_HITS := RUN_IMMEDIATE_METHODS_HITS + 1;3338if not IS_IDENTICAL_OBJ( TYPE_OBJ( obj ), type ) then3339type := TYPE_OBJ( obj );3340newflags := SUB_FLAGS( type![2], IMM_FLAGS );3341newflags := SUB_FLAGS( newflags, flags );3342APPEND_LIST_INTR( flagspos, TRUES_FLAGS( newflags ) );3343flags := type![2];3344fi;3345fi;3346fi;3347od;3348fi;3349od;3350return;3351end ); */3352t_1 = GF_BIND__GLOBAL;3353C_NEW_STRING( t_2, 19, "RunImmediateMethods" );3354t_3 = NewFunction( NameFunc[2], NargFunc[2], NamsFunc[2], HdlrFunc2 );3355ENVI_FUNC( t_3 ) = TLS(CurrLVars);3356t_4 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3357STARTLINE_BODY(t_4) = INTOBJ_INT(26);3358ENDLINE_BODY(t_4) = INTOBJ_INT(117);3359FILENAME_BODY(t_4) = FileName;3360BODY_FUNC(t_3) = t_4;3361CHANGED_BAG( TLS(CurrLVars) );3362CALL_2ARGS( t_1, t_2, t_3 );33633364/* BIND_GLOBAL( "INSTALL_METHOD_FLAGS", function ( opr, info, rel, flags, rank, method )3365local methods, narg, i, k, tmp, replace, match, j;3366if opr in CONSTRUCTORS then3367if 0 < LEN_LIST( flags ) then3368rank := rank - RankFilter( flags[1] );3369fi;3370else3371for i in flags do3372rank := rank + RankFilter( i );3373od;3374fi;3375narg := LEN_LIST( flags );3376methods := METHODS_OPERATION( opr, narg );3377if info = false then3378info := NAME_FUNC( opr );3379else3380k := SHALLOW_COPY_OBJ( NAME_FUNC( opr ) );3381APPEND_LIST_INTR( k, ": " );3382APPEND_LIST_INTR( k, info );3383info := k;3384CONV_STRING( info );3385fi;3386i := 0;3387while i < LEN_LIST( methods ) and rank < methods[i + (narg + 3)] do3388i := i + (narg + 4);3389od;3390replace := false;3391if REREADING then3392k := i;3393while k < LEN_LIST( methods ) and rank = methods[k + narg + 3] do3394if info = methods[k + narg + 4] then3395match := false;3396for j in [ 1 .. narg ] do3397match := match and methods[k + j + 1] = flags[j];3398od;3399if match then3400replace := true;3401i := k;3402break;3403fi;3404fi;3405k := k + narg + 4;3406od;3407fi;3408if not REREADING or not replace then3409methods{[ narg + 4 + i + 1 .. narg + 4 + LEN_LIST( methods ) ]} := methods{[ i + 1 .. LEN_LIST( methods ) ]};3410fi;3411if rel = true then3412methods[i + 1] := RETURN_TRUE;3413elif rel = false then3414methods[i + 1] := RETURN_FALSE;3415elif IS_FUNCTION( rel ) then3416if CHECK_INSTALL_METHOD then3417tmp := NARG_FUNC( rel );3418if tmp < AINV( narg ) - 1 or tmp >= 0 and tmp <> narg then3419Error( NAME_FUNC( opr ), ": <famrel> must accept ", narg, " arguments" );3420fi;3421fi;3422methods[i + 1] := rel;3423else3424Error( NAME_FUNC( opr ), ": <famrel> must be a function, `true', or `false'" );3425fi;3426for k in [ 1 .. narg ] do3427methods[i + k + 1] := flags[k];3428od;3429if method = true then3430methods[i + (narg + 2)] := RETURN_TRUE;3431elif method = false then3432methods[i + (narg + 2)] := RETURN_FALSE;3433elif IS_FUNCTION( method ) then3434if CHECK_INSTALL_METHOD and not IS_OPERATION( method ) then3435tmp := NARG_FUNC( method );3436if tmp < AINV( narg ) - 1 or tmp >= 0 and tmp <> narg then3437Error( NAME_FUNC( opr ), ": <method> must accept ", narg, " arguments" );3438fi;3439fi;3440methods[i + (narg + 2)] := method;3441else3442Error( NAME_FUNC( opr ), ": <method> must be a function, `true', or `false'" );3443fi;3444methods[i + (narg + 3)] := rank;3445methods[i + (narg + 4)] := IMMUTABLE_COPY_OBJ( info );3446CHANGED_METHODS_OPERATION( opr, narg );3447return;3448end ); */3449t_1 = GF_BIND__GLOBAL;3450C_NEW_STRING( t_2, 20, "INSTALL_METHOD_FLAGS" );3451t_3 = NewFunction( NameFunc[3], NargFunc[3], NamsFunc[3], HdlrFunc3 );3452ENVI_FUNC( t_3 ) = TLS(CurrLVars);3453t_4 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3454STARTLINE_BODY(t_4) = INTOBJ_INT(124);3455ENDLINE_BODY(t_4) = INTOBJ_INT(235);3456FILENAME_BODY(t_4) = FileName;3457BODY_FUNC(t_3) = t_4;3458CHANGED_BAG( TLS(CurrLVars) );3459CALL_2ARGS( t_1, t_2, t_3 );34603461/* BIND_GLOBAL( "InstallMethod", function ( arg... )3462INSTALL_METHOD( arg, true );3463return;3464end ); */3465t_1 = GF_BIND__GLOBAL;3466C_NEW_STRING( t_2, 13, "InstallMethod" );3467t_3 = NewFunction( NameFunc[4], NargFunc[4], NamsFunc[4], HdlrFunc4 );3468ENVI_FUNC( t_3 ) = TLS(CurrLVars);3469t_4 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3470STARTLINE_BODY(t_4) = INTOBJ_INT(282);3471ENDLINE_BODY(t_4) = INTOBJ_INT(284);3472FILENAME_BODY(t_4) = FileName;3473BODY_FUNC(t_3) = t_4;3474CHANGED_BAG( TLS(CurrLVars) );3475CALL_2ARGS( t_1, t_2, t_3 );34763477/* BIND_GLOBAL( "InstallOtherMethod", function ( arg... )3478INSTALL_METHOD( arg, false );3479return;3480end ); */3481t_1 = GF_BIND__GLOBAL;3482C_NEW_STRING( t_2, 18, "InstallOtherMethod" );3483t_3 = NewFunction( NameFunc[5], NargFunc[5], NamsFunc[5], HdlrFunc5 );3484ENVI_FUNC( t_3 ) = TLS(CurrLVars);3485t_4 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3486STARTLINE_BODY(t_4) = INTOBJ_INT(309);3487ENDLINE_BODY(t_4) = INTOBJ_INT(311);3488FILENAME_BODY(t_4) = FileName;3489BODY_FUNC(t_3) = t_4;3490CHANGED_BAG( TLS(CurrLVars) );3491CALL_2ARGS( t_1, t_2, t_3 );34923493/* DeclareGlobalFunction( "EvalString" ); */3494t_1 = GF_DeclareGlobalFunction;3495C_NEW_STRING( t_2, 10, "EvalString" );3496CALL_1ARGS( t_1, t_2 );34973498/* Unbind( INSTALL_METHOD ); */3499AssGVar( G_INSTALL__METHOD, 0 );35003501/* BIND_GLOBAL( "INSTALL_METHOD", function ( arglist, check )3502local len, opr, info, pos, rel, filters, info1, isstr, flags, i, rank, method, req, reqs, match, j, k, imp, notmatch;3503len := LEN_LIST( arglist );3504if len < 3 then3505Error( "too few arguments given in <arglist>" );3506fi;3507opr := arglist[1];3508if not IS_OPERATION( opr ) then3509Error( "<opr> is not an operation" );3510fi;3511if IS_STRING_REP( arglist[2] ) then3512info := arglist[2];3513pos := 3;3514else3515info := false;3516pos := 2;3517fi;3518if arglist[pos] = true or IS_FUNCTION( arglist[pos] ) then3519rel := arglist[pos];3520pos := pos + 1;3521else3522rel := true;3523fi;3524if not IsBound( arglist[pos] ) or not IS_LIST( arglist[pos] ) then3525Error( "<arglist>[", pos, "] must be a list of filters" );3526fi;3527filters := arglist[pos];3528if GAPInfo.MaxNrArgsMethod < LEN_LIST( filters ) then3529Error( "methods can have at most ", GAPInfo.MaxNrArgsMethod, " arguments" );3530fi;3531if 0 < LEN_LIST( filters ) then3532info1 := "[ ";3533isstr := true;3534for i in [ 1 .. LEN_LIST( filters ) ] do3535if IS_STRING_REP( filters[i] ) then3536APPEND_LIST_INTR( info1, filters[i] );3537APPEND_LIST_INTR( info1, ", " );3538filters[i] := EvalString( filters[i] );3539if not IS_FUNCTION( filters[i] ) then3540Error( "string does not evaluate to a function" );3541fi;3542else3543isstr := false;3544break;3545fi;3546od;3547if isstr and info = false then3548info1[LEN_LIST( info1 ) - 1] := ' ';3549info1[LEN_LIST( info1 )] := ']';3550info := info1;3551fi;3552fi;3553pos := pos + 1;3554flags := [ ];3555for i in filters do3556ADD_LIST( flags, FLAGS_FILTER( i ) );3557od;3558if not IsBound( arglist[pos] ) then3559Error( "the method is missing in <arglist>" );3560elif IS_INT( arglist[pos] ) then3561rank := arglist[pos];3562pos := pos + 1;3563else3564rank := 0;3565fi;3566if not IsBound( arglist[pos] ) then3567Error( "the method is missing in <arglist>" );3568fi;3569method := arglist[pos];3570if FLAG1_FILTER( opr ) <> 0 and (rel = true or rel = RETURN_TRUE) and LEN_LIST( filters ) = 1 and (method = true or method = RETURN_TRUE) then3571Error( NAME_FUNC( opr ), ": use `InstallTrueMethod' for <opr>" );3572fi;3573if CHECK_INSTALL_METHOD and check then3574if opr in WRAPPER_OPERATIONS then3575INFO_DEBUG( 1, "a method is installed for the wrapper operation ", NAME_FUNC( opr ), "\n", "#I probably it should be installed for (one of) its\n", "#I underlying operation(s)" );3576fi;3577req := false;3578for i in [ 1, 3 .. LEN_LIST( OPERATIONS ) - 1 ] do3579if IS_IDENTICAL_OBJ( OPERATIONS[i], opr ) then3580req := OPERATIONS[i + 1];3581break;3582fi;3583od;3584if req = false then3585Error( "unknown operation ", NAME_FUNC( opr ) );3586fi;3587imp := [ ];3588for i in flags do3589ADD_LIST( imp, WITH_HIDDEN_IMPS_FLAGS( i ) );3590od;3591j := 0;3592match := false;3593notmatch := 0;3594while j < LEN_LIST( req ) and not match do3595j := j + 1;3596reqs := req[j];3597if LEN_LIST( reqs ) = LEN_LIST( imp ) then3598match := true;3599for i in [ 1 .. LEN_LIST( reqs ) ] do3600if not IS_SUBSET_FLAGS( imp[i], reqs[i] ) then3601match := false;3602notmatch := i;3603break;3604fi;3605od;3606if match then3607break;3608fi;3609fi;3610od;3611if not match then3612if notmatch = 0 then3613Error( "the number of arguments does not match a declaration of ", NAME_FUNC( opr ) );3614else3615Error( "required filters ", NamesFilter( imp[notmatch] ), "\nfor ", Ordinal( notmatch ), " argument do not match a declaration of ", NAME_FUNC( opr ) );3616fi;3617else3618for k in [ j + 1 .. LEN_LIST( req ) ] do3619reqs := req[k];3620if LEN_LIST( reqs ) = LEN_LIST( imp ) then3621match := true;3622for i in [ 1 .. LEN_LIST( reqs ) ] do3623if not IS_SUBSET_FLAGS( imp[i], reqs[i] ) then3624match := false;3625break;3626fi;3627od;3628if match then3629INFO_DEBUG( 1, "method installed for ", NAME_FUNC( opr ), " matches more than one declaration" );3630fi;3631fi;3632od;3633fi;3634fi;3635INSTALL_METHOD_FLAGS( opr, info, rel, flags, rank, method );3636return;3637end ); */3638t_1 = GF_BIND__GLOBAL;3639C_NEW_STRING( t_2, 14, "INSTALL_METHOD" );3640t_3 = NewFunction( NameFunc[6], NargFunc[6], NamsFunc[6], HdlrFunc6 );3641ENVI_FUNC( t_3 ) = TLS(CurrLVars);3642t_4 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3643STARTLINE_BODY(t_4) = INTOBJ_INT(322);3644ENDLINE_BODY(t_4) = INTOBJ_INT(526);3645FILENAME_BODY(t_4) = FileName;3646BODY_FUNC(t_3) = t_4;3647CHANGED_BAG( TLS(CurrLVars) );3648CALL_2ARGS( t_1, t_2, t_3 );36493650/* LENGTH_SETTER_METHODS_2 := LENGTH_SETTER_METHODS_2 + 6; */3651t_2 = GC_LENGTH__SETTER__METHODS__2;3652CHECK_BOUND( t_2, "LENGTH_SETTER_METHODS_2" )3653C_SUM_FIA( t_1, t_2, INTOBJ_INT(6) )3654AssGVar( G_LENGTH__SETTER__METHODS__2, t_1 );36553656/* InstallAttributeFunction( function ( name, filter, getter, setter, tester, mutflag )3657local flags, rank, cats, props, i;3658if not IS_IDENTICAL_OBJ( filter, IS_OBJECT ) then3659flags := FLAGS_FILTER( filter );3660rank := 0;3661cats := IS_OBJECT;3662props := [ ];3663for i in [ 1 .. LEN_FLAGS( flags ) ] do3664if ELM_FLAGS( flags, i ) then3665if i in CATS_AND_REPS then3666cats := cats and FILTERS[i];3667rank := rank - RankFilter( FILTERS[i] );3668elif i in NUMBERS_PROPERTY_GETTERS then3669ADD_LIST( props, FILTERS[i] );3670fi;3671fi;3672od;3673if 0 < LEN_LIST( props ) then3674InstallOtherMethod( getter, "default method requiring categories and checking properties", true, [ cats ], rank, function ( obj )3675local found, prop;3676found := false;3677for prop in props do3678if not Tester( prop )( obj ) then3679found := true;3680if not (prop( obj ) and Tester( prop )( obj )) then3681return TRY_NEXT_METHOD;3682fi;3683fi;3684od;3685if found then3686return getter( obj );3687else3688return TRY_NEXT_METHOD;3689fi;3690return;3691end );3692fi;3693fi;3694return;3695end ); */3696t_1 = GF_InstallAttributeFunction;3697t_2 = NewFunction( NameFunc[7], NargFunc[7], NamsFunc[7], HdlrFunc7 );3698ENVI_FUNC( t_2 ) = TLS(CurrLVars);3699t_3 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3700STARTLINE_BODY(t_3) = INTOBJ_INT(545);3701ENDLINE_BODY(t_3) = INTOBJ_INT(599);3702FILENAME_BODY(t_3) = FileName;3703BODY_FUNC(t_2) = t_3;3704CHANGED_BAG( TLS(CurrLVars) );3705CALL_1ARGS( t_1, t_2 );37063707/* InstallAttributeFunction( function ( name, filter, getter, setter, tester, mutflag )3708InstallOtherMethod( setter, "default method, does nothing", true, [ IS_OBJECT, IS_OBJECT ], 0, DO_NOTHING_SETTER );3709return;3710end ); */3711t_1 = GF_InstallAttributeFunction;3712t_2 = NewFunction( NameFunc[9], NargFunc[9], NamsFunc[9], HdlrFunc9 );3713ENVI_FUNC( t_2 ) = TLS(CurrLVars);3714t_3 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3715STARTLINE_BODY(t_3) = INTOBJ_INT(602);3716ENDLINE_BODY(t_3) = INTOBJ_INT(608);3717FILENAME_BODY(t_3) = FileName;3718BODY_FUNC(t_2) = t_3;3719CHANGED_BAG( TLS(CurrLVars) );3720CALL_1ARGS( t_1, t_2 );37213722/* IsPrimeInt := "2b defined"; */3723C_NEW_STRING( t_1, 10, "2b defined" );3724AssGVar( G_IsPrimeInt, t_1 );37253726/* BIND_GLOBAL( "KeyDependentOperation", function ( name, domreq, keyreq, keytest )3727local str, oper, attr;3728if keytest = "prime" then3729keytest := function ( key )3730if not IsPrimeInt( key ) then3731Error( name, ": <p> must be a prime" );3732fi;3733return;3734end;3735fi;3736str := SHALLOW_COPY_OBJ( name );3737APPEND_LIST_INTR( str, "Op" );3738DeclareOperation( str, [ domreq, keyreq ] );3739oper := VALUE_GLOBAL( str );3740str := "Computed";3741APPEND_LIST_INTR( str, name );3742APPEND_LIST_INTR( str, "s" );3743DeclareAttribute( str, domreq, "mutable" );3744attr := VALUE_GLOBAL( str );3745InstallMethod( attr, "default method", true, [ domreq ], 0, function ( D )3746return [ ];3747end );3748DeclareOperation( name, [ domreq, keyreq ] );3749ADD_LIST( WRAPPER_OPERATIONS, VALUE_GLOBAL( name ) );3750InstallOtherMethod( VALUE_GLOBAL( name ), "default method", true, [ domreq, keyreq ], 0, function ( D, key )3751local known, i, erg;3752keytest( key );3753known := attr( D );3754i := 1;3755while i < LEN_LIST( known ) and known[i] < key do3756i := i + 2;3757od;3758if LEN_LIST( known ) < i or known[i] <> key then3759erg := oper( D, key );3760known{[ i + 2 .. LEN_LIST( known ) + 2 ]} := known{[ i .. LEN_LIST( known ) ]};3761known[i] := key;3762known[i + 1] := erg;3763fi;3764return known[i + 1];3765end );3766return;3767end ); */3768t_1 = GF_BIND__GLOBAL;3769C_NEW_STRING( t_2, 21, "KeyDependentOperation" );3770t_3 = NewFunction( NameFunc[10], NargFunc[10], NamsFunc[10], HdlrFunc10 );3771ENVI_FUNC( t_3 ) = TLS(CurrLVars);3772t_4 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3773STARTLINE_BODY(t_4) = INTOBJ_INT(728);3774ENDLINE_BODY(t_4) = INTOBJ_INT(788);3775FILENAME_BODY(t_4) = FileName;3776BODY_FUNC(t_3) = t_4;3777CHANGED_BAG( TLS(CurrLVars) );3778CALL_2ARGS( t_1, t_2, t_3 );37793780/* CallFuncList := "2b defined"; */3781C_NEW_STRING( t_1, 10, "2b defined" );3782AssGVar( G_CallFuncList, t_1 );37833784/* BIND_GLOBAL( "RedispatchOnCondition", function ( arg... )3785local oper, info, fampred, reqs, cond, val, re, i;3786if LEN_LIST( arg ) = 5 then3787oper := arg[1];3788info := " fallback method to test conditions";3789fampred := arg[2];3790reqs := arg[3];3791cond := arg[4];3792val := arg[5];3793elif LEN_LIST( arg ) = 6 then3794oper := arg[1];3795info := arg[2];3796fampred := arg[3];3797reqs := arg[4];3798cond := arg[5];3799val := arg[6];3800else3801Error( "Usage: RedispatchOnCondition(oper[,info],fampred,reqs,cond,val)" );3802fi;3803for i in reqs do3804val := val - SIZE_FLAGS( WITH_HIDDEN_IMPS_FLAGS( FLAGS_FILTER( i ) ) );3805od;3806InstallOtherMethod( oper, info, fampred, reqs, val, function ( arg... )3807re := false;3808for i in [ 1 .. LEN_LIST( reqs ) ] do3809re := re or IsBound( cond[i] ) and not Tester( cond[i] )( arg[i] ) and cond[i]( arg[i] ) and Tester( cond[i] )( arg[i] );3810od;3811if re then3812return CallFuncList( oper, arg );3813else3814return TRY_NEXT_METHOD;3815fi;3816return;3817end );3818return;3819end ); */3820t_1 = GF_BIND__GLOBAL;3821C_NEW_STRING( t_2, 21, "RedispatchOnCondition" );3822t_3 = NewFunction( NameFunc[14], NargFunc[14], NamsFunc[14], HdlrFunc14 );3823ENVI_FUNC( t_3 ) = TLS(CurrLVars);3824t_4 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj) );3825STARTLINE_BODY(t_4) = INTOBJ_INT(823);3826ENDLINE_BODY(t_4) = INTOBJ_INT(872);3827FILENAME_BODY(t_4) = FileName;3828BODY_FUNC(t_3) = t_4;3829CHANGED_BAG( TLS(CurrLVars) );3830CALL_2ARGS( t_1, t_2, t_3 );38313832/* InstallMethod( ViewObj, "default method using `PrintObj'", true, [ IS_OBJECT ], 0, PRINT_OBJ ); */3833t_1 = GF_InstallMethod;3834t_2 = GC_ViewObj;3835CHECK_BOUND( t_2, "ViewObj" )3836C_NEW_STRING( t_3, 31, "default method using `PrintObj'" );3837t_4 = True;3838t_5 = NEW_PLIST( T_PLIST, 1 );3839SET_LEN_PLIST( t_5, 1 );3840t_6 = GC_IS__OBJECT;3841CHECK_BOUND( t_6, "IS_OBJECT" )3842SET_ELM_PLIST( t_5, 1, t_6 );3843CHANGED_BAG( t_5 );3844t_6 = GC_PRINT__OBJ;3845CHECK_BOUND( t_6, "PRINT_OBJ" )3846CALL_6ARGS( t_1, t_2, t_3, t_4, t_5, INTOBJ_INT(0), t_6 );38473848/* return; */3849RES_BRK_CURR_STAT();3850SWITCH_TO_OLD_FRAME(oldFrame);3851return 0;38523853/* return; */3854RES_BRK_CURR_STAT();3855SWITCH_TO_OLD_FRAME(oldFrame);3856return 0;3857}38583859/* 'InitKernel' sets up data structures, fopies, copies, handlers */3860static Int InitKernel ( StructInitInfo * module )3861{38623863/* global variables used in handlers */3864InitCopyGVar( "REREADING", &GC_REREADING );3865InitFopyGVar( "SHALLOW_COPY_OBJ", &GF_SHALLOW__COPY__OBJ );3866InitCopyGVar( "PRINT_OBJ", &GC_PRINT__OBJ );3867InitCopyGVar( "GAPInfo", &GC_GAPInfo );3868InitFopyGVar( "IS_FUNCTION", &GF_IS__FUNCTION );3869InitFopyGVar( "NAME_FUNC", &GF_NAME__FUNC );3870InitFopyGVar( "NARG_FUNC", &GF_NARG__FUNC );3871InitFopyGVar( "IS_OPERATION", &GF_IS__OPERATION );3872InitFopyGVar( "AINV", &GF_AINV );3873InitFopyGVar( "IS_INT", &GF_IS__INT );3874InitFopyGVar( "IS_LIST", &GF_IS__LIST );3875InitFopyGVar( "ADD_LIST", &GF_ADD__LIST );3876InitFopyGVar( "IS_STRING_REP", &GF_IS__STRING__REP );3877InitFopyGVar( "Error", &GF_Error );3878InitFopyGVar( "TYPE_OBJ", &GF_TYPE__OBJ );3879InitFopyGVar( "IMMUTABLE_COPY_OBJ", &GF_IMMUTABLE__COPY__OBJ );3880InitFopyGVar( "IS_IDENTICAL_OBJ", &GF_IS__IDENTICAL__OBJ );3881InitCopyGVar( "IS_OBJECT", &GC_IS__OBJECT );3882InitCopyGVar( "TRY_NEXT_METHOD", &GC_TRY__NEXT__METHOD );3883InitFopyGVar( "SUB_FLAGS", &GF_SUB__FLAGS );3884InitFopyGVar( "WITH_HIDDEN_IMPS_FLAGS", &GF_WITH__HIDDEN__IMPS__FLAGS );3885InitFopyGVar( "IS_SUBSET_FLAGS", &GF_IS__SUBSET__FLAGS );3886InitFopyGVar( "TRUES_FLAGS", &GF_TRUES__FLAGS );3887InitFopyGVar( "SIZE_FLAGS", &GF_SIZE__FLAGS );3888InitFopyGVar( "LEN_FLAGS", &GF_LEN__FLAGS );3889InitFopyGVar( "ELM_FLAGS", &GF_ELM__FLAGS );3890InitFopyGVar( "FLAG1_FILTER", &GF_FLAG1__FILTER );3891InitFopyGVar( "FLAGS_FILTER", &GF_FLAGS__FILTER );3892InitFopyGVar( "METHODS_OPERATION", &GF_METHODS__OPERATION );3893InitFopyGVar( "CHANGED_METHODS_OPERATION", &GF_CHANGED__METHODS__OPERATION );3894InitCopyGVar( "DO_NOTHING_SETTER", &GC_DO__NOTHING__SETTER );3895InitCopyGVar( "RETURN_TRUE", &GC_RETURN__TRUE );3896InitCopyGVar( "RETURN_FALSE", &GC_RETURN__FALSE );3897InitFopyGVar( "LEN_LIST", &GF_LEN__LIST );3898InitFopyGVar( "APPEND_LIST_INTR", &GF_APPEND__LIST__INTR );3899InitFopyGVar( "CONV_STRING", &GF_CONV__STRING );3900InitFopyGVar( "Print", &GF_Print );3901InitCopyGVar( "ViewObj", &GC_ViewObj );3902InitCopyGVar( "RUN_IMMEDIATE_METHODS_CHECKS", &GC_RUN__IMMEDIATE__METHODS__CHECKS );3903InitCopyGVar( "RUN_IMMEDIATE_METHODS_HITS", &GC_RUN__IMMEDIATE__METHODS__HITS );3904InitFopyGVar( "BIND_GLOBAL", &GF_BIND__GLOBAL );3905InitCopyGVar( "IGNORE_IMMEDIATE_METHODS", &GC_IGNORE__IMMEDIATE__METHODS );3906InitCopyGVar( "IMM_FLAGS", &GC_IMM__FLAGS );3907InitCopyGVar( "IMMEDIATES", &GC_IMMEDIATES );3908InitCopyGVar( "IMMEDIATE_METHODS", &GC_IMMEDIATE__METHODS );3909InitCopyGVar( "TRACE_IMMEDIATE_METHODS", &GC_TRACE__IMMEDIATE__METHODS );3910InitCopyGVar( "CONSTRUCTORS", &GC_CONSTRUCTORS );3911InitFopyGVar( "RankFilter", &GF_RankFilter );3912InitCopyGVar( "CHECK_INSTALL_METHOD", &GC_CHECK__INSTALL__METHOD );3913InitFopyGVar( "INSTALL_METHOD", &GF_INSTALL__METHOD );3914InitFopyGVar( "DeclareGlobalFunction", &GF_DeclareGlobalFunction );3915InitFopyGVar( "EvalString", &GF_EvalString );3916InitCopyGVar( "WRAPPER_OPERATIONS", &GC_WRAPPER__OPERATIONS );3917InitFopyGVar( "INFO_DEBUG", &GF_INFO__DEBUG );3918InitCopyGVar( "OPERATIONS", &GC_OPERATIONS );3919InitFopyGVar( "NamesFilter", &GF_NamesFilter );3920InitFopyGVar( "Ordinal", &GF_Ordinal );3921InitFopyGVar( "INSTALL_METHOD_FLAGS", &GF_INSTALL__METHOD__FLAGS );3922InitCopyGVar( "LENGTH_SETTER_METHODS_2", &GC_LENGTH__SETTER__METHODS__2 );3923InitFopyGVar( "InstallAttributeFunction", &GF_InstallAttributeFunction );3924InitCopyGVar( "CATS_AND_REPS", &GC_CATS__AND__REPS );3925InitCopyGVar( "FILTERS", &GC_FILTERS );3926InitCopyGVar( "NUMBERS_PROPERTY_GETTERS", &GC_NUMBERS__PROPERTY__GETTERS );3927InitFopyGVar( "InstallOtherMethod", &GF_InstallOtherMethod );3928InitFopyGVar( "Tester", &GF_Tester );3929InitFopyGVar( "IsPrimeInt", &GF_IsPrimeInt );3930InitFopyGVar( "DeclareOperation", &GF_DeclareOperation );3931InitFopyGVar( "VALUE_GLOBAL", &GF_VALUE__GLOBAL );3932InitFopyGVar( "DeclareAttribute", &GF_DeclareAttribute );3933InitFopyGVar( "InstallMethod", &GF_InstallMethod );3934InitFopyGVar( "CallFuncList", &GF_CallFuncList );39353936/* information for the functions */3937InitGlobalBag( &DefaultName, "GAPROOT/lib/oper1.g:DefaultName(-28903883)" );3938InitGlobalBag( &FileName, "GAPROOT/lib/oper1.g:FileName(-28903883)" );3939InitHandlerFunc( HdlrFunc1, "GAPROOT/lib/oper1.g:HdlrFunc1(-28903883)" );3940InitGlobalBag( &(NameFunc[1]), "GAPROOT/lib/oper1.g:NameFunc[1](-28903883)" );3941InitHandlerFunc( HdlrFunc2, "GAPROOT/lib/oper1.g:HdlrFunc2(-28903883)" );3942InitGlobalBag( &(NameFunc[2]), "GAPROOT/lib/oper1.g:NameFunc[2](-28903883)" );3943InitHandlerFunc( HdlrFunc3, "GAPROOT/lib/oper1.g:HdlrFunc3(-28903883)" );3944InitGlobalBag( &(NameFunc[3]), "GAPROOT/lib/oper1.g:NameFunc[3](-28903883)" );3945InitHandlerFunc( HdlrFunc4, "GAPROOT/lib/oper1.g:HdlrFunc4(-28903883)" );3946InitGlobalBag( &(NameFunc[4]), "GAPROOT/lib/oper1.g:NameFunc[4](-28903883)" );3947InitHandlerFunc( HdlrFunc5, "GAPROOT/lib/oper1.g:HdlrFunc5(-28903883)" );3948InitGlobalBag( &(NameFunc[5]), "GAPROOT/lib/oper1.g:NameFunc[5](-28903883)" );3949InitHandlerFunc( HdlrFunc6, "GAPROOT/lib/oper1.g:HdlrFunc6(-28903883)" );3950InitGlobalBag( &(NameFunc[6]), "GAPROOT/lib/oper1.g:NameFunc[6](-28903883)" );3951InitHandlerFunc( HdlrFunc7, "GAPROOT/lib/oper1.g:HdlrFunc7(-28903883)" );3952InitGlobalBag( &(NameFunc[7]), "GAPROOT/lib/oper1.g:NameFunc[7](-28903883)" );3953InitHandlerFunc( HdlrFunc8, "GAPROOT/lib/oper1.g:HdlrFunc8(-28903883)" );3954InitGlobalBag( &(NameFunc[8]), "GAPROOT/lib/oper1.g:NameFunc[8](-28903883)" );3955InitHandlerFunc( HdlrFunc9, "GAPROOT/lib/oper1.g:HdlrFunc9(-28903883)" );3956InitGlobalBag( &(NameFunc[9]), "GAPROOT/lib/oper1.g:NameFunc[9](-28903883)" );3957InitHandlerFunc( HdlrFunc10, "GAPROOT/lib/oper1.g:HdlrFunc10(-28903883)" );3958InitGlobalBag( &(NameFunc[10]), "GAPROOT/lib/oper1.g:NameFunc[10](-28903883)" );3959InitHandlerFunc( HdlrFunc11, "GAPROOT/lib/oper1.g:HdlrFunc11(-28903883)" );3960InitGlobalBag( &(NameFunc[11]), "GAPROOT/lib/oper1.g:NameFunc[11](-28903883)" );3961InitHandlerFunc( HdlrFunc12, "GAPROOT/lib/oper1.g:HdlrFunc12(-28903883)" );3962InitGlobalBag( &(NameFunc[12]), "GAPROOT/lib/oper1.g:NameFunc[12](-28903883)" );3963InitHandlerFunc( HdlrFunc13, "GAPROOT/lib/oper1.g:HdlrFunc13(-28903883)" );3964InitGlobalBag( &(NameFunc[13]), "GAPROOT/lib/oper1.g:NameFunc[13](-28903883)" );3965InitHandlerFunc( HdlrFunc14, "GAPROOT/lib/oper1.g:HdlrFunc14(-28903883)" );3966InitGlobalBag( &(NameFunc[14]), "GAPROOT/lib/oper1.g:NameFunc[14](-28903883)" );3967InitHandlerFunc( HdlrFunc15, "GAPROOT/lib/oper1.g:HdlrFunc15(-28903883)" );3968InitGlobalBag( &(NameFunc[15]), "GAPROOT/lib/oper1.g:NameFunc[15](-28903883)" );39693970/* return success */3971return 0;39723973}39743975/* 'InitLibrary' sets up gvars, rnams, functions */3976static Int InitLibrary ( StructInitInfo * module )3977{3978Obj func1;3979Obj body1;39803981/* Complete Copy/Fopy registration */3982UpdateCopyFopyInfo();39833984/* global variables used in handlers */3985G_REREADING = GVarName( "REREADING" );3986G_SHALLOW__COPY__OBJ = GVarName( "SHALLOW_COPY_OBJ" );3987G_PRINT__OBJ = GVarName( "PRINT_OBJ" );3988G_GAPInfo = GVarName( "GAPInfo" );3989G_IS__FUNCTION = GVarName( "IS_FUNCTION" );3990G_NAME__FUNC = GVarName( "NAME_FUNC" );3991G_NARG__FUNC = GVarName( "NARG_FUNC" );3992G_IS__OPERATION = GVarName( "IS_OPERATION" );3993G_AINV = GVarName( "AINV" );3994G_IS__INT = GVarName( "IS_INT" );3995G_IS__LIST = GVarName( "IS_LIST" );3996G_ADD__LIST = GVarName( "ADD_LIST" );3997G_IS__STRING__REP = GVarName( "IS_STRING_REP" );3998G_Error = GVarName( "Error" );3999G_TYPE__OBJ = GVarName( "TYPE_OBJ" );4000G_IMMUTABLE__COPY__OBJ = GVarName( "IMMUTABLE_COPY_OBJ" );4001G_IS__IDENTICAL__OBJ = GVarName( "IS_IDENTICAL_OBJ" );4002G_IS__OBJECT = GVarName( "IS_OBJECT" );4003G_TRY__NEXT__METHOD = GVarName( "TRY_NEXT_METHOD" );4004G_SUB__FLAGS = GVarName( "SUB_FLAGS" );4005G_WITH__HIDDEN__IMPS__FLAGS = GVarName( "WITH_HIDDEN_IMPS_FLAGS" );4006G_IS__SUBSET__FLAGS = GVarName( "IS_SUBSET_FLAGS" );4007G_TRUES__FLAGS = GVarName( "TRUES_FLAGS" );4008G_SIZE__FLAGS = GVarName( "SIZE_FLAGS" );4009G_LEN__FLAGS = GVarName( "LEN_FLAGS" );4010G_ELM__FLAGS = GVarName( "ELM_FLAGS" );4011G_FLAG1__FILTER = GVarName( "FLAG1_FILTER" );4012G_FLAGS__FILTER = GVarName( "FLAGS_FILTER" );4013G_METHODS__OPERATION = GVarName( "METHODS_OPERATION" );4014G_CHANGED__METHODS__OPERATION = GVarName( "CHANGED_METHODS_OPERATION" );4015G_DO__NOTHING__SETTER = GVarName( "DO_NOTHING_SETTER" );4016G_RETURN__TRUE = GVarName( "RETURN_TRUE" );4017G_RETURN__FALSE = GVarName( "RETURN_FALSE" );4018G_LEN__LIST = GVarName( "LEN_LIST" );4019G_APPEND__LIST__INTR = GVarName( "APPEND_LIST_INTR" );4020G_CONV__STRING = GVarName( "CONV_STRING" );4021G_Print = GVarName( "Print" );4022G_ViewObj = GVarName( "ViewObj" );4023G_RUN__IMMEDIATE__METHODS__CHECKS = GVarName( "RUN_IMMEDIATE_METHODS_CHECKS" );4024G_RUN__IMMEDIATE__METHODS__HITS = GVarName( "RUN_IMMEDIATE_METHODS_HITS" );4025G_BIND__GLOBAL = GVarName( "BIND_GLOBAL" );4026G_IGNORE__IMMEDIATE__METHODS = GVarName( "IGNORE_IMMEDIATE_METHODS" );4027G_IMM__FLAGS = GVarName( "IMM_FLAGS" );4028G_IMMEDIATES = GVarName( "IMMEDIATES" );4029G_IMMEDIATE__METHODS = GVarName( "IMMEDIATE_METHODS" );4030G_TRACE__IMMEDIATE__METHODS = GVarName( "TRACE_IMMEDIATE_METHODS" );4031G_CONSTRUCTORS = GVarName( "CONSTRUCTORS" );4032G_RankFilter = GVarName( "RankFilter" );4033G_CHECK__INSTALL__METHOD = GVarName( "CHECK_INSTALL_METHOD" );4034G_INSTALL__METHOD = GVarName( "INSTALL_METHOD" );4035G_DeclareGlobalFunction = GVarName( "DeclareGlobalFunction" );4036G_EvalString = GVarName( "EvalString" );4037G_WRAPPER__OPERATIONS = GVarName( "WRAPPER_OPERATIONS" );4038G_INFO__DEBUG = GVarName( "INFO_DEBUG" );4039G_OPERATIONS = GVarName( "OPERATIONS" );4040G_NamesFilter = GVarName( "NamesFilter" );4041G_Ordinal = GVarName( "Ordinal" );4042G_INSTALL__METHOD__FLAGS = GVarName( "INSTALL_METHOD_FLAGS" );4043G_LENGTH__SETTER__METHODS__2 = GVarName( "LENGTH_SETTER_METHODS_2" );4044G_InstallAttributeFunction = GVarName( "InstallAttributeFunction" );4045G_CATS__AND__REPS = GVarName( "CATS_AND_REPS" );4046G_FILTERS = GVarName( "FILTERS" );4047G_NUMBERS__PROPERTY__GETTERS = GVarName( "NUMBERS_PROPERTY_GETTERS" );4048G_InstallOtherMethod = GVarName( "InstallOtherMethod" );4049G_Tester = GVarName( "Tester" );4050G_IsPrimeInt = GVarName( "IsPrimeInt" );4051G_DeclareOperation = GVarName( "DeclareOperation" );4052G_VALUE__GLOBAL = GVarName( "VALUE_GLOBAL" );4053G_DeclareAttribute = GVarName( "DeclareAttribute" );4054G_InstallMethod = GVarName( "InstallMethod" );4055G_CallFuncList = GVarName( "CallFuncList" );40564057/* record names used in handlers */4058R_MaxNrArgsMethod = RNamName( "MaxNrArgsMethod" );40594060/* information for the functions */4061C_NEW_STRING( DefaultName, 14, "local function" );4062C_NEW_STRING( FileName, 19, "GAPROOT/lib/oper1.g" );4063NameFunc[1] = DefaultName;4064NamsFunc[1] = 0;4065NargFunc[1] = 0;4066NameFunc[2] = DefaultName;4067NamsFunc[2] = 0;4068NargFunc[2] = 2;4069NameFunc[3] = DefaultName;4070NamsFunc[3] = 0;4071NargFunc[3] = 6;4072NameFunc[4] = DefaultName;4073NamsFunc[4] = 0;4074NargFunc[4] = -1;4075NameFunc[5] = DefaultName;4076NamsFunc[5] = 0;4077NargFunc[5] = -1;4078NameFunc[6] = DefaultName;4079NamsFunc[6] = 0;4080NargFunc[6] = 2;4081NameFunc[7] = DefaultName;4082NamsFunc[7] = 0;4083NargFunc[7] = 6;4084NameFunc[8] = DefaultName;4085NamsFunc[8] = 0;4086NargFunc[8] = 1;4087NameFunc[9] = DefaultName;4088NamsFunc[9] = 0;4089NargFunc[9] = 6;4090NameFunc[10] = DefaultName;4091NamsFunc[10] = 0;4092NargFunc[10] = 4;4093NameFunc[11] = DefaultName;4094NamsFunc[11] = 0;4095NargFunc[11] = 1;4096NameFunc[12] = DefaultName;4097NamsFunc[12] = 0;4098NargFunc[12] = 1;4099NameFunc[13] = DefaultName;4100NamsFunc[13] = 0;4101NargFunc[13] = 2;4102NameFunc[14] = DefaultName;4103NamsFunc[14] = 0;4104NargFunc[14] = -1;4105NameFunc[15] = DefaultName;4106NamsFunc[15] = 0;4107NargFunc[15] = -1;41084109/* create all the functions defined in this module */4110func1 = NewFunction(NameFunc[1],NargFunc[1],NamsFunc[1],HdlrFunc1);4111ENVI_FUNC( func1 ) = TLS(CurrLVars);4112CHANGED_BAG( TLS(CurrLVars) );4113body1 = NewBag( T_BODY, NUMBER_HEADER_ITEMS_BODY*sizeof(Obj));4114BODY_FUNC( func1 ) = body1;4115CHANGED_BAG( func1 );4116CALL_0ARGS( func1 );41174118/* return success */4119return 0;41204121}41224123/* 'PostRestore' restore gvars, rnams, functions */4124static Int PostRestore ( StructInitInfo * module )4125{41264127/* global variables used in handlers */4128G_REREADING = GVarName( "REREADING" );4129G_SHALLOW__COPY__OBJ = GVarName( "SHALLOW_COPY_OBJ" );4130G_PRINT__OBJ = GVarName( "PRINT_OBJ" );4131G_GAPInfo = GVarName( "GAPInfo" );4132G_IS__FUNCTION = GVarName( "IS_FUNCTION" );4133G_NAME__FUNC = GVarName( "NAME_FUNC" );4134G_NARG__FUNC = GVarName( "NARG_FUNC" );4135G_IS__OPERATION = GVarName( "IS_OPERATION" );4136G_AINV = GVarName( "AINV" );4137G_IS__INT = GVarName( "IS_INT" );4138G_IS__LIST = GVarName( "IS_LIST" );4139G_ADD__LIST = GVarName( "ADD_LIST" );4140G_IS__STRING__REP = GVarName( "IS_STRING_REP" );4141G_Error = GVarName( "Error" );4142G_TYPE__OBJ = GVarName( "TYPE_OBJ" );4143G_IMMUTABLE__COPY__OBJ = GVarName( "IMMUTABLE_COPY_OBJ" );4144G_IS__IDENTICAL__OBJ = GVarName( "IS_IDENTICAL_OBJ" );4145G_IS__OBJECT = GVarName( "IS_OBJECT" );4146G_TRY__NEXT__METHOD = GVarName( "TRY_NEXT_METHOD" );4147G_SUB__FLAGS = GVarName( "SUB_FLAGS" );4148G_WITH__HIDDEN__IMPS__FLAGS = GVarName( "WITH_HIDDEN_IMPS_FLAGS" );4149G_IS__SUBSET__FLAGS = GVarName( "IS_SUBSET_FLAGS" );4150G_TRUES__FLAGS = GVarName( "TRUES_FLAGS" );4151G_SIZE__FLAGS = GVarName( "SIZE_FLAGS" );4152G_LEN__FLAGS = GVarName( "LEN_FLAGS" );4153G_ELM__FLAGS = GVarName( "ELM_FLAGS" );4154G_FLAG1__FILTER = GVarName( "FLAG1_FILTER" );4155G_FLAGS__FILTER = GVarName( "FLAGS_FILTER" );4156G_METHODS__OPERATION = GVarName( "METHODS_OPERATION" );4157G_CHANGED__METHODS__OPERATION = GVarName( "CHANGED_METHODS_OPERATION" );4158G_DO__NOTHING__SETTER = GVarName( "DO_NOTHING_SETTER" );4159G_RETURN__TRUE = GVarName( "RETURN_TRUE" );4160G_RETURN__FALSE = GVarName( "RETURN_FALSE" );4161G_LEN__LIST = GVarName( "LEN_LIST" );4162G_APPEND__LIST__INTR = GVarName( "APPEND_LIST_INTR" );4163G_CONV__STRING = GVarName( "CONV_STRING" );4164G_Print = GVarName( "Print" );4165G_ViewObj = GVarName( "ViewObj" );4166G_RUN__IMMEDIATE__METHODS__CHECKS = GVarName( "RUN_IMMEDIATE_METHODS_CHECKS" );4167G_RUN__IMMEDIATE__METHODS__HITS = GVarName( "RUN_IMMEDIATE_METHODS_HITS" );4168G_BIND__GLOBAL = GVarName( "BIND_GLOBAL" );4169G_IGNORE__IMMEDIATE__METHODS = GVarName( "IGNORE_IMMEDIATE_METHODS" );4170G_IMM__FLAGS = GVarName( "IMM_FLAGS" );4171G_IMMEDIATES = GVarName( "IMMEDIATES" );4172G_IMMEDIATE__METHODS = GVarName( "IMMEDIATE_METHODS" );4173G_TRACE__IMMEDIATE__METHODS = GVarName( "TRACE_IMMEDIATE_METHODS" );4174G_CONSTRUCTORS = GVarName( "CONSTRUCTORS" );4175G_RankFilter = GVarName( "RankFilter" );4176G_CHECK__INSTALL__METHOD = GVarName( "CHECK_INSTALL_METHOD" );4177G_INSTALL__METHOD = GVarName( "INSTALL_METHOD" );4178G_DeclareGlobalFunction = GVarName( "DeclareGlobalFunction" );4179G_EvalString = GVarName( "EvalString" );4180G_WRAPPER__OPERATIONS = GVarName( "WRAPPER_OPERATIONS" );4181G_INFO__DEBUG = GVarName( "INFO_DEBUG" );4182G_OPERATIONS = GVarName( "OPERATIONS" );4183G_NamesFilter = GVarName( "NamesFilter" );4184G_Ordinal = GVarName( "Ordinal" );4185G_INSTALL__METHOD__FLAGS = GVarName( "INSTALL_METHOD_FLAGS" );4186G_LENGTH__SETTER__METHODS__2 = GVarName( "LENGTH_SETTER_METHODS_2" );4187G_InstallAttributeFunction = GVarName( "InstallAttributeFunction" );4188G_CATS__AND__REPS = GVarName( "CATS_AND_REPS" );4189G_FILTERS = GVarName( "FILTERS" );4190G_NUMBERS__PROPERTY__GETTERS = GVarName( "NUMBERS_PROPERTY_GETTERS" );4191G_InstallOtherMethod = GVarName( "InstallOtherMethod" );4192G_Tester = GVarName( "Tester" );4193G_IsPrimeInt = GVarName( "IsPrimeInt" );4194G_DeclareOperation = GVarName( "DeclareOperation" );4195G_VALUE__GLOBAL = GVarName( "VALUE_GLOBAL" );4196G_DeclareAttribute = GVarName( "DeclareAttribute" );4197G_InstallMethod = GVarName( "InstallMethod" );4198G_CallFuncList = GVarName( "CallFuncList" );41994200/* record names used in handlers */4201R_MaxNrArgsMethod = RNamName( "MaxNrArgsMethod" );42024203/* information for the functions */4204NameFunc[1] = DefaultName;4205NamsFunc[1] = 0;4206NargFunc[1] = 0;4207NameFunc[2] = DefaultName;4208NamsFunc[2] = 0;4209NargFunc[2] = 2;4210NameFunc[3] = DefaultName;4211NamsFunc[3] = 0;4212NargFunc[3] = 6;4213NameFunc[4] = DefaultName;4214NamsFunc[4] = 0;4215NargFunc[4] = -1;4216NameFunc[5] = DefaultName;4217NamsFunc[5] = 0;4218NargFunc[5] = -1;4219NameFunc[6] = DefaultName;4220NamsFunc[6] = 0;4221NargFunc[6] = 2;4222NameFunc[7] = DefaultName;4223NamsFunc[7] = 0;4224NargFunc[7] = 6;4225NameFunc[8] = DefaultName;4226NamsFunc[8] = 0;4227NargFunc[8] = 1;4228NameFunc[9] = DefaultName;4229NamsFunc[9] = 0;4230NargFunc[9] = 6;4231NameFunc[10] = DefaultName;4232NamsFunc[10] = 0;4233NargFunc[10] = 4;4234NameFunc[11] = DefaultName;4235NamsFunc[11] = 0;4236NargFunc[11] = 1;4237NameFunc[12] = DefaultName;4238NamsFunc[12] = 0;4239NargFunc[12] = 1;4240NameFunc[13] = DefaultName;4241NamsFunc[13] = 0;4242NargFunc[13] = 2;4243NameFunc[14] = DefaultName;4244NamsFunc[14] = 0;4245NargFunc[14] = -1;4246NameFunc[15] = DefaultName;4247NamsFunc[15] = 0;4248NargFunc[15] = -1;42494250/* return success */4251return 0;42524253}425442554256/* <name> returns the description of this module */4257static StructInitInfo module = {4258/* type = */ 2,4259/* name = */ "GAPROOT/lib/oper1.g",4260/* revision_c = */ 0,4261/* revision_h = */ 0,4262/* version = */ 0,4263/* crc = */ -28903883,4264/* initKernel = */ InitKernel,4265/* initLibrary = */ InitLibrary,4266/* checkInit = */ 0,4267/* preSave = */ 0,4268/* postSave = */ 0,4269/* postRestore = */ PostRestore4270};42714272StructInitInfo * Init__oper1 ( void )4273{4274return &module;4275}42764277/* compiled code ends here */4278#endif427942804281