|
|
|
|
Quelle vars.c
Sprache: C
|
|
/****************************************************************************
**
** 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 variables package.
**
** The variables package is the part of the interpreter that executes
** assignments to variables and evaluates references to variables.
**
** There are five kinds of variables, local variables (i.e., arguments and
** locals), higher variables (i.e., local variables of enclosing functions),
** global variables, list elements, and record elements.
*/
#include "vars.h"
#include "bool.h"
#include "calls.h"
#include "code.h"
#include "error.h"
#include "exprs.h"
#include "gap.h"
#include "gaputils.h"
#include "gvars.h"
#include "hookintrprtr.h"
#include "io.h"
#include "lists.h"
#include "modules.h"
#include "plist.h"
#include "precord.h"
#include "records.h"
#include "saveload.h"
#include "stats.h"
#include "stringobj.h"
#ifdef HPCGAP
#include "hpc/aobjects.h"
#include "hpc/guards.h"
#endif
#include <stdio.h> // for snprintf
/****************************************************************************
**
*V BottomLVars . . . . . . . . . . . . . . . . . bottom local variables bag
**
** 'BottomLVars' is the local variables bag at the bottom of the call stack.
** Without such a dummy frame at the bottom, 'SWITCH_TO_NEW_LVARS' would
** have to check for the bottom, slowing it down.
**
*/
static Bag BottomLVars;
/****************************************************************************
**
*F ObjLVar(<lvar>) . . . . . . . . . . . . . . . . value of a local variable
**
** 'ObjLVar' returns the value of the local variable <lvar>.
*/
Obj ObjLVar (
UInt lvar )
{
Obj val; // value result
val = OBJ_LVAR(lvar);
if (val == 0) {
ErrorMayQuit("Variable: '%g' must have an assigned value",
(Int)NAME_LVAR(lvar), 0);
}
return val;
}
/****************************************************************************
**
*F NewLVarsBag(<slots>) . . . . . . . . . . . . . . allocate a new LVars bag
**
** 'NewLVarsBag' allocates a new 'T_LVAR' bag, with the given number of
** local variable <slots>. It tries to satisfy the request from a pool of
** available LVars with up to 16 slots. If the request cannot be satisfied
** from a pool, a new bag is allocated instead.
**
** The pools are stored as single linked lists, for which 'PARENT_LVARS'
** is abused.
*/
Bag NewLVarsBag(UInt slots)
{
Bag result;
if (slots < ARRAY_SIZE(STATE(LVarsPool))) {
result = STATE(LVarsPool)[slots];
if (result) {
STATE(LVarsPool)[slots] = PARENT_LVARS(result);
CHANGED_BAG(result);
return result;
}
}
return NewBag(T_LVARS, sizeof(LVarsHeader) + sizeof(Obj) * slots);
}
/****************************************************************************
**
*F FreeLVarsBag(<slots>) . . . . . . . . . . . . . . . . . free an LVars bag
**
** 'FreeLVarsBag' returns an unused 'T_LVAR' bag to one of the 'LVarsPool',
** assuming its size (resp. number of local variable slots) is not too big.
*/
void FreeLVarsBag(Bag bag)
{
GAP_ASSERT(TNUM_OBJ(bag) == T_LVARS);
UInt slots = (SIZE_BAG(bag) - sizeof(LVarsHeader)) / sizeof(Obj);
if (slots < ARRAY_SIZE(STATE(LVarsPool))) {
// clean the bag
memset(PTR_BAG(bag), 0, SIZE_BAG(bag));
// put it into the linked list of available LVars bags
LVarsHeader * hdr = (LVarsHeader *)ADDR_OBJ(bag);
hdr->parent = STATE(LVarsPool)[slots];
STATE(LVarsPool)[slots] = bag;
}
}
/****************************************************************************
**
*F ExecAssLVar(<stat>) . . . . . . . . . assign to local variable
**
** 'ExecAssLVar' executes the local variable assignment statement <stat> to
** the local variable that is referenced in <stat>.
*/
static ExecStatus ExecAssLVar(Stat stat)
{
Obj rhs; // value of right hand side
// assign the right hand side to the local variable
rhs = EVAL_EXPR(READ_STAT(stat, 1));
ASS_LVAR(READ_STAT(stat, 0), rhs);
return STATUS_END;
}
static ExecStatus ExecUnbLVar(Stat stat)
{
// unbind the local variable
ASS_LVAR(READ_STAT(stat, 0), (Obj)0);
return STATUS_END;
}
static Obj EvalIsbLVar(Expr expr)
{
Obj val; // value, result
// get the value of the local variable
val = OBJ_LVAR(READ_EXPR(expr, 0));
// return the value
return (val != (Obj)0 ? True : False);
}
/****************************************************************************
**
*F PrintAssLVar(<stat>) . . . . . . print an assignment to a local variable
**
** 'PrintAssLVar' prints the local variable assignment statement <stat>.
*/
static void PrintAssLVar(Stat stat)
{
Pr("%2>", 0, 0);
Pr("%I", (Int)NAME_LVAR(READ_STAT(stat, 0)), 0);
Pr("%< %>:= ", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr("%2<;", 0, 0);
}
static void PrintUnbLVar(Stat stat)
{
Pr("Unbind( %I );", (Int)NAME_LVAR(READ_STAT(stat, 0)), 0);
}
/****************************************************************************
**
*F PrintRefLVar(<expr>) . . . . . . . print a reference to a local variable
**
** 'PrintRefLVar' prints the local variable reference expression <expr>.
*/
static void PrintRefLVar(Expr expr)
{
Pr("%I", (Int)NAME_LVAR(LVAR_REF_LVAR(expr)), 0);
}
static void PrintIsbLVar(Expr expr)
{
Pr("IsBound( %I )", (Int)NAME_LVAR(READ_EXPR(expr, 0)), 0);
}
/****************************************************************************
**
*F ASS_HVAR(<hvar>,<val>) . . . . . . . . . . . assign to a higher variable
*F OBJ_HVAR(<hvar>) . . . . . . . . . . . . . . value of a higher variable
*F NAME_HVAR(<hvar>) . . . . . . . . . . . . . . . name of a higher variable
**
** 'ASS_HVAR' assigns the value <val> to the higher variable <hvar>.
**
** 'OBJ_HVAR' returns the value of the higher variable <hvar>.
**
** 'NAME_HVAR' returns the name of the higher variable <hvar>.
*/
void ASS_HVAR(UInt hvar, Obj val)
{
ASS_HVAR_WITH_CONTEXT(STATE(CurrLVars), hvar, val);
}
Obj OBJ_HVAR(UInt hvar)
{
return OBJ_HVAR_WITH_CONTEXT(STATE(CurrLVars), hvar);
}
Obj NAME_HVAR(UInt hvar)
{
return NAME_HVAR_WITH_CONTEXT(STATE(CurrLVars), hvar);
}
void ASS_HVAR_WITH_CONTEXT(Obj context, UInt hvar, Obj val)
{
// walk up the environment chain to the correct values bag
for (UInt i = 1; i <= (hvar >> MAX_FUNC_LVARS_BITS); i++) {
context = ENVI_FUNC(FUNC_LVARS(context));
}
// assign the value
ASS_LVAR_WITH_CONTEXT(context, hvar & MAX_FUNC_LVARS_MASK, val);
CHANGED_BAG(context);
}
Obj OBJ_HVAR_WITH_CONTEXT(Obj context, UInt hvar)
{
// walk up the environment chain to the correct values bag
for (UInt i = 1; i <= (hvar >> MAX_FUNC_LVARS_BITS); i++) {
context = ENVI_FUNC(FUNC_LVARS(context));
}
// get the value
Obj val = OBJ_LVAR_WITH_CONTEXT(context, hvar & MAX_FUNC_LVARS_MASK);
// return the value
return val;
}
Obj NAME_HVAR_WITH_CONTEXT(Obj context, UInt hvar)
{
// walk up the environment chain to the correct values bag
for (UInt i = 1; i <= (hvar >> MAX_FUNC_LVARS_BITS); i++) {
context = ENVI_FUNC(FUNC_LVARS(context));
}
// get the name
return NAME_LVAR_WITH_CONTEXT(context, hvar & MAX_FUNC_LVARS_MASK);
}
/****************************************************************************
**
*F ExecAssHVar(<stat>) . . . . . . . . . . . . . . assign to higher variable
**
** 'ExecAssHVar' executes the higher variable assignment statement <stat> to
** the higher variable that is referenced in <stat>.
*/
static ExecStatus ExecAssHVar(Stat stat)
{
Obj rhs; // value of right hand side
// assign the right hand side to the higher variable
rhs = EVAL_EXPR(READ_STAT(stat, 1));
ASS_HVAR(READ_STAT(stat, 0), rhs);
return STATUS_END;
}
static ExecStatus ExecUnbHVar(Stat stat)
{
// unbind the higher variable
ASS_HVAR(READ_STAT(stat, 0), 0);
return STATUS_END;
}
/****************************************************************************
**
*F EvalRefHVar(<expr>) . . . . . . . . . . . . . . value of higher variable
**
** 'EvalRefLVarXX' evaluates the higher variable reference expression <expr>
** to the higher variable that is referenced in <expr>.
*/
static Obj EvalRefHVar(Expr expr)
{
Obj val; // value, result
UInt hvar = READ_EXPR(expr, 0);
// get and check the value of the higher variable
val = OBJ_HVAR(hvar);
if (val == 0) {
ErrorMayQuit("Variable: '%g' must have an assigned value",
(Int)NAME_HVAR(hvar), 0);
}
// return the value
return val;
}
static Obj EvalIsbHVar(Expr expr)
{
Obj val; // value, result
// get the value of the higher variable
val = OBJ_HVAR(READ_EXPR(expr, 0));
// return the value
return (val != (Obj)0 ? True : False);
}
/****************************************************************************
**
*F PrintAssHVar(<stat>) . . . . . . . . print assignment to higher variable
**
** 'PrintAssHVar' prints the higher variable assignment statement <stat>.
*/
static void PrintAssHVar(Stat stat)
{
Pr("%2>", 0, 0);
Pr("%I", (Int)NAME_HVAR(READ_STAT(stat, 0)), 0);
Pr("%< %>:= ", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr("%2<;", 0, 0);
}
static void PrintUnbHVar(Stat stat)
{
Pr("Unbind( %I );", (Int)NAME_HVAR(READ_STAT(stat, 0)), 0);
}
/****************************************************************************
**
*F PrintRefHVar(<expr>) . . . . . . . . . print reference to higher variable
**
** 'PrintRefHVar' prints the higher variable reference expression <expr>.
*/
static void PrintRefHVar(Expr expr)
{
Pr("%I", (Int)NAME_HVAR(READ_EXPR(expr, 0)), 0);
}
static void PrintIsbHVar(Expr expr)
{
Pr("IsBound( %I )", (Int)NAME_HVAR(READ_EXPR(expr, 0)), 0);
}
/****************************************************************************
**
*F ExecAssGVar(<stat>) . . . . . . . . . . . . . assign to a global variable
**
** 'ExecAssGVar' executes the global variable assignment statement <stat> to
** the global variable that is referenced in <stat>.
*/
static ExecStatus ExecAssGVar(Stat stat)
{
Obj rhs; // value of right hand side
// assign the right hand side to the global variable
rhs = EVAL_EXPR(READ_STAT(stat, 1));
AssGVar(READ_STAT(stat, 0), rhs);
return STATUS_END;
}
static ExecStatus ExecUnbGVar(Stat stat)
{
// unbind the global variable
AssGVar(READ_STAT(stat, 0), (Obj)0);
return STATUS_END;
}
/****************************************************************************
**
*F EvalRefGVar(<expr>) . . . . . . . . . . . . . value of a globale variable
**
** 'EvalRefGVar' evaluates the global variable reference expression <expr>
** to the global variable that is referenced in <expr>.
*/
static Obj EvalRefGVar(Expr expr)
{
Obj val; // value, result
// get and check the value of the global variable
val = ValAutoGVar(READ_EXPR(expr, 0));
if (val == 0) {
ErrorMayQuit("Variable: '%g' must have an assigned value",
(Int)NameGVar(READ_EXPR(expr, 0)), 0);
}
// return the value
return val;
}
static Obj EvalIsbGVar(Expr expr)
{
Obj val; // value, result
// get the value of the global variable
val = ValAutoGVar(READ_EXPR(expr, 0));
// return the value
return (val != (Obj)0 ? True : False);
}
/****************************************************************************
**
*F PrintAssGVar(<stat>) . . . . . print an assignment to a global variable
**
** 'PrVarAss' prints the global variable assignment statement <stat>.
*/
static void PrintAssGVar(Stat stat)
{
Pr("%2>", 0, 0);
Pr("%I", (Int)NameGVar(READ_STAT(stat, 0)), 0);
Pr("%< %>:= ", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr("%2<;", 0, 0);
}
static void PrintUnbGVar(Stat stat)
{
Pr("Unbind( %I );", (Int)NameGVar(READ_STAT(stat, 0)), 0);
}
/****************************************************************************
**
*F PrintRefGVar(<expr>) . . . . . . print a reference to a global variable
**
** 'PrintRefGVar' prints the global variable reference expression <expr>.
*/
static void PrintRefGVar(Expr expr)
{
Pr("%I", (Int)NameGVar(READ_STAT(expr, 0)), 0);
}
static void PrintIsbGVar(Expr expr)
{
Pr("IsBound( %I )", (Int)NameGVar(READ_EXPR(expr, 0)), 0);
}
/****************************************************************************
**
*F ExecAssList(<ass>) . . . . . . . . . . . assign to an element of a list
**
** 'ExecAssList' executes the list assignment statement <stat> of the form
** '<list>[<position>] := <rhs>;'.
*/
static ExecStatus ExecAssList(Expr stat)
{
Obj list; // list, left operand
Obj pos; // position, left operand
Int p; // position, as C integer
Obj rhs; // right hand side, right operand
// evaluate the list (checking is done by 'ASS_LIST')
list = EVAL_EXPR(READ_STAT(stat, 0));
// evaluate the position
pos = EVAL_EXPR(READ_STAT(stat, 1));
// evaluate the right hand side
rhs = EVAL_EXPR(READ_STAT(stat, 2));
if (IS_POS_INTOBJ(pos)) {
p = INT_INTOBJ(pos);
// special case for plain list
if ( TNUM_OBJ(list) == T_PLIST ) {
if ( LEN_PLIST(list) < p ) {
GROW_PLIST( list, p );
SET_LEN_PLIST( list, p );
}
SET_ELM_PLIST( list, p, rhs );
CHANGED_BAG( list );
}
// generic case
else {
ASS_LIST( list, p, rhs );
}
} else {
ASSB_LIST(list, pos, rhs);
}
return STATUS_END;
}
/****************************************************************************
**
*F ExecAssMat(<ass>) . . . . . . . . . . . assign to an element of a matrix
**
** 'ExecAssMat' executes the matrix assignment statement <stat> of the form
** '<mat>[<row>,<col>] := <rhs>;'.
*/
static ExecStatus ExecAssMat(Expr stat)
{
// evaluate the matrix (checking is done by 'ASS_MAT')
Obj mat = EVAL_EXPR(READ_STAT(stat, 0));
// evaluate and check the row and column
Obj row = EVAL_EXPR(READ_STAT(stat, 1));
Obj col = EVAL_EXPR(READ_STAT(stat, 2));
// evaluate the right hand side
Obj rhs = EVAL_EXPR(READ_STAT(stat, 3));
ASS_MAT(mat, row, col, rhs);
return STATUS_END;
}
/****************************************************************************
**
*F ExecAsssList(<stat>) . . . . . . . . assign to several elements of a list
**
** 'ExecAsssList' executes the list assignment statement <stat> of the form
** '<list>{<positions>} := <rhss>;'.
*/
static ExecStatus ExecAsssList(Expr stat)
{
Obj list; // list, left operand
Obj poss; // positions, left operand
Obj rhss; // right hand sides, right operand
// evaluate the list (checking is done by 'ASSS_LIST')
list = EVAL_EXPR(READ_STAT(stat, 0));
// evaluate and check the positions
poss = EVAL_EXPR(READ_STAT(stat, 1));
CheckIsPossList("List Assignments", poss);
// evaluate and check right hand sides
rhss = EVAL_EXPR(READ_STAT(stat, 2));
RequireDenseList("List Assignments", rhss);
RequireSameLength("List Assignments", rhss, poss);
// assign the right hand sides to several elements of the list
ASSS_LIST( list, poss, rhss );
return STATUS_END;
}
/****************************************************************************
**
*F ExecAssListLevel(<stat>) . . . . . . assign to elements of several lists
**
** 'ExecAssListLevel' executes the list assignment statement <stat> of the
** form '<list>...{<positions>}...[<position>] := <rhss>;', where there may
** actually be several '{<positions>}' selections between <list> and
** '[<position>]'. The number of those is called the level.
** 'ExecAssListLevel' goes that deep into the left operand and <rhss> and
** assigns the values from <rhss> to each of those lists. For example, if
** the level is 1, the left operand must be a list of lists, <rhss> must be
** a list, and 'ExecAssListLevel' assigns the element '<rhss>[<i>]' to the
** list '<list>[<i>]' at <position>.
*/
static ExecStatus ExecAssListLevel(Expr stat)
{
Obj lists; // lists, left operand
Obj pos; // position, left operand
Obj rhss; // right hand sides, right operand
UInt level; // level
Int narg,i;
Obj ixs;
// evaluate lists (if this works, then <lists> is nested <level> deep,
// checking it is nested <level>+1 deep is done by 'AssListLevel')
lists = EVAL_EXPR(READ_STAT(stat, 0));
narg = SIZE_STAT(stat)/sizeof(Stat) -3;
ixs = NEW_PLIST(T_PLIST, narg);
for (i = 1; i <= narg; i++) {
pos = EVAL_EXPR(READ_STAT(stat, i));
SET_ELM_PLIST(ixs, i, pos);
CHANGED_BAG(ixs);
}
SET_LEN_PLIST(ixs, narg);
// evaluate right hand sides (checking is done by 'AssListLevel')
rhss = EVAL_EXPR(READ_STAT(stat, narg + 1));
// get the level
level = READ_STAT(stat, narg + 2);
// assign the right hand sides to the elements of several lists
AssListLevel( lists, ixs, rhss, level );
return STATUS_END;
}
/****************************************************************************
**
*F ExecAsssListLevel(<stat>) . . assign to several elements of several lists
**
** 'ExecAsssListLevel' executes the list assignment statement <stat> of the
** form '<list>...{<positions>}...{<positions>} := <rhss>;', where there may
** actually be several '{<positions>}' selections between <list> and
** '{<positions>}'. The number of those is called the level.
** 'ExecAsssListLevel' goes that deep into the left operand and <rhss> and
** assigns the sublists from <rhss> to each of those lists. For example, if
** the level is 1, the left operand must be a list of lists, <rhss> must be
** a list, and 'ExecAsssListLevel' assigns the elements '<rhss>[<i>]' to the
** list '<list>[<i>]' at the positions <positions>.
*/
static ExecStatus ExecAsssListLevel(Expr stat)
{
Obj lists; // lists, left operand
Obj poss; // position, left operand
Obj rhss; // right hand sides, right operand
UInt level; // level
// evaluate lists (if this works, then <lists> is nested <level> deep,
// checking it is nested <level>+1 deep is done by 'AsssListLevel')
lists = EVAL_EXPR(READ_STAT(stat, 0));
// evaluate and check the positions
poss = EVAL_EXPR(READ_EXPR(stat, 1));
CheckIsPossList("List Assignments", poss);
// evaluate right hand sides (checking is done by 'AsssListLevel')
rhss = EVAL_EXPR(READ_STAT(stat, 2));
// get the level
level = READ_STAT(stat, 3);
// assign the right hand sides to several elements of several lists
AsssListLevel( lists, poss, rhss, level );
return STATUS_END;
}
/****************************************************************************
**
*F ExecUnbList(<ass>) . . . . . . . . . . . . . unbind an element of a list
**
** 'ExecUnbList' executes the list unbind statement <stat> of the form
** 'Unbind( <list>[<position>] );'.
*/
static ExecStatus ExecUnbList(Expr stat)
{
Obj list; // list, left operand
Obj pos; // position, left operand
Obj ixs;
Int narg;
Int i;
// evaluate the list (checking is done by 'UNB_LIST')
list = EVAL_EXPR(READ_STAT(stat, 0));
narg = SIZE_STAT(stat)/sizeof(Stat) - 1;
if (narg == 1) {
pos = EVAL_EXPR( READ_STAT(stat, 1) );
// unbind the element
if (IS_POS_INTOBJ(pos)) {
UNB_LIST( list, INT_INTOBJ(pos) );
} else {
UNBB_LIST( list, pos );
}
} else {
ixs = NEW_PLIST(T_PLIST, narg);
for (i = 1; i <= narg; i++) {
// evaluate the position
pos = EVAL_EXPR(READ_STAT(stat, i));
SET_ELM_PLIST(ixs,i,pos);
CHANGED_BAG(ixs);
}
SET_LEN_PLIST(ixs, narg);
UNBB_LIST(list, ixs);
}
return STATUS_END;
}
/****************************************************************************
**
*F EvalElmList(<expr>) . . . . . . . . . . . . . select an element of a list
**
** 'EvalElmList' evaluates the list element expression <expr> of the form
** '<list>[<position>]'.
*/
static Obj EvalElmList(Expr expr)
{
Obj elm; // element, result
Obj list; // list, left operand
Obj pos; // position, right operand
Int p; // position, as C integer
// evaluate the list (checking is done by 'ELM_LIST')
list = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate and check the position
pos = EVAL_EXPR(READ_EXPR(expr, 1));
if (IS_POS_INTOBJ(pos)) {
p = INT_INTOBJ( pos );
// special case for plain lists (use generic code to signal errors)
if ( IS_PLIST( list ) ) {
if ( LEN_PLIST(list) < p ) {
return ELM_LIST( list, p );
}
elm = ELM_PLIST( list, p );
if ( elm == 0 ) {
return ELM_LIST( list, p );
}
}
// generic case
else {
elm = ELM_LIST( list, p );
}
} else {
elm = ELMB_LIST(list, pos);
}
// return the element
return elm;
}
/****************************************************************************
**
*F EvalElmMat(<expr>) . . . . . . . . . . . . select an element of a matrix
**
** 'EvalElmMat' evaluates the matrix element expression <expr> of the form
** '<mat>[<row>,<col>]'.
*/
static Obj EvalElmMat(Expr expr)
{
// evaluate the matrix (checking is done by 'ELM_MAT')
Obj mat = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate and check the row and column
Obj row = EVAL_EXPR(READ_EXPR(expr, 1));
Obj col = EVAL_EXPR(READ_EXPR(expr, 2));
// return the element
return ELM_MAT(mat, row, col);
}
/****************************************************************************
**
*F EvalElmsList(<expr>) . . . . . . . . . select several elements of a list
**
** 'EvalElmsList' evaluates the list element expression <expr> of the form
** '<list>{<positions>}'.
*/
static Obj EvalElmsList(Expr expr)
{
Obj elms; // elements, result
Obj list; // list, left operand
Obj poss; // positions, right operand
// evaluate the list (checking is done by 'ELMS_LIST')
list = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate and check the positions
poss = EVAL_EXPR(READ_EXPR(expr, 1));
CheckIsPossList("List Elements", poss);
// select several elements from the list
elms = ELMS_LIST( list, poss );
// return the elements
return elms;
}
/****************************************************************************
**
*F EvalElmListLevel(<expr>) . . . . . . . select elements of several lists
**
** 'EvalElmListLevel' evaluates the list element expression <expr> of the
** form '<list>...{<positions>}...[<position>]', where there may actually be
** several '{<positions>}' selections between <list> and '[<position>]'.
** The number of those is called the level. 'EvalElmListLevel' goes that
** deep into the left operand and selects the element at <position> from
** each of those lists. For example, if the level is 1, the left operand
** must be a list of lists and 'EvalElmListLevel' selects the element at
** <position> from each of the lists and returns the list of those values.
*/
static Obj EvalElmListLevel(Expr expr)
{
Obj lists; // lists, left operand
Obj pos; // position, right operand
Obj ixs;
UInt level; // level
Int narg;
Int i;
// evaluate lists (if this works, then <lists> is nested <level> deep,
// checking it is nested <level>+1 deep is done by 'ElmListLevel')
lists = EVAL_EXPR(READ_EXPR(expr, 0));
narg = SIZE_EXPR(expr)/sizeof(Expr) -2;
ixs = NEW_PLIST(T_PLIST, narg);
for (i = 1; i <= narg; i++) {
pos = EVAL_EXPR( READ_EXPR(expr, i));
SET_ELM_PLIST(ixs, i, pos);
CHANGED_BAG(ixs);
}
SET_LEN_PLIST(ixs, narg);
// get the level
level = READ_EXPR(expr, narg + 1);
// select the elements from several lists (store them in <lists>)
ElmListLevel( lists, ixs, level );
// return the elements
return lists;
}
/****************************************************************************
**
*F EvalElmsListLevel(<expr>) . . . select several elements of several lists
**
** 'EvalElmsListLevel' evaluates the list element expression <expr> of the
** form '<list>...{<positions>}...{<positions>}', where there may actually
** be several '{<positions>}' selections between <list> and '{<positions>}'.
** The number of those is called the level. 'EvalElmsListLevel' goes that
** deep into the left operand and selects the elements at <positions> from
** each of those lists. For example, if the level is 1, the left operand
** must be a list of lists and 'EvalElmsListLevel' selects the elements at
** <positions> from each of the lists and returns the list of those
** sublists.
*/
static Obj EvalElmsListLevel(Expr expr)
{
Obj lists; // lists, left operand
Obj poss; // positions, right operand
UInt level; // level
// evaluate lists (if this works, then <lists> is nested <level> deep,
// checking it is nested <level>+1 deep is done by 'ElmsListLevel')
lists = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate and check the positions
poss = EVAL_EXPR(READ_EXPR(expr, 1));
CheckIsPossList("List Elements", poss);
// get the level
level = READ_EXPR(expr, 2);
// select several elements from several lists (store them in <lists>)
ElmsListLevel( lists, poss, level );
// return the elements
return lists;
}
/****************************************************************************
**
*F EvalIsbList(<expr>) . . . . . . . . test if an element of a list is bound
**
** 'EvalIsbList' evaluates the list isbound expression <expr> of the form
** 'IsBound( <list>[<position>] )'.
*/
static Obj EvalIsbList(Expr expr)
{
Obj list; // list, left operand
Obj pos; // position, right operand
Obj ixs;
Int narg, i;
// evaluate the list (checking is done by 'ISB_LIST')
list = EVAL_EXPR(READ_EXPR(expr, 0));
narg = SIZE_EXPR(expr)/sizeof(Expr) -1;
if (narg == 1) {
// evaluate and check the position
pos = EVAL_EXPR(READ_EXPR(expr, 1));
if (IS_POS_INTOBJ(pos))
return ISB_LIST( list, INT_INTOBJ(pos) ) ? True : False;
else
return ISBB_LIST(list, pos) ? True : False;
} else {
ixs = NEW_PLIST(T_PLIST, narg);
for (i = 1; i <= narg; i++) {
pos = EVAL_EXPR( READ_EXPR(expr, i) );
SET_ELM_PLIST(ixs,i,pos);
CHANGED_BAG(ixs);
}
SET_LEN_PLIST(ixs, narg);
return ISBB_LIST(list, ixs) ? True : False;
}
}
/****************************************************************************
**
*F PrintAssList(<stat>) . . . . print an assignment to an element of a list
**
** 'PrintAssList' prints the list assignment statement <stat> of the form
** '<list>[<position>] := <rhs>;'.
**
** Linebreaks are preferred before the ':='.
*/
static void PrintAssList(Stat stat)
{
Pr("%4>", 0, 0);
PrintExpr(READ_EXPR(stat, 0));
Pr("%<[", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr("%<]", 0, 0);
Pr("%< %>:= ", 0, 0);
PrintExpr(READ_EXPR(stat, 2));
Pr("%2<;", 0, 0);
}
static void PrintAssMat(Stat stat)
{
Pr("%4>", 0, 0);
PrintExpr(READ_EXPR(stat, 0));
Pr("%<[", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr("%<, %>", 0, 0);
PrintExpr(READ_EXPR(stat, 2));
Pr("%<]", 0, 0);
Pr("%< %>:= ", 0, 0);
PrintExpr(READ_EXPR(stat, 3));
Pr("%2<;", 0, 0);
}
static void PrintUnbList(Stat stat)
{
Int narg = SIZE_STAT(stat)/sizeof(Stat) -1;
Int i;
Pr("Unbind( ", 0, 0);
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(stat, 0));
Pr("%<[", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
for (i = 2; i <= narg; i++) {
Pr("%<, %>", 0, 0);
PrintExpr(READ_EXPR(stat, i));
}
Pr("%<]", 0, 0);
Pr(" );", 0, 0);
}
/****************************************************************************
**
*F PrintAsssList(<stat>) . print an assignment to several elements of a list
**
** 'PrintAsssList' prints the list assignment statement <stat> of the form
** '<list>{<positions>} := <rhss>;'.
**
** Linebreaks are preferred before the ':='.
*/
static void PrintAsssList(Stat stat)
{
Pr("%4>", 0, 0);
PrintExpr(READ_EXPR(stat, 0));
Pr("%<{", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr("%<}", 0, 0);
Pr("%< %>:= ", 0, 0);
PrintExpr(READ_EXPR(stat, 2));
Pr("%2<;", 0, 0);
}
/****************************************************************************
**
*F ExprHasNonZeroListLevel(<expr>) . . . . . . . . . . . . . . . . . . . . .
**
** Every 'EXPR_ELMS_LIST' or 'EXPR_ELMS_LIST_LEV' increments the list level.
** 'EXPR_ELM_LIST_LEV' has a non-zero list level.
** Every other expression should have level 0.
**
** If a list access happens at level zero ('EXPR_ELM_LIST', 'EXPR_ELM_MAT'
** and 'EXPR_ELMS_LIST') but the level of the list is non-zero, the list
** must be put into parentheses during printing to reset the level to 0.
*/
static BOOL ExprHasNonZeroListLevel(Expr list)
{
return TNUM_EXPR(list) == EXPR_ELMS_LIST ||
TNUM_EXPR(list) == EXPR_ELM_LIST_LEV ||
TNUM_EXPR(list) == EXPR_ELMS_LIST_LEV;
}
/****************************************************************************
**
*F PrintElmList(<expr>) . . . . . print a selection of an element of a list
**
** 'PrintElmList' prints the list element expression <expr> of the form
** '<list>[<position>]'.
**
** Linebreaks are preferred after the '['.
*/
static void PrintElmList(Expr expr)
{
Expr list = READ_EXPR(expr, 0);
Pr("%2>", 0, 0);
if (ExprHasNonZeroListLevel(list)) {
Pr("(", 0, 0);
PrintExpr(list);
Pr(")", 0, 0);
} else {
PrintExpr(list);
}
Pr("%<[", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
Pr("%<]", 0, 0);
}
static void PrintElmMat(Expr expr)
{
Expr matrix = READ_EXPR(expr, 0);
Pr("%2>", 0, 0);
if (ExprHasNonZeroListLevel(matrix)) {
Pr("(", 0, 0);
PrintExpr(matrix);
Pr(")", 0, 0);
} else {
PrintExpr(matrix);
}
Pr("%<[", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
Pr("%<, %>", 0, 0);
PrintExpr(READ_EXPR(expr, 2));
Pr("%<]", 0, 0);
}
static void PrintElmListLevel(Expr expr)
{
Int i;
Int narg = SIZE_EXPR(expr)/sizeof(Expr) -2 ;
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(expr, 0));
Pr("%<[", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
for (i = 2; i <= narg; i++) {
Pr("%<, %>", 0, 0);
PrintExpr(READ_EXPR(expr, i));
}
Pr("%<]", 0, 0);
}
static void PrintIsbList(Expr expr)
{
Int narg = SIZE_EXPR(expr)/sizeof(Expr) - 1;
Int i;
Pr("IsBound( ", 0, 0);
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(expr, 0));
Pr("%<[", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
for (i = 2; i <= narg; i++) {
Pr("%<, %>", 0, 0);
PrintExpr(READ_EXPR(expr, i));
}
Pr("%<]", 0, 0);
Pr(" )", 0, 0);
}
/****************************************************************************
**
*F PrintElmsList(<expr>) . . print a selection of several elements of a list
**
** 'PrintElmsList' prints the list elements expression <expr> of the form
** '<list>{<positions>}'.
**
** Linebreaks are preferred after the '{'.
*/
static void PrintElmsList(Expr expr)
{
Expr list = READ_EXPR(expr, 0);
Pr("%2>", 0, 0);
if (ExprHasNonZeroListLevel(list)) {
Pr("(", 0, 0);
PrintExpr(list);
Pr(")", 0, 0);
} else {
PrintExpr(list);
}
Pr("%<{", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
Pr("%<}", 0, 0);
}
/****************************************************************************
**
*F PrintElmsListLevel(<expr>) . . print a selection of several elements of a list
**
** 'PrintElmsListLevel' prints the list elements expression <expr> of the form
** '<list>{<positions>}'.
**
** Linebreaks are preferred after the '{'.
*/
static void PrintElmsListLevel(Expr expr)
{
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(expr, 0));
Pr("%<{", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
Pr("%<}", 0, 0);
# ".h"
/****************************************************************************
**
*F ExecAssRecName(<stat>) . . . . . . . . assign to an element of a record
**
** 'ExecAssRecName' executes the record assignment statement <stat> of the
** form '<record>.<name> := <rhs>;'.
*/
static ExecStatus ExecAssRecName(Stat stat)
{
Obj record; // record, left operand
UInt rnam; // name, left operand
Obj rhs; // rhs, right operand
// evaluate the record (checking is done by 'ASS_REC')
record = EVAL_EXPR(READ_STAT(stat, 0));
// get the name (stored immediately in the statement)
rnam = READ_STAT(stat, 1);
// evaluate the right hand side
rhs = EVAL_EXPR(READ_STAT(stat, 2));
// assign the right hand side to the element of the record
ASS_REC( record, rnam, rhs );
return STATUS_END;
}
/****************************************************************************
**
*F ExecAssRecExpr(<stat>) . . . . . . . . assign to an element of a record
*
*' executes record assignment statement <stat> of the
** Without Without adummyframe SWITCH_TO_NEW_LVARS
*/
static ExecStatus ExecAssRecExpr(Stat stat)
{
Objrecord;
UInt
rhs
/
record =* java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 74
// evaluate the name and convert it to a record name
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 50
// evaluate the right hand sideifslots<ARRAY_SIZESTATELVarsPool)
rhsjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 40
// assign the right hand side to the element of the record
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
return STATUS_END;
}
/****************************************************************************
**
*F ExecUnbRecName(<stat>) . . . . . . . . . . unbind an element of a record
**
** 'ExecUnbRecName' executes the record unbind statement <stat> of the form
** 'Unbind( <record>.<name> );'.
*/
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 43
{
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
UInt// name, left operand
// evaluate the record (checking is done by 'UNB_REC')
record = EVAL_EXPR(READ_STAT(stat, 0))*
// get the name (stored immediately in the statement)
rnam = READ_STAT(stat, 1);
// unbind the element of the record
UNB_REC( record, rnam );
return STATUS_END;
}
/****************************************************************************
**
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 77
**
** 'ExecUnbRecExpr' executes the record unbind statement <stat> of the form
* Unbind( <>.(n>));'.
*/
forUInt i 1;i=( >java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 63
{
Obj record; // record, left operand
UInt rnam; // name, left operand
// evaluate the record (checking is done by 'UNB_REC')
record = EVAL_EXPR(READ_STAT(stat, 0));
// evaluate the name and convert it to a record name
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
}
*
}
/****************************************************************************
*
* Stat
**
* E' java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 77
*// higher variable
*/
Obj(xpr expr
{
;// element, result
Obj record; // the record, left operand
UInt rnam; // the name, right operand
/ therecord( ''java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
e,0)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
// get the name (stored immediately in the expression)
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
// select the element of the record
elm= ,)
// return the element
(2;,0 ;
}
/****************************************************************************
**
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
** variablethat referenced s>
* form'record>(name>.
*/
static Obj EvalElmRecExpr(Expr expr)
{
Obj elm; // element, result
Obj record; // the record, left operand
UInt rnam; // the name, right operand
// evaluate the record (checking is done by 'ELM_REC')
record = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate the name and convert it to a record name
rnam = RNamObj(EVAL_EXPR(READ_EXPR(expr, 1)));
// select the element of the record
elm = ELM_REC( record, rnam );
// return the element
return elm;
}
/****************************************************************************
*
**
*
** 'EvalElmRecName' evaluates the record isbound expression <expr> of the
** form 'IsBound( <record>.<name> )'.
*/
static Obj EvalIsbRecName(Expr expr)
{
Obj record; // the record, left operand
UInt rnam; // the name, right operand
// evaluate the record (checking is done by 'ISB_REC')
record = EVAL_EXPR(READ_EXPR(expr, 0));
// get the name (stored immediately in the expression)
rnam = READ_EXPR(expr, 1);
**
}
/****************************************************************************
**
*F EvalIsbRecExpr(<expr>) . . . . . . . . test if a record element is*
**
** 'EvalIsbRecExpr' evaluates the record isbound expression <expr> of the
** form 'IsBound( <record>.(<name>) )'.
*/
static Obj EvalIsbRecExpr(Expr expr)
{
Obj record; // the record, left operand
UInt rnam; // the name, right operand
// evaluate the record (checking is done by 'ISB_REC')
record = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate the name and convert it to a record name
rnam = RNamObj(EVAL_EXPR(READ_EXPR(expr, 1)));
return (ISB_REC( record,
}
/****************************************************************************
**
*F PrintAssRecName(<stat>) . . print an assignment to an element of a record
*
*
** form '<record>.<name> := <rhs>;'.
*/
static staticvoid Statstat)
{
Pr("READ_EXPR );
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 34
Pr("%<.", 0, 0);
T(stat, 1)), )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
Pr("%<" (%,(NameGVar( ) )
"<%=" ,);
*<ass).. ...... java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 77
Pr("%2<;", 0, 0);
}
static void Obj pos// position, left operand
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
Pr("%2> ,0);
PrintExpr ;
(<" , )
Pr }
Pr("%<", 0, 0);
Pr(" );", 0, 0);
}
/****************************************************************************
**
*F
**
*}
*'.name>) =<;.
*
PrintAssRecExpr(tat stat)
{
Pr("%4>", 0, 0);
PrintExpr(READ_EXPR(stat, 0));
Pr("%<.(", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr(")%<", 0, 0);
Pr("%< %>:= ", 0, 0);
PrintExpr(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
Pr=java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 44
}
static
{
Pr("Unbind( ", 0, 0);
Pr("%2>", 0, 0);
READ_EXPRstat,0)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
Pr("ExecStatus Expr java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
PrintExpr(java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
<,,)
;" 0);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/****************************************************************************
**
*F PrintElmRecName(<expr>) . . . print a selection of an element of a record
**
** 'PrintElmRecName' prints the record element expression*ExecAssListLevel'executes the list assignment statement <stat> of the
** '<record>.<name>'.
*/*file java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 77
atic
">, )
PrintExpr"hjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
(m"
(%,(),),0;
(%" ,);
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
% ,java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
* (stat).. several java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 77
(<.*
"*<' java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 77
(<,0,0);
Pr"),0 )
}
/****************************************************************************
**
*F PrintElmRecExpr(<expr>) . . . print a selection of an element of a record
**
** 'PrintElmRecExpr' prints the record element expression <expr> of the form
** '<record>.(<name>)'.
*/
static void PrintElmRecExpr(Expr expr)
{
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(expr, 0));
Pr("%<.(", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
Pr(")%<", 0, 0);
}
static void PrintIsbRecExpr(Expr expr)
{
Pr /evaluate if <>is > ,
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(expr, 0));
Pr("%<.(", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
lists =EVAL_EXPR(( 0)
Pr(" )", 0, 0);
}
/****************************************************************************
*
<). ..... an ofaposobj
**
** 'ExecAssPosObj' executes the posobj assignment statement <stat> of the
** form '<posobj>[<position>] := <rhs>;'.
*/
static ExecStatus * U ><java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 36
{
Obj posobj; // posobj, left operand
Obj pos; // position, left operand
Int p; // position, as a C integer
Obj rhs; // right hand side, right operand
// evaluate the posobj (checking is done by 'AssPosObj')
posobj = EVAL_EXPR(READ_STAT(stat, 0));
// evaluate and check the position
pos = EVAL_EXPR(READ_STAT(stat, 1));
p = Obj ;//list, operand
(, 2));
// special case for plain posobj
AssPosObj(posobj, p, rhsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return STATUS_END;
}
/****************************************************************************
**
*F ExecUnbPosObj(<ass>) . . . . . . . . . . . unbind an element of a posobj
**
** 'ExecUnbPosObj' executes the posobj unbind statement <stat> of the form
** 'Unbind( <posobj>[<position>] );'.
*/
static ExecStatus ExecUnbPosObj(Expr stat)
{
Obj posobj; // posobj, left operand
Obj pos; // position, left operand
Int p; // position, as a C integer
the( donejava.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 60
posobj = EVAL_EXPR(READ_STAT(stat, 0));
// evaluate and check the position
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
// evaluate lists (if this works, then <lists> is nested <level> deep,
return STATUS_END;
}
/****************************************************************************
**
*F EvalElmPosObj(<expr>) . . . . . . . . . . . select an element of a posobj
**
** '* must be alistof lists''selects at
** form '<posobj>[<java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 13
*/
static Obj EvalElmPosObj( EVAL_EXPR(java.lang.StringIndexOutOfBoundsException: Range [41, 30) out of bounds for length 41
{
Objelm
Obj posobj; // posobj, left operand
Obj pos; // position, right operand
p
// evaluate the posobj (checking is done by 'ElmPosObj')
// evaluate and check the position
=READ_EXPR );
" <";
posobjsusejava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 73
elm = ElmPosObjPr
// return the element
return elm (x& )!=xjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
} java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
/****************************************************************************
**
(expr)... ..test anelement
**
*'evaluates e> the
** form 'IsBound( <posobj>[<positionPrintExpr((stat );
*/
static Obj EvalIsbPosObj(Expr expr)
{
Obj isb; // isbound, result
Obj posobj; // posobj, left operand Pr"] ,0java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
Obj
IntFPrintAsssList(<stat>) . print an assignment to several elements of a list
// evaluate the posobj (checking is done by 'IsbPosObj')
posobj _EXPR((expr );
// evaluate and check the position
pos = EVAL_EXPR(READ_EXPR(expr, 1)** <<}: >'
*Linebreaks java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 45
// get the result
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 46
returnisb;
/****************************************************************************
**
*F PrintAssPosObj(<stat>) . . print an assignment to an element of a posobj
**
** 'PrintAssPosObj' prints the posobj assignment statement <stat> of the
**
** Linebreaks are preferred before the ':='.
*/
static void PrintAssPosObj(Stat stat)
{
Pr("%4>", 0, 0);
PrintExpr( )butlevel is non, the
Pr("%<![", 0, 0);
READ_EXPR( );
Pr("%<]", 0, 0);
Pr("%< %>:=*
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
Pr("%2<;", 0list)=java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
}
static void PrintUnbPosObj(Stat stat)
{
Pr("Unbind( "* PrintElmList form
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(* Linebreaks are preferred
Pr("%<![", 0, 0);
Exprlist=READ_EXPR(,)
Pr"%],0 )
Pr(" );", 0prlist);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/****************************************************************************
st java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 34
FPrintElmPosObjexpr). of
**
** ;
** '<posobj>[<java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 22
**
** Linebreaks expr,1)
*/
static void PrintElmPosObj(Expr expr)
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
Pr"2> ;
PrintExprPr(">",0)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
Pr("%<![", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
Pr("%<]", 0, 0);
}
static void PrintIsbPosObj(Expr expr)
{
Pr("IsBound( ", 0, 0);
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(expr, 0));
Pr("%<![", 0, 0);
PrintExpr(READ_EXPR(expr, 1));
Pr("%<]", 0Pr"<" ,0;
Pr(" )", 0, 0);
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/****************************************************************************
**
*F ExecAssComObjName(< ( 2 =narg;i+ {
**
** 'ExecAssComObjName' executes the comobj assignment statement <stat> of
** the form '<comobj>!.<name> := <rhs>;'.
*/
static ExecStatus ExecAssComObjName(Stat stat)
{
Objcomobj; / comobj, left operand
trnam
Obj rhsUInt ptr
/evaluate comobj java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
=java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 43
// get the name (stored immediately in the statement) 'PrintElmsList list <> form
* are=(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{
rhs ptr2 (flags2 Expr expr0;
// assign the right hand side to the element of the comobj
,)
java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
}
/**************************************************************************** (
*
) .. java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 77
*
*E* Linebreaks preferred the 'java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
the )Pr"%{ ,0;
*/
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
comobj;// comobj, left operand
UInt java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
// evaluate the comobj (checking is done by 'AssComObj');
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 43
// evaluate the name and convert it to a comobj name
rnam = RNamObj(* 'ExecUnbRecExpr' executes java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 77
// evaluate the right hand side
rhs = EVAL_EXPR(READ_STAT(stat, 2))UIntjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
// assign the right hand side to the element of the comobj EVAL_EXPRjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 50
EvalElmRecNameexpr ... ..... element
}
/****************************************************************************
**
*F ExecUnbComObjName(java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
**
* Ejava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 74
** form 'Unbind( <comobj>.<name> );'.
*/
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
{
comobj
UInt rnam; // name, left operand
// evaluate the comobj (checking is done by 'UnbComObj')
comobj = EVAL_EXPR(READ_STAT(stat, 0));
// get the name (stored immediately in the statement)
rnam = READ_STAT(stat, 1);
// unbind the element of the comobj
UnbComObj(comobj, rnam);
return STATUS_END;
}
/****************************************************************************
**
*F ExecUnbComObjExpr(<stat>) . . . . . . . . . unbind an element of a comobj
**
** 'ExecUnbComObjExpr' executes the comobj unbind statement ;// the name, right operand
** form 'Unbind( = rnam)
*/
static ExecStatus ExecUnbComObjExpr(Stat stat)
{
Obj comobj; // comobj, left operand
UInt rnam; // name, left operand
/
comobj=(s 0))
// evaluate the name and convert it to a comobj name
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
// unbind the element of the comobj
UnbComObjc java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
return STATUS_END;
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*******************************
**
EvalElmComObjNameexpr>) . . . . . . . . . . . . select
**
** 'EvalElmComObjNamejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 77
** form
*/
static Obj EvalElmComObjName(* <.name: rhs;.
{
Obj elm; // element, result
Obj comobj; // the comobj, left operand
rnam/the operand
// evaluate the comobj (checking is done by 'ElmComObj')
comobj = EVAL_EXPR(READ_EXPR(expr, 0));
// get the name (stored immediately in the expression)java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 77
rnam = READ_EXPR(expr, PrintExprRs,2)
// select the element of the comobj =java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
elm ( ,Objjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
// return the element
;
}
/****************************************************************************{
*Fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
**
** 'EvalElmComObjExpr()
*(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 65
*/
static Obj EvalElmComObjExpr(Expr expr)
{
Obj elm; // element, result
Obj comobj; // the comobj, left operand
UInt rnam; // the name, right operand
// evaluate the comobj (checking is done by 'ElmComObj')
comobj = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate the name and convert it to a comobj name
rnam = RNamObj(EVAL_EXPR(READ_EXPR(expr, 1)));
// select the element of the comobj
elm = ElmComObj(comobj, rnam);
// return the element
return elm;
}
/****************************************************************************
**
*F EvalIsbComObjName(<expr>) . . . . . . . test if a comobj element is bound
**
** 'EvalIsbComObjName
*% ;
*/
static Obj EvalIsbComObjName(Expr expr)
{
Objisb
Obj comobj; // the comobj, left operand
UInt rnam* list . to the file details
// evaluate the comobj (checking is done by 'IsbComObj')
=READ_EXPR );
// get the name (stored immediately in the expression)
flags
/java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 1
isbjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
;
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/****************************************************************************
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
** CountFlags .
**
java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 77
** form '
*/
static Obj java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
{
Obj isb; // element, result
// the comobj, left operand
UInt rnam; // the name, right operand
// evaluate the comobj (checking is done by 'IsbComObj')
comobj = EVAL_EXPR(READ_EXPR(expr, 0));
// evaluate the name and convert it to a comobj name
rnam = RNamObj(Obj ;
// select the element of the comobj
) java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
return isb
}
/****************************************************************************
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
**
** 'PrintAssComObjNameObjobjjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
** ()java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 58
*/
staticjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 28
/
Pr("%4>", 0, 0/
java.lang.StringIndexOutOfBoundsException: Range [38, 32) out of bounds for length 41
Pr( 0,0)
Pr("
Pr(" (java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 40
Pr("%< %>:= java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PrintExpr
Pr(> . anjava.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 77
}
** theform<.<> =<java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 43
{
Pr("java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Pr("%2>", 0, 0);
PrintExpr(READ_EXPR(stat, 0));
Pr("%<!.", 0, 0);
(READ_STAT(stat )) 0
Pr("%<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Pr(" );", 0, 0);
}
/****************************************************************************
**
*F PrintAssComObjExpr(<stat>) . print an assignment to an element of a comobj
**
** 'PrintAssComObjExpr' prints the comobj assignment statement <stat> of the
** form '<comobj>.(<name>) := <rhs>;'.
*/
static void PrintAssComObjExpr(Stat stat)
{
Pr("%4>", 0, 0);
(READ_EXPRstat0)
Pr("%<!.(", 0, 0);
PrintExpr(READ_EXPR(stat, 1));
Pr(")%
Pr(<%: ",,;
READ_EXPR,))java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
static void PrintUnbComObjExpr(Stat stat)
{
Pr("Unbind( ", 0, 0);
Pr("%2>", 0, 0);
PrintExpr java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 30
Pr("%
(stat );
Pr(")%<", 0, 0);
*
}
/****************************************************************************
**
*F PrintElmComObjName(<expr>) . print a
**
** 'PrintElmComObjName' prints the{
** form '< Obj *assignments variables evaluates to .
*/arefive of variables,local*r;
void// evaluateevaluate the comobj (checking is done by 'ElmComObj')
* java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 57
#inclujava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 18
(java.lang.StringIndexOutOfBoundsException: Range [28, 23) out of bounds for length 34
i hpc/.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
Pr("******java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( ;
}
static void /
{
Pr("IsBoundObj
Pr2"00java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
PrintExpr(** have to checktojava.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
Pr("%<!.", 0, 0) java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 34
Pr("%I", (Int)NAME_RNAM(READ_EXPR(expr**
(%",0;
Pr(" )", 0{
}
/****************************************************************************
**
*F PrintElmComObjExprObjjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
*
*'rintElmComObjExpr // element, result
** form ' Objcomobj
*
staticjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{
Pr("%2>", 0, 0);
PrintExprjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(%!,0
return
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
static void PrintIsbComObjExpr(Expr*'java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Pr("IsBound( ",java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Pr(%>, );
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 34
(%! ,0;
Pr(")%<
Objjava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31
}
*******************
*
*
*F Pr("%2<;,0 ;
Vars
**
*(,),1java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
*java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 19
**
*/
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
{
// Need to promote to High Vars, else bag will be freed when function exitstriesthejava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 74
MakeHighVars(STATE(CurrLVars))* 'java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
STATEC)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 39
{
}
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ifrhs java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 40
}
ars;
Failjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 49
{
i!({
RequireArgumentjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 60
}
Obj contents = NEW_PREC(0);
Objjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
=Nf)
UInt =(SIZE_BAG(lvars) -2sizeofObj) - sizeof(UInt))/sizeof(Obj);
// walk up the environment chain to the correct values bag
if (java.lang.StringIndexOutOfBoundsException: Range [25, 19) out of bounds for length 27
returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
( ")func;
) )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
memcpy(1+ADDR_OBJ =ENVI_FUNCFcontext
while (len > 0 && ELM_PLIST(values, len) == 0)
len--;
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 29
)
if (!IsBottomLVars(ENVI_FUNC(func)))
AssPRec(contents,
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
}*
static<<'
{ (var )
RequireFunction(SELF_NAME, java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2
Obj envi "<.,0 ;
return (envi && IS_LVARS_OR_HVARS(envi)) ? envi : Fail;
}
*************************************
**
*F IsBottomLVars(<lvars>) . . check whether some lvars are the (getter flagsjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
returnPrjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 26
/***********
/****************************************************************************
**
*F * java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
*/
SWITCH_TO_BOTTOM_LVARS*
{
return java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/****************************************************************************
(DoSetReturnTrueFilter
*F VarsAfterCollectBagsSET_FLAG2_FILT(java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0
*/
#
static void java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
// As an optimization, we never call CHANGED_BAG on CurrLVars directly,;
Pr("%I", (Int)NAME_LVAR(READ_STAT(stat, 0)), 0); java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 55
();}
HANGED_BAG ()java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
}
static java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
{
if (
(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 35
STATE(PtrLVars) ****** * ** *filter** * *** **java.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
STATE(PtrBody) = PTR_BAG*
}
}
java.lang.NullPointerException
/****************************************************************************
**
*F SaveLVarsflag1 ()
**
*/
#ifdef #ifdef GAP_ENABLE_SAVELOAD
static voido;
{
UInt if= java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const LVarsHeader * hdr = (const LVarsHeader *)CONST_ADDR_OBJ(lvars);
SaveSubObj(hdr->func);
SaveUInt(hdr->stat);
Pr(%!,0 )
len = (SIZE_OBJ(lvars) - (2*sizeof(Obj)+ Pr"%", , 0)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
ptr = CONST_ADDR_OBJ(lvars)java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
for (i = 0; i < len; i++)
SaveSubObj(*ptr++); READ_EXPRexpr, 1)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
#endif
/****************************************************************************
**
*F LoadLVars ( <lvars> )
**
*/
#ifdef java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
static void LoadLVars// Need to promote to High Vars, else bag will be freed when function exits
{
UInt lenstaticObjObj java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
Obj *java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
LVarsHeader
hdr->func = LoadSubObj();java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 60
hdr->stat = LoadUInt();
hdr->parent = LoadSubObj();
len = (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
contents=0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
*ptr++ = LoadSubObj() *Obj java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 74
#endif
static Obj TYPE_LVARS;
static Obj TypeLVars(Obj lvars)
{
return TYPE_LVARS;
}
static void PrintLVars( (+java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 71
{
" >,,0;
}
/****************************************************************************
**
*F * * * * * * * * * * * * ( &IS_LVARS_OR_HVARSenvi)?envi:
*/
/****************************************************************************
**
*V BagNames . . . . . . . . . . . . . . .BOOLIsBottomLVars(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
*/
[ ={
{ T_LVARS, "
* java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 77
};
/****************************************************************************
**
*V GVarFuncs . RequireOperation(oper);
*/
static StructGVarFunc java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
(,
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 34
GVAR_FUNC_1ARGS(ParentLVars, lvarstester#USE_GASMAN
GVAR_FUNC_1ARGS(static void VarsBeforeCollectBa java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 34
GVAR_FUNC_1ARGS
/Asjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 2
}
***
**
*F InitKernel*Thisenablesspecialjava.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 36
*/
static Int*
java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 32
// make 'CurrLVars' known to Gasman
(TCurrLVars)"varscC")
(&BottomLVars "srcvars.c: }
enum { Obj r
static char cookies[count/
for (int i = 0; i < count; i++) {
snprintf( (RNamOperation == 0)
InitGlobalBag
}
// set the bag type names (for error messages and debugging)
(BagNames )
// install the marking functions for local variables bag
InitMarkFuncBags( T_LVARS, MarkAllButFirstSubBags );
InitMarkFuncBags java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 56
// Make T_LVARS bags public
(_java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
#endif
#ifdef GAP_ENABLE_SAVELOAD
// and the save restore functions
SaveObjFuncs[ T_LVARS *java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
ObjFLUSH_ALL_METHOD_CACHES;
SaveObjFuncs[ T_HVARS ] = SaveLVars;
LoadObjFuncs[ java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 18
#endif
TypeObjFuncs[ T_LVARS ] = TypeLVars;
_java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 40
] ;java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
PrintObjFuncs=}
/ java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 70
InstallExecStatFunc
InstallExecStatFunc( *java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
InstallEvalExprFunc java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [46, 39) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 62
InstallPrintExprFunc( EXPR_REF_LVAR java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 40
{,0 ,00}
// install executors, evaluators, and printers for higher variables
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 60
stat )
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 35
;
InstallPrintStatFunc( STAT_UNB_HVAR , PrintUnbHVar);
InstallPrintExprFunc( EXPR_REF_HVAR , PrintRefHVar);
InstallPrintExprFunc( EXPR_ISB_HVAR , PrintIsbHVar);
// install executors, evaluators, and printers for global variables
InstallExecStatFunc
java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 60
InstallEvalExprFuncEXPR_REF_GVAR , EvalRefGVar)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2
( ,);
InstallPrintStatFunc( STAT_UNB_GVAR , PrintUnbGVar);
InstallPrintExprFunc( EXPR_REF_GVAR , PrintRefGVar);
InstallPrintExprFunc( EXPR_ISB_GVAR , PrintIsbGVar);
// install executors, evaluators, and printers for list elements
InstallExecStatFunc( STAT_ASS_LIST , ExecAssList);
InstallExecStatFunc( STAT_ASSS_LIST , ExecAsssList);
InstallExecStatFunc( STAT_ASS_LIST_LEV , ExecAssListLevel);
InstallExecStatFunc( STAT_ASSS_LIST_LEV , ExecAsssListLevel);
InstallExecStatFunc( STAT_UNB_LIST , ExecUnbList);
InstallEvalExprFunc( EXPR_ELM_LIST , EvalElmList);
InstallEvalExprFunc( EXPR_ELMS_LIST , EvalElmsList);
InstallEvalExprFunc( EXPR_ELM_LIST_LEV , EvalElmListLevel);
InstallEvalExprFunc( EXPR_ELMS_LIST_LEV , EvalElmsListLevel);
InstallEvalExprFunc( EXPR_ISB_LIST , EvalIsbList);
InstallPrintStatFunc(STAT_ASS_LIST ;
InstallPrintStatFunc( STAT_ASSS_LIST , PrintAsssList);
InstallPrintStatFunc( STAT_ASS_LIST_LEV , PrintAssList);
=*
InstallPrintStatFunc InstallPrintExprFunc(EXPR_ISB_LVAR,PrintIsbLVar)
InstallPrintExprFunc( EXPR_ELM_LIST , PrintElmList);
InstallPrintExprFunc(EXPR_ELMS_LIST , PrintElmsList);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
InstallPrintExprFunc
InstallPrintExprFunc(EXPR_ISB_LIST , PrintIsbList);
// install executors, evaluators, and printers for matrix elements
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 50
val =ValAutoGVar(READ_EXPR(xpr,0)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
(EXPR_ELM_MAT,rintElmMat);
// evaluatejava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
( java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 17
voidPrintUnbGVarD_STAT(,;
(STAT_UNB_REC_EXPR
,tatic inline
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
InstallEvalExprFunc(
Obj ;
InstallPrintStatFunc
fori ijava.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
ifLEN_PLISTl)<
* list 'list[i>'at position>java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
InstallPrintExprFunc(EXPR_ISB_REC_NAME , PrintIsbRecName);
InstallPrintExprFunc( EXPR_ISB_REC_EXPR , PrintIsbRecExpr);
// install executors, evaluators, and printers for positional objects
InstallExecStatFunc( STAT_ASS_POSOBJ , ExecAssPosObj);
narg (/(Stat)-;
i=1 < narg;i+ java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
SET_LEN_PLIST(ixs arg);
InstallPrintStatFunc )java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
InstallPrintStatFunc( InstallExecStatFunc( STAT_ASSS_LIST_LEV,ExecAsssListLeveljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
InstallPrintExprFunc( EXPR_ELM_POSOBJ , java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 0
InstallPrintExprFunc
InstallEvalExprFunc( EXPR_ELMS_LIST_LEV , EvalElmsListLevel);
InstallExecStatFunc( STAT_ASS_COMOBJ_NAME , ExecAssComObjName);
)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
InstallExecStatFunc( STAT_UNB_COMOBJ_NAME , ExecUnbComObjName);
InstallExecStatFunc* 'xecAsssListLevel InstallPrintStatFunc( STAT_ASS PrintAsssList;
InstallEvalExprFunc( EXPR_ELM_COMOBJ_NAME , EvalElmComObjName);
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
InstallEvalExprFunc( EXPR_ISB_COMOBJ_NAME ,
InstallEvalExprFunc
InstallPrintStatFunc( STAT_ASS_COMOBJ_NAME , PrintAssComObjName);
InstallPrintStatFunc( STAT_ASS_COMOBJ_EXPR /entries tilln+ argumentjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
InstallPrintStatFunc( STAT_UNB_COMOBJ_NAME , PrintUnbComObjName);
InstallPrintStatFunc( STAT_UNB_COMOBJ_EXPR , PrintUnbComObjExpr);
InstallPrintExprFunc( EXPR_ELM_COMOBJ_NAME , PrintElmComObjName);
InstallPrintExprFunc( EXPR_ELM_COMOBJ_EXPR , java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 18
InstallPrintExprFunc( EXPR_ISB_COMOBJ_NAME , PrintIsbComObjName);
java.lang.StringIndexOutOfBoundsException: Range [46, 24) out of bounds for length 70
#USE_GASMAN
// install before and after actions for garbage collections
RegisterBeforeCollectFuncBags(VarsBeforeCollectBags);
RegisterAfterCollectFuncBags(VarsAfterCollectBags);
#endif
// init filters and functions
InitHdlrFuncsFromTable( GVarFuncs switch){
InitCopyGVar",)
return 0;
}
/****************************************************************************
**
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/
static Int PostRestore (
StructInitInfo * module )
b
CurrLVars)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
SWITCH_TO_BOTTOM_LVARS();
return
/****************************************************************************
**
*F InitLibrary( <module> ) . java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
*/
}
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
tmpBody
NewBag(T_HVARS 3 *sizeof(Obj))
tmpFunc NewFunctionC "bottom " 0)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
LVarsHeader * hdr = (LVarsHeader *)ADDR_OBJ(BottomLVars);break;
hdr->func = tmpFunc;
hdr->parent =Fail;
tmpBody = break;
SET_BODY_FUNC( tmpFunc, tmpBody );
// init filters and functions
breakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
return PostRestore(module);
}
static Int InitModuleState(void)
{
#ifdef HPCGAP
STATE(CurrLVars) = BottomLVars;
SWITCH_TO_BOTTOM_LVARS();
#endif
return 0;
}
/****************************************************************************
**
*F InitInfoVars() . . . . . . . . . . . . . . . . . table of init functions
*/
static StructInitInfo module = {
// init struct using C99 designated initializers; for a full list of
// fields, please refer to the definition of StructInitInfo
.type = MODULE_BUILTIN,
.name = "vars",
.initKernel = InitKernel,
.initLibrary = InitLibrary,
.postRestore = PostRestore,
.initModuleState = InitModuleState,
};
StructInitInfo * InitInfoVars ( void )
{
return &module;
}
¤ Dauer der Verarbeitung: 0.556 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|
|
|
|
|