diff --git a/Website/documentation/html/refmanual/index.html b/Website/documentation/html/refmanual/index.html index 348ec16b8..f90377898 100644 --- a/Website/documentation/html/refmanual/index.html +++ b/Website/documentation/html/refmanual/index.html @@ -1,5 +1,5 @@ -Orc Reference Manual v2.0.0 \ No newline at end of file +

The University of Texas at Austin

http://orc.csres.utexas.edu/

2011-04-27

License and Grant Information

1. Data Values
1.1. Booleans
1.2. Numerics
1.3. Character Strings
1.4. signal
1.5. Lists
1.6. Tuples
1.7. Records
1.8. Algebraic Data Types
1.9. Closures
1.10. Mutable State
1.11. External Values
2. Expressions
2.1. Literal Value
2.2. Variable
2.3. stop
2.4. Site and Function Calls
2.5. Dot Access
2.6. Operators
2.7. if then else
2.8. lambda
3. Combinators
3.1. Parallel Combinator
3.2. Sequential Combinator
3.3. Pruning Combinator
3.4. Otherwise Combinator
4. Declarations
4.1. val: Bind Value
4.2. def: Define Function
4.3. def class: Define Site in Orc
4.4. import site: Import Site
4.5. import class: Import Class from Java
4.6. type: Declare Type
4.7. include: Include Orc File
5. Patterns
5.1. Literal Pattern
5.2. Variable Pattern
5.3. Tuple Pattern
5.4. List Pattern
5.5. Record Pattern
5.6. Call Pattern
5.7. Cons Pattern
5.8. As Pattern
5.9. Wildcard Pattern
6. Sites and Services
6.1. Library sites
6.2. Java sites
6.3. Web Services
6.4. Custom sites
7. Time
7.1. Real Time
8. Concepts
8.1. Publication
8.2. Silence
8.3. Expression States
8.4. Deflation
8.5. Helpful Sites
8.6. Approximation in Orc Implementation
9. Type System
9.1. Metatheory
9.2. Parametric Polymorphism
9.3. Subtyping
9.4. Adding Type Information
9.5. Type Override
9.6. Typing Contexts
10. Syntax
10.1. EBNF Grammar
10.2. Lexical Specifications
10.3. Precedence, Fixity, and Associativity
11. Standard Library
11.1. Introduction
11.2. core: Fundamental sites and operators.
11.3. idioms: Higher-order Orc programming idioms.
11.4. list: Operations on lists.
11.5. reflect: Metalanguage operations.
11.6. state: General-purpose supplemental data structures.
11.7. text: Operations on strings.
11.8. time: Real time.
11.9. util: Miscellaneous utility functions.
11.10. web: Web browsing, HTTP, and JSON capabilities.
11.11. xml: XML manipulation.
Index of Key Terms
\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.combinators.html b/Website/documentation/html/refmanual/ref.combinators.html index 238b7a9b0..f88f67769 100644 --- a/Website/documentation/html/refmanual/ref.combinators.html +++ b/Website/documentation/html/refmanual/ref.combinators.html @@ -1,5 +1,5 @@ -Chapter 3. Combinators
Lexicographic sublist
@@ -75,7 +75,7 @@
 [-2, 4, -7]
 -}
 
Channel Transfer
@@ -96,7 +96,7 @@
 [1, 2, 3, 4]
 -}
 
Helpful publication
@@ -114,5 +114,5 @@
    [1,2,3]
 -}
 

3.4.5. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.combinators.parallel.html b/Website/documentation/html/refmanual/ref.combinators.parallel.html index d4eb49a70..4003e380a 100644 --- a/Website/documentation/html/refmanual/ref.combinators.parallel.html +++ b/Website/documentation/html/refmanual/ref.combinators.parallel.html @@ -1,5 +1,5 @@ -3.1. Parallel Combinator
Parallel Site Calls
@@ -69,5 +69,5 @@
 
 Google("cupcake") | Yahoo("cupcake")
 

3.1.5. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.combinators.pruning.html b/Website/documentation/html/refmanual/ref.combinators.pruning.html index 7ac826271..9af682a7e 100644 --- a/Website/documentation/html/refmanual/ref.combinators.pruning.html +++ b/Website/documentation/html/refmanual/ref.combinators.pruning.html @@ -1,5 +1,5 @@ -3.3. Pruning Combinator
Print First Result
@@ -80,7 +80,7 @@
 
 Println(result) <result< ( Google("cupcake") | Yahoo("cupcake") )
 
Pattern Publication
@@ -97,7 +97,7 @@
 25
 -}
 
Timed Termination
@@ -118,5 +118,5 @@
 signal
 -}
 

3.3.5. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.combinators.sequential.html b/Website/documentation/html/refmanual/ref.combinators.sequential.html index 9f787bbf6..8925ffe9f 100644 --- a/Website/documentation/html/refmanual/ref.combinators.sequential.html +++ b/Website/documentation/html/refmanual/ref.combinators.sequential.html @@ -1,5 +1,5 @@ -3.2. Sequential Combinator
Filtering
@@ -80,7 +80,7 @@
 6
 -}
 
Suppressed Publication
@@ -98,5 +98,5 @@
 world
 -}
 

3.2.5. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.concepts.approximation.html b/Website/documentation/html/refmanual/ref.concepts.approximation.html index aea1d3666..6367be44a 100644 --- a/Website/documentation/html/refmanual/ref.concepts.approximation.html +++ b/Website/documentation/html/refmanual/ref.concepts.approximation.html @@ -1,5 +1,5 @@ -8.6. Approximation in Orc Implementation

8.4.3. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.concepts.helpful.html b/Website/documentation/html/refmanual/ref.concepts.helpful.html index c0eebfff6..5d157f249 100644 --- a/Website/documentation/html/refmanual/ref.concepts.helpful.html +++ b/Website/documentation/html/refmanual/ref.concepts.helpful.html @@ -1,5 +1,5 @@ -8.5. Helpful Sites
Publish one value
@@ -46,7 +46,7 @@
 1
 -}
 
Publish two values
@@ -57,7 +57,7 @@
 32
 -}
 
Publish an unbounded number of values (metronome)
@@ -65,5 +65,5 @@
 
 metronome()
 

8.1.2. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.concepts.silent.html b/Website/documentation/html/refmanual/ref.concepts.silent.html index 20e0498f0..7272caa08 100644 --- a/Website/documentation/html/refmanual/ref.concepts.silent.html +++ b/Website/documentation/html/refmanual/ref.concepts.silent.html @@ -1,5 +1,5 @@ -8.2. Silence
Conditional Silence
@@ -60,5 +60,5 @@
 OUTPUT:
 -}
 

8.2.3. Related Links

Related Reference Topics

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.concepts.states.html b/Website/documentation/html/refmanual/ref.concepts.states.html index 5762d467f..fbc98fb17 100644 --- a/Website/documentation/html/refmanual/ref.concepts.states.html +++ b/Website/documentation/html/refmanual/ref.concepts.states.html @@ -1,5 +1,5 @@ -8.3. Expression States
Pruning combinator; killed state

@@ -137,7 +137,7 @@ As we have shown, G will definitely publish. Then G is killed, and so are its sub-expressions.

Sequential and otherwise combinators

@@ -157,5 +157,5 @@ halts silently, causing false to be published, or (3) the call remains blocked forever, causing F to remain blocked.

8.3.7. Related Links

Related Reference Topics

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.boolean.html b/Website/documentation/html/refmanual/ref.data.boolean.html index 2a29788ad..deb079ad2 100644 --- a/Website/documentation/html/refmanual/ref.data.boolean.html +++ b/Website/documentation/html/refmanual/ref.data.boolean.html @@ -1,5 +1,5 @@ -1.1. Booleans

1.1.6. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.closure.html b/Website/documentation/html/refmanual/ref.data.closure.html index b3729c732..ddbc9259e 100644 --- a/Website/documentation/html/refmanual/ref.data.closure.html +++ b/Website/documentation/html/refmanual/ref.data.closure.html @@ -1,5 +1,5 @@ -1.9. Closures
One Two Sum
@@ -64,5 +64,5 @@
 9
 -}
 

1.9.3. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.datatype.html b/Website/documentation/html/refmanual/ref.data.datatype.html index a78f93123..07494ffc1 100644 --- a/Website/documentation/html/refmanual/ref.data.datatype.html +++ b/Website/documentation/html/refmanual/ref.data.datatype.html @@ -1,5 +1,5 @@ -1.8. Algebraic Data Types
Geometric shape datatype
@@ -92,7 +92,7 @@
 3.14159265358970
 -}
 
Binary tree node
@@ -114,7 +114,7 @@
 InnerNode(LeafNode(1), InnerNode(LeafNode(2), LeafNode(3)))
 -}
 
Polymorphic binary tree node
@@ -136,7 +136,7 @@
 InnerNode(LeafNode("A"), InnerNode(LeafNode("B"), LeafNode("C")))
 -}
 
Orc built-in Option type
@@ -148,5 +148,5 @@
 NONRUNNABLE
 -}
 

1.8.5. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.external.html b/Website/documentation/html/refmanual/ref.data.external.html index 4534e6ace..6167dc0c9 100644 --- a/Website/documentation/html/refmanual/ref.data.external.html +++ b/Website/documentation/html/refmanual/ref.data.external.html @@ -1,5 +1,5 @@ -1.11. External Values
Java HashMap
@@ -55,5 +55,5 @@
 "Minnie"
 -}
 

1.11.3. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.html b/Website/documentation/html/refmanual/ref.data.html index c3d39e5a3..8e0206578 100644 --- a/Website/documentation/html/refmanual/ref.data.html +++ b/Website/documentation/html/refmanual/ref.data.html @@ -1,5 +1,5 @@ -Chapter 1. Data Values

Chapter 1. Data Values

1.1. Booleans
1.2. Numerics
1.3. Character Strings
1.4. signal
1.5. Lists
1.6. Tuples
1.7. Records
1.8. Algebraic Data Types
1.9. Closures
1.10. Mutable State
1.11. External Values

The primitive data types in Orc are Booleans, numbers, strings, diff --git a/Website/documentation/html/refmanual/ref.data.list.html b/Website/documentation/html/refmanual/ref.data.list.html index e8ae807b7..01f819baa 100644 --- a/Website/documentation/html/refmanual/ref.data.list.html +++ b/Website/documentation/html/refmanual/ref.data.list.html @@ -1,5 +1,5 @@ -1.5. Lists

Lists Are Not Sets
@@ -72,7 +72,7 @@
 true
 -}
 
Building Lists with Cons
@@ -85,5 +85,5 @@
 [4, 3, 2, 1]
 -}
 

1.5.7. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.mutable.html b/Website/documentation/html/refmanual/ref.data.mutable.html index 0db4c1a08..65beabcab 100644 --- a/Website/documentation/html/refmanual/ref.data.mutable.html +++ b/Website/documentation/html/refmanual/ref.data.mutable.html @@ -1,5 +1,5 @@ -1.10. Mutable State
Integer to Number Promotion
@@ -108,7 +108,7 @@
 (24.666666666666668, 24)
 -}
 
Square Roots and Squares
@@ -133,5 +133,5 @@
 (5.00, 2.23606797749979, 25.0000)
 -}
 

1.2.6. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.record.html b/Website/documentation/html/refmanual/ref.data.record.html index d5fff3a18..aa02c17c2 100644 --- a/Website/documentation/html/refmanual/ref.data.record.html +++ b/Website/documentation/html/refmanual/ref.data.record.html @@ -1,5 +1,5 @@ -1.7. Records
Record Extension
@@ -99,5 +99,5 @@
 128
 -}
 

1.7.8. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.signal.html b/Website/documentation/html/refmanual/ref.data.signal.html index afe0f5fc6..bfd528400 100644 --- a/Website/documentation/html/refmanual/ref.data.signal.html +++ b/Website/documentation/html/refmanual/ref.data.signal.html @@ -1,5 +1,5 @@ -1.4. signal
String Functions
@@ -62,5 +62,5 @@
 "I like Orc"
 -}
 

1.3.6. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.data.tuple.html b/Website/documentation/html/refmanual/ref.data.tuple.html index af22c2172..64f4012a9 100644 --- a/Website/documentation/html/refmanual/ref.data.tuple.html +++ b/Website/documentation/html/refmanual/ref.data.tuple.html @@ -1,5 +1,5 @@ -1.6. Tuples
Fork-Join
@@ -62,5 +62,5 @@
 join
 -}
 

1.6.7. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.declarations.class.html b/Website/documentation/html/refmanual/ref.declarations.class.html index aab3eef7e..7fe8c27c0 100644 --- a/Website/documentation/html/refmanual/ref.declarations.class.html +++ b/Website/documentation/html/refmanual/ref.declarations.class.html @@ -1,5 +1,5 @@ -4.5. import class: Import Class from Java
Invoke a Java static method
@@ -86,7 +86,7 @@
 1.6232492903979006
 -}
 
Declaring and instantiating a Java generic class
@@ -102,5 +102,5 @@
 2
 -} 
 		

4.5.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.declarations.def.html b/Website/documentation/html/refmanual/ref.declarations.def.html index bcf06fbd8..a586815bd 100644 --- a/Website/documentation/html/refmanual/ref.declarations.def.html +++ b/Website/documentation/html/refmanual/ref.declarations.def.html @@ -1,5 +1,5 @@ -4.2. def: Define Function
Parallel-Or Function
@@ -191,7 +191,7 @@
 true
 -}
 
Even/Odd Using Mutual Recursion
@@ -211,7 +211,7 @@
 false
 -}
 
List Head
@@ -228,7 +228,7 @@
 2
 -}
 
List Length
@@ -243,7 +243,7 @@
 3
 -}
 
List Sum
@@ -259,7 +259,7 @@
 -}
 
 
Same-Length Zip
@@ -279,7 +279,7 @@
 -}
 
 
Fibonacci Function
@@ -296,5 +296,5 @@
 8
 -}
 

4.2.9. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.declarations.defclass.html b/Website/documentation/html/refmanual/ref.declarations.defclass.html index b02d83815..ab3ce7b35 100644 --- a/Website/documentation/html/refmanual/ref.declarations.defclass.html +++ b/Website/documentation/html/refmanual/ref.declarations.defclass.html @@ -1,5 +1,5 @@ -4.3. def class: Define Site in Orc
Create a Write-Once Site

@@ -164,7 +164,7 @@ 42 -}

Extend Functionality of an Existing Site

@@ -195,7 +195,7 @@ 5 -}

Managing Concurrent Access

@@ -234,7 +234,7 @@ OUTPUT: -}

Computing with the Goal Expression

@@ -266,7 +266,7 @@ 0 -}

Stopwatch
@@ -314,5 +314,5 @@
 true
 -}
 

4.3.6. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.declarations.html b/Website/documentation/html/refmanual/ref.declarations.html index 6974bbcdc..15c518ed0 100644 --- a/Website/documentation/html/refmanual/ref.declarations.html +++ b/Website/documentation/html/refmanual/ref.declarations.html @@ -1,5 +1,5 @@ -Chapter 4. Declarations
Include a separate file
@@ -51,5 +51,5 @@
 
 sum([1,2,3])
 

4.7.3. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.declarations.site.html b/Website/documentation/html/refmanual/ref.declarations.site.html index 60256cd45..ae0ba3707 100644 --- a/Website/documentation/html/refmanual/ref.declarations.site.html +++ b/Website/documentation/html/refmanual/ref.declarations.site.html @@ -1,5 +1,5 @@ -4.4. import site: Import Site

4.4.5. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.declarations.type.html b/Website/documentation/html/refmanual/ref.declarations.type.html index 8e88812d4..044e0c6d5 100644 --- a/Website/documentation/html/refmanual/ref.declarations.type.html +++ b/Website/documentation/html/refmanual/ref.declarations.type.html @@ -1,5 +1,5 @@ -4.6. type: Declare Type
Importing Types
@@ -77,7 +77,7 @@
 NONRUNNABLE
 -}
 
Binary Tree Type
@@ -106,5 +106,5 @@
 Node(Node(Empty(), 0, Empty()), 1, Node(Empty(), 2, Empty()))
 -}
 

4.6.6. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.declarations.val.html b/Website/documentation/html/refmanual/ref.declarations.val.html index 57084c495..324d43612 100644 --- a/Website/documentation/html/refmanual/ref.declarations.val.html +++ b/Website/documentation/html/refmanual/ref.declarations.val.html @@ -1,5 +1,5 @@ -4.1. val: Bind Value
Timeout
@@ -59,7 +59,7 @@
 
 result
 
Roll Die
@@ -95,5 +95,5 @@
 "You rolled 6"
 -}
 

4.1.3. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.call.html b/Website/documentation/html/refmanual/ref.expressions.call.html index e734ad3d0..bfdde7df0 100644 --- a/Website/documentation/html/refmanual/ref.expressions.call.html +++ b/Website/documentation/html/refmanual/ref.expressions.call.html @@ -1,5 +1,5 @@ -2.4. Site and Function Calls
Functions are Lenient
@@ -104,7 +104,7 @@
 Waiting
 -}
 
Function with Domain and Range
@@ -134,5 +134,5 @@
 true
 -}
 

2.4.7. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.dot.html b/Website/documentation/html/refmanual/ref.expressions.dot.html index 7cc03bdcd..9cf2fd443 100644 --- a/Website/documentation/html/refmanual/ref.expressions.dot.html +++ b/Website/documentation/html/refmanual/ref.expressions.dot.html @@ -1,5 +1,5 @@ -2.5. Dot Access
Channel Operations
@@ -81,7 +81,7 @@
 8
 -}
 
Capture Channel Methods
@@ -104,5 +104,5 @@
 Received: 3
 -}
 

2.5.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.html b/Website/documentation/html/refmanual/ref.expressions.html index 3e6bb0f48..7f0a3ab32 100644 --- a/Website/documentation/html/refmanual/ref.expressions.html +++ b/Website/documentation/html/refmanual/ref.expressions.html @@ -1,5 +1,5 @@ -Chapter 2. Expressions

2.7.4. Related Links

Related Reference Topics

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.lambda.html b/Website/documentation/html/refmanual/ref.expressions.lambda.html index fc471f0cb..51d4786c9 100644 --- a/Website/documentation/html/refmanual/ref.expressions.lambda.html +++ b/Website/documentation/html/refmanual/ref.expressions.lambda.html @@ -1,5 +1,5 @@ -2.8. lambda

2.8.3. Type

The type of a lambda expression is exactly the type of the closure it creates.

2.8.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.literal.html b/Website/documentation/html/refmanual/ref.expressions.literal.html index 7b0185dd7..e7b6c9439 100644 --- a/Website/documentation/html/refmanual/ref.expressions.literal.html +++ b/Website/documentation/html/refmanual/ref.expressions.literal.html @@ -1,5 +1,5 @@ -2.1. Literal Value

2.1.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.operators.html b/Website/documentation/html/refmanual/ref.expressions.operators.html index 6aad3a851..17dab0286 100644 --- a/Website/documentation/html/refmanual/ref.expressions.operators.html +++ b/Website/documentation/html/refmanual/ref.expressions.operators.html @@ -1,5 +1,5 @@ -2.6. Operators
Operators publish once
@@ -102,7 +102,7 @@
 4
 -}
 
Redefine an operator
@@ -119,5 +119,5 @@
 "To be, or not to be, that is the question."
 -}
 

2.6.6. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.stop.html b/Website/documentation/html/refmanual/ref.expressions.stop.html index 94ba9962e..ffa30a757 100644 --- a/Website/documentation/html/refmanual/ref.expressions.stop.html +++ b/Website/documentation/html/refmanual/ref.expressions.stop.html @@ -1,5 +1,5 @@ -2.3. stop
Square Root
@@ -61,5 +61,5 @@
 OUTPUT:
 -}
 

2.3.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.expressions.variable.html b/Website/documentation/html/refmanual/ref.expressions.variable.html index e672c719c..4191e40bb 100644 --- a/Website/documentation/html/refmanual/ref.expressions.variable.html +++ b/Website/documentation/html/refmanual/ref.expressions.variable.html @@ -1,5 +1,5 @@ -2.2. Variable

2.2.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.index.html b/Website/documentation/html/refmanual/ref.index.html index 6df87ab6a..5f1de7fec 100644 --- a/Website/documentation/html/refmanual/ref.index.html +++ b/Website/documentation/html/refmanual/ref.index.html @@ -1,5 +1,5 @@ -Index of Key Terms

5.8.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.call.html b/Website/documentation/html/refmanual/ref.patterns.call.html index 509d2c29c..39e66e2e4 100644 --- a/Website/documentation/html/refmanual/ref.patterns.call.html +++ b/Website/documentation/html/refmanual/ref.patterns.call.html @@ -1,5 +1,5 @@ -5.6. Call Pattern
Integer square root
@@ -110,7 +110,7 @@
 -}
 
 
Factoring Using Multimatch
@@ -142,5 +142,5 @@
 -}
 
 

5.6.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.cons.html b/Website/documentation/html/refmanual/ref.patterns.cons.html index 3c3e826dd..1bfec9cef 100644 --- a/Website/documentation/html/refmanual/ref.patterns.cons.html +++ b/Website/documentation/html/refmanual/ref.patterns.cons.html @@ -1,5 +1,5 @@ -5.7. Cons Pattern

5.7.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.html b/Website/documentation/html/refmanual/ref.patterns.html index 075e0e17d..d7aabae65 100644 --- a/Website/documentation/html/refmanual/ref.patterns.html +++ b/Website/documentation/html/refmanual/ref.patterns.html @@ -1,5 +1,5 @@ -Chapter 5. Patterns

5.4.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.literal.html b/Website/documentation/html/refmanual/ref.patterns.literal.html index 95a2e7bbd..c302fa240 100644 --- a/Website/documentation/html/refmanual/ref.patterns.literal.html +++ b/Website/documentation/html/refmanual/ref.patterns.literal.html @@ -1,5 +1,5 @@ -5.1. Literal Pattern

5.1.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.record.html b/Website/documentation/html/refmanual/ref.patterns.record.html index d2ed8735e..4babac883 100644 --- a/Website/documentation/html/refmanual/ref.patterns.record.html +++ b/Website/documentation/html/refmanual/ref.patterns.record.html @@ -1,5 +1,5 @@ -5.5. Record Pattern

5.5.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.tuple.html b/Website/documentation/html/refmanual/ref.patterns.tuple.html index 2cc2fd9c1..1cf24a0df 100644 --- a/Website/documentation/html/refmanual/ref.patterns.tuple.html +++ b/Website/documentation/html/refmanual/ref.patterns.tuple.html @@ -1,5 +1,5 @@ -5.3. Tuple Pattern
Pattern Publication
@@ -56,5 +56,5 @@
 9
 -}
 

5.3.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.variable.html b/Website/documentation/html/refmanual/ref.patterns.variable.html index 47a6e0d9f..167bfac2b 100644 --- a/Website/documentation/html/refmanual/ref.patterns.variable.html +++ b/Website/documentation/html/refmanual/ref.patterns.variable.html @@ -1,5 +1,5 @@ -5.2. Variable Pattern
Pair to List
@@ -54,5 +54,5 @@
 [3, 4]
 -}
 

5.2.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.patterns.wildcard.html b/Website/documentation/html/refmanual/ref.patterns.wildcard.html index 11019a4bd..5c3a2b6f1 100644 --- a/Website/documentation/html/refmanual/ref.patterns.wildcard.html +++ b/Website/documentation/html/refmanual/ref.patterns.wildcard.html @@ -1,5 +1,5 @@ -5.9. Wildcard Pattern
Implication by Fewer Cases
@@ -58,5 +58,5 @@
 true
 -}
 

5.9.4. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.sites.custom.html b/Website/documentation/html/refmanual/ref.sites.custom.html index 1bb09f52b..f20d74f1c 100644 --- a/Website/documentation/html/refmanual/ref.sites.custom.html +++ b/Website/documentation/html/refmanual/ref.sites.custom.html @@ -1,5 +1,5 @@ -6.4. Custom sites
Accessing class members
@@ -144,7 +144,7 @@
 "2E+108"
 -}
 
No-arg constructor invocation, field assignment, and field dereference
@@ -166,7 +166,7 @@
 "test 4"
 -}
 
Integer conversion overflow
@@ -183,5 +183,5 @@
 -1530464171
 -}
 

6.2.7. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.sites.library.html b/Website/documentation/html/refmanual/ref.sites.library.html index e0b9bd606..0dbb38b92 100644 --- a/Website/documentation/html/refmanual/ref.sites.library.html +++ b/Website/documentation/html/refmanual/ref.sites.library.html @@ -1,5 +1,5 @@ -6.1. Library sites
Another standard library site: Ift
@@ -49,5 +49,5 @@
 "correct"
 -}
 

6.1.2. Related Links

Related Reference Topics

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.sites.web.html b/Website/documentation/html/refmanual/ref.sites.web.html index 9457536c2..61b77594f 100644 --- a/Website/documentation/html/refmanual/ref.sites.web.html +++ b/Website/documentation/html/refmanual/ref.sites.web.html @@ -1,5 +1,5 @@ -6.3. Web Services

6.3.5. Related Links

Related Reference Topics

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.stdlib.core.html b/Website/documentation/html/refmanual/ref.stdlib.core.html index 03ccb6cc3..713b4a29f 100644 --- a/Website/documentation/html/refmanual/ref.stdlib.core.html +++ b/Website/documentation/html/refmanual/ref.stdlib.core.html @@ -1,5 +1,5 @@ -11.2. core: Fundamental sites and operators.
Timeout
@@ -55,5 +55,5 @@
   <result< ( Google("impatience") 
            | Rwait(5000) >> "Search timed out.")
 

7.1.5. Related Links

Related Reference Topics

Related Tutorial Sections

\ No newline at end of file diff --git a/Website/documentation/html/refmanual/ref.types.context.html b/Website/documentation/html/refmanual/ref.types.context.html index 9a053b12c..60480f891 100644 --- a/Website/documentation/html/refmanual/ref.types.context.html +++ b/Website/documentation/html/refmanual/ref.types.context.html @@ -1,5 +1,5 @@ -9.6. Typing Contexts

- Orc Reference Manual v2.0.0 +

+ Orc Reference Manual v2.0.1 -

The University of Texas at Austin

http://orc.csres.utexas.edu/

2011-04-21

License and Grant Information

+

The University of Texas at Austin

http://orc.csres.utexas.edu/

2011-04-27

License and Grant Information

Use and redistribution of this file is governed by the license terms in the LICENSE file found in the project's top-level directory and also found at @@ -76,7 +76,7 @@ false -}

1.1.6. Related Links

Related Reference Topics

Related Tutorial Sections

1.2. Numerics

Orc includes two numeric types, integers and numbers. Orc's integers are arbitrary-precision two's complement integers. Orc's numbers are floating point numbers, with an arbitrary-precision two's complement significand and a 32-bit two's complement exponent (base 10). @@ -150,7 +150,7 @@ 14 -}

See the Orc precedence table.

Integer to Number Promotion
@@ -169,7 +169,7 @@
 (24.666666666666668, 24)
 -}
 
Square Roots and Squares
@@ -194,7 +194,7 @@
 (5.00, 2.23606797749979, 25.0000)
 -}
 

1.2.6. Related Links

Related Reference Topics

Related Tutorial Sections

1.3. Character Strings

Orc's character sequence representation is a string. Characters in Orc strings are drawn from the Unicode character set, and are encoded in the UTF-16 encoding form. @@ -226,7 +226,7 @@ "hello world" -}

String Functions
@@ -241,7 +241,7 @@
 "I like Orc"
 -}
 

1.3.6. Related Links

Related Reference Topics

Related Tutorial Sections

1.4. signal

A signal is a value that carries no information. It typically indicates completion of a call, when there is no other meaningful value to return. It is analogous to void in Java or () in ML. @@ -293,7 +293,7 @@ [[1], [2, 2], [3, 3, 3]] -}

Lists Are Not Sets
@@ -311,7 +311,7 @@
 true
 -}
 
Building Lists with Cons
@@ -324,7 +324,7 @@
 [4, 3, 2, 1]
 -}
 

1.5.7. Related Links

Related Reference Topics

Related Tutorial Sections

1.6. Tuples

A tuple is a sequence of at least two values. Orc does not have 0-tuples or 1-tuples.

Tuples are intended to be used for sequences with a fixed length and varying element types, @@ -357,7 +357,7 @@ ([1, 2, 3, 4], [1, 4, 9, 16]) -}

Fork-Join
@@ -371,7 +371,7 @@
 join
 -}
 

1.6.7. Related Links

Related Reference Topics

Related Tutorial Sections

1.7. Records

A record is an unordered finite map from keys to values. The empty record is written as {. .}. @@ -440,7 +440,7 @@ -}

Record Extension
@@ -455,7 +455,7 @@
 128
 -}
 

1.7.8. Related Links

Related Reference Topics

Related Tutorial Sections

1.8. Algebraic Data Types

An Orc datatype is an algebraic data type, or "tagged union". A datatype value contains a sequence of values enclosed by a tag. This value can be matched by a pattern. @@ -514,7 +514,7 @@ [Secondary(), Tertiary()] -}

Geometric shape datatype
@@ -532,7 +532,7 @@
 3.14159265358970
 -}
 
Binary tree node
@@ -554,7 +554,7 @@
 InnerNode(LeafNode(1), InnerNode(LeafNode(2), LeafNode(3)))
 -}
 
Polymorphic binary tree node
@@ -576,7 +576,7 @@
 InnerNode(LeafNode("A"), InnerNode(LeafNode("B"), LeafNode("C")))
 -}
 
Orc built-in Option type
@@ -588,7 +588,7 @@
 NONRUNNABLE
 -}
 

1.8.5. Related Links

Related Reference Topics

Related Tutorial Sections

1.9. Closures

Functions are first-class values in Orc. Defining a function creates a special value called a closure; the defined name of the function is a variable and the value bound to it @@ -622,7 +622,7 @@ 7 -}

One Two Sum
@@ -637,7 +637,7 @@
 9
 -}
 

1.9.3. Related Links

Related Reference Topics

Related Tutorial Sections

1.10. Mutable State

A mutable object is a value on which operations may yield different results when called at different times. Mutable objects are common in imperative programming languages. @@ -664,7 +664,7 @@ "{2, 4}" -}

Java HashMap
@@ -682,7 +682,7 @@
 "Minnie"
 -}
 

1.11.3. Related Links

Related Reference Topics

Related Tutorial Sections

Chapter 2. Expressions

Orc expressions are executed, rather than evaluated. An execution may call external services and publish some number of values (possibly zero). @@ -717,7 +717,7 @@ "ceci n'est pas une |" -}

2.1.4. Related Links

Related Reference Topics

Related Tutorial Sections

2.2. Variable

A variable may occur on its own as an expression. Execution of a variable publishes the value bound to that variable, and then halts. @@ -756,7 +756,7 @@ 1 -}

2.2.4. Related Links

Related Reference Topics

Related Tutorial Sections

2.3. stop

The stop expression does nothing. Execution of stop immediately halts silently. @@ -786,7 +786,7 @@ 3 -}

Square Root
@@ -802,7 +802,7 @@
 OUTPUT:
 -}
 

2.3.4. Related Links

Related Reference Topics

Related Tutorial Sections

2.4. Site and Function Calls

A call is an invocation of a target expression on a sequence of argument expressions. First, the target expression is deflated to a value g. @@ -869,7 +869,7 @@ Waited 0.5 seconds -}

Functions are Lenient
@@ -891,7 +891,7 @@
 Waiting
 -}
 
Function with Domain and Range
@@ -921,7 +921,7 @@
 true
 -}
 

2.4.7. Related Links

Related Reference Topics

Related Tutorial Sections

2.5. Dot Access

A dot access is an expression that retrieves a named member of a value. It consists of a target expression E and a key K. @@ -964,7 +964,7 @@ 3.3 -}

Channel Operations
@@ -987,7 +987,7 @@
 8
 -}
 
Capture Channel Methods
@@ -1010,7 +1010,7 @@
 Received: 3
 -}
 

2.5.4. Related Links

Related Reference Topics

Related Tutorial Sections

2.6. Operators

Orc has a standard set of infix, prefix, and postfix operators. Operators in Orc are syntactic sugar for site calls; @@ -1082,7 +1082,7 @@ 7 -}

Operators publish once
@@ -1097,7 +1097,7 @@
 4
 -}
 
Redefine an operator
@@ -1114,7 +1114,7 @@
 "To be, or not to be, that is the question."
 -}
 

2.6.6. Related Links

Related Reference Topics

Related Tutorial Sections

2.7. if then else

The expression if Ec then Et else Ef is a conditional expression. @@ -1166,7 +1166,7 @@ false -}

2.7.4. Related Links

Related Reference Topics

2.8. lambda

Sometimes one would like to create a closure directly, without bothering to give it a name. There is a special keyword lambda for this purpose. By writing a @@ -1202,7 +1202,7 @@ -}

2.8.3. Type

The type of a lambda expression is exactly the type of the closure it creates.

2.8.4. Related Links

Related Reference Topics

Related Tutorial Sections

Chapter 3. Combinators

@@ -1247,7 +1247,7 @@ 2 -}

Parallel Site Calls
@@ -1263,7 +1263,7 @@
 
 Google("cupcake") | Yahoo("cupcake")
 

3.1.5. Related Links

Related Reference Topics

Related Tutorial Sections

3.2. Sequential Combinator

F >x> G

The execution of F >x> G @@ -1314,7 +1314,7 @@ 2 -}

Filtering
@@ -1328,7 +1328,7 @@
 6
 -}
 
Suppressed Publication
@@ -1346,7 +1346,7 @@
 world
 -}
 

3.2.5. Related Links

Related Reference Topics

Related Tutorial Sections

3.3. Pruning Combinator

F <x< G

The execution of F <x< G @@ -1399,7 +1399,7 @@ "tails" -}

Print First Result
@@ -1411,7 +1411,7 @@
 
 Println(result) <result< ( Google("cupcake") | Yahoo("cupcake") )
 
Pattern Publication
@@ -1428,7 +1428,7 @@
 25
 -}
 
Timed Termination
@@ -1449,7 +1449,7 @@
 signal
 -}
 

3.3.5. Related Links

Related Reference Topics

Related Tutorial Sections

3.4. Otherwise Combinator

F ; G

The execution of @@ -1487,7 +1487,7 @@ Google("cupcake") ; Yahoo("cupcake")

Lexicographic sublist
@@ -1509,7 +1509,7 @@
 [-2, 4, -7]
 -}
 
Channel Transfer
@@ -1530,7 +1530,7 @@
 [1, 2, 3, 4]
 -}
 
Helpful publication
@@ -1548,7 +1548,7 @@
    [1,2,3]
 -}
 

3.4.5. Related Links

Related Reference Topics

Related Tutorial Sections

Chapter 4. Declarations

A declaration binds variables to values, or type variables to types, in an expression. The values may be as simple as integers or booleans, or as complex as functions, sites, or classes. @@ -1584,7 +1584,7 @@ "x is false, y is 2" -}

Timeout
@@ -1598,7 +1598,7 @@
 
 result
 
Roll Die
@@ -1634,7 +1634,7 @@
 "You rolled 6"
 -}
 

4.1.3. Related Links

Related Reference Topics

Related Tutorial Sections

4.2. def: Define Function

The def declaration defines a function. A function definition consists of an identifier, a sequence of parameters, @@ -1792,7 +1792,7 @@ (0, 1) -}

Parallel-Or Function
@@ -1810,7 +1810,7 @@
 true
 -}
 
Even/Odd Using Mutual Recursion
@@ -1830,7 +1830,7 @@
 false
 -}
 
List Head
@@ -1847,7 +1847,7 @@
 2
 -}
 
List Length
@@ -1862,7 +1862,7 @@
 3
 -}
 
List Sum
@@ -1878,7 +1878,7 @@
 -}
 
 
Same-Length Zip
@@ -1898,7 +1898,7 @@
 -}
 
 
Fibonacci Function
@@ -1915,7 +1915,7 @@
 8
 -}
 

4.2.9. Related Links

Related Reference Topics

Related Tutorial Sections

4.3. def class: Define Site in Orc

The def class declaration provides the capability to implement sites within Orc itself. @@ -2031,7 +2031,7 @@ matrix. This allows us to retrieve and update the matrix elements using traditional notation.

Create a Write-Once Site

@@ -2064,7 +2064,7 @@ 42 -}

Extend Functionality of an Existing Site

@@ -2095,7 +2095,7 @@ 5 -}

Managing Concurrent Access

@@ -2134,7 +2134,7 @@ OUTPUT: -}

Computing with the Goal Expression

@@ -2166,7 +2166,7 @@ 0 -}

Stopwatch
@@ -2214,7 +2214,7 @@
 true
 -}
 

4.3.6. Related Links

Related Reference Topics

Related Tutorial Sections

4.4. import site: Import Site

A site declaration makes an Orc site that is present in the environment available for use by the program. @@ -2264,7 +2264,7 @@ MySite()

4.4.5. Related Links

Related Reference Topics

Related Tutorial Sections

4.5. import class: Import Class from Java

Orc programs can use services of the platform on which the Orc runtime engine runs. In this implementation of Orc, this platform is the Java Runtime Environment (JRE). @@ -2319,7 +2319,7 @@ 15 -}

Invoke a Java static method
@@ -2335,7 +2335,7 @@
 1.6232492903979006
 -}
 
Declaring and instantiating a Java generic class
@@ -2351,7 +2351,7 @@
 2
 -} 
 		

4.5.4. Related Links

Related Reference Topics

Related Tutorial Sections

4.6. type: Declare Type

A type declaration binds a type variable to a type. There are three kinds of type declarations: aliases, @@ -2400,7 +2400,7 @@ NONRUNNABLE -}

Importing Types
@@ -2413,7 +2413,7 @@
 NONRUNNABLE
 -}
 
Binary Tree Type
@@ -2442,7 +2442,7 @@
 Node(Node(Empty(), 0, Empty()), 1, Node(Empty(), 2, Empty()))
 -}
 

4.6.6. Related Links

Related Reference Topics

Related Tutorial Sections

4.7. include: Include Orc File

It is often convenient to group related declarations into units that can be shared between programs. The include declaration offers a simple @@ -2467,7 +2467,7 @@ def foldr(f,l,s) = foldl(f,rev(l),s)

Include a separate file
@@ -2478,7 +2478,7 @@
 
 sum([1,2,3])
 

4.7.3. Related Links

Related Reference Topics

Related Tutorial Sections

Chapter 5. Patterns

Patterns are used in combinators, in val declarations, and in clausal definitions of functions, to select values and bind variables to values. A pattern is given by a shape and a set of variables. A shape is either a tuple, a list, @@ -2528,7 +2528,7 @@ true -}

5.1.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.2. Variable Pattern

When a variable pattern x is matched against a value v, the variable x is bound to the value v. @@ -2552,7 +2552,7 @@ 7 -}

Pair to List
@@ -2567,7 +2567,7 @@
 [3, 4]
 -}
 

5.2.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.3. Tuple Pattern

Each element of a tuple pattern matches the corresponding element of a tuple value.

5.3.1. Syntax

@@ -2593,7 +2593,7 @@ signal -}

Pattern Publication
@@ -2608,7 +2608,7 @@
 9
 -}
 

5.3.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.4. List Pattern

Each element of a list pattern matches the corresponding element of a list value.

5.4.1. Syntax

@@ -2641,7 +2641,7 @@ [1, 1, 3, 4, 5, 9] -}

5.4.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.5. Record Pattern

When a record pattern is matched against a record value, each key mentioned in the record pattern must have a mapping in the record value, @@ -2682,7 +2682,7 @@ Harry Q. Bovik's application was accepted -}

5.5.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.6. Call Pattern

A call pattern allows a call to be made within a pattern match. @@ -2742,7 +2742,7 @@ -}

Integer square root
@@ -2777,7 +2777,7 @@
 -}
 
 
Factoring Using Multimatch
@@ -2809,7 +2809,7 @@
 -}
 
 

5.6.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.7. Cons Pattern

The cons pattern matches the head and the tail of a nonempty list.

5.7.1. Syntax

@@ -2837,7 +2837,7 @@ (1, [2, 3]) -}

5.7.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.8. As Pattern

The as keyword binds a variable to the value matched by a pattern. It is a more general way of binding variables than using variable patterns alone. @@ -2869,7 +2869,7 @@ [3, 4, (3, 4)] -}

5.8.4. Related Links

Related Reference Topics

Related Tutorial Sections

5.9. Wildcard Pattern

The wildcard pattern matches any value and binds no variables.

5.9.1. Syntax

@@ -2893,7 +2893,7 @@ [2, 3, 4] -}

Implication by Fewer Cases
@@ -2912,7 +2912,7 @@
 true
 -}
 

5.9.4. Related Links

Related Reference Topics

Related Tutorial Sections

Chapter 6. Sites and Services

Orc programs communicate with their environment by calling sites. Sites perform services, which the Orc program orchestrates. @@ -2949,7 +2949,7 @@ 2 -}

Another standard library site: Ift
@@ -2962,7 +2962,7 @@
 "correct"
 -}
 

6.1.2. Related Links

Related Reference Topics

6.2. Java sites

Essential to Orc's role as an orchestration language is Orc's interaction with its host platform, which in this implementation is the Java virtual machine (JVM). @@ -3062,7 +3062,7 @@ "OK" -}

Accessing class members
@@ -3091,7 +3091,7 @@
 "2E+108"
 -}
 
No-arg constructor invocation, field assignment, and field dereference
@@ -3113,7 +3113,7 @@
 "test 4"
 -}
 
Integer conversion overflow
@@ -3130,7 +3130,7 @@
 -1530464171
 -}
 

6.2.7. Related Links

Related Reference Topics

Related Tutorial Sections

6.3. Web Services

Some sites provide access to remote services, rather than performing local computation. In particular, a site could provide access to a Web service. @@ -3277,7 +3277,7 @@ randombytes(4)

6.3.5. Related Links

Related Reference Topics

6.4. Custom sites

For services beyond those available as library sites, Java sites, and Web service sites, Orc programs may call sites developed specifically as Orc sites. @@ -3340,7 +3340,7 @@ green -}

Timeout
@@ -3353,7 +3353,7 @@
   <result< ( Google("impatience") 
            | Rwait(5000) >> "Search timed out.")
 

7.1.5. Related Links

Related Reference Topics

Related Tutorial Sections

Chapter 8. Concepts

These are a few concepts which are essential to Orc, and are used frequently in other parts of the reference manual. @@ -3377,7 +3377,7 @@ OUTPUT: -}

Publish one value
@@ -3387,7 +3387,7 @@
 1
 -}
 
Publish two values
@@ -3398,7 +3398,7 @@
 32
 -}
 
Publish an unbounded number of values (metronome)
@@ -3406,7 +3406,7 @@
 
 metronome()
 

8.1.2. Related Links

Related Reference Topics

Related Tutorial Sections

8.2. Silence

8.2.1. Definition

An expression is silent in an execution if it never publishes in that execution. An expression is always silent if it does not publish in any execution. @@ -3427,7 +3427,7 @@ print but don't publish -}

Conditional Silence
@@ -3451,7 +3451,7 @@
 OUTPUT:
 -}
 

8.2.3. Related Links

Related Reference Topics

8.3. Expression States

A site call, from the site's perspective, has three possible outcomes: the site will definitely publish a value, the site knows that it will @@ -3558,7 +3558,7 @@ be no response, causing G to halt; otherwise, G stays blocked forever.

Pruning combinator; killed state

@@ -3573,7 +3573,7 @@ As we have shown, G will definitely publish. Then G is killed, and so are its sub-expressions.

Sequential and otherwise combinators

@@ -3593,7 +3593,7 @@ halts silently, causing false to be published, or (3) the call remains blocked forever, causing F to remain blocked.

8.3.7. Related Links

Related Reference Topics

8.4. Deflation

8.4.1. Definition

Deflation is an execution mechanism which extracts a single value from an expression that might publish many values, so that such an expression can be executed in a context that expects @@ -3635,7 +3635,7 @@ yahoo = Yahoo("Jack Burton") | Rwait(7000) >> "no result" .}

8.4.3. Related Links

Related Reference Topics

Related Tutorial Sections

8.5. Helpful Sites

A helpful site responds with an indication that it will never publish, when it knows this outcome for a call. diff --git a/Website/documentation/html/userguide/index.html b/Website/documentation/html/userguide/index.html index a1d599dc1..d00008389 100644 --- a/Website/documentation/html/userguide/index.html +++ b/Website/documentation/html/userguide/index.html @@ -1,5 +1,5 @@ -Orc User Guide v2.0.0 \ No newline at end of file +

The University of Texas at Austin

http://orc.csres.utexas.edu/

2011-04-27

License and Grant Information

Preface
1. An Introduction to Orc
1.1. Simple Expressions
1.2. Complex Expressions
1.3. Data Structures
1.4. Functions
2. Additional Features of Orc
2.1. First-Class Functions
2.2. The . notation
2.3. Records
2.4. Defining Sites in Orc
2.5. Datatypes
2.6. Importing Resources
2.7. Type Checking
3. Syntactic and Stylistic Conventions
3.1. Parallel combinator
3.2. Sequential combinator
3.3. Pruning combinator
3.4. Declarations
4. Programming Idioms
4.1. Channels
4.2. Lists
4.3. Streams
4.4. Mutable References
4.5. Tables
4.6. Loops
4.7. Parallel Matching
4.8. Fork-join
4.9. Sequential Fork-Join
4.10. Priority Poll
4.11. Parallel Or
4.12. Timeout
4.13. Priority
4.14. Metronome
4.15. Routing
4.16. Fold
5. Larger Examples
5.1. Dining Philosophers
5.2. Hygienic Dining Philosophers
5.3. Readers-Writers
5.4. Quicksort
5.5. Meeting Scheduler
\ No newline at end of file diff --git a/Website/documentation/html/userguide/style.pruning.html b/Website/documentation/html/userguide/style.pruning.html index b7cf6cc98..033daff60 100644 --- a/Website/documentation/html/userguide/style.pruning.html +++ b/Website/documentation/html/userguide/style.pruning.html @@ -1,5 +1,5 @@ -3.3. Pruning combinator

Preface

Orc is a programming language designed to make distributed and @@ -36,7 +36,7 @@

Unless otherwise noted, all material in this document pertains to the Orc language implementation version -2.0.0 +2.0.1 .

This guide introduces the reader to the Orc programming language. It does not diff --git a/Website/documentation/html/userguide/ug.style.declarations.html b/Website/documentation/html/userguide/ug.style.declarations.html index 5786ebffe..1de60f542 100644 --- a/Website/documentation/html/userguide/ug.style.declarations.html +++ b/Website/documentation/html/userguide/ug.style.declarations.html @@ -1,5 +1,5 @@ -3.4. Declarations

- Orc User Guide v2.0.0 +

+ Orc User Guide v2.0.1 -

The University of Texas at Austin

http://orc.csres.utexas.edu/

2011-04-21

License and Grant Information

+

The University of Texas at Austin

http://orc.csres.utexas.edu/

2011-04-27

License and Grant Information

Use and redistribution of this file is governed by the license terms in the LICENSE file found in the project's top-level directory and also found at @@ -30,7 +30,7 @@ recommendations expressed in this document are those of the authors and do not necessarily reflect the views of the National Science Foundation. -


Table of Contents

Preface
1. An Introduction to Orc
1.1. Simple Expressions
1.1.1. Values
1.1.2. Operators
1.1.3. Sites
1.2. Complex Expressions
1.2.1. Combinators
1.2.2. val
1.2.3. Conditional Expressions
1.2.4. Nested Expressions
1.3. Data Structures
1.3.1. Tuples
1.3.2. Lists
1.3.3. Patterns
1.4. Functions
1.4.1. Recursion
1.4.2. Clauses
1.4.3. Guards
2. Additional Features of Orc
2.1. First-Class Functions
2.2. The . notation
2.3. Records
2.4. Defining Sites in Orc
2.4.1. Example: Stack
2.4.2. Example: Multicast
2.5. Datatypes
2.6. Importing Resources
2.6.1. Writing Custom Sites
2.6.2. Using Java Classes
2.6.3. Including Source Files
2.7. Type Checking
2.7.1. Type Inference
2.7.2. Adding Type Information
2.7.3. Polymorphism
3. Syntactic and Stylistic Conventions
3.1. Parallel combinator
3.2. Sequential combinator
3.3. Pruning combinator
3.4. Declarations
3.4.1. Ambiguous Declarations
4. Programming Idioms
4.1. Channels
4.2. Lists
4.3. Streams
4.4. Mutable References
4.4.1. Rewritable references
4.4.2. Write-once references
4.4.3. Syntax for manipulating references
4.4.4. Arrays
4.5. Tables
4.6. Loops
4.7. Parallel Matching
4.8. Fork-join
4.8.1. Example: Machine initialization
4.8.2. Example: Simple parallel auction
4.8.3. Example: Barrier synchronization
4.9. Sequential Fork-Join
4.10. Priority Poll
4.11. Parallel Or
4.12. Timeout
4.12.1. Auction with timeout
4.12.2. Detecting timeout
4.13. Priority
4.14. Metronome
4.15. Routing
4.15.1. Generalizing Termination
4.15.2. Non-Terminating Pruning
4.15.3. Sequencing Otherwise
4.16. Fold
4.16.1. Associative Fold
4.16.2. Associative, Commutative Fold
5. Larger Examples
5.1. Dining Philosophers
5.2. Hygienic Dining Philosophers
5.3. Readers-Writers
5.4. Quicksort
5.5. Meeting Scheduler

Preface

+


Table of Contents

Preface
1. An Introduction to Orc
1.1. Simple Expressions
1.2. Complex Expressions
1.3. Data Structures
1.4. Functions
2. Additional Features of Orc
2.1. First-Class Functions
2.2. The . notation
2.3. Records
2.4. Defining Sites in Orc
2.5. Datatypes
2.6. Importing Resources
2.7. Type Checking
3. Syntactic and Stylistic Conventions
3.1. Parallel combinator
3.2. Sequential combinator
3.3. Pruning combinator
3.4. Declarations
4. Programming Idioms
4.1. Channels
4.2. Lists
4.3. Streams
4.4. Mutable References
4.5. Tables
4.6. Loops
4.7. Parallel Matching
4.8. Fork-join
4.9. Sequential Fork-Join
4.10. Priority Poll
4.11. Parallel Or
4.12. Timeout
4.13. Priority
4.14. Metronome
4.15. Routing
4.16. Fold
5. Larger Examples
5.1. Dining Philosophers
5.2. Hygienic Dining Philosophers
5.3. Readers-Writers
5.4. Quicksort
5.5. Meeting Scheduler

Preface

Orc is a programming language designed to make distributed and concurrent programs simple and intuitive to write. Orc expresses orchestration, a type of structured concurrency. It emphasizes the @@ -45,7 +45,7 @@

Unless otherwise noted, all material in this document pertains to the Orc language implementation version -2.0.0 +2.0.1 .

This guide introduces the reader to the Orc programming language. It does not @@ -65,7 +65,7 @@ with guidelines on style and programming methodology, explanations of some common concurrency patterns, and larger example programs. -

Chapter 1. An Introduction to Orc

Table of Contents

1.1. Simple Expressions
1.1.1. Values
1.1.2. Operators
1.1.3. Sites
1.2. Complex Expressions
1.2.1. Combinators
1.2.2. val
1.2.3. Conditional Expressions
1.2.4. Nested Expressions
1.3. Data Structures
1.3.1. Tuples
1.3.2. Lists
1.3.3. Patterns
1.4. Functions
1.4.1. Recursion
1.4.2. Clauses
1.4.3. Guards

+

Chapter 1. An Introduction to Orc

Table of Contents

1.1. Simple Expressions
1.2. Complex Expressions
1.3. Data Structures
1.4. Functions

An Orc program is an expression. Complex Orc expressions are built up recursively from simpler expressions. Orc expressions are executed; @@ -590,7 +590,7 @@ def odd(n) if (n <: 0) = even(n+1) def odd(0) = false

-

Chapter 2. Additional Features of Orc

Table of Contents

2.1. First-Class Functions
2.2. The . notation
2.3. Records
2.4. Defining Sites in Orc
2.4.1. Example: Stack
2.4.2. Example: Multicast
2.5. Datatypes
2.6. Importing Resources
2.6.1. Writing Custom Sites
2.6.2. Using Java Classes
2.6.3. Including Source Files
2.7. Type Checking
2.7.1. Type Inference
2.7.2. Adding Type Information
2.7.3. Polymorphism

+

Chapter 2. Additional Features of Orc

Table of Contents

2.1. First-Class Functions
2.2. The . notation
2.3. Records
2.4. Defining Sites in Orc
2.5. Datatypes
2.6. Importing Resources
2.7. Type Checking

Chapter 1 presented the essential features of the Orc programming language. Here we show a number of additional features, which are useful for programming in certain styles, making use of additional services and resources, and constructing larger programs. @@ -888,7 +888,7 @@ FileReader, and BufferedReader classes to read the first line of a text file. -

+

 import class File = "java.io.File"
 import class FileReader = "java.io.FileReader"
 import class BufferedReader = "java.io.BufferedReader"
@@ -1070,7 +1070,7 @@
 LinkedList<Integer> l = new LinkedList<Integer>();
 

-

Chapter 3. Syntactic and Stylistic Conventions

Table of Contents

3.1. Parallel combinator
3.2. Sequential combinator
3.3. Pruning combinator
3.4. Declarations
3.4.1. Ambiguous Declarations

+

Chapter 3. Syntactic and Stylistic Conventions

Table of Contents

3.1. Parallel combinator
3.2. Sequential combinator
3.3. Pruning combinator
3.4. Declarations

In this section we suggest some syntactic conventions for writing Orc programs. None of these conventions are required by the parser; newlines are used only to disambiguate certain corner cases in parsing, and other whitespace is ignored. However, following programming convention @@ -1254,7 +1254,7 @@

An expression that follows a declaration begins with an alphanumeric symbol

To circumvent this restriction, if (x,y) is an expression that follows a declaration, write it as signal >> (x,y). Similarly, write signal >> -3, in case -3 is the goal expression in the above example. Note that there are many solutions to this problem; for example -using stop | (x,y) is also valid.

Chapter 4. Programming Idioms

Table of Contents

4.1. Channels
4.2. Lists
4.3. Streams
4.4. Mutable References
4.4.1. Rewritable references
4.4.2. Write-once references
4.4.3. Syntax for manipulating references
4.4.4. Arrays
4.5. Tables
4.6. Loops
4.7. Parallel Matching
4.8. Fork-join
4.8.1. Example: Machine initialization
4.8.2. Example: Simple parallel auction
4.8.3. Example: Barrier synchronization
4.9. Sequential Fork-Join
4.10. Priority Poll
4.11. Parallel Or
4.12. Timeout
4.12.1. Auction with timeout
4.12.2. Detecting timeout
4.13. Priority
4.14. Metronome
4.15. Routing
4.15.1. Generalizing Termination
4.15.2. Non-Terminating Pruning
4.15.3. Sequencing Otherwise
4.16. Fold
4.16.1. Associative Fold
4.16.2. Associative, Commutative Fold

+using stop | (x,y) is also valid.

Chapter 4. Programming Idioms

Table of Contents

4.1. Channels
4.2. Lists
4.3. Streams
4.4. Mutable References
4.5. Tables
4.6. Loops
4.7. Parallel Matching
4.8. Fork-join
4.9. Sequential Fork-Join
4.10. Priority Poll
4.11. Parallel Or
4.12. Timeout
4.13. Priority
4.14. Metronome
4.15. Routing
4.16. Fold

In this section we give Orc implementations of some standard idioms from concurrent and functional programming. @@ -1394,7 +1394,7 @@ val r = Cell() Rwait(1000) >> r.write(2) >> Println("Wrote 2") >> stop -| Rwait(1000) >> r.write(3) >> Println("Wrote 3") >> stop +| Rwait(2000) >> r.write(3) >> Println("Wrote 3") >> stop | r.read() {- @@ -1423,7 +1423,7 @@ val r = Cell() Rwait(1000) >> r := 2 >> Println("Wrote 2") >> stop -| Rwait(1000) >> r := 3 >> Println("Wrote 3") >> stop +| Rwait(2000) >> r := 3 >> Println("Wrote 3") >> stop | r? {- @@ -1456,9 +1456,10 @@ initialize(0) >> (a(3)? | a(6)? | a(10)?) {- -OUTPUT: +OUTPUT:PERMUTABLE 8 64 +Error: java.lang.ArrayIndexOutOfBoundsException: 10 -}

@@ -1613,9 +1614,10 @@

 [4, 6] >x>
-  x >[]> 0
+( x >[]> 0
 | x >[_]> 1
 | x >_:_:_> 2
+)
 

whereas @@ -2171,124 +2173,131 @@ the philosopher cleans it. On eating, the philosopher dirties all forks. For full details of the algorithm, consult the original paper.

-{- Start a philosopher actor; never publishes.
-   Messages sent between philosophers include:
-   - ("fork", p): philosopher p relinquishes the fork
-   - ("request", p): philosopher p requests the fork
-   - ("rumble", p): sent by a philosopher to itself when it should
-     become hungry
-
-   name: identify this process in status messages
-   mbox: our mailbox; the "address" of this philosopher is mbox.put
-   missing: set of neighboring philosophers holding our forks
+{- The "hygenic solution to the diners problem",
+   described in "The Drinking Philosophers Problem", by
+   K. M. Chandy and J. Misra.
 -}
 
-{- Define philosopher -}
+{- 
+Use a Scala set implementation.
+Operations on this set are not synchronized.
+-}
+import class ScalaSet = "scala.collection.mutable.HashSet"
+
+{-
+Make a set initialized to contain
+the items in the given list.
+-}
+def Set(items) = ScalaSet() >s> joinMap(s.add, items) >> s
+
+
+{-
+Start a philosopher process; never publishes.
+
+name: identify this process in status messages
+mbox: our mailbox
+missing: set of neighboring philosophers holding our fork
+-}
 def philosopher(name, mbox, missing) =
-  {- deferred requests for forks -}
+  val send = mbox.put
+  val receive = mbox.get
+  -- deferred requests for forks
   val deferred = Channel()
-  {- forks we hold which are clean -}
-  val clean = Set()
+  -- forks we hold which are clean
+  val clean = Set([])
 
   def sendFork(p) =
-    {- remember that we no longer hold the fork -}
     missing.add(p) >>
-    p(("fork", mbox.put))
+    p(("fork", send))
  
   def requestFork(p) =
-    p(("request", mbox.put))
+    clean.add(p) >>
+    p(("request", send))
   
-  {- Start a timer which will tell us when we're hungry. -}
+  -- While thinking, start a timer which
+  -- will tell us when we're hungry
   def digesting() =
       Println(name + " thinking") >>
       thinking()
-    | Rwait(Random(1000)) >>
-      mbox.put(("rumble", mbox.put)) >>
+    | Rwait(Random(30)) >>
+      send(("rumble", send)) >>
       stop
 
-  {- Wait to become hungry -}
   def thinking() =
     def on(("rumble", _)) =
       Println(name + " hungry") >>
-      map(requestFork, missing) >>
+      map(requestFork, missing.toList()) >>
       hungry()
     def on(("request", p)) =
-      sendFork(p) >> thinking()
-    on(mbox.get())
+      sendFork(p) >>
+      thinking()
+    on(receive())
 
-  {- Eat once we receive all forks -}
   def hungry() =
     def on(("fork", p)) =
       missing.remove(p) >>
-      clean.add(p) >>
-      if missing.isEmpty()
-      then Println(name + " eating") >> eating()
-      else hungry()
+      ( 
+        if missing.isEmpty() then
+          Println(name + " eating") >>
+          eating()
+        else hungry()
+      )
     def on(("request", p)) =
-      if clean.contains(p)
-      then deferred.put(p) >> hungry()
-      else sendFork(p) >> requestFork(p) >> hungry()
-    on(mbox.get())
+      if clean.contains(p) then
+        deferred.put(p) >>
+        hungry()
+      else
+        sendFork(p) >>
+        requestFork(p) >>
+        hungry()
+    on(receive())
 
-  {- Dirty forks, process deferred requests, then digest -}
   def eating() =
     clean.clear() >>
-    Rwait(Random(1000)) >>
+    Rwait(Random(10)) >>
     map(sendFork, deferred.getAll()) >>
     digesting()
 
-  {- All philosophers start out digesting -}
   digesting()
 
-{- Create an NxN 4-connected grid of philosophers.  Each philosopher
-   holds the fork for the connections below and to the right (so the
-   top left philosopher holds both its forks).
+{-
+Create an NxN 4-connected grid of philosophers.  Each philosopher holds the
+fork for the connections below and to the right (so the top left philosopher
+holds both its forks).
 -}
-
 def philosophers(n) =
-  {- A set with 1 item -}
-  def Set1(item) = Set() >s> s.add(item) >> s
-  {- A set with 2 items -}
-  def Set2(i1, i2) = Set() >s> s.add(i1) >> s.add(i2) >> s
-
-  {- create an NxN matrix of mailboxes -}
+  {- channels -}
   val cs = uncurry(Table(n, lambda (_) = Table(n, ignore(Channel))))
 
-  {- create the first row of philosophers -}
-  philosopher((0,0), cs(0,0), Set())
+  {- first row -}
+  philosopher((0,0), cs(0,0), Set([]))
   | for(1, n) >j>
-    philosopher((0,j), cs(0,j), Set1(cs(0,j-1).put))
+    philosopher((0,j), cs(0,j), Set([cs(0,j-1).put]))
 
-  {- create remaining rows -}
+  {- remaining rows -}
   | for(1, n) >i> (
-      philosopher((i,0), cs(i,0), Set1(cs(i-1,0).put))
+      philosopher((i,0), cs(i,0), Set([cs(i-1,0).put]))
       | for(1, n) >j>
-        philosopher((i,j), cs(i,j), Set2(cs(i-1,j).put, cs(i,j-1).put))
+        philosopher((i,j), cs(i,j), Set([cs(i-1,j).put, cs(i,j-1).put]))
     )
 
-{- Simulate a 3x3 grid of philosophers for 10 seconds -}
-Let(
-  philosophers(3)
-  | Rwait(10000)
-) >> "HALTED"
+philosophers(2)
 
 {-
 OUTPUT:EXAMPLE
 (0, 0) thinking
 (0, 1) thinking
-(0, 2) thinking
 (1, 0) thinking
-(2, 0) thinking
 (1, 1) thinking
-(2, 1) thinking
-(1, 2) thinking
-(2, 2) thinking
 (1, 0) hungry
 (0, 0) hungry
 (0, 1) hungry
+(1, 1) hungry
+(1, 1) eating
+(1, 1) thinking
 ...
-"HALTED"
--}

+-} +

Our implementation is based on the actor model of concurrency. An actor is a state machine which reacts to messages. On receiving a message, an actor can send asynchronous messages to other actors, @@ -2496,9 +2505,11 @@ range, the program asks each person when they are available for a meeting. It then combines all the responses, selects a meeting time which is acceptable to everyone, and notifies everyone of the selected time. -

+

 {- This program requires the Orchard environment to run -}
-include "net.inc"
+include "forms.inc"
+include "mail.inc"
+
 val during = Interval(LocalDate(2009, 9, 10),
                       LocalDate(2009, 10, 17))
 val invitees = ["john@example.com", "jane@example.com"]
diff --git a/Website/documentation/pdf/refmanual/refmanual.pdf b/Website/documentation/pdf/refmanual/refmanual.pdf
index ebfc51329..f440d3fe0 100644
Binary files a/Website/documentation/pdf/refmanual/refmanual.pdf and b/Website/documentation/pdf/refmanual/refmanual.pdf differ
diff --git a/Website/documentation/pdf/userguide/userguide.pdf b/Website/documentation/pdf/userguide/userguide.pdf
index 692276920..55d4851c3 100644
Binary files a/Website/documentation/pdf/userguide/userguide.pdf and b/Website/documentation/pdf/userguide/userguide.pdf differ