of bounds for length 428
<p><a id="X825A881A7A39C5C3" name="X825A881A7A39C5C3"></a></p>
<h5>3.9<p<a="X825A881A7A39C5C3" name"X825A881A7A39C5C3"></a></p>
<div class="func"><table class="func" width="100%"><tr><td
<< class=<region&;
<p><a id="X86C54C9278FE00F4" name="X86C54C9278FE00F4"></a></p>
<h5 =">
<divpreclass>table"0%tr< "&7NewInternalRegion"ame<
<>codeclass"NewInternalRegion/code functionsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p><a id="X7A7FFA847E090257" name="X7A7FFA847E090257"><
<h5
<div class""><span"GAPprompt">gtspan =GAPinputegionOf,3) RegionOf(5/
<<class><ahref.X83864D427DE991F2spanRefLink/)functionscode"NewRegion <".">spanclass""31) that of the regionitcreatesisnegative Itithusexemptfrom ordering
<p><a id="X86BEBBAF855AA26A" name="X86BEBBAF855AA26A"><
<h5>3.9-7 RegionOf</h5>
<div classjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<><codeclassfunc<>willtheofregionvar""obj><p
<span class="GAPprompt">
<public region>
<class">>>java.lang.StringIndexOutOfBoundsException: Range [50, 44) out of bounds for length 87
<: thread#>
<spanclass="GAPprompt">gapgtregion #t
&;region>
<00
<regionx45deaa0 =>&;</ <span"GAPinputRegionOfShareObj(13))/span>
<span class="GAPprompt">gap></spanspanclass"">gap;</pan<span class"GAPinput"><span class="GAPprompt">gap></span> <span class="GAPinput">RegionPrecedence
<<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre<div>
<p>Note
div"
<spanclass=GAPprompt>&;</spanspan=GAPinputRegionOf2 [6;<sjava.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
</pre></div>
<>a="name"">/a
<p><a id="X87421870782B33C7" name="X87421870782B33C7"></a></p>
<h5java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
<div class="func"><table class
<code"unc> ill return precedenceof the of varclass="Argobj><p
<div="><>
pangts<=RegionPrecedence(""<spanjava.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105
30000
<span class="GAPprompt">p<aid=" =""
300
<span class="GAPprompt">gap>
9
</pre></div>
<p><a id="X7D5982617A3027BD"
<h53.-9 ShareObjh5
<div ="span =GAPprompt>gap&;spanclass""RegionPrecedenceNewLibraryRegion"" 1;/pan>
<p>The <code class="funcjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p><java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<><="" =X79E455D27E12C5B4>/>
<h5areLibraryObj<h5
< p>class a Itintended codeThe can t var=Arg<varargumentthe way<code ""N/><hrefchap3"spanclass""3-/span>a)
<p>code class=funcShareLibraryObjcode>functions
<p><a id="X867DE843791EEF65" name="X867DE843791EEF65"></a><
<h5.-11 </h5
<div class="funcfunc="00%>r> class="code>22;ShareSpecialObj(var=></[<var=""></ar/<class(function)/>/<<iv
<p><code class="func">ShareSystemObj</code> functions like <code class="func">ShareObj</code> (<<><odeclass="func> functionslike< =func>> =RefLink">3.p< java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 304
<p><a
<h5>3.9-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<div class="func">
<< ""></java.lang.StringIndexOutOfBoundsException: Range [53, 45) out of bounds for length 426
<p><a id="X792DAE2C83BD1554" nameX792DAE2C83BD1554<>/>
<h5>3.9-13 ShareInternalObj</h5>
<divclassfunc< class
<p><code class="func">ShareInternalObj</code> functions like <code class="func">ShareObj</code> (<a href="chap3.html#X7D5982617A3027BD"><span class=<class"&;spanspan ="APinput);;span
<p><a id="X82F3B2597E0EC15E" name="X82F3B2597E0EC15E"></a></p>
<h5.9- ShareSpecialObj</h5
<div class="funcaid" X792DAE2C83BD1554=
<p[rue ]
FA5"=p>idX82F3B2597E0EC15E" ="/java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
<p>The <code class="func">ShareSingleObj</code> function creates a new shared region and migrates the f="chap3.htmlX7D5982617A3027BD>< ="">3.9-/span>>, except that the precedenceofthe it creates is It is java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<div class="example
<span class="GAPpromptdiv class=">table ="func" width"100>tr< =tdleft>code="func#82; </code( <varp><code class="func">ShareSingleLibraryObj</code> functions like <code class="func">ShareSingleObj</code> (<a href="chap3.html#Xs/>except of region isthatcodefunc< (<h=.#50> class"39-5<>>. s to used u and packages
sGAPprompt">gapgt; >gap>p>"funcShareSingleSystemObj/ode =func><> < "html< ="">.-5/><a) the of
<span class="GAPprompt">></span> <span<span"gapgt> < ">m: java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 0
<span java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[false
</></div
<p><code class="func">ShareSingleObj/
<p><a id="p>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<h5>3.9-16 ShareSingleLibraryObj<<code class"/> ""< (<=chap3html> =">1<) except the of it is lowest. It to are; i..no that such may another whileaccessingit>
<div
<p><code<5>3.divfunc=0"tdleft>; <o( class"bjvar>[ </>,< class"p(&;function <>//table>>
<p><a id="X8352EF8B83390656" name="X8352EF8B83390656"></a></p>
p<id"name"X8352EF8B83390656<
<h5
<div class="func"><tablec=""funcwidth0<classtdleft< ""&22 /><></var ame,var/><"( 
<p>< code class= "div="func><java.lang.StringIndexOutOfBoundsException: Range [25, 24) o ut of bounds for length 250
<p><a id="X7B5A471982EFD292" name="X7B5A471982EFD292"></a></p>
<ShareSingleKernelObj
<div class="func"><table
pcode=ShareSingleKernelObj like =func<code>hX8508A72B7C215FA5/<>,except precedenceit =func<code hrefhtml>span="9-/>/>. it bytheGAPernel,andlcode iththe .>
<p><a id="X85C5F5A67DAFD919" name="X85C5F5A67DAFD919"></a></p>
<h5>3.9-19 ShareSingleInternalObj</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func"<p>code class"func"ShareSingleKernelObj> likejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p><code class="func">ShareSingleInternalObj</code
<p><a id="X7CB671AE7A411314" name="X7CB671AE7A411314"></a><<> <code ="func">LockAndMigrateObj/code function like<code class""><>(ajava.lang.StringIndexOutOfBoundsException: Range [116, 112) out of bounds for length 338
<h5>3.9-20 ShareSingleSpecialObj</h5>
<div=""><table="func" width"0"<>< classtdleft">RShareSingleSpecialObj/( class"Arg<[ <ar"Arg"name
<p><code
<p><a id="X81A356DD84E76A8A" name="X81A356DD84E76A8A"></a></p>
<div class="func"><table java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
<p>Thelass="func"><table class="func" width="100%"><tr><td class="tdleft"><code class
<p>For thediv=>table="width>tr =" class"#7 <(<var=bj><c=""<<ctdright(nbspfunctiontdtr<java.lang.StringIndexOutOfBoundsException: Range [256, 257) out of bounds for length 256
<>< ="X7BAE5A7282793684"nameX7BAE5A7282793684/<p
<h5>3.9-22 MigrateSingleObj</h5>
<div class="func"><table class="func" width="100%"><tr><tdprediv>
<p>The <code class=class""><tableclass"func" width ap/panclass"tomic<>
<p><a p>hecodeclassfuncLockAndMigrateObjcode>function likecode classGAPprompt>/> class> ( , [,6)/>
<<pan class="GAPprompt name=="X7D1943AF793296F7<>/a/java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
<<>3.9- [ 123 4 , ,[79java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
<p>The <code classLockAndMigrateObj>div
<p><<p>Usingplain would leave newly lists inthethread-local region<p
<h5>3.9-24 IncorporateObj</h5>
<div class="func"><table class="func" width="100%"><tr><td
<p>The
IncorporateObj := function( target[indexcodeclass=><code extends< class></>(ahrefchap3#7">>3.9-4</pan/a) byalso targetI..,for list,itequivalentto/>
valuedo
target[index
od;
:target]=MigrateObj
<prediv
<p>od;
<div class="example">
IncorporateObj := function(target, index, value)
atomic java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.)=
;
nd
</pre></div>
<p>es after its .Example
<div class="example"><pre>
<
<span="GAPprompt>&;/>< "java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 83
<panclassGAPprompt&;</span ">class="" ="1%<>< =tdleftcode="">#22 </code( var=Arg</var> )</><td=tdright&;functionnbsp</>/>tablediv
<span class="GAPprompt">></spanp>Using assignment leave newly lists> code ""AdoptObjcode < class="Arg>/> (and sameregion) ' It accessto "Argbj>pjava.lang.StringIndexOutOfBoundsException: Index 241 out of bounds for length 240
<span class="GAPpromptGAPpromptgap;<span< ="l = ShareObj(1,23java.lang.StringIndexOutOfBoundsException: Range [82, 83) out of bounds for length 62
<span ="GAPprompt">gapgt/panspan"APinput">IsThreadLocal
<span class="GAPprompt"java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
,3[4, 5 6[7, , 9 ]
</pre></div>
<p>Using plain assignment would leave the newly created lists in the thread-local region.</p>
<p><a id="X876843717F4437CB" targetindex : MigrateObj(, target
<h5>3.9-2 AtomicIncorporateObjh5
<div class="func"><table class="func" width="100%"><tr<iv class=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<><codeclassfuncAtomicIncorporateObj<code> extends <code class="func">IncorporateObj</code> (<a href=".html#X7D1943AF793296F7"><spanclass="RefLink">3.-4/></>) also thetarget .. for list isequivalentto/
<divatomic valuedo="
AtomicIncorporateObj := function(target, index, value)
tomic, do
target] :=MigrateObjvalue targetjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
od;
end;
<pre<div =functable =funcwidth0>tr classtdleftcodefunc2 </code> class""o<var</>< classtdright; >/<table>
<>fThe="">CopyRegion/code>function structural of<ar classArg">obj/var>.Theresultingobjectsill locatedin thecurrent 'thread-local The returns itsits./pjava.lang.StringIndexOutOfBoundsException: Index 242 out of bounds for length 242
<div class="example"><pre>
AtomicIncorporateObj := function(target, index, value)
do
target.(index) := MigrateObj(value, target)
d;
end;
</pre>/div>
<p><aid"X784C978D801191E2 name"X784C978D801191E2">>/p>
<h5>3.9-26 AdoptObj</h5span="GAPprompt">gap
<div class=
<p>The>
<=">java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< ="GAPprompt>&;<>
<pt ""tablefuncwidth1"<>" ""W (
false
<span class="GAPprompt">gap>
< class">gapgt;> ><table class="func" width="
<p>.- CopyRegion>
" name="X867CDC9285D30DE8/><java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
<>
<div class="func"><table class="func" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>The <code class="func">LockAndAdoptObj</code> function works like keReadOnlyObj[12,)</>
<p><a id="X7C71A88487762733" namediv class""pre
<h5>3.9-29 CopyRegion</h5>
<div class=""><able class=
<>he<java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
<div class="example"><pre>
<span class=java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
[ 1>< id
<span class="GAPprompt">gap></span> <span
,, 3]
<spandivclassfunc< =100%"<>< ="<class">#87;IsPublic( varclass"">
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdenticalObj(l, l2);</span>
false
<span class=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
true
</pre</iv
<p><a id="X8222929685E9959A" name="X8222929685E9959A"></a></p>
<h5>3.9-30 IsPublic</h5>
div"">table="func" ="100%"<tr<=tdleft =func#27 java.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 4
e <codeclass">/ode>functionreturns ifitsargument is an < =GAPprompt>gap&;"">(ShareObj23)<
<div<span classspan"">>spanspan ="GAPinput>((12,));>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 4
true
<pan="GAPprompt>gap&;/pan
false
<span class="GAPprompt">gap><p>h5.- IsThreadLocalh5
false
<span="GAPprompt">>> <span="GAPinput">IsPublic([12,3);<span
true
</pre></div>
<p><a id="X86B2EEF67C3378F0" name> <span="GAPinput">IsThreadLocal
<h5>3.9-31 IsThreadLocal</h5>
<divclassfunc classGAPprompt&; <classGAPinput>(ShareObj,2,];</span
<p>The
class"pre>
<span class="GAPprompt">gap&span class=APprompt
true
<span class
false</re><
< classGAPpromptgapgtspan< classGAPinputIsThreadLocal/;/span
false
<span="GAPprompt">
<public region>
<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<>aidX80A11F3C84DB512Ename=X80A11F3C84DB512E>/</
<h5>3.9-32 IsShared</h5>
<div class="func"><table class="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>The <code class="func">IsShared</code> function returns true if its argument is an object in a shared region. Note that
<>< ="X827A26A67C99316C" name="X827A26A67C99316C"></a></p>
<h5>3.9-33 HaveReadAccess</h5>
<div="func"">table ="func"0%"><<tdclasstdleft">obj <
<p>The <code class class=""=w="10%>>tdclasstdleft>code class=func&827 IsReadOnlyObjIsReadOnlyObj<>( var class="">obj )&;&;</d</r</><div>
<div class="example"><pre>
<span class"GAPprompt">><span spanclassspanjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 92
true
<span class="GAPprompt""gap>gt> >>span < ="">aveReadAccess(;</java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
false
<span class="GAPprompt">gap></span> <span class="GAPinput">atomic readonly l do t := HaveReadAccess(l); od;; t;</span>
true
</pre
<p><a ="X794206E5845006EA" name="X794206E5845006EA>>
<h5>3.9-34 HaveWriteAccess</h5>
<div class=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>The <code class="func">HaveWriteAccess</code> function returns true if the current thread has write access to <var class="Arg">objpThe< class"HaveWriteAccess/> function returns true if the current thread has write access to obj.>
< class="example">pre
<span="h5>3.99 <>
true
<span class="GAPprompt">gap></span> <span class="div class
<pan"GAPprompt>&/> span=GAPinput">)>
false
<span class="GAPprompt">gap
true
</pre><a =""nameX7F53D70285AF37B4h53.-4RegionNameh5>
<p>div class"example"><pre>
<h5>3.9-35 MakeReadOnlyObj</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MakeReadOnlyObj</code>( <var class="Arg">obj</varpThe class"func">ViewSharedcodefunction theinspection objects regions trylockregion call<codeclassViewObj)<> it a , will normal ./java.lang.StringIndexOutOfBoundsException: Index 298 out of bounds for length 298
<p>pIt to but are
pa id="X7EC9341A865BCC35" name="X7EC9341A865BCC35> =""gapgt;span class""l3;/java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
<Atomicstatements observe ordering means highest
<
<> java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
<<id name08>>/p
<h5>3.9-37 IsReadOnlyObj</h5>
<divp> of regions/pre/>
<p>The <
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsReadOnlyObj([1,2,3]);</span>
false"">&;</panspan=""> (list);</>
<span ="GAPprompt">&;/><span"GAPinput">IsReadOnlyObj(123);/>
false
< classgap;<span<span="GAPinput"IsReadOnlyObj(1,,]);<prejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
true
</pre><<
<>a id"" name"7"<a>p>
<h5>3.9-38 SetRegionName</h5>
<div class="func"><table class="func" width="100%"><tr><java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>The java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p><a id="X8427E1537ADC4575"
<h53 </h5
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class] := l2[i];od/>
<>he classf"ClearRegionName>clears nameof
<p><a id="X7959FC997CC9177C" name="X7959FC997CC9177C"></a></p>
<nNameh5
< classpre>
<p>The <code class="func">RegionName</code>
<p>aidX80D0DFAB7F7241E8="X80D0DFAB7F7241E8"></a>>The of function toconcurrent of,where threadsattemptsetvalueconcurrently onesucceed threads then thevaluecode=""BindOnce>as the value the.It allows the initialization objects the .<p>
<h5>3.9-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< class
<p>ThepInstead atomic, entire candeclared be. This the effectthough function in tatement Function can bedeclared code=codereadwriteor code<codethey . Iffunctionis < classc">readwrite norcodeclass="code></code,thenot .Example/p>
<p><a id="X7FD39BCC8526AC53" name=< classfunctable="func" width10%">tr>><ode="func">82; TestBindOnce</code>( <var class"Arg">bj</>, < class=Arg>index>, <var="Arg">value/ar> )/><tdclasstdrightnbsp; /><>/div
<h5= ="java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 62
<div class="func"><table class="func" width="100
<>he codeclass=""UNSAFE_VIEW>functionthe anythe
<p>Moreover, the function works by temporarily disabling read and write guards for regions
<>It is safe use if
<p><a id="java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
<h5>3.9-43 <span class="Heading">The <code class="code">atomich5.1
<p>The<divclassfunc class"width10"><tr><td class="tdleft"><code
<div class="example"><pre>
atomic (readwritereturn(obj ,expr)
statements
od;> current needs haveat readaccess to var="Arg"obj> but else
</pre></div>
;
<div class>pre
<span class="GAPprompt"
<span="GAPprompt"gap
<span implementation component p<code class<code like ="func""BindOnce/code (chap3>,that ""truebeode">
<span class="GAPprompt">gap></span> <span <span class="GAPprompt">gap></span> <span class
[ 1,4, 9]
</pre></div>
<div class="example"><pre>
<span class="GAPprompt"gap<>< class""l ([,2345)<span
<span class="GAPprompt">gap>nceExpr</> works like<code java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput"><p><a id"X7897092C86AE17D7""name= if not IsBound(![index]) then
<span class="GAPprompt">></span <span class="GAPinput"> i in [1.] do[]:= [i]; odelse
<span java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=GAPprompt;/> spanGAPinput;<span
<span class="GAPprompt">gap></span> <span class=
[
</pre></div>
<>tomic statements must observe region ordering. That
<p><a <h5>3.11-4</>
<.10<span=""> functions/></>
<> of regions entire can declaredto atomic has same as thefunctions body enclosed .Functionarguments beeither class"ode"readwrite</code> or class=codereadonlycode; they will locked the way for statement a function is byneither class""readwrite> code classcode><code, corresponding be.:/>
<div class="examplen>.1
<span class="GAPprompt">gap></span> <span class ="func"><table="func" width"10"<>td""><codeclass"#27;StrictBindOnce var="Arg</> varArg"><="expr <tdclass">(nbsp;&;) | >
|