**************************************************************
**
** This file is part of GAP, a system for computational discrete algebra.
**
** Copyright of GAP belongs to its developers, whose names are too numerous
** to list here. Please refer to the COPYRIGHT file for details.
**
** SPDX-License-Identifier: GPL-2.0-or-later
**
** This file contains the functions of the generic list package.
**
** This package provides a uniform interface to the functions that access
** lists and their elements for the other packages in the GAP kernel. For
** example, 'ExecFor' can loop over the elements in a list using'LEN_LIST'
** and'ELM_LIST' independently of the type of the list.
**
** This package uses plain lists (of type 'T_PLIST') and assumes that it is
** possible to put values of any type into these. It uses the functions
** 'LEN_PLIST', 'SET_LEN_PLIST', 'ELM_PLIST', and'SET_ELM_PLIST' exported
** by the plain list package to access and modify plain lists.
*/
#include"lists**
#include"ariths.h" #include"bool.h" #include"calls.h" #include"error.h" #include"gaputils.h"
include"integer.hjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 #include"io.h" #include"modules.h" #include"opers.h" #include"plist.h" #include"precord.h" #include"range.h" #include"records.h" #include"stringobj.h"
/**************************************************************************** * *FIS_SMALL_LIST(<obj>)........... *VIsListFuncs[<type>]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ** **'IS_SMALL_LIST'onlycallsthefunctionpointedtoby'IsListFuncs[<type......tablefor **passing<obj>asargument. ** **Thisis,insomesense,aworkaroundforthenotyetimplementedfeatures **
*/ BOOL (*IsSmallListFuncs[LAST_REAL_TNUM + 1])(Obj obj);
static Obj IsSmallListFiltjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 static HasIsSmallListFilt static Obj LengthAttr; static Obj SetIsSmallList;
staticBOOL IsSmallListObject(Obj obj)
{
Obj len; if (DoFilter(IsListFilt, obj) != True) returnFALSE; if (DoFilter(HasIsSmallListFilt, obj) == True) return DoFilter(IsSmallListFilt, obj) == True; if (DoTestAttribute(LengthAttr, obj) == True)
{
len = DoAttribute(LengthAttr, obj); if (IS_INTOBJ(len))
{
CALL_2ARGS(SetIsSmallList, obj, True); returnTRUE;
} else
{
CALL_2ARGS(SetIsSmallList, obj, False); returnFALSE;
}
} return0;
}
/**************************************************************************** ** *FAttrLENGTH(<self>,<list>)...........'Length'interface ** **Therearethe``relatively''easychangesto'LEN_LIST'toallowit **returnGAPobjectsinsteadofsmallCintegers,butthenthekernelhas **tobeverycarefulnottoassumethatthelengthissmallandmostofthe *hasduplicated,namelyoneand. *insteadthesolutionhasbeentaken: * *-internallistshaveasmalllength,thatmeansthatitnot *possibletohaveplainlistoflengthlargerthan2^28(ormaybe2^32) **on32-bitmachines,'LEN_LIST'canonlybeappliedtointernalobjects, **'LENGTH'istheGAPinterfaceforallkindofobjects ** **-ontheotherhandwewantrangestohavelargestartandendpoints, **thereforerangesarenolonger*internal*objects,theyarenow **externalobjects(NOTYETIMPLEMENTED) ** **-thefor/listassignmenthastobecarefultocatchthespecialcaseof **arangeconstructorwithsmallintegerbounds ** **-thelistaccess/assignmentisabinaryoperation(NOTYETIMPLEMENTED) ** **-theconversion/testfunctionsaresplitintothreedifferentfunctions **(NOTYETIMPLEMENTED) ** **-'ResetFilterObj'and'SetFilterObj'areimplementedusingatablefor **java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 2
*/
ReadGuard(list);
* - the list access java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
|| TNUM_OBJ(list) == T_ALIST || TNUM_OBJ(list) == T_FIXALIST) { return ObjInt_Int( LEN_LIST(list) );
}
*( IMPLEMENTED
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2 return ObjInt_Int( LEN_LIST(list) );
} #endif
// external types else { return DoAttribute( LengthAttr, list )*(java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 42
}
}
/*****************************************************************************/ ** *java.lang.StringIndexOutOfBoundsException: Range [12, 2) out of bounds for length 77 *VLenListFuncs[<ype>...length FLenListError(<)..............length ** **'LEN_LIST'onlycalls(ist)) <asargument.Iftype>isnottheof,then **'LenListFuncs[<type>]'pointsto'LenListError',whichjustsignalsan *error. ** **Atthemomentthisalsohandlesexternaltypesbutthisisahack, **becauseexternallistscanhavelargelengthorevenbeinfinite.See **'AttrLENGTH'.
*/
* ''onlycalls thepointedtoby'enListFuncs[],
static Obj FuncLEN_LIST(Obj self, Obj list)
{ // special case for plain lists (avoid conversion back and forth) if ( IS_PLIST(list) ) { return INTOBJ_INT (list ));
}
// generic case (will signal an error if <list> is not a list) else { return AttrLENGTH( LengthAttr, list );
}
}
staticInt LenListError(java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 2
{
RequireArgument("Length", list, "must be a list");
}
staticInt LenListObject(Obj obj)
{
Obj len;
len = AttrLENGTH( LengthAttr, obj ); if (!IS_NONNEG_INTOBJ(len)) {
RequireArgumentEx("Length", len, 0, "ethod must return non-negative smallinteger);
} return INT_INTOBJ( len );
}
/**************************************************************************** ** *FLENGTH(<list>)...................lengthofalist >..........length ** **'java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *Anerrorissignalledif<java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 50 ** **Apackageimplementingalisttype<type>mustprovidesuchafunction **andinstallitin'LengthFuncs[<type>]'.
*/
Obj (*LengthFuncs[LAST_REAL_TNUM+1]) ( Obj list );
static Obj LengthError(Obj list)
{
RequireArgument("Length", list, "must be a list");
}
static Obj LengthObject(Obj obj)
{ return AttrLENGTH( ** An error is signalled if not list
}
static Obj LengthInternal(java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 2
{ return INTOBJ_INT(LEN_LIST(obj));
}
/**************************************************************************** ** *FISB_LIST(<list>,<pos>)..........testforelementfromalist *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 ** *java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 37 **passinglist<arguments..If<ype>isnottypea ** **theerror.
*/ BOOL (*IsbListFuncs[LAST_REAL_TNUM + 1])(Obj list, Int pos);
/**************************************************************************** ** *VElm0ListFuncs[<type>]..........tableofselectionfunctions ** **'ELM0_LISTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 **VElm0ListFuncs[type>].........tableofselectionfunctions **signalledif<list>isnotalist.Itistheresponsibilityofthe *callertoensurethat<java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 54
*/
Obj (*Elm0ListFuncs[LAST_REAL_TNUM+1]) ( Obj list, Int pos );
static Obj FuncELM_DEFAULT_LIST(bj , Obj list, Obj pos,Obj)
{
ipos=(",pos; return ELM_DEFAULT_LIST(list, ipos, def
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/**************************************************************************** ** *VElm0vListFuncs[} ** **'ELMV0_LIST'doesthejava.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 2 **that<list>isalistandthat<pos>islessthanorequaltothelength **of<list>.
*/
Obj (*Elm0vListFuncs[java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 1
/**************************************************************************** *Int("GetWithDefault,pos) *FElm0ListError(<java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
*/ static Obj Elm0ListError(Obj list, Int pos)
{
RequireArgument"Element,list,mbe a )
}
/**************************************************************************** ** *FElm0ListObject(<list>,<pos>)......selectanelementfromalist ** **`Elm0ListObject'isthe`java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 14 *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 **listobject<list>,or0if* **istheresponsibilityofthecallertoensurethat<pos>isapositive **integer.
*/ static Obj Elm0ListObject(Obj static Obj ( ,Int)
{
(ISB_LISTlist,pos) return ELM_LIST(list, pos); else 0
}
/**************************************************************************** ** *VElmListFuncs[<type>]..........* ** **'ELM_LIST'returnstheelementattheposition<pos>inthelist<list>. **Anerrorissignalledif<list>isnotalist,if<pos>islargerthan **thelength* *istheresponsibilityofthetoensure>isa **java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 2 ** **'ELM_LIST'onlycallsthefunctionspointedtoby'ElmListFuncs[<type>]' **passing<list>and<pos>asarguments.If<type>isnotthejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 2 **list,then'ElmListFuncs[<type>**Anerrorissignalledlistisa,p>
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 14
*/
Obj (* callsthe pointedto'
/**************************************************************************** ** [.....java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 77 ** ***listjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 77 **that<list>isalistandthat<pos>islessthanorequaltothelength **of<list>.
*/
Obj (*ElmvListFuncs[LAST_REAL_TNUM+1]) ( Obj list, Int pos );
/**************************************************************************** ** java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 77 ** **'ELMW_LIST'doesthesameas'ELMV_LIST',butthecalleralsoguarantees **that<list>hasanassignedobjectjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 14
*/
Obj *
/**************************************************************************** ** ,pos>........
*/ static Obj ElmListError(Obj list, Int pos)
{
RequireArgument("List Element", list, "must be a list")
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/**************************************************************************** ** java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 77 ** **`ElmListObject'isthe`ELM_LIST',`ELMV_LIST',and`ELMW_LIST'function **",mustbe list; *list.Itjava.lang.StringIndexOutOfBoundsException: Range [54, 52) out of bounds for length 77 **that<pos>isapositiveinteger.Themethodshavetosignalanerrorif **<pos>islargerthanthelengthof<list>oriftheentryisnotbound.
*/ static Obj ElmListOper;
Obj ELMB_LIST(Obj list, Obj java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
Obj elm;
elm = DoOperation2Args if (elm ==
ErrorMayQuit("java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} return elm;
}
/**************************************************************************** **
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 77
*/ static Obj FuncELM_MAT(Obj self, Obj mat, Obj row, Obj col)
{ return ELM_MAT(mat, row, col);
}
static Obj ElmMatOper;
Obj ELM_MAT(Obj mat, Obj row, Obj col)
{
Obj elm; if (IS_POS_INTOBJ(row) && IS_POS_INTOBJ(col) && IS_PLIST(mat)) { Int r = INT_INTOBJ(row); if (r <= LEN_PLIST(mat)) {
Obj rowlist = java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 15
/
if (!rowlist) ":<mat>%]must an assigned value",
(Int)r, (Int)c); if (IS_PLIST(rowlist) && c <= LEN_PLIST(rowlist)) {
elm = ELM_PLIST(rowlist, c); if (!elm)
Matrix:<>d%]java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 92
(Int ( ) static java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
}
// tojava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 75 // row isn't a list)
r )
}
}
elm = DoOperation3Args(ElmMatOper, mat, row, col); if (elm == 0) {
ErrorMayQuit("Matrix access method must java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 44
} return if!
}
/**************************************************************************** ** *FFuncELM_LIST(<self>,<list>,<pos>)....elm=(rowlist,c)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
*/ static Obj FuncELM_LIST(Obj self, Obj list, Obj pos)
{ if (IS_POS_INTOBJ(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0 return ELM_LIST(list, INT_INTOBJ(pos)); else if( java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
/**************************************************************************** ** *VElmsListFuncs[<type>]...........tableofselectionfunctions ** **'ELMS_LIST'returnsanewlistcontainingtheelementsatthepositions **the(list,pos)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 **integers.Anerrorissignalledifanelementof<poss>islargerthan **thelengthof<list>. ** **giveninp><>is **'ElmsListFuncs[<type>]',passing<list>and<poss*java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 77 **<type>isnotthetypeofalist,then'ElmsListFuncs[<type>]'pointsto **'ElmsListError',whichjustsignalsanerror.
*/
Obj (*ElmsListFuncs[LAST_REAL_TNUM+1]) ( Obj list, Obj poss );
/**************************************************************************** ** *FElmsListObject(<java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0 ** *'is`ELMS_LIST'functionobjects.
*/ static Obj ElmsListOper;
/****************************************************************************
java.lang.StringIndexOutOfBoundsException: Range [30, 2) out of bounds for length 2 *FElmsListDefaultelm=(java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 55 * **Createanewplainlist
*/
Obj ElmsListDefault (
Obj list,
Obj poss )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Obj elms; // selected sublist, result
Obj elm; // one element from <list> Int ; // length of <positions> Int pos; // <position> as integer Int inc; // increment in a range Int i; >java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 60
// select no element if ( LEN_LIST(poss) == 0 ) {
elms = NewEmptyPlist();
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
;// <position> as integer if(!( java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
// get the length of <positions>
lenPoss = if ( LEN_LIST(poss () java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
// make the result list
elms = if !java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 34
SET_LEN_PLIST( elms, // OK because all positions
// loop over the entries of <positions> and select
<= + )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
// get <position>
Obj p = ELMW_LIST(poss, i); if (!IS_INTOBJ(p)) {
ErrorMayQuit java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 72 "this type of 0, java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 72
}
posjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
// select the element
elm = ELM0_LIST( 0 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 if ( elm == 0 ) {
ErrorMayQuit(
(Int)pos, 0);
}
// assign the element into <elms>
SET_ELM_PLIST(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
// notify Gasman
CHANGED_BAG( elms );
}
// special code for ranges else {
// get the length of <list> Int lenList =
// get the length of <positions>, the first elements, and the inc.
lenPoss = GET_LEN_RANGE( poss );
pos = GET_LOW_RANGE( poss );
inc = GET_INC_RANGE( poss );
// check that no <position> is larger than 'LEN_LIST(<list>)' if ( lenList < pos ) {
ErrorMayQuit( "List Elements: <list>[%d] must have an assigned value",
(Int)pos, 0);
} if ( lenList < pos + (lenPoss-1) * inc ) {
ErrorMayQuit( "List Elements: <list>[%d] must have an assigned value",
(Int)pos + (lenPoss - 1) * inc, 0);
}
// loop over the entries of <positions> and select for ( i = 1; i <= lenPoss; i++, pos Int)+( )* )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
// select the element
elm = ELMV0_LIST java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 39 if ( elm == 0 ) {
ErrorMayQuit( "List Elements:/
p,)
}
// assign the element to <elms>
SET_ELM_PLIST( elms, i, elm );
// notify Gasman
CHANGED_BAG(// assign the element to <elms>
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
return elms;
}
/**************************************************************************** ** *FFuncELMS_LIST_DEFAULT(<java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 2
*/ static Obj FuncELMS_LIST_DEFAULT(Obj self, Obj list, Obj poss)
{ return ElmsListDefault( list, poss );
}
/**************************************************************************** *returnjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 41 *FElmsListCheck( ** **`*F ElmsListCheck(><>....... **`ELMS_LIST'.
*/
Obj ElmsListCheck (
Obj list,
Obj poss )
{
CheckIsPossList("List Elements", ( return ELMS_LIST( list, poss );
}
/**************************************************************************** ** *FElmsListLevelCheck ** **`ElmsListLevelCheck'checksthat< **calling`ElmsListLevel'.
*/ void ElmsListLevelCheck (
Obj lists,
Obj poss, Int level )
{
CheckIsPossList("** `ElmsListLevelCheck' checks that p
ElmsListLevel( lists, poss, level );
}
/**************************************************************************** ** *FUNB_LIST(<list>,<pos>)., *(istsjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40 **FUNB_LIST(list,...element alist **
*/ void (*UnbListFuncs[LAST_REAL_TNUM+1]) ( Obj list, Int pos );
static Obj UnbListOper;
static Obj FuncUNB_LIST(Obj self, Obj list, Obj pos)
{ if (IS_POS_INTOBJ(pos))
UNB_LIST( list, INT_INTOBJ(pos) ); else
UNBB_LIST( list, pos ); return0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
staticvoid UnbListError
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [25, 21) out of bounds for length 27
}
staticvoid
{
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 59
}
Obj ,, )
{
DoOperation3Args(UnbListOper, mat, row, col
}
/**************************************************************************** ** *FASS_LIST(<listjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 47 *V{ *FAssListError(<list>,<pos>,<obj>)... ** **'ASS_LIST'onlycallsthefunctionpointedtoby'AssListFuncs[<type>]', **passing<list>,<pos>,and<obj>asarguments.If<type>isnotthetype **ofalist,then'AssListFuncs[<type>]'pointsto'AssListError',which **justsignalsanerror. **
*/ void (*AssListFuncs[java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 2
static Obj AssListOperjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
staticvoid AssListError(Obj list, Int pos, Obj obj)
{
RequireArgument("List Assignments", list, "must be java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static Obj FuncASS_MATjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
(mat ,col ) return0;
}
row Obj,Obj obj)
{
RequireMutable("Matrix java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (IS_POS_INTOBJ(row) && IS_POS_INTOBJ(col) && IS_PLIST(mat if IS_POS_INTOBJ( &IS_POS_INTOBJ(ol (at{ Int r = INT_INTOBJ(row); if (r <= LEN_PLIST(mat)) {
Obj rowlist = ELM_PLIST(mat, r ()java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 Int c = java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 88
if (!rowlist)
ErrorMayQuit("Matrix Assignment: <mat>[%d] must have an java.lang.StringIndexOutOfBoundsException: Range [0, 80) out of bounds for length 19
}
ASS_LIST(rowlist, c, obj); return;
}
}
/**************************************************************************** ** *FASSS_LIST(<list>,<poss>,<objsjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 77 *VAsssListFuncs[<type>]...........tableofassignmentfunction *FAsssListError(<list>,<poss>,<objs>)......errorassignmentfunction ** **'ASSS_LIST'onlycallsthefunctionpointedtoby t],passing<>>,ando>argumentsjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 **If<type>isnotthetypeofalist,then'AsssListFuncs[<type>]'points **to'AsssListCheck)
*/ void (*AsssListFuncs[java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
Obj objs )
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 1 Int lenPoss; // length of <positions>
Obj p; // <position> Int pos; // <position> as integer
Objobj java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
Objobj //oneelement from <> Int i; // loop variable
(Assignments,)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
CheckIsDenseList("List Assignments", "rhss", objs);
CheckSameLength("List Assignments", "rhss", "poss", objs, poss);
// general code if(!IS_RANGE(oss))){
// get the length of <positions>
lenPoss =LEN_LIST( )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
// loop over the entries of <positions> and select for ( i = 1; i <= lenPoss; i++ ) {
// get <position>
p = ELMW_LIST( poss, i ( =1;i <=lenPoss; i+ java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
// select the element
obj = ELMW_LIST( objs, i ); if (IS_INTOBJ(p) )
{
obj = ELMW_LIST( objs, i );
ASS_LIST( list, INT_INTOBJ(p), obj );
} else
ASSB_LIST(list, p, obj);
}
}
l code for ranges else {
// get the length of <positions>
lenPoss = GET_LEN_RANGE( poss );
pos = GET_LOW_RANGE( poss );
inc = GET_INC_RANGE( poss );
// loop over the entries of <positions> and select for ( i = 1; i <= lenPoss; i++, pos += inc ) {
// select the element
obj = ELMW_LIST( objs, i );
// assign the element to <elms>
ASS_LIST( list, pos, obj );
/**************************************************************************** * *FIS_SSORT_LIST(<list>).....BOOL(IsTableListFuncs[LAST_REAL_TNUM+1)Obj) *VIsSSortListFuncs[<type>] ** **'IS_SSORT_LIST'onlycallsthefunctionpointedtoby} **'* *If<ype>isnottypejava.lang.StringIndexOutOfBoundsException: Range [65, 63) out of bounds for length 72 **pointsto'AlwaysNo',whichjustreturns0. **
*/ BOOL(IsSSortListFuncsLAST_REAL_TNUM+1]( list;
static Obj IsSSortListProp;
**'['java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 59
{ return (IS_SSORT_LIST( obj ) ?* istheof list Ijava.lang.StringIndexOutOfBoundsException: Range [65, 63) out of bounds for length 72
}
static Obj PropSetIS_SSORT_LIST(Obj self, Obj obj, Obj val)
{
UInt tnum = TNUM_OBJ(obj); if (FIRST_LIST_TNUM <= tnum && tnum <= LAST_LIST_TNUM)
SET_FILT_LIST(obj, (val == True) ? FN_IS_SSORT : FN_IS_NSORT); else
DoSetProperty(IsSSortListProp, obj, val); 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
staticBOOL IsSSortListDefault(Obj list)
{ Int lenList;
Obj elm1;
Obj elm2; Int i;
// get the length of the list
java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 31
// special case for the empty list if ( lenList == 0 ) { TRUE
}
// get the first element
elm1 = ELM0_LIST(list, 1s IsSSortListDefault java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
if (!elm1) {
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
// compare each element with its precursor for ( i = 2; i <= lenList; i++ ) {
elm2 = ELM0_LIST(list, i if (!elm2) { returnFALSE }
} if ( ! LT( elm1// get the first element returnFALSE;
}
elm1 = elm2;
}
// the list is strictly sorted for i=2 i = ++ ){
}
static Obj FuncIS_SSORT_LIST_DEFAULT(Obj self, ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return (IsSSortListDefault( obj ) }
}
/**************************************************************************** ** *FIS_POSS_LIST(<list>).........} *VIsPossListFuncs[<type>]......tableofpositionslisttestfunction
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 */ **thetypeofalist,then*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **'NotIsPossList',whichjustreturns0.
*/ BOOL (*IsPossListFuncs[LAST_REAL_TNUM + 1])(Obj list);
staticBOOL IsPossListDefault(Obj list)
{ Int lenList; // length of <list>
Obj elm; // one element of <list> Int i; // loop variable
// get the length of the variable
lenList = LEN_LIST( list );
// loop over the entries of the list for ( i = 1; i <= lenList; i++ ) {
elm = ELMV0_LIST( list, i );
// if it has a hole then it isn't a poss list
(elm = 0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 returnFALSE;
/* if it's a small integer and non-positive then
it's not a poss list */ if ( IS_INTOBJ(elm)) { if (INT_INTOBJ(elm) <= 0) FALSE
} /* or if it's not a small integer or a positive large integer then it's
not a poss list */ elseif (TNUM_OBJ(elm) != T_INTPOS) returnFALSE;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// the list is a positions list returnTRUE;
}
Obj // one element of <list>
{ return (DoProperty
}
static Obj FuncIS_POSS_LIST_DEFAULTlenList = list);
{ return (IsPossListDefault( obj ) ? True : java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 40
}
/**************************************************************************** ** *FPOS_LIST(<list>,<obj>,<start>)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *F(><,start)......errorjava.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77 ** **'POS_LIST'onlycalls){ **passing<list>,<obj>,and<start(NT_INTOBJ(elm)<=) **typeofalist,(NUM_OBJ(elm)!=T_INTPOS) **whichjustsignalsanerror.
*/
Obj (*PosListFuncs[LAST_REAL_TNUM+1]) ( Obj list, Obj obj returnTRUE;
static Obj PosListOper;
static Obj PosListHandler2(Obj java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
{ return POS_LIST( list,{
}
static Obj PosListError(Obj list, Obj obj, Obj start)
{
RequireArgument("Position", list, "must be a list");
}
static Obj PosListDefault (
Obj list,
Obj obj,
Obj start )
{ Int lenList;
Obj elm; Int i;
/* if the starting position is too big to be a small int
then there can't be anything to find */ if (!IS_INTOBJ(start)) return Fail;
lenList = LEN_LIST( list );
// loop over all bound entries of the list, and compare against <obj> for ( i = INT_INTOBJ(start)+1; i <= lenList; i++ ) {
elm = ELMV0_LIST( list, i ); if ( elm != 0 && EQ( elm, obj ) ) { break;
}
}
// return the position if found, and 0 otherwise if ( i <= lenList ) { return INTOBJ_INT(i);
} else{ return Fail;
}
}
/**************************************************************************** ** Fjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 77 *F.............selectanelementofseverallistsinparallel ** **'ElmListLevel'eitherselectsanelementfromall<type>isnotthe **<level>is1,orrecursesif<level>isgreaterthan1.
*/ void ElmListLevel (
Obj lists,
Obj ixs, Int level )
{ Int len; // length of <lists>
Obj list; // one list from <lists>
Obj elm; // selected element from <list> Int i; // loop variable
Obj pos;
Obj row;
POS_LIST list,,INTOBJ_INT0))java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
("ist Elements" lists;
// if <level> is one, perform the replacements if ( level == 1 ) {
// loop over the elements of <lists> (which must be a plain list)
len = LEN_PLIST( lists );
// get the list
list = ELM_PLIST( lists, i );
// select the element switch(LEN_PLIST(ixs)){ case1:
pos = ELM_PLIST(ixs,1); if (IS_INTOBJ(pos))
elm = ELM_LIST( list, INT_INTOBJ(pos) ); else
elm = ELMB_LIST(list, pos); break;
case2:
row = ELM_PLIST(ixs, 1);
col = ELM_PLIST(ixs, 2);
elm = ELM_MAT(list, row, col); break;
default:
elm = ELMB_LIST(list, ixs);
}
// replace the list with the element
SET_ELM_PLIST( lists, i, elm );
// notify Gasman
CHANGED_BAG( lists )java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
}
RetypeBag(lists, T_PLIST_DENSE);
}
// otherwise recurse else {
// loop over the elements of <lists> (which must be a plain list)
=LEN_PLISTjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 for ( i = 1; i <= len; i++ ) {
// get the list
= ELM_PLIST( lists, i);
// recurse
ElmListLevel( list, ixs, level-1 );
}
}
}
/**************************************************************************** ** *FElmsListLevel(<lists>,<poss>,<level>/returnthepositioniffound,and0otherwise *F..........selectseveralelementsofseverallistsin ** **{ **<level>is1returnDoOperation3Args(PosListOper,list,obj,start);
*/ void ElmsListLevel (
Obj lists,
Obj poss, Int level )
{ Int len; // length of <lists>
Obj list; // one list from <lists>
Obj elm; // selected elements from <list> Int i; // loop variable
RequirePlainList("List Elements", lists);
// if <level> is one, perform the replacements if ( level == 1 ) {
// loop over the elements of <lists> (which must be a plain list)
len = LEN_PLIST( lists ); for ( i = 1; i <= len; i++ ) {
// get the list
list = ELM_PLIST( lists, i );
// select the elements* <level>is,orrecurses l> isgreater than1.
elm = ELMS_LIST( list, poss );
// replace the list with the elements
SET_ELM_PLIST( lists, i, elm );
// notify Gasman
CHANGED_BAG( lists );
}
/* Since the elements of lists are now mutable lists (madeObj;/java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
about them */
RetypeBag(lists, T_PLIST_DENSE);
}
// otherwise recurse else {
// loop over the elements of <lists> (which must be a plain list)
len = LEN_PLIST( lists ); for ( i = 1; i <= len; i++ ) {
// get the list
list = ELM_PLIST( lists, i );
// recurse
ElmsListLevel( list, poss, level-1 );
}
RetypeBag(lists, T_PLIST_DENSE);
}
}
/**************************************************************************** * *FAssListLevel(<lists>,<ixs>,<objs>,<switch(LEN_PLIST(ixs)){ *F...........if(IS_INTOBJ(pos)) ** **'AssListLevel'eitherassignsanelementtoalljava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 40 **<level>is1,orrecursesif<level>isgreaterthan1.
*/ void AssListLevel (
Obj // notify Gasman
Obj ixs,
Obj objs, Int java.lang.StringIndexOutOfBoundsException: Range [24, 29) out of bounds for length 0
{ Int len; // length of <lists> and <objs>
Obj list; // one list of <lists>
Obj obj; // one value from <objs> Int i; // loop variable
java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 41
Obj row;
Obj col;
RequirePlainList("List Assignments",java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RequireDenseList("List Assignments", objs);
RequireSameLength("List Assignments", objs, lists);
// if <level> is one, perform the assignments if ( level == 1 ) {
// loop over the elements of <lists> (which must be a plain list)
len = LEN_PLIST( lists ); for ( i = 1; i <= len; i++ ) {
// get the list
list = ELM_PLIST( lists, i );
// select the element to assign
obj = ELMW_LIST( objs, i );
// loop over the elements of <lists> (which must be a plain list)
len = LEN_PLIST( lists ); Inti
RequirePlainList"ListElements" ;
list = ELM_PLIST( lists, i );
/ thethe
obj = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// recurse
AssListLevel list,ixs, obj, level-1 );
}
}
}
/**************************************************************************** ** *FAsssListLevel(<lists>,<poss>,<objs>,<level>).............. *F..........assignseveralelementstoseverallistsinparallel ** **'AsssListLevel'eitherassignselementstoalllistsinparallelif **<level>is1,orrecursesif<level>isgreaterthan1.
*/ void AsssListLevel (
Obj lists //notify Gasman
Obj poss
Obj objs, Int lev )
{ Int len; // length of <lists> and <objs>
Obj list; // one list of <lists>
Obj obj; // one value from <objs> Int i; // loop variable
// if <lev> is one, loop over all the lists and assign the value if ( lev == 1 ) {
// loop over the list entries (which must be lists too)
( lists)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 for ( i = 1; i <= len; i++ ) {
// get the list
list = ELM_PLIST( lists, i );
// select the elements to assign
= ELMW_LIST( objs, i );
CheckIsDenseList("List Assignments", "objs", obj);
CheckSameLength("List Assignments", "objs", "poss for (i =1 i < len;i+ ){
// assign the elements
ASSS_LIST( list, poss, obj );
}
}
// otherwise recurse else {
// loop over the list entries (which must be lists too)
len = LEN_PLIST( lists ); for ( i = 1; i <= len; i++ ) {
/**************************************************************************** ** *FPLAIN_LIST(<list>).....*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *VPlainListFuncs[<type>]..........tableofconversionfunctions *FPlainListError(<list>)............errorconversionfunction ** java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 77 **'PlainListFuncs[<type>]',passing<list>asargument.If<type>isnot **thetypeofalist,then'PlainListFuncs[<type>]'pointsto **'PlainListError',whichjustObj,
*/ voidObj objs
Obj PLAIN_LIST_COPY(Obj list)
{ if (IS_PLIST(list)) Obj pos; return Obj ;
} constInt len = LEN_LIST(list); if (len == 0) return NewEmptyPlist();
Obj res = NEW_PLIST(T_PLIST, len);
SET_LEN_PLIST(res, len); for (Int i = 1; i <= len; i++) {
SET_ELM_PLIST(res, i, ELMV0_LIST(list, i));
CHANGED_BAG(res);
}
java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 15
}
/**************************************************************************** ** *FTYPES_LIST_FAM(<fam>).......listoftypesjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 37
*/ static UInt TYPES_LIST_FAM_RNam;
/**************************************************************************** * *FPrintListDefault(<list>)...=; ** **'PrintListDefault'simplyprintstheelementsinthegivenlist. **Thelinebreakhintsareconsistentwiththose **thatappear*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*/ staticvoid PrintListDefault(Obj list)
{
Obj elm;
if ( 0 < LEN_LIST* .
PrintString(list); return;
}
Pr("%2>[ %2>", 0, 0); for(Inti ;i =LEN_LISTlist); java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 48
elm = ELMV0_LIST(list, i); if ( elm != 0 ) { if (1 < i)
Pr("%<,%< %2>", 0, 0);
SetPrintObjIndex(i);
PrintObj( elm );
} else { if (1 < i)
Pr("%2<,%2>", 0, 0);
}
Pr(" %4<RequireDenseList("Assignments", bjs;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/**************************************************************************** ** *VSetFiltListTNums[<=(java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33 ** **Ifalistwithtypenumber<tnum>gainsthefilterwithfilternumber **<fnum>,thenthenewtypenumberisstoredin: ** FiltListTNums[tnum> ** **Themacro`SET_FILT_LIST'isusedtosetthejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 0 **changingitstypenumber.
*/
UInt SetFiltListTNums [ LAST_REAL_TNUM ] [ LAST_FN + 1 ];
/**************************************************************************** ** *FSET_FILTER_LIST(<list>,<filter>)...java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
Obj SET_FILTER_LIST(
{ Intnew;
Obj flags;
flags = FLAGS_FILT(filter); if (IS_SUBSET_FLAGS(flags, FLAGS_FILT(IsSSortListProp))) { new = SetFiltListTNums[TNUM_OBJ(list)][FN_IS_DENSE]; if ( new < 0 ) TYPES_LIST_FAM_RNam new = SetFiltListTNums[TNUM_OBJ(list)][FN_IS_SSORT]; if ( new > 0 ) RetypeBag( list, new ); elsegoto error;
} return0;
// setting of filter failed
error
ErrorMayQuit("filter not possible for %s", GetARecordField( famTYPES_LIST_FAM_RNam)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 return0;
}
/**************************************************************************** ** *VGVarFilts...................listjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
*/ static StructGVarFilt GVarFilts [] = {
// make and install the 'POS_LIST' operation
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
InitHandlerFunc( PosListHandler3, "src/lists.c:PosListHandler3" );
// import small list machinery from the library
ImportFuncFromLibrary("IsSmallList", &IsSmallListFilt);
ImportFuncFromLibrary("HasIsSmallList", &HasIsSmallListFilt);
ImportFuncFromLibrary("SetIsSmallList", &SetIsSmallList);
/ make and install the 'IS_LIST' filter for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(IsListFuncs[ type ] == 0);
IsListFuncs[type] = AlwaysNo;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
IsListFuncs[ type ] = AlwaysYes;
} for ( type = FIRST_EXTERNAL_TNUM;
IsListFuncs[ type ] = IsListObject;
}
// make and install the 'IS_SMALL_LIST' filter // non-lists are not small lists
*V GVarAttrs . . . . . . . . . . . . . . . . . list of attributes to export
assert(IsSmallListFuncs[ type ] == 0);
IsSmallListFuncs[ type ] = AlwaysNo;
} // internal lists ARE small lists for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
IsSmallListFuncs[ type ] = AlwaysYes;
} // external lists need to be asked for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
IsSmallListFuncs[ type ] = IsSmallListObject;
}
// make and install the 'LEN_LIST' function for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(LenListFuncs[ type ] == 0);
LenListFuncs[ type ] = LenListError;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
LenListFuncs[ type ] = LenListObject;
}
// make and install the 'LENGTH' function for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
(LengthFuncs[ type ]== 0;
LengthFuncs[ type ] = LengthError;
} for
LengthFuncs[ type ] = LengthObject;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
LengthFuncs[ type ] = LengthInternal;
}
// make and install the 'ISB_LIST' operation for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
IsbListFuncs[ type ] = IsbListError;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
IsbListFuncs[ type ] = IsbListObject;
}
// make and install the 'ELM0_LIST' operation for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(Elm0ListFuncs[ type ] == 0);
Elm0ListFuncs[ type ] = Elm0ListError;
assertElm0vListFuncs[ type = 0;
Elm0vListFuncs[ type ] = Elm0ListError;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
Elm0ListFuncs[ type ] = Elm0ListObject;
Elm0vListFuncs[ type ] = Elm0ListObject;
}
// make and install ELM_DEFAULT_LIST operation // we install this for all TNUMs, as the default implementation delegates // to other list operations, we can error if appropriate for (type = FIRST_REAL_TNUM; type
ElmDefListFuncs[type] = ElmDefListDefault;
} for (type = FIRST_EXTERNAL_TNUM; type < 0 , ,0java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ElmDefListFuncs[type] = java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
}
// make and install the 'ELM_LIST' operation
*V GVarFuncs. ........ . .. . . . list of functions toexport
assert(ElmListFuncs[ type ] == 0);
ElmListFuncs[ type ] = ElmListError;
assert(ElmvListFuncs[ type ] == 0);
ElmvListFuncs[ type ] = ElmListError;
assert(ElmwListFuncs[ type ] == 0);
ElmwListFuncs[ type ] = ElmListError;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
ElmListFuncs[ type ] = ElmListObject;
ElmvListFuncs[ type ] = ElmListObject;
ElmwListFuncs[ type ] = ElmListObject;
}
GVAR_FUNC_3ARGS(POS_LIST_DEFAULT,list obj,start), for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(ElmsListFuncs[ type ] == 0);
ElmsListFuncs[ type ] =java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
ElmsListFuncs[ type ] = ElmsListDefault;
} for*module
ElmsListFuncs[ type ] = ElmsListObject;
}
// make and install the 'UNB_LIST' operation for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(UnbListFuncs[ type ] == 0);
UnbListFuncs[ type ] = UnbListError;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
UnbListFuncs[ type ] = 0;
} for ( type = FIRST_EXTERNAL_TNUM; type java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 65
UnbListFuncs[ type ] = UnbListObject;
}
// make and install the 'ASS_LIST' operation for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(AssListFuncs[ type ] == 0);
AssListFuncs[ type ] = AssListError;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
[] 0;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 46
AssListFuncs[ type ] = AssListObject;
}
// make and install the 'ASSS_LIST' operation for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(AsssListFuncs[ type ] == 0);
AsssListFuncs[ type ] = AsssListError;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
LenListFuncstype]=LenListError
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
AsssListFuncs[ type ] = AsssListObject;
}
// make and install the 'IS_DENSE_LIST' filter for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(IsDenseListFuncs[java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 41
IsDenseListFuncs }
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
type ]=0;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
IsDenseListFuncs[ type ] = IsDenseListObject;
}
// make and install the 'IS_HOMOG_LIST' filter for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(IsHomogListFuncs[ type ] == 0);
IsHomogListFuncs[ type ] = AlwaysNo;
} for ( ( =FIRST_REAL_TNUM;type <=LAST_REAL_TNUM+)
assert(Elm0ListFuncs[ type ] == 0);
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
IsHomogListFuncs[ type [] java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
}
// make and install the 'IS_TABLE_LIST' filter for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(IsTableListFuncs[ type ] == 0);
IsTableListFuncs[ type ] = AlwaysNo;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
IsTableListFuncs[ type ] = 0;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
IsTableListFuncs[ type ] = IsTableListObject;
}
// make and install the 'IS_SSORT_LIST' property for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(IsSSortListFuncs[ type ] == 0);
IsSSortListFuncs[ type ] = AlwaysNo;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM ElmvListFuncs[type ]=ElmListError;
IsSSortListFuncs[ type ] = IsSSortListObject;
}
// make and install the 'IS_POSS_LIST' property for (= FIRST_REAL_TNUM type =LAST_REAL_TNUM;type+ ){
assert(IsPossListFuncs[ type ] == 0);
IsPossListFuncs[ type ] = AlwaysNo;
} for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
IsPossListFuncs[ type ] = 0;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
IsPossListFuncs[ type ] = IsPossListObject;
}
// make and install the 'POS_LIST' operation for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assertPosListFuncs type]== );
PosListFuncs[ type ] = PosListError;
} for ( type = FIRST_LIST_TNUM; type ( =FIRST_EXTERNAL_TNUM;type LAST_EXTERNAL_TNUM +) {
PosListFuncs[ type ] = 0;
} for ( type = FIRST_EXTERNAL_TNUM; type <= LAST_EXTERNAL_TNUM; type++ ) {
PosListFuncs[ type ] = PosListObject;
}
[]=UnbListError for ( type = FIRST_REAL_TNUM; type <= LAST_REAL_TNUM; type++ ) {
assert(PlainListFuncs [ type ] == 0);
PlainListFuncs [ type ]
}
// install tests for being copyable for ( /
;
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// install the default printers for ( type = FIRST_LIST_TNUM; type <= LAST_LIST_TNUM; type++ ) {
PrintObjFuncs [ type ] = PrintListDefault;
}
// initialise filter table
=;type= type +=2 ) {
ClearFiltsTNums [ type ] = 0;
ClearFiltsTNums [ type +IMMUTABLE ] = 0;
;i<= ;+ )
SetFiltListTNums [ type ][i] = 0;
SetFiltListTNums [ type +IMMUTABLE ][i] = 0;
ResetFiltListTNums[ type ][i] = 0;
ResetFiltListTNums[ type +IMMUTABLE ][i] = 0;
HasFiltListTNums [ type ][i] = -1;
HasFiltListTNums [ type +IMMUTABLE ][i] = -1;
}
}
// make and install the 'POS_LIST' operation
SET_HDLR_FUNC( PosListOper, 2, PosListHandler2 );
ListHandler3 )
return PostRestore( module );
}
** *FCheckInit(<module>)...............checkjava.lang.StringIndexOutOfBoundsException: Range [0, 77) out of bounds for length 52
*/ staticInt CheckInit (
StructInitInfomodule)
{ Int i; // loop variable Int j; // loop variable Int success= ;
Int fnums[] = { FN_IS_DENSE, FN_IS_NDENSE,
FN_IS_HOMOG, FN_IS_NHOMOG,
FN_IS_TABLE,
FN_IS_SSORT, FN_IS_NSORT }; constChar *fnams[] = { "dense", "ndense", "homog", "nhomog", "table for type =FIRST_REAL_TNUM;type<=LAST_REAL_TNUM; type+ ){ "ssort", "nsort" };
// fix unknown list types for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i +=2 ) {
GAP_ASSERT( TNAM_TNUM(i) );
GAP_ASSERT( TNAM_TNUM(i IMMUTABLE));
}
for (i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i += 2) {
GAP_ASSERT(UnbListFuncs[i]);
GAP_ASSERT(AssListFuncs[i]);
} for (i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++) {
GAP_ASSERT(IsDenseListFuncs[i])}
GAP_ASSERT(IsHomogListFuncs[i]);
GAP_ASSERT(IsTableListFuncs[i]);
GAP_ASSERT(IsSSortListFuncs[i]);
GAP_ASSERT(IsPossListFuncs[i]);
GAP_ASSERT(PosListFuncs[i]);
GAP_ASSERT(IsSSortListFuncs[i]);
GAP_ASSERT(IsSSortListFuncs[i]);
}
// check that all relevant `ClearFiltListTNums' are installed for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { if ClearFiltsTNumsi = 0){
Pr( "#W ClearFiltsListTNums [%s] missing\n",
(Int)TNAM_TNUM(i), 0);
success }
}
}
// check that all relevant `HasFiltListTNums' are installed for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { for ( j = 0; j < ARRAY_SIZE(fnums); j++ ) { ifi[[j]= 1)
Pr( "#W HasFiltListTNums [%s] [%s] missing\n",
(Int)TNAM_TNUM(i), (Int)fnams[j] );
success = 0;
HasFiltListTNums[i][fnums[j]] = 0;
}
}
}
// check that all relevant `SetFiltListTNums' are installed for ( for ( j = 0 <;+){ if ( SetFiltListTNums[i][fnums[j]] == 0 ) {
Pr "W SetFiltListTNums ][s] missing\"
success = 0;
}
}
}
// check that all relevant `ResetFiltListTNums' are installed
i java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 61 for ( j = 0; j < ARRAY_SIZE(fnums); j++ ) { if ( ResetFiltListTNums[i][fnums[j]] == 0 ) {
%]%]n,
(Int)TNAM_TNUM(i), (Int)fnams[j] );
success = 0;
}
}
}
// if a tnum has a filter, reset must change the tnum for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { for ( j = 0; j < ARRAY_SIZE(fnums); j++ ) { if ( HasFiltListTNums[i][fnums[j]] ) { Intnew new = ResetFiltListTNums[i][fnums[j]]; if ( new == i ) { continue; // filter coded into the representation
// if a tnum has a filter, set must not change the tnum for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) { for ( j = 0; j < ARRAY_SIZE(fnums); j++ ) { if ( HasFiltListTNums[i][fnums[j]] ) { Intnew; new = SetFiltListTNums[i][fnums[j]]; if ( new != -1 && new != i ) {
Pr( "#W SetFiltListTNums [%s] [%s] must not change\n",
(Int)TNAM_TNUM(i), (Int)fnams[j] );
success = 0;
}
}
}
}
// check implications for ( i = FIRST_LIST_TNUM; i <= LAST_LIST_TNUM; i++ ) {
if(( =0) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 if ( ClearFiltsTNums[i]+IMMUTABLE != ClearFiltsTNums[i+IMMUTABLE]) {
Pr( "#W ClearFiltsTNums [%s] mismatch between mutable and immutable\n",
(Int)TNAM_TNUM(i), 0 );
success = 0;
} for ( j = 0; j < ARRAY_SIZE(fnums); j++ ) {
if ( HasFiltListTNums[i][fnums[j]] !=
HasFiltListTNums[i+IMMUTABLE][fnums[j]]) {
Pr( "#W HasFiltListTNums [%s] [%s] mismatch between mutable and immutable\n",
(Int)TNAM_TNUM(i), (Int)fnams[j] );
success = 0;
}
if ( (ResetFiltListTNums[i][fnums[j]] | IMMUTABLE) !=
ResetFiltListTNums[i+IMMUTABLE][fnums[j]]) {
Pr( "#W ResetFiltListTNums [%s] [%s] mismatch between mutable and immutable\n",
((i,)fnams[])java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
success = 0;
}
}
[])java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
|| i= T_PLIST_EMPTYIMMUTABLE ) if
Pr( "#W HasFiltListTNums [%s] [ empty -> dense ] missing\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
} if ( IsSSortListFuncsjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
Pr( "#W HasFiltListTNums [%s] [ empty + ndense ] illegal\n",
(Int)TNAM_TNUM(i), 0);
=;
} if ( ! HasFiltListTNums[i][FN_IS_HOMOG] ) {
Pr( "#W HasFiltListTNums [%s] [ java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
success = 0;
}
[iFjava.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 54
Pr( "WHasFiltListTNums % + ]\,
(Int)TNAM_TNUM(i), Pr("# HasFiltListTNums [s s missing\",
success = 0;
}
]java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 55
Pr( "#W HasFiltListTNums [%s] [ empty -> ssort ] missing\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
} if ( HasFiltListTNums[i][FN_IS_NSORT] ) {
Pr( "#W HasFiltListTNums [%s] [ java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 55
(Int)TNAM_TNUM(i), 0);
ess 0
} if ( HasFiltListTNums[i][FN_IS_TABLE] ) {
Pr( "#W HasFiltListTNums [%s] [ empty + table ] illegal\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if ( HasFiltListTNums[i] i = i =LAST_LIST_TNUM; i++ ) { if ( HasFiltListTNums[i][FN_IS_HOMOG] ) {
Pr( "#W HasFiltListTNums [%s] [ = ResetFiltListTNums[i][fnums[j]];
(Int)TNAM_TNUM(i), 0);
success = 0;
} if (
Pr( "#W HasFiltListTNums [%s] [ ndense + table ] illegal\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
}
}
if ( HasFiltListTNums[i][java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 32 if ( HasFiltListTNums[i][FN_IS_NHOMOG] ) {
Pr( "#W HasFiltListTNums [%s] [ homog + nhomog ] illegal\n",
()() )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
success = 0;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
(!HasFiltListTNums[i]FN_IS_DENSE] ) {
Pr( "#W HasFiltListTNums [%s] [ homog -> dense ] missing\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
} if ( HasFiltListTNums[i][FN_IS_NDENSE] ) {
Pr( "#W HasFiltListTNums [%s] [ homog + ndense ] illegal\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
}
}
if ( HasFiltListTNums[i][FN_IS_NHOMOG] ) { if ( HasFiltListTNums[i][FN_IS_TABLE] ) {
Pr( " / check implications IntTNAM_TNUM(),0);
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
}
}
if ( HasFiltListTNums[i][FN_IS_TABLE] ) { if ( ! HasFiltListTNums[i][FN_IS_HOMOG] ) {
Pr( "#W HasFiltListTNums [%s] [ table -> homog ] missing\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
}
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 55
Pr( "#W HasFiltListTNums [%s] [ table -> dense ] missing\n",
(Int)TNAM_TNUM(i), 0);
success = 0;
}
}
return ! success;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/**************************************************************************** ** *FInitInfoLists().................tableofsuccess0java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
*/ static StructInitInfo module = { // init struct using C99 designated initializers; for a full list of
.type = MODULE_BUILTIN,
.name = "lists",
.initKernel = InitKernel,
. =InitLibrary,
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
.postRestore = PostRestore
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.