From: <ba...@us...> - 2010-05-28 21:08:25
|
Revision: 14323 http://x10.svn.sourceforge.net/x10/?rev=14323&view=rev Author: bardb Date: 2010-05-28 21:08:16 +0000 (Fri, 28 May 2010) Log Message: ----------- Frumping through Function types Modified Paths: -------------- trunk/x10.man/v2.0/Functions2.tex trunk/x10.man/v2.0/Types.tex trunk/x10.man/v2.0/x10.pdf Modified: trunk/x10.man/v2.0/Functions2.tex =================================================================== --- trunk/x10.man/v2.0/Functions2.tex 2010-05-28 21:03:16 UTC (rev 14322) +++ trunk/x10.man/v2.0/Functions2.tex 2010-05-28 21:08:16 UTC (rev 14323) @@ -6,22 +6,46 @@ \section{Overview} Functions, the last of the three kinds of values in X10, encapsulate pieces of -code which can be applied to a vector of arguments to produce a value. -Functions, when applied, can do anything that any other code could do: fail to -terminate, throw an exception, modify variables, spawn activities, execute in -several places, and so on. X10 functions are not mathematical functions: the -\xcd`f(1)` may return \xcd`true` on one call and \xcd`false` on an immediately -following call. +code which can be applied to a vector of arguments to produce a value. +Functions, when applied, can do nearly anything that any other code could do: +fail to terminate, throw an exception, modify variables, spawn activities, +execute in several places, and so on. X10 functions are not mathematical +functions: the \xcd`f(1)` may return \xcd`true` on one call and \xcd`false` on +an immediately following call. It is a limitation of \XtenCurrVer{} that functions do not support type arguments. This limitation may be removed in future versions of the language. A \emph{function literal} \xcd"(x1:T1,..,xn:Tn){c}:T=>e" creates a function of -type\\ \xcd"(x1:T1,...,xn:Tn){c}=>T" (\Sref{FunctionType}). The body \Xcd{e} -of such an expression is type-checked in an environment in which \Xcd{c} is -true. +type\\ \xcd"(x1:T1,...,xn:Tn){c}=>T" (\Sref{FunctionType}). For example, +\xcd`(x:Int) => x*x` is a function literal describing the squaring function on +integers. + +The function body may be a block. To compute integer squares by repeated +addition (inefficiently), one may write: +%~~gen +% package Functions.Are.For.Spunctions; +% class Examplllll { +% static +%~~vis +\begin{xten} +val sq: (Int) => Int + = (n:Int) => { + var s : Int = 0; + val abs_n = n < 0 ? -n : n; + for ((i) in 1..abs_n) s += abs_n; + s + }; +\end{xten} +%~~siv +%} +%~~neg + + + + A function literal evaluates to a function entity {$\phi$}. When {$\phi$} is applied to a suitable list of actual parameters \xcd`a1`-\xcd`an`, it evaluates \xcd`e` with the formal parameters bound to the actual parameters. @@ -71,16 +95,16 @@ %~~siv %}} %~~neg +\noindent +This doesn't quite work if the body is a statement rather than an expression. +A few language features are forbidden (\xcd`break` or \xcd`continue` of a loop +that surrounds the function literal) or mean something different (\xcd`return` +inside a function returns from the function). -%FUNCY% At runtime, -%FUNCY% function execution results in the evaluation of \Xcd{e} in an -%FUNCY% environment in which each formal is bound to the given actual -%FUNCY% parameter. - The \emph{method selector expression} \Xcd{e.m.(x1:T1,...,xn:Tn)} (\Sref{MethodSelectors}) permits the specification of the function underlying the method \Xcd{m}, which takes arguments of type \Xcd{(x1:T1,..., xn:Tn)}. @@ -132,12 +156,15 @@ same syntax as a method body; it may be either an expression, a block of statements, or a block terminated by an expression to return. In particular, a value may be returned from the body of the function -using a return statement (\Sref{ReturnStatement}). The type of a +using a return statement (\Sref{ReturnStatement}). + +The type of a function is a function type (\Sref{FunctionType}). In some cases the return type \Xcd{T} is also optional and defaults to the type of the body. If a formal \Xcd{xi} does not occur in any -\Xcd{Tj},\Xcd{c},\Xcd{T} or \Xcd{e}, the declaration \Xcd{xi:Ti} may -be replaced by just \Xcd{Ti}. +\Xcd{Tj}, \Xcd{c}, \Xcd{T} or \Xcd{e}, the declaration \Xcd{xi:Ti} may +be replaced by just \Xcd{Ti}: \xcd`(Int)=>7` is the integer function returning +7 for all inputs. \label{ClosureGuard} @@ -154,7 +181,11 @@ have a terminating expression. If the return type is omitted, it is inferred, as described in \Sref{TypeInference}. -It is a static error if the return type cannot be inferred. +It is a static error if the return type cannot be inferred. \Eg, +\xcd`(Int)=>null` is not well-defined; X10 does not know which type of +\xcd`null` is intended. +%~~exp~~`~~`~~ ~~ +But \xcd`(Int):Rail[Double] => null` is legal. \begin{example} @@ -165,16 +196,19 @@ %~~gen % package functions2.oh.no; % import x10.util.*; +% class Finder { +% static %~~vis \begin{xten} -class Finder { -static def find[T](f: (T) => Boolean, xs: List[T], absent:T): T = { + +def find[T](f: (T) => Boolean, xs: List[T], absent:T): T = { for (x: T in xs) if (f(x)) return x; absent - }} + } \end{xten} %~~siv +% } %~~neg The method may be invoked thus: @@ -256,14 +290,13 @@ valid for those variables. \xcd`shared var`s are heap-allocated, which is less efficient but allows them to exist after \xcd`m` returns. -\begin{note} + \xcd`shared` does not guarantee {\bf atomic} access to the shared variable. As with any code that might mutate shared data concurrently, be sure to protect references to mutable shared state with \xcd`atomic`. For example, the following code returns a pair of closures which operate on the same shared variable \xcd`a`, which are concurrency-safe---even if invoked many times simultaneously. Without \xcd`atomic`, it would no longer be concurrency-safe. -\end{note} %~~gen @@ -300,14 +333,45 @@ %or anonymous classes. %\end{note} -\section{Methods selectors} +\section{Method selectors} \label{MethodSelectors} \index{function!method selector} \index{method!underlying function} A method selector expression allows a method to be used as a -first-class function. +first-class function, without writing a function expression for it. +For example, consider a class \xcd`Span` defining ranges of integers. +%~~gen +% package Functions2.Span; +%~~vis +\begin{xten} +class Span(low:Int, high:Int) { + def this(low:Int, high:Int) {property(low,high);} + def between(n:Int) = low <= n && n <= high; + def example() { + val digit = new Span(0,9); + val isDigit : (Int) => Boolean = digit.between.(Int); + if (isDigit(8)) x10.io.Console.OUT.println("8 is!"); + } +} +\end{xten} +%~~siv +% +%~~neg +\noindent + + +In \xcd`example()`, +%~~exp~~`~~`~~ digit:Span!~~class Span(low:Int, high:Int) {def this(low:Int, high:Int) {property(low,high);} def between(n:Int) = low <= n && n <= high;} +\xcd`digit.between.(Int)` +is a unary function testing whether its argument is between zero +and nine. It could also be written +%~~exp~~`~~`~~ digit:Span!~~class Span(low:Int, high:Int) {def this(low:Int, high:Int) {property(low,high);} def between(n:Int) = low <= n && n <= high;} +\xcd`(n:Int) => digit.between(n)`. + +This is formalized thus: + \begin{grammar} MethodSelector \: Primary \xcd"." @@ -320,8 +384,8 @@ \end{grammar} The \emph{method selector expression} \Xcd{e.m.(T1,...,Tn)} is type -correct only if it is the case that the static type of \Xcd{e} is a -class or struct or interface with a method +correct only if the static type of \Xcd{e} is a +class or struct or interface \xcd`V` with a method \Xcd{m(x1:T1,...xn:Tn)\{c\}:T} defined on it (for some \Xcd{x1,...,xn,c,T)}. At runtime the evaluation of this expression evaluates \Xcd{e} to a value \Xcd{v} and creates a function \Xcd{f} @@ -335,12 +399,16 @@ \end{xtenmath} \noindent behaves as if it were the function \begin{xtenmath} -((v:T)=> - [X$_1$, $\dots$, X$_m$](x$_1$: T$_1$, $\dots$, x$_n$: T$_n$) => v.m[X$_1$, $\dots$, X$_m$](x$_1$, $\dots$, x$_n$)) +((v:V)=> + [X$_1$, $\dots$, X$_m$](x$_1$: T$_1$, $\dots$, x$_n$: T$_n$){c} + => v.m[X$_1$, $\dots$, X$_m$](x$_1$, $\dots$, x$_n$)) (e) \end{xtenmath} -\begin{note} + +\limitation{X10 functions, including method selectors, do not currently accept +generic arguments.} + Because of overloading, a method name is not sufficient to uniquely identify a function for a given class (in Java-like languages). One needs the argument type information as well. @@ -348,7 +416,6 @@ method invocation on \xcd"e" of method named \xcd"m" with no arguments) from \xcd"e.m.()" (the function bound to the method). -\end{note} A static method provides a binding from a name to a function that is independent of any instance of a class; rather it is associated with the @@ -362,15 +429,7 @@ directly (using the function syntax), or obtained via (static or instance) function selectors. -\begin{note} -Design note: The function selector syntax is consistent with the -reinterpretation of the usual method invocation syntax -\xcdmath"e.m(e$_1$,..., e$_n$)" -into a function specifier, \xcd"e.m", applied to a tuple of arguments -\xcdmath"(e$_1$,..., e$_n$)". Note that the receiver is not -treated as ``an extra argument'' to the -function. That would break the above approach. -\end{note} +%%BARD-HERE \section{Operator functions} \label{OperatorFunction} Modified: trunk/x10.man/v2.0/Types.tex =================================================================== --- trunk/x10.man/v2.0/Types.tex 2010-05-28 21:03:16 UTC (rev 14322) +++ trunk/x10.man/v2.0/Types.tex 2010-05-28 21:08:16 UTC (rev 14323) @@ -76,7 +76,7 @@ \| ConstrainedType \\ FunctionType \: TypeParameters\opt \xcd"(" Formals\opt \xcd")" -Constraint\opt Throws\opt \xcd"=>" Type \\ +Constraint\opt Throws\opt \xcd"=>" TypeOrVoid \\ TypeParameters \: \xcd"[" TypeParameter ( \xcd"," TypeParameter )\star \xcd"]" \\ TypeParameter \: Identifier \\ Throws \: \xcd"throws" TypeName ( \xcd"," TypeName )\star \\ @@ -88,7 +88,8 @@ \| InterfaceBaseType \\ \| PathType \\ \| \xcd"(" Type \xcd")" \\ - +TypeOrVoid \: Type \\ + \| \xcd`Void`\\ ClassType \: Annotation\star ClassBaseType Constraint\opt PlaceConstraint\opt \\ InterfaceType \: Annotation\star InterfaceBaseType Constraint\opt Modified: trunk/x10.man/v2.0/x10.pdf =================================================================== --- trunk/x10.man/v2.0/x10.pdf 2010-05-28 21:03:16 UTC (rev 14322) +++ trunk/x10.man/v2.0/x10.pdf 2010-05-28 21:08:16 UTC (rev 14323) @@ -556,7 +556,7 @@ << /S /GoTo /D (section.9.3) >> endobj 375 0 obj -(Implementation of "Any" methods) +(Optional Implementation of "Any" methods) endobj 376 0 obj << /S /GoTo /D (section.9.4) >> @@ -574,721 +574,709 @@ << /S /GoTo /D (section.9.6) >> endobj 387 0 obj -(Programming Methodology) +(Example structs) endobj 388 0 obj -<< /S /GoTo /D (subsection.9.6.1) >> +<< /S /GoTo /D (chapter.10) >> endobj 391 0 obj -(Compatibility Note) +(Functions) endobj 392 0 obj -<< /S /GoTo /D (subsection.9.6.2) >> +<< /S /GoTo /D (section.10.1) >> endobj 395 0 obj -(Examples) +(Overview) endobj 396 0 obj -<< /S /GoTo /D (chapter.10) >> +<< /S /GoTo /D (section.10.2) >> endobj 399 0 obj -(Functions) +(Function Literals) endobj 400 0 obj -<< /S /GoTo /D (section.10.1) >> +<< /S /GoTo /D (subsection.10.2.1) >> endobj 403 0 obj -(Overview) +(Outer variable access) endobj 404 0 obj -<< /S /GoTo /D (section.10.2) >> +<< /S /GoTo /D (section.10.3) >> endobj 407 0 obj -(Function Literals) +(Method selectors) endobj 408 0 obj -<< /S /GoTo /D (subsection.10.2.1) >> +<< /S /GoTo /D (section.10.4) >> endobj 411 0 obj -(Outer variable access) +(Operator functions) endobj 412 0 obj -<< /S /GoTo /D (section.10.3) >> +<< /S /GoTo /D (section.10.5) >> endobj 415 0 obj -(Methods selectors) +(Functions as objects of type "Any") endobj 416 0 obj -<< /S /GoTo /D (section.10.4) >> +<< /S /GoTo /D (section.10.6) >> endobj 419 0 obj -(Operator functions) +(MISPLACED) endobj 420 0 obj -<< /S /GoTo /D (section.10.5) >> +<< /S /GoTo /D (chapter.11) >> endobj 423 0 obj -(Functions as objects of type "Any") +(Expressions) endobj 424 0 obj -<< /S /GoTo /D (section.10.6) >> +<< /S /GoTo /D (section.11.1) >> endobj 427 0 obj -(MISPLACED) +(Literals) endobj 428 0 obj -<< /S /GoTo /D (chapter.11) >> +<< /S /GoTo /D (section.11.2) >> endobj 431 0 obj -(Expressions) +("this") endobj 432 0 obj -<< /S /GoTo /D (section.11.1) >> +<< /S /GoTo /D (section.11.3) >> endobj 435 0 obj -(Literals) +(Local variables) endobj 436 0 obj -<< /S /GoTo /D (section.11.2) >> +<< /S /GoTo /D (section.11.4) >> endobj 439 0 obj -("this") +(Field access) endobj 440 0 obj -<< /S /GoTo /D (section.11.3) >> +<< /S /GoTo /D (section.11.5) >> endobj 443 0 obj -(Local variables) +(Function Literals) endobj 444 0 obj -<< /S /GoTo /D (section.11.4) >> +<< /S /GoTo /D (section.11.6) >> endobj 447 0 obj -(Field access) +(Calls) endobj 448 0 obj -<< /S /GoTo /D (section.11.5) >> +<< /S /GoTo /D (section.11.7) >> endobj 451 0 obj -(Function Literals) +(Assignment) endobj 452 0 obj -<< /S /GoTo /D (section.11.6) >> +<< /S /GoTo /D (section.11.8) >> endobj 455 0 obj -(Calls) +(Increment and decrement) endobj 456 0 obj -<< /S /GoTo /D (section.11.7) >> +<< /S /GoTo /D (section.11.9) >> endobj 459 0 obj -(Assignment) +(Numeric promotion) endobj 460 0 obj -<< /S /GoTo /D (section.11.8) >> +<< /S /GoTo /D (section.11.10) >> endobj 463 0 obj -(Increment and decrement) +(Unary plus and unary minus) endobj 464 0 obj -<< /S /GoTo /D (section.11.9) >> +<< /S /GoTo /D (section.11.11) >> endobj 467 0 obj -(Numeric promotion) +(Bitwise complement) endobj 468 0 obj -<< /S /GoTo /D (section.11.10) >> +<< /S /GoTo /D (section.11.12) >> endobj 471 0 obj -(Unary plus and unary minus) +(Binary arithmetic operations) endobj 472 0 obj -<< /S /GoTo /D (section.11.11) >> +<< /S /GoTo /D (section.11.13) >> endobj 475 0 obj -(Bitwise complement) +(Binary shift operations) endobj 476 0 obj -<< /S /GoTo /D (section.11.12) >> +<< /S /GoTo /D (section.11.14) >> endobj 479 0 obj -(Binary arithmetic operations) +(Binary bitwise operations) endobj 480 0 obj -<< /S /GoTo /D (section.11.13) >> +<< /S /GoTo /D (section.11.15) >> endobj 483 0 obj -(Binary shift operations) +(String concatenation) endobj 484 0 obj -<< /S /GoTo /D (section.11.14) >> +<< /S /GoTo /D (section.11.16) >> endobj 487 0 obj -(Binary bitwise operations) +(Logical negation) endobj 488 0 obj -<< /S /GoTo /D (section.11.15) >> +<< /S /GoTo /D (section.11.17) >> endobj 491 0 obj -(String concatenation) +(Boolean logical operations) endobj 492 0 obj -<< /S /GoTo /D (section.11.16) >> +<< /S /GoTo /D (section.11.18) >> endobj 495 0 obj -(Logical negation) +(Boolean conditional operations) endobj 496 0 obj -<< /S /GoTo /D (section.11.17) >> +<< /S /GoTo /D (section.11.19) >> endobj 499 0 obj -(Boolean logical operations) +(Relational operations) endobj 500 0 obj -<< /S /GoTo /D (section.11.18) >> +<< /S /GoTo /D (section.11.20) >> endobj 503 0 obj -(Boolean conditional operations) +(Conditional expressions) endobj 504 0 obj -<< /S /GoTo /D (section.11.19) >> +<< /S /GoTo /D (section.11.21) >> endobj 507 0 obj -(Relational operations) +(Stable equality) endobj 508 0 obj -<< /S /GoTo /D (section.11.20) >> +<< /S /GoTo /D (section.11.22) >> endobj 511 0 obj -(Conditional expressions) +(Allocation) endobj 512 0 obj -<< /S /GoTo /D (section.11.21) >> +<< /S /GoTo /D (section.11.23) >> endobj 515 0 obj -(Stable equality) +(Casts) endobj 516 0 obj -<< /S /GoTo /D (section.11.22) >> +<< /S /GoTo /D (section.11.24) >> endobj 519 0 obj -(Allocation) +("instanceof") endobj 520 0 obj -<< /S /GoTo /D (section.11.23) >> +<< /S /GoTo /D (section.11.25) >> endobj 523 0 obj -(Casts) +(Subtyping expressions) endobj 524 0 obj -<< /S /GoTo /D (section.11.24) >> +<< /S /GoTo /D (section.11.26) >> endobj 527 0 obj -("instanceof") +(Contains expressions) endobj 528 0 obj -<< /S /GoTo /D (section.11.25) >> +<< /S /GoTo /D (section.11.27) >> endobj 531 0 obj -(Subtyping expressions) +(Rail constructors) endobj 532 0 obj -<< /S /GoTo /D (section.11.26) >> +<< /S /GoTo /D (section.11.28) >> endobj 535 0 obj -(Contains expressions) +(Coercions and conversions) endobj 536 0 obj -<< /S /GoTo /D (section.11.27) >> +<< /S /GoTo /D (subsection.11.28.1) >> endobj 539 0 obj -(Rail constructors) +(Coercions) endobj 540 0 obj -<< /S /GoTo /D (section.11.28) >> +<< /S /GoTo /D (subsection.11.28.2) >> endobj 543 0 obj -(Coercions and conversions) +(Conversions) endobj 544 0 obj -<< /S /GoTo /D (subsection.11.28.1) >> +<< /S /GoTo /D (chapter.12) >> endobj 547 0 obj -(Coercions) +(Statements) endobj 548 0 obj -<< /S /GoTo /D (subsection.11.28.2) >> +<< /S /GoTo /D (section.12.1) >> endobj 551 0 obj -(Conversions) +(Empty statement) endobj 552 0 obj -<< /S /GoTo /D (chapter.12) >> +<< /S /GoTo /D (section.12.2) >> endobj 555 0 obj -(Statements) +(Local variable declaration) endobj 556 0 obj -<< /S /GoTo /D (section.12.1) >> +<< /S /GoTo /D (section.12.3) >> endobj 559 0 obj -(Empty statement) +(Block statement) endobj 560 0 obj -<< /S /GoTo /D (section.12.2) >> +<< /S /GoTo /D (section.12.4) >> endobj 563 0 obj -(Local variable declaration) +(Expression statement) endobj 564 0 obj -<< /S /GoTo /D (section.12.3) >> +<< /S /GoTo /D (section.12.5) >> endobj 567 0 obj -(Block statement) +(Labeled statement) endobj 568 0 obj -<< /S /GoTo /D (section.12.4) >> +<< /S /GoTo /D (section.12.6) >> endobj 571 0 obj -(Expression statement) +(Break statement) endobj 572 0 obj -<< /S /GoTo /D (section.12.5) >> +<< /S /GoTo /D (section.12.7) >> endobj 575 0 obj -(Labeled statement) +(Continue statement) endobj 576 0 obj -<< /S /GoTo /D (section.12.6) >> +<< /S /GoTo /D (section.12.8) >> endobj 579 0 obj -(Break statement) +(If statement) endobj 580 0 obj -<< /S /GoTo /D (section.12.7) >> +<< /S /GoTo /D (section.12.9) >> endobj 583 0 obj -(Continue statement) +(Switch statement) endobj 584 0 obj -<< /S /GoTo /D (section.12.8) >> +<< /S /GoTo /D (section.12.10) >> endobj 587 0 obj -(If statement) +(While statement) endobj 588 0 obj -<< /S /GoTo /D (section.12.9) >> +<< /S /GoTo /D (section.12.11) >> endobj 591 0 obj -(Switch statement) +(Do\205while statement) endobj 592 0 obj -<< /S /GoTo /D (section.12.10) >> +<< /S /GoTo /D (section.12.12) >> endobj 595 0 obj -(While statement) +(For statement) endobj 596 0 obj -<< /S /GoTo /D (section.12.11) >> +<< /S /GoTo /D (section.12.13) >> endobj 599 0 obj -(Do\205while statement) +(Throw statement) endobj 600 0 obj -<< /S /GoTo /D (section.12.12) >> +<< /S /GoTo /D (section.12.14) >> endobj 603 0 obj -(For statement) +(Try\205catch statement) endobj 604 0 obj -<< /S /GoTo /D (section.12.13) >> +<< /S /GoTo /D (section.12.15) >> endobj 607 0 obj -(Throw statement) +(Return statement) endobj 608 0 obj -<< /S /GoTo /D (section.12.14) >> +<< /S /GoTo /D (chapter.13) >> endobj 611 0 obj -(Try\205catch statement) +(Places) endobj 612 0 obj -<< /S /GoTo /D (section.12.15) >> +<< /S /GoTo /D (section.13.1) >> endobj 615 0 obj -(Return statement) +(Place expressions) endobj 616 0 obj -<< /S /GoTo /D (chapter.13) >> +<< /S /GoTo /D (section.13.2) >> endobj 619 0 obj -(Places) +("here") endobj 620 0 obj -<< /S /GoTo /D (section.13.1) >> +<< /S /GoTo /D (chapter.14) >> endobj 623 0 obj -(Place expressions) +(Activities) endobj 624 0 obj -<< /S /GoTo /D (section.13.2) >> +<< /S /GoTo /D (section.14.1) >> endobj 627 0 obj -("here") +(The X10 rooted exception model) endobj 628 0 obj -<< /S /GoTo /D (chapter.14) >> +<< /S /GoTo /D (section.14.2) >> endobj 631 0 obj -(Activities) +(Spawning an activity) endobj 632 0 obj -<< /S /GoTo /D (section.14.1) >> +<< /S /GoTo /D (section.14.3) >> endobj 635 0 obj -(The X10 rooted exception model) +(Place changes) endobj 636 0 obj -<< /S /GoTo /D (section.14.2) >> +<< /S /GoTo /D (section.14.4) >> endobj 639 0 obj -(Spawning an activity) +(Finish) endobj 640 0 obj -<< /S /GoTo /D (section.14.3) >> +<< /S /GoTo /D (section.14.5) >> endobj 643 0 obj -(Place changes) +(Initial activity) endobj 644 0 obj -<< /S /GoTo /D (section.14.4) >> +<< /S /GoTo /D (section.14.6) >> endobj 647 0 obj -(Finish) +(Foreach statements) endobj 648 0 obj -<< /S /GoTo /D (section.14.5) >> +<< /S /GoTo /D (section.14.7) >> endobj 651 0 obj -(Initial activity) +(Ateach statements) endobj 652 0 obj -<< /S /GoTo /D (section.14.6) >> +<< /S /GoTo /D (section.14.8) >> endobj 655 0 obj -(Foreach statements) +(Futures) endobj 656 0 obj -<< /S /GoTo /D (section.14.7) >> +<< /S /GoTo /D (section.14.9) >> endobj 659 0 obj -(Ateach statements) +(At expressions) endobj 660 0 obj -<< /S /GoTo /D (section.14.8) >> +<< /S /GoTo /D (section.14.10) >> endobj 663 0 obj -(Futures) +(Shared variables) endobj 664 0 obj -<< /S /GoTo /D (section.14.9) >> +<< /S /GoTo /D (section.14.11) >> endobj 667 0 obj -(At expressions) +(Atomic blocks) endobj 668 0 obj -<< /S /GoTo /D (section.14.10) >> +<< /S /GoTo /D (subsection.14.11.1) >> endobj 671 0 obj -(Shared variables) +(Unconditional atomic blocks) endobj 672 0 obj -<< /S /GoTo /D (section.14.11) >> +<< /S /GoTo /D (subsection.14.11.2) >> endobj 675 0 obj -(Atomic blocks) +(Conditional atomic blocks) endobj 676 0 obj -<< /S /GoTo /D (subsection.14.11.1) >> +<< /S /GoTo /D (chapter.15) >> endobj 679 0 obj -(Unconditional atomic blocks) +(Clocks) endobj 680 0 obj -<< /S /GoTo /D (subsection.14.11.2) >> +<< /S /GoTo /D (section.15.1) >> endobj 683 0 obj -(Conditional atomic blocks) +(Clock operations) endobj 684 0 obj -<< /S /GoTo /D (chapter.15) >> +<< /S /GoTo /D (subsection.15.1.1) >> endobj 687 0 obj -(Clocks) +(Creating new clocks) endobj 688 0 obj -<< /S /GoTo /D (section.15.1) >> +<< /S /GoTo /D (subsection.15.1.2) >> endobj 691 0 obj -(Clock operations) +(Registering new activities on clocks) endobj 692 0 obj -<< /S /GoTo /D (subsection.15.1.1) >> +<< /S /GoTo /D (subsection.15.1.3) >> endobj 695 0 obj -(Creating new clocks) +(Resuming clocks) endobj 696 0 obj -<< /S /GoTo /D (subsection.15.1.2) >> +<< /S /GoTo /D (subsection.15.1.4) >> endobj 699 0 obj -(Registering new activities on clocks) +(Advancing clocks) endobj 700 0 obj -<< /S /GoTo /D (subsection.15.1.3) >> +<< /S /GoTo /D (subsection.15.1.5) >> endobj 703 0 obj -(Resuming clocks) +(Dropping clocks) endobj 704 0 obj -<< /S /GoTo /D (subsection.15.1.4) >> +<< /S /GoTo /D (section.15.2) >> endobj 707 0 obj -(Advancing clocks) +(Program equivalences) endobj 708 0 obj -<< /S /GoTo /D (subsection.15.1.5) >> +<< /S /GoTo /D (chapter.16) >> endobj 711 0 obj -(Dropping clocks) +(Arrays) endobj 712 0 obj -<< /S /GoTo /D (section.15.2) >> +<< /S /GoTo /D (subsection.16.0.1) >> endobj 715 0 obj -(Program equivalences) +(Array types) endobj 716 0 obj -<< /S /GoTo /D (chapter.16) >> +<< /S /GoTo /D (subsection.16.0.2) >> endobj 719 0 obj -(Arrays) +(Rails) endobj 720 0 obj -<< /S /GoTo /D (subsection.16.0.1) >> +<< /S /GoTo /D (section.16.1) >> endobj 723 0 obj -(Array types) +(Points) endobj 724 0 obj -<< /S /GoTo /D (subsection.16.0.2) >> +<< /S /GoTo /D (section.16.2) >> endobj 727 0 obj -(Rails) +(Regions) endobj 728 0 obj -<< /S /GoTo /D (section.16.1) >> +<< /S /GoTo /D (subsection.16.2.1) >> endobj 731 0 obj -(Points) +(Operations on regions) endobj 732 0 obj -<< /S /GoTo /D (section.16.2) >> +<< /S /GoTo /D (section.16.3) >> endobj 735 0 obj -(Regions) +(Distributions) endobj 736 0 obj -<< /S /GoTo /D (subsection.16.2.1) >> +<< /S /GoTo /D (subsection.16.3.1) >> endobj 739 0 obj -(Operations on regions) +(Operations returning distributions) endobj 740 0 obj -<< /S /GoTo /D (section.16.3) >> +<< /S /GoTo /D (subsection.16.3.2) >> endobj 743 0 obj -(Distributions) +(User-defined distributions) endobj 744 0 obj -<< /S /GoTo /D (subsection.16.3.1) >> +<< /S /GoTo /D (subsection.16.3.3) >> endobj 747 0 obj -(Operations returning distributions) +(Operations on distributions) endobj 748 0 obj -<< /S /GoTo /D (subsection.16.3.2) >> +<< /S /GoTo /D (subsection.16.3.4) >> endobj 751 0 obj -(User-defined distributions) +(Example) endobj 752 0 obj -<< /S /GoTo /D (subsection.16.3.3) >> +<< /S /GoTo /D (section.16.4) >> endobj 755 0 obj -(Operations on distributions) +(Array initializer) endobj 756 0 obj -<< /S /GoTo /D (subsection.16.3.4) >> +<< /S /GoTo /D (section.16.5) >> endobj 759 0 obj -(Example) +(Operations on arrays) endobj 760 0 obj -<< /S /GoTo /D (section.16.4) >> +<< /S /GoTo /D (subsection.16.5.1) >> endobj 763 0 obj -(Array initializer) +(Element operations) endobj 764 0 obj -<< /S /GoTo /D (section.16.5) >> +<< /S /GoTo /D (subsection.16.5.2) >> endobj 767 0 obj -(Operations on arrays) +(Constant promotion) endobj 768 0 obj -<< /S /GoTo /D (subsection.16.5.1) >> +<< /S /GoTo /D (subsection.16.5.3) >> endobj 771 0 obj -(Element operations) +(Restriction of an array) endobj 772 0 obj -<< /S /GoTo /D (subsection.16.5.2) >> +<< /S /GoTo /D (subsection.16.5.4) >> endobj 775 0 obj -(Constant promotion) +(Assembling an array) endobj 776 0 obj -<< /S /GoTo /D (subsection.16.5.3) >> +<< /S /GoTo /D (subsection.16.5.5) >> endobj 779 0 obj -(Restriction of an array) +(Global operations ) endobj 780 0 obj -<< /S /GoTo /D (subsection.16.5.4) >> +<< /S /GoTo /D (chapter.17) >> endobj 783 0 obj -(Assembling an array) +(Annotations and compiler plugins) endobj 784 0 obj -<< /S /GoTo /D (subsection.16.5.5) >> +<< /S /GoTo /D (section.17.1) >> endobj 787 0 obj -(Global operations ) +(Annotation syntax) endobj 788 0 obj -<< /S /GoTo /D (chapter.17) >> +<< /S /GoTo /D (section.17.2) >> endobj 791 0 obj -(Annotations and compiler plugins) +(Annotation declarations) endobj 792 0 obj -<< /S /GoTo /D (section.17.1) >> +<< /S /GoTo /D (section.17.3) >> endobj 795 0 obj -(Annotation syntax) +(Compiler plugins) endobj 796 0 obj -<< /S /GoTo /D (section.17.2) >> +<< /S /GoTo /D (chapter.18) >> endobj 799 0 obj -(Annotation declarations) +(Native Code Integration) endobj 800 0 obj -<< /S /GoTo /D (section.17.3) >> +<< /S /GoTo /D (section.18.1) >> endobj 803 0 obj -(Compiler plugins) +(Native `static` Methods) endobj 804 0 obj -<< /S /GoTo /D (chapter.18) >> +<< /S /GoTo /D (section.18.2) >> endobj 807 0 obj -(Native Code Integration) +(Native Blocks) endobj 808 0 obj -<< /S /GoTo /D (section.18.1) >> +<< /S /GoTo /D (section.18.3) >> endobj 811 0 obj -(Native `static` Methods) +(External Java Code) endobj 812 0 obj -<< /S /GoTo /D (section.18.2) >> +<< /S /GoTo /D (section.18.4) >> endobj 815 0 obj -(Native Blocks) +(External C++ Code) endobj 816 0 obj -<< /S /GoTo /D (section.18.3) >> +<< /S /GoTo /D (subsection.18.4.1) >> endobj 819 0 obj -(External Java Code) +(Auxiliary C++ Files) endobj 820 0 obj -<< /S /GoTo /D (section.18.4) >> +<< /S /GoTo /D (subsection.18.4.2) >> endobj 823 0 obj -(External C++ Code) +(C++ System Libraries) endobj 824 0 obj -<< /S /GoTo /D (subsection.18.4.1) >> +<< /S /GoTo /D (chapter.19) >> endobj 827 0 obj -(Auxiliary C++ Files) +(Lost Bits) endobj 828 0 obj -<< /S /GoTo /D (subsection.18.4.2) >> +<< /S /GoTo /D (section.19.1) >> endobj 831 0 obj -(C++ System Libraries) +(Visibility of Local Variables and Formals) endobj 832 0 obj -<< /S /GoTo /D (chapter.19) >> +<< /S /GoTo /D (chapter*.63) >> endobj 835 0 obj -(Lost Bits) +(Alphabetic index of definitions of concepts, keywords, and procedures) endobj 836 0 obj -<< /S /GoTo /D (section.19.1) >> +<< /S /GoTo /D (appendix.A) >> endobj 839 0 obj -(Visibility of Local Variables and Formals) +(Change Log) endobj 840 0 obj -<< /S /GoTo /D (chapter*.63) >> +<< /S /GoTo /D (section.A.1) >> endobj 843 0 obj -(Alphabetic index of definitions of concepts, keywords, and procedures) +(Changes from X10 v2.0) endobj 844 0 obj -<< /S /GoTo /D (appendix.A) >> +<< /S /GoTo /D (section.A.2) >> endobj 847 0 obj -(Change Log) +(Changes from X10 v1.7) endobj 848 0 obj -<< /S /GoTo /D (section.A.1) >> +<< /S /GoTo /D [849 0 R /Fit ] >> endobj -851 0 obj -(Changes from X10 v2.0) -endobj -852 0 obj -<< /S /GoTo /D (section.A.2) >> -endobj -855 0 obj -(Changes from X10 v1.7) -endobj -856 0 obj -<< /S /GoTo /D [857 0 R /Fit ] >> -endobj -859 0 obj << +851 0 obj << /Length 1467 /Filter /FlateDecode >> stream xڕWYo\xDC6~ϯ\xD8G \x88X\x91\xBA\xDFj\xE7B\x8E&F\xBCh\xB4}\xE0J\xF4\x8A\xB1$ \x94\xE4\xD4\xFD\xF5\x9D\xE1\x90\xF6\xDAض\xE8˒\x9C\x83s}3\xD4^\xEE_\xFC\xF06;\x91\xB2\xB2\xC5n\xB3\xE3B\xB0HeZ\xB0<\xDB\xED\xBB\xDDo\xD1W5\xBBƉ(\xD2\xC8L\xB4\xAE\xBD\xA2͕5G+\xC7QOG"|\x92\xD3q\x93G\xCF\xFE\x95\xA7\xF1\xFB\xCE\xCFY\x96\x97\xC99u\xB9Kx漝\x9Fc\xCEy\xA4좃\xC1R\x96\xA1\xFE.\xC9r\x96\xF2|\x97\xE4@k -Rx\xFDx5gyU\xB9\x9B9K\xABb\x97z\xD7\xE3\xA4\xD1\xFC\xF2\xE8\xAD\xDB\xEFϹ\x93,kDP\xFA]\x88\x8A\xEC\xFF$\xEF\xBD#\xD5K\xBFI)\xA0]R\x96\xAC\xCAjp\xAC`uY\x86\xCA4\xD2߂ֵ\xB4r\xF9\xF34\x92>}r\xEAhs)m\xD8 +Rx\xFDx5gyU\xB9\x9B9K\xABb\x97z\xD7\xE3\xA4\xD1\xFC\xF2\xE8\xAD\xDB\xEFϹ\x93,kDP\xFA]\x88\x8A\xEC\xFF$\xEF\xBD#\xF5K\xBFI)\xA0]R\x96\xAC\xCAjp\xAC`uY\x86\xCA4\xD2߂ֵ\xB4r\xF9\xF34\x92>}r\xEAhs)m\xD8 ƌt%$\xA5\xDF\xE9J\xE3ՠ\xE4⓹\xA8\xA0ޚqTӺ\xF8b JdOs\A \xF3\xD5,~\xDC\xA6#k\xC9\xE4\xF3<$E\xC6\xF2\xB2v\xD9)\xFEsBꛢ u^\xE4L\xA8R M}\xFB^\x83\x9F\x99\xC8#끔\x89"\x9A\xAD\x89y\xDD\xE9Ny\xAE$\x9C[\xAB\xE7Ձ |