Modified: tinkerpop/site/docs/3.2.3-SNAPSHOT/reference/index.html
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/docs/3.2.3-SNAPSHOT/reference/index.html?rev=1764499&r1=1764498&r2=1764499&view=diff
==============================================================================
--- tinkerpop/site/docs/3.2.3-SNAPSHOT/reference/index.html (original)
+++ tinkerpop/site/docs/3.2.3-SNAPSHOT/reference/index.html Wed Oct 12 18:47:56 
2016
@@ -1123,6 +1123,7 @@ span.line-numbers { border-right: 1px so
 <li><a href="#_gremlin_python_sugar">Gremlin-Python Sugar</a></li>
 <li><a href="#_static_enums_and_methods">Static Enums and Methods</a></li>
 <li><a href="#_bindings">Bindings</a></li>
+<li><a href="#_traversal_strategies">Traversal Strategies</a></li>
 <li><a href="#_the_lambda_solution">The Lambda Solution</a></li>
 </ul>
 </li>
@@ -1998,14 +1999,12 @@ gremlin&gt; graph.features()
 ==&gt;FEATURES
 &gt; GraphFeatures
 &gt;-- <span class="key">Transactions</span>: <span 
class="predefined-constant">false</span>
+&gt;-- <span class="key">Persistence</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">ConcurrentAccess</span>: <span 
class="predefined-constant">false</span>
-&gt;-- <span class="key">ThreadedTransactions</span>: <span 
class="predefined-constant">false</span>
 &gt;-- <span class="key">Computer</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">Persistence</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">ThreadedTransactions</span>: <span 
class="predefined-constant">false</span>
 &gt; VariableFeatures
 &gt;-- <span class="key">Variables</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">LongArrayValues</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">StringArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">BooleanValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">ByteValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleValues</span>: <span 
class="predefined-constant">true</span>
@@ -2022,19 +2021,21 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">DoubleArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">FloatArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">IntegerArrayValues</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">LongArrayValues</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">StringArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt; VertexFeatures
-&gt;-- <span class="key">AddVertices</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">RemoveVertices</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">MetaProperties</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">AddVertices</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">MultiProperties</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">RemoveVertices</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">AddProperty</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">RemoveProperty</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">NumericIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">StringIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">UuidIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">CustomIds</span>: <span 
class="predefined-constant">false</span>
-&gt;-- <span class="key">UserSuppliedIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">AnyIds</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">UserSuppliedIds</span>: <span 
class="predefined-constant">true</span>
 &gt; VertexPropertyFeatures
 &gt;-- <span class="key">AddProperty</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">RemoveProperty</span>: <span 
class="predefined-constant">true</span>
@@ -2042,11 +2043,9 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">StringIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">UuidIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">CustomIds</span>: <span 
class="predefined-constant">false</span>
-&gt;-- <span class="key">UserSuppliedIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">AnyIds</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">UserSuppliedIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="predefined-type">Properties</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">LongArrayValues</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">StringArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">BooleanValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">ByteValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleValues</span>: <span 
class="predefined-constant">true</span>
@@ -2063,21 +2062,21 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">DoubleArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">FloatArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">IntegerArrayValues</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">LongArrayValues</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">StringArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt; EdgeFeatures
-&gt;-- <span class="key">AddEdges</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">RemoveEdges</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">AddEdges</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">AddProperty</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">RemoveProperty</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">NumericIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">StringIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">UuidIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">CustomIds</span>: <span 
class="predefined-constant">false</span>
-&gt;-- <span class="key">UserSuppliedIds</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">AnyIds</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">UserSuppliedIds</span>: <span 
class="predefined-constant">true</span>
 &gt; EdgePropertyFeatures
 &gt;-- <span class="predefined-type">Properties</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">LongArrayValues</span>: <span 
class="predefined-constant">true</span>
-&gt;-- <span class="key">StringArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">BooleanValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">ByteValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleValues</span>: <span 
class="predefined-constant">true</span>
@@ -2094,6 +2093,8 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">DoubleArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">FloatArrayValues</span>: <span 
class="predefined-constant">true</span>
 &gt;-- <span class="key">IntegerArrayValues</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">LongArrayValues</span>: <span 
class="predefined-constant">true</span>
+&gt;-- <span class="key">StringArrayValues</span>: <span 
class="predefined-constant">true</span>
 </code></pre>
 </div>
 </div>
@@ -2934,7 +2935,7 @@ gremlin&gt; g = graph.traversal()
 gremlin&gt; f = <span class="keyword">new</span> <span 
class="predefined-type">ByteArrayOutputStream</span>()
 ==&gt;
 gremlin&gt; mapper = graph.io(graphson()).mapper().embedTypes(<span 
class="predefined-constant">true</span>).create()
-==&gt;org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper<span 
class="error">@</span><span class="float">39f</span><span 
class="float">5e98d</span>
+==&gt;org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper<span 
class="error">@</span><span class="float">447324d</span><span 
class="integer">3</span>
 gremlin&gt; 
graph.io(graphson()).writer().mapper(mapper).create().writeVertex(f, g.V(<span 
class="integer">1</span>).next(), BOTH)
 gremlin&gt; f.close()</code></pre>
 </div>
@@ -3124,7 +3125,7 @@ gremlin&gt; g = graph.traversal()
 gremlin&gt; f = <span class="keyword">new</span> <span 
class="predefined-type">ByteArrayOutputStream</span>()
 ==&gt;
 gremlin&gt; mapper = 
graph.io(graphson()).mapper().version(GraphSONVersion.V2_0).create()
-==&gt;org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper<span 
class="error">@</span><span class="integer">280744</span>a1
+==&gt;org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper<span 
class="error">@</span><span class="float">3e0d</span>c27e
 gremlin&gt; 
graph.io(graphson()).writer().mapper(mapper).create().writeVertex(f, g.V(<span 
class="integer">1</span>).next(), BOTH)
 gremlin&gt; f.close()</code></pre>
 </div>
@@ -4043,22 +4044,25 @@ made more salient on a larger graph. The
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; graph = 
TinkerGraph.open()
 ==&gt;tinkergraph[<span class="key">vertices</span>:<span 
class="integer">0</span> <span class="key">edges</span>:<span 
class="integer">0</span>]
 gremlin&gt; graph.io(graphml()).readGraph(<span class="string"><span 
class="delimiter">'</span><span 
class="content">data/grateful-dead.xml</span><span 
class="delimiter">'</span></span>)
-gremlin&gt; g = graph.traversal()
+gremlin&gt; g = graph.traversal().withoutStrategies(LazyBarrierStrategy) <span 
class="comment">//</span><b>(1)</b>
 ==&gt;graphtraversalsource[tinkergraph[<span class="key">vertices</span>:<span 
class="integer">808</span> <span class="key">edges</span>:<span 
class="integer">8049</span>], standard]
-gremlin&gt; clockWithResult(<span 
class="integer">1</span>){g.V().both().both().both().count().next()} <span 
class="comment">//</span><b>(1)</b>
-==&gt;<span class="float">9123.918201</span>
+gremlin&gt; clockWithResult(<span 
class="integer">1</span>){g.V().both().both().both().count().next()} <span 
class="comment">//</span><b>(2)</b>
+==&gt;<span class="float">8431.455299</span>
 ==&gt;<span class="integer">126653966</span>
-gremlin&gt; clockWithResult(<span 
class="integer">1</span>){g.V().repeat(both()).times(<span 
class="integer">3</span>).count().next()} <span 
class="comment">//</span><b>(2)</b>
-==&gt;<span class="float">26.883083</span>
+gremlin&gt; clockWithResult(<span 
class="integer">1</span>){g.V().repeat(both()).times(<span 
class="integer">3</span>).count().next()} <span 
class="comment">//</span><b>(3)</b>
+==&gt;<span class="float">45.849306</span>
 ==&gt;<span class="integer">126653966</span>
-gremlin&gt; clockWithResult(<span 
class="integer">1</span>){g.V().both().barrier().both().barrier().both().barrier().count().next()}
 <span class="comment">//</span><b>(3)</b>
-==&gt;<span class="float">15.527578</span>
+gremlin&gt; clockWithResult(<span 
class="integer">1</span>){g.V().both().barrier().both().barrier().both().barrier().count().next()}
 <span class="comment">//</span><b>(4)</b>
+==&gt;<span class="float">23.119515</span>
 ==&gt;<span class="integer">126653966</span></code></pre>
 </div>
 </div>
 <div class="colist arabic">
 <ol>
 <li>
+<p>Explicitly remove <code>LazyBarrierStrategy</code> which yields a bulking 
optimization.</p>
+</li>
+<li>
 <p>A non-bulking traversal where each traverser is processed.</p>
 </li>
 <li>
@@ -4072,10 +4076,10 @@ gremlin&gt; clockWithResult(<span class=
 <div class="paragraph">
 <p>If <code>barrier()</code> is provided an integer argument, then the barrier 
will only hold <code>n</code>-number of unique traversers in its
 barrier before draining the aggregated traversers to the next step. This is 
useful in the aforementioned bulking
-optimization scenario, but reduces the risk of an out-of-memory exception.</p>
+optimization scenario with the added benefit of reducing the risk of an 
out-of-memory exception.</p>
 </div>
 <div class="paragraph">
-<p>The non-default <code>LazyBarrierStrategy</code> inserts 
<code>barrier()</code>-steps in a traversal where appropriate in order to gain 
the
+<p><code>LazyBarrierStrategy</code> inserts <code>barrier()</code>-steps into 
a traversal where appropriate in order to gain the
 "bulking optimization."</p>
 </div>
 <div class="listingblock">
@@ -4083,18 +4087,21 @@ optimization scenario, but reduces the r
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; graph = 
TinkerGraph.open()
 ==&gt;tinkergraph[<span class="key">vertices</span>:<span 
class="integer">0</span> <span class="key">edges</span>:<span 
class="integer">0</span>]
 gremlin&gt; graph.io(graphml()).readGraph(<span class="string"><span 
class="delimiter">'</span><span 
class="content">data/grateful-dead.xml</span><span 
class="delimiter">'</span></span>)
-gremlin&gt; g = 
graph.traversal().withStrategies(LazyBarrierStrategy.instance())
+gremlin&gt; g = graph.traversal() <span class="comment">//</span><b>(1)</b>
 ==&gt;graphtraversalsource[tinkergraph[<span class="key">vertices</span>:<span 
class="integer">808</span> <span class="key">edges</span>:<span 
class="integer">8049</span>], standard]
 gremlin&gt; clockWithResult(<span 
class="integer">1</span>){g.V().both().both().both().count().next()}
-==&gt;<span class="float">34.724472999999996</span>
+==&gt;<span class="float">10.675328</span>
 ==&gt;<span class="integer">126653966</span>
-gremlin&gt; g.V().both().both().both().count().iterate().toString() <span 
class="comment">//</span><b>(1)</b>
+gremlin&gt; g.V().both().both().both().count().iterate().toString() <span 
class="comment">//</span><b>(2)</b>
 ==&gt;[TinkerGraphStep(vertex,<span class="type">[]</span>), 
VertexStep(BOTH,vertex), NoOpBarrierStep(<span class="integer">10000</span>), 
VertexStep(BOTH,vertex), NoOpBarrierStep(<span class="integer">10000</span>), 
VertexStep(BOTH,edge), CountGlobalStep]</code></pre>
 </div>
 </div>
 <div class="colist arabic">
 <ol>
 <li>
+<p><code>LazyBarrierStrategy</code> is a default strategy and thus, does not 
need to be explicitly activated.</p>
+</li>
+<li>
 <p>With <code>LazyBarrierStrategy</code> activated, <code>barrier()</code> 
steps are automatically inserted where appropriate.</p>
 </li>
 </ol>
@@ -4309,8 +4316,7 @@ gremlin&gt; g.V().hasLabel(<span class="
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; 
g.V().coin(<span class="float">0.5</span>)
 ==&gt;v[<span class="integer">1</span>]
 ==&gt;v[<span class="integer">2</span>]
-==&gt;v[<span class="integer">4</span>]
-==&gt;v[<span class="integer">5</span>]
+==&gt;v[<span class="integer">3</span>]
 ==&gt;v[<span class="integer">6</span>]
 gremlin&gt; g.V().coin(<span class="float">0.0</span>)
 gremlin&gt; g.V().coin(<span class="float">1.0</span>)
@@ -4430,12 +4436,12 @@ has been seen or not.</p>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; 
g.V().valueMap(<span class="predefined-constant">true</span>, <span 
class="string"><span class="delimiter">'</span><span 
class="content">name</span><span class="delimiter">'</span></span>)
-==&gt;[<span class="key">name</span>:[marko],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">1</span>]
-==&gt;[<span class="key">name</span>:[vadas],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">2</span>]
-==&gt;[<span class="key">name</span>:[lop],<span 
class="key">label</span>:software,<span class="key">id</span>:<span 
class="integer">3</span>]
-==&gt;[<span class="key">name</span>:[josh],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">4</span>]
-==&gt;[<span class="key">name</span>:[ripple],<span 
class="key">label</span>:software,<span class="key">id</span>:<span 
class="integer">5</span>]
-==&gt;[<span class="key">name</span>:[peter],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">6</span>]
+==&gt;[<span class="key">id</span>:<span class="integer">1</span>,<span 
class="key">name</span>:[marko],<span class="key">label</span>:person]
+==&gt;[<span class="key">id</span>:<span class="integer">2</span>,<span 
class="key">name</span>:[vadas],<span class="key">label</span>:person]
+==&gt;[<span class="key">id</span>:<span class="integer">3</span>,<span 
class="key">name</span>:[lop],<span class="key">label</span>:software]
+==&gt;[<span class="key">id</span>:<span class="integer">4</span>,<span 
class="key">name</span>:[josh],<span class="key">label</span>:person]
+==&gt;[<span class="key">id</span>:<span class="integer">5</span>,<span 
class="key">name</span>:[ripple],<span class="key">label</span>:software]
+==&gt;[<span class="key">id</span>:<span class="integer">6</span>,<span 
class="key">name</span>:[peter],<span class="key">label</span>:person]
 gremlin&gt; g.V().dedup().by(label).values(<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>)
 ==&gt;marko
 ==&gt;lop</code></pre>
@@ -4514,14 +4520,15 @@ post strategy application. The final tra
 Original Traversal                 [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(<span 
class="integer">5</span>))]
 
 ConnectiveStrategy           [D]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(<span 
class="integer">5</span>))]
+InlineFilterStrategy         [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(<span 
class="integer">5</span>))]
+MatchPredicateStrategy       [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(<span 
class="integer">5</span>))]
+FilterRankingStrategy        [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(<span 
class="integer">5</span>))]
 IncidentToAdjacentStrategy   [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(<span 
class="integer">5</span>))]
+AdjacentToIncidentStrategy   [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(<span 
class="integer">5</span>))]
 RangeByIsCountStrategy       [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
-InlineFilterStrategy         [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
-MatchPredicateStrategy       [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
-FilterRankingStrategy        [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
-AdjacentToIncidentStrategy   [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
 RepeatUnrollStrategy         [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
 PathRetractionStrategy       [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
+LazyBarrierStrategy          [O]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
 TinkerGraphStepStrategy      [P]   
[TinkerGraphStep(vertex,[~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
 ProfileStrategy              [F]   
[TinkerGraphStep(vertex,[~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
 StandardVerificationStrategy [V]   
[TinkerGraphStep(vertex,[~label.eq(person)]), VertexStep(OUT,edge), 
IdentityStep, EdgeVertexStep(IN), RangeGlobalStep(<span 
class="integer">0</span>,<span class="integer">6</span>), CountGlobalStep, 
IsStep(gt(<span class="integer">5</span>))]
@@ -5646,14 +5653,14 @@ gremlin&gt; g.V().hasLabel(<span class="
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; 
g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span 
class="content">person</span><span 
class="delimiter">'</span></span>).order().by(shuffle)
+==&gt;v[<span class="integer">1</span>]
 ==&gt;v[<span class="integer">6</span>]
 ==&gt;v[<span class="integer">2</span>]
 ==&gt;v[<span class="integer">4</span>]
-==&gt;v[<span class="integer">1</span>]
 gremlin&gt; g.V().hasLabel(<span class="string"><span 
class="delimiter">'</span><span class="content">person</span><span 
class="delimiter">'</span></span>).order().by(shuffle)
 ==&gt;v[<span class="integer">1</span>]
-==&gt;v[<span class="integer">4</span>]
 ==&gt;v[<span class="integer">6</span>]
+==&gt;v[<span class="integer">4</span>]
 ==&gt;v[<span class="integer">2</span>]</code></pre>
 </div>
 </div>
@@ -5727,11 +5734,11 @@ The <code>pageRank()</code>-step is a <c
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g = 
graph.traversal().withComputer()
 ==&gt;graphtraversalsource[tinkergraph[<span class="key">vertices</span>:<span 
class="integer">6</span> <span class="key">edges</span>:<span 
class="integer">6</span>], graphcomputer]
 gremlin&gt; g.V().pageRank().by(<span class="string"><span 
class="delimiter">'</span><span class="content">pageRank</span><span 
class="delimiter">'</span></span>).values(<span class="string"><span 
class="delimiter">'</span><span class="content">pageRank</span><span 
class="delimiter">'</span></span>)
-==&gt;<span class="float">0.15000000000000002</span>
-==&gt;<span class="float">0.15000000000000002</span>
-==&gt;<span class="float">0.4018125</span>
 ==&gt;<span class="float">0.19250000000000003</span>
 ==&gt;<span class="float">0.19250000000000003</span>
+==&gt;<span class="float">0.4018125</span>
+==&gt;<span class="float">0.15000000000000002</span>
+==&gt;<span class="float">0.15000000000000002</span>
 ==&gt;<span class="float">0.23181250000000003</span>
 gremlin&gt; g.V().hasLabel(<span class="string"><span 
class="delimiter">'</span><span class="content">person</span><span 
class="delimiter">'</span></span>).
            pageRank().
@@ -5740,8 +5747,8 @@ gremlin&gt; g.V().hasLabel(<span class="
            order().by(<span class="string"><span 
class="delimiter">'</span><span class="content">friendRank</span><span 
class="delimiter">'</span></span>,decr).valueMap(<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>,<span class="string"><span 
class="delimiter">'</span><span class="content">friendRank</span><span 
class="delimiter">'</span></span>)
 ==&gt;[<span class="key">friendRank</span>:[<span 
class="float">0.21375000000000002</span>],<span class="key">name</span>:[vadas]]
 ==&gt;[<span class="key">friendRank</span>:[<span 
class="float">0.21375000000000002</span>],<span class="key">name</span>:[josh]]
-==&gt;[<span class="key">friendRank</span>:[<span 
class="float">0.15000000000000002</span>],<span class="key">name</span>:[peter]]
-==&gt;[<span class="key">friendRank</span>:[<span 
class="float">0.15000000000000002</span>],<span 
class="key">name</span>:[marko]]</code></pre>
+==&gt;[<span class="key">friendRank</span>:[<span 
class="float">0.15000000000000002</span>],<span class="key">name</span>:[marko]]
+==&gt;[<span class="key">friendRank</span>:[<span 
class="float">0.15000000000000002</span>],<span 
class="key">name</span>:[peter]]</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -5757,45 +5764,47 @@ gremlin&gt; g.V().hasLabel(<span class="
              by(<span class="string"><span class="delimiter">'</span><span 
class="content">friendRank</span><span class="delimiter">'</span></span>).
            order().by(<span class="string"><span 
class="delimiter">'</span><span class="content">friendRank</span><span 
class="delimiter">'</span></span>,decr).valueMap(<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>,<span class="string"><span 
class="delimiter">'</span><span class="content">friendRank</span><span 
class="delimiter">'</span></span>).explain()
 ==&gt;Traversal Explanation
-=======================================================================================================================================================================================================================================
-Original Traversal                 [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), 
OrderGlobalStep([[value(friendRank), decr]]), Proper
-                                      tyMapStep([name, friendRank],value)]
-
-ConnectiveStrategy           [D]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), 
OrderGlobalStep([[value(friendRank), decr]]), Proper
-                                      tyMapStep([name, friendRank],value)]
-VertexProgramStrategy        [D]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-OrderLimitStrategy           [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-RangeByIsCountStrategy       [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-IncidentToAdjacentStrategy   [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-AdjacentToIncidentStrategy   [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-InlineFilterStrategy         [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-MatchPredicateStrategy       [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-PathProcessorStrategy        [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-RepeatUnrollStrategy         [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-PathRetractionStrategy       [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-FilterRankingStrategy        [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-TinkerGraphStepStrategy      [P]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-ProfileStrategy              [F]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-ComputerVerificationStrategy [V]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
-StandardVerificationStrategy [V]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+=============================================================================================================================================================================================================================================
+Original Traversal                 [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), 
OrderGlobalStep([[value(friendRank), decr]]), PropertyMapS
+                                      tep([name, friendRank],value)]
+
+ConnectiveStrategy           [D]   [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), 
OrderGlobalStep([[value(friendRank), decr]]), PropertyMapS
+                                      tep([name, friendRank],value)]
+VertexProgramStrategy        [D]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+InlineFilterStrategy         [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+MatchPredicateStrategy       [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+FilterRankingStrategy        [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+IncidentToAdjacentStrategy   [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+AdjacentToIncidentStrategy   [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+RangeByIsCountStrategy       [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+RepeatUnrollStrategy         [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+PathProcessorStrategy        [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+PathRetractionStrategy       [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+LazyBarrierStrategy          [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+OrderLimitStrategy           [O]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+TinkerGraphStepStrategy      [P]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+ProfileStrategy              [F]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+ComputerVerificationStrategy [V]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
+StandardVerificationStrategy [V]   
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]
 
-Final Traversal                    
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), Trav
-                                      
ersalVertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]</code></pre>
+Final Traversal                    
[TraversalVertexProgramStep([GraphStep(vertex,<span class="type">[]</span>), 
HasStep([~label.eq(person)])],graphfilter[none]), 
PageRankVertexProgramStep([VertexStep(OUT,[knows],edge)],friendRank,<span 
class="integer">30</span>,graphfilter[none]), TraversalV
+                                      
ertexProgramStep([OrderGlobalStep([[value(friendRank), decr]]), 
PropertyMapStep([name, friendRank],value)],graphfilter[none]), 
ComputerResultStep]</code></pre>
 </div>
 </div>
 </div>
@@ -5947,7 +5956,7 @@ gremlin&gt; g.V().peerPressure().by(<spa
 gremlin&gt; g.V().hasLabel(<span class="string"><span 
class="delimiter">'</span><span class="content">person</span><span 
class="delimiter">'</span></span>).
            peerPressure().by(<span class="string"><span 
class="delimiter">'</span><span class="content">cluster</span><span 
class="delimiter">'</span></span>).
            group().by(<span class="string"><span 
class="delimiter">'</span><span class="content">cluster</span><span 
class="delimiter">'</span></span>).by(<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>)
-==&gt;[<span class="integer">1</span>:[marko,josh,vadas],<span 
class="integer">6</span>:[peter]]</code></pre>
+==&gt;[<span class="integer">1</span>:[vadas,josh,marko],<span 
class="integer">6</span>:[peter]]</code></pre>
 </div>
 </div>
 </div>
@@ -5976,18 +5985,18 @@ profile results, but durations are not e
 ==&gt;Traversal Metrics
 Step                                                               Count  
Traversers       <span class="predefined-type">Time</span> (ms)    % Dur
 
=============================================================================================================
-TinkerGraphStep(vertex,<span class="type">[]</span>)                           
                  <span class="integer">6</span>           <span 
class="integer">6</span>           <span class="float">0.067</span>    <span 
class="float">11.71</span>
-VertexStep(OUT,[created],vertex)                                       <span 
class="integer">4</span>           <span class="integer">4</span>           
<span class="float">0.093</span>    <span class="float">16.25</span>
-VertexStep(BOTH,vertex)                                               <span 
class="integer">10</span>          <span class="integer">10</span>           
<span class="float">0.059</span>    <span class="float">10.42</span>
-NoOpBarrierStep(<span class="integer">5000</span>)                             
                    <span class="integer">10</span>           <span 
class="integer">3</span>           <span class="float">0.063</span>    <span 
class="float">11.05</span>
-VertexStep(BOTH,vertex)                                               <span 
class="integer">24</span>           <span class="integer">7</span>           
<span class="float">0.027</span>     <span class="float">4.77</span>
-NoOpBarrierStep(<span class="integer">5000</span>)                             
                    <span class="integer">24</span>           <span 
class="integer">5</span>           <span class="float">0.027</span>     <span 
class="float">4.80</span>
-VertexStep(BOTH,vertex)                                               <span 
class="integer">58</span>          <span class="integer">11</span>           
<span class="float">0.049</span>     <span class="float">8.72</span>
-NoOpBarrierStep(<span class="integer">5000</span>)                             
                    <span class="integer">58</span>           <span 
class="integer">6</span>           <span class="float">0.040</span>     <span 
class="float">7.03</span>
-HasStep([~label.eq(person)])                                          <span 
class="integer">48</span>           <span class="integer">4</span>           
<span class="float">0.029</span>     <span class="float">5.15</span>
-PropertiesStep([age],value)                                           <span 
class="integer">48</span>           <span class="integer">4</span>           
<span class="float">0.035</span>     <span class="float">6.15</span>
-SumGlobalStep                                                          <span 
class="integer">1</span>           <span class="integer">1</span>           
<span class="float">0.079</span>    <span class="float">13.95</span>
-                                            &gt;TOTAL                     -    
       -           <span class="float">0.572</span>        -</code></pre>
+TinkerGraphStep(vertex,<span class="type">[]</span>)                           
                  <span class="integer">6</span>           <span 
class="integer">6</span>           <span class="float">0.071</span>    <span 
class="float">12.26</span>
+VertexStep(OUT,[created],vertex)                                       <span 
class="integer">4</span>           <span class="integer">4</span>           
<span class="float">0.097</span>    <span class="float">16.65</span>
+VertexStep(BOTH,vertex)                                               <span 
class="integer">10</span>          <span class="integer">10</span>           
<span class="float">0.060</span>    <span class="float">10.45</span>
+NoOpBarrierStep(<span class="integer">5000</span>)                             
                    <span class="integer">10</span>           <span 
class="integer">3</span>           <span class="float">0.057</span>     <span 
class="float">9.78</span>
+VertexStep(BOTH,vertex)                                               <span 
class="integer">24</span>           <span class="integer">7</span>           
<span class="float">0.041</span>     <span class="float">7.18</span>
+NoOpBarrierStep(<span class="integer">5000</span>)                             
                    <span class="integer">24</span>           <span 
class="integer">5</span>           <span class="float">0.029</span>     <span 
class="float">5.08</span>
+VertexStep(BOTH,vertex)                                               <span 
class="integer">58</span>          <span class="integer">11</span>           
<span class="float">0.035</span>     <span class="float">6.01</span>
+NoOpBarrierStep(<span class="integer">5000</span>)                             
                    <span class="integer">58</span>           <span 
class="integer">6</span>           <span class="float">0.043</span>     <span 
class="float">7.51</span>
+HasStep([~label.eq(person)])                                          <span 
class="integer">48</span>           <span class="integer">4</span>           
<span class="float">0.030</span>     <span class="float">5.31</span>
+PropertiesStep([age],value)                                           <span 
class="integer">48</span>           <span class="integer">4</span>           
<span class="float">0.034</span>     <span class="float">5.91</span>
+SumGlobalStep                                                          <span 
class="integer">1</span>           <span class="integer">1</span>           
<span class="float">0.080</span>    <span class="float">13.86</span>
+                                            &gt;TOTAL                     -    
       -           <span class="float">0.582</span>        -</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -6035,9 +6044,9 @@ gremlin&gt; metrics = t.getSideEffects()
 ==&gt;Traversal Metrics
 Step                                                               Count  
Traversers       <span class="predefined-type">Time</span> (ms)    % Dur
 
=============================================================================================================
-TinkerGraphStep(vertex,<span class="type">[]</span>)                           
                  <span class="integer">6</span>           <span 
class="integer">6</span>           <span class="float">0.126</span>   -<span 
class="float">91.93</span>
-VertexStep(OUT,[created],vertex)                                       <span 
class="integer">4</span>           <span class="integer">4</span>          
-<span class="float">0.265</span>   <span class="float">191.93</span>
-                                            &gt;TOTAL                     -    
       -          -<span class="float">0.138</span>        -</code></pre>
+TinkerGraphStep(vertex,<span class="type">[]</span>)                           
                  <span class="integer">6</span>           <span 
class="integer">6</span>           <span class="float">0.108</span>  -<span 
class="float">118.91</span>
+VertexStep(OUT,[created],vertex)                                       <span 
class="integer">4</span>           <span class="integer">4</span>          
-<span class="float">0.198</span>   <span class="float">218.91</span>
+                                            &gt;TOTAL                     -    
       -          -<span class="float">0.090</span>        -</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -6458,14 +6467,14 @@ value is accessed (<code>sack()</code>).
 ==&gt;<span class="float">1.0</span>
 ==&gt;<span class="float">1.0</span>
 gremlin&gt; rand = <span class="keyword">new</span> <span 
class="predefined-type">Random</span>()
-==&gt;java.util.Random<span class="error">@</span><span 
class="float">365f</span>de74
+==&gt;java.util.Random<span class="error">@</span><span 
class="float">2f</span><span class="integer">98859</span>a
 gremlin&gt; g.withSack {rand.nextFloat()}.V().sack()
-==&gt;<span class="float">0.6933165</span>
-==&gt;<span class="float">0.6583827</span>
-==&gt;<span class="float">0.05784458</span>
-==&gt;<span class="float">0.045722425</span>
-==&gt;<span class="float">0.4116984</span>
-==&gt;<span class="float">0.26082867</span></code></pre>
+==&gt;<span class="float">0.2825899</span>
+==&gt;<span class="float">0.15487432</span>
+==&gt;<span class="float">0.5790652</span>
+==&gt;<span class="float">0.26411813</span>
+==&gt;<span class="float">0.12017095</span>
+==&gt;<span class="float">0.8834764</span></code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -6576,11 +6585,11 @@ gremlin&gt; g.withBulk(<span class="pred
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; 
g.V().outE().sample(<span class="integer">1</span>).values(<span 
class="string"><span class="delimiter">'</span><span 
class="content">weight</span><span class="delimiter">'</span></span>)
-==&gt;<span class="float">0.4</span>
-gremlin&gt; g.V().outE().sample(<span class="integer">1</span>).by(<span 
class="string"><span class="delimiter">'</span><span 
class="content">weight</span><span 
class="delimiter">'</span></span>).values(<span class="string"><span 
class="delimiter">'</span><span class="content">weight</span><span 
class="delimiter">'</span></span>)
 ==&gt;<span class="float">0.5</span>
+gremlin&gt; g.V().outE().sample(<span class="integer">1</span>).by(<span 
class="string"><span class="delimiter">'</span><span 
class="content">weight</span><span 
class="delimiter">'</span></span>).values(<span class="string"><span 
class="delimiter">'</span><span class="content">weight</span><span 
class="delimiter">'</span></span>)
+==&gt;<span class="float">1.0</span>
 gremlin&gt; g.V().outE().sample(<span class="integer">2</span>).by(<span 
class="string"><span class="delimiter">'</span><span 
class="content">weight</span><span 
class="delimiter">'</span></span>).values(<span class="string"><span 
class="delimiter">'</span><span class="content">weight</span><span 
class="delimiter">'</span></span>)
-==&gt;<span class="float">0.5</span>
+==&gt;<span class="float">1.0</span>
 ==&gt;<span class="float">1.0</span></code></pre>
 </div>
 </div>
@@ -6600,11 +6609,11 @@ the traverser never splits and continues
 gremlin&gt; g.V(<span class="integer">1</span>).repeat(local(
                   bothE().sample(<span class="integer">1</span>).by(<span 
class="string"><span class="delimiter">'</span><span 
class="content">weight</span><span class="delimiter">'</span></span>).otherV()
                 )).times(<span class="integer">5</span>).path()
-==&gt;[v[<span class="integer">1</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">2</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">1</span>],e[<span 
class="integer">9</span>][<span class="integer">1</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">3</span>],e[<span 
class="integer">9</span>][<span class="integer">1</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">1</span>],e[<span 
class="integer">8</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">4</span>],v[<span class="integer">4</span>]]
+==&gt;[v[<span class="integer">1</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">2</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">1</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">2</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">1</span>],e[<span 
class="integer">8</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">4</span>],v[<span class="integer">4</span>]]
 gremlin&gt; g.V(<span class="integer">1</span>).repeat(local(
                   bothE().sample(<span class="integer">1</span>).by(<span 
class="string"><span class="delimiter">'</span><span 
class="content">weight</span><span class="delimiter">'</span></span>).otherV()
                 )).times(<span class="integer">10</span>).path()
-==&gt;[v[<span class="integer">1</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">2</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">1</span>],e[<span 
class="integer">8</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">4</span>],v[<span class="integer">4</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">3</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">4</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">3</span>],e[<span 
class="integer">9</span>][<span class="integer">1</span>-created-&gt;<span 
class="integer">3<
 /span>],v[<span class="integer">1</span>],e[<span 
class="integer">8</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">4</span>],v[<span class="integer">4</span>],e[<span 
class="integer">8</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">4</span>],v[<span class="integer">1</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">2</span>]]</code></pre>
+==&gt;[v[<span class="integer">1</span>],e[<span 
class="integer">8</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">4</span>],v[<span class="integer">4</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">3</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">4</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">3</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">4</span>],e[<span 
class="integer">10</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">5</span>],v[<span class="integer">5</span>],e[<span 
class="integer">10</span>][<span class="integer">4</span>-created-&gt;<span 
class="inte
 ger">5</span>],v[<span class="integer">4</span>],e[<span 
class="integer">11</span>][<span class="integer">4</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">3</span>],e[<span 
class="integer">9</span>][<span class="integer">1</span>-created-&gt;<span 
class="integer">3</span>],v[<span class="integer">1</span>],e[<span 
class="integer">7</span>][<span class="integer">1</span>-knows-&gt;<span 
class="integer">2</span>],v[<span class="integer">2</span>]]</code></pre>
 </div>
 </div>
 </div>
@@ -7113,7 +7122,7 @@ that can be used to time execution of a
 ==&gt;v[<span class="integer">5</span>]=<span class="integer">1136688</span>
 ==&gt;v[<span class="integer">6</span>]=<span class="integer">1136688</span>
 gremlin&gt; clock(<span class="integer">1</span>) 
{g.V().repeat(both().groupCount(<span class="string"><span 
class="delimiter">'</span><span class="content">m</span><span 
class="delimiter">'</span></span>)).times(<span 
class="integer">16</span>).cap(<span class="string"><span 
class="delimiter">'</span><span class="content">m</span><span 
class="delimiter">'</span></span>).order(local).by(values,decr).next()}
-==&gt;<span class="float">1.385287</span>
+==&gt;<span class="float">6.564381</span>
 gremlin&gt; g.V().repeat(timeLimit(<span 
class="integer">2</span>).both().groupCount(<span class="string"><span 
class="delimiter">'</span><span class="content">m</span><span 
class="delimiter">'</span></span>)).times(<span 
class="integer">16</span>).cap(<span class="string"><span 
class="delimiter">'</span><span class="content">m</span><span 
class="delimiter">'</span></span>).order(local).by(values,decr).next()
 ==&gt;v[<span class="integer">1</span>]=<span class="integer">2744208</span>
 ==&gt;v[<span class="integer">3</span>]=<span class="integer">2744208</span>
@@ -7122,7 +7131,7 @@ gremlin&gt; g.V().repeat(timeLimit(<span
 ==&gt;v[<span class="integer">5</span>]=<span class="integer">1136688</span>
 ==&gt;v[<span class="integer">6</span>]=<span class="integer">1136688</span>
 gremlin&gt; clock(<span class="integer">1</span>) 
{g.V().repeat(timeLimit(<span class="integer">2</span>).both().groupCount(<span 
class="string"><span class="delimiter">'</span><span 
class="content">m</span><span class="delimiter">'</span></span>)).times(<span 
class="integer">16</span>).cap(<span class="string"><span 
class="delimiter">'</span><span class="content">m</span><span 
class="delimiter">'</span></span>).order(local).by(values,decr).next()}
-==&gt;<span class="float">1.391554</span></code></pre>
+==&gt;<span class="float">1.6748109999999998</span></code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -7320,30 +7329,30 @@ returned map.</p>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; 
g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span 
class="content">person</span><span 
class="delimiter">'</span></span>).valueMap(<span 
class="predefined-constant">true</span>)
-==&gt;[<span class="key">name</span>:[marko],<span 
class="key">location</span>:[san diego,santa cruz,brussels,santa fe],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">1</span>]
-==&gt;[<span class="key">name</span>:[stephen],<span 
class="key">location</span>:[centreville,dulles,purcellville],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">7</span>]
-==&gt;[<span class="key">name</span>:[matthias],<span 
class="key">location</span>:[bremen,baltimore,oakland,seattle],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">8</span>]
-==&gt;[<span class="key">name</span>:[daniel],<span 
class="key">location</span>:[spremberg,kaiserslautern,aachen],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">9</span>]
+==&gt;[<span class="key">id</span>:<span class="integer">1</span>,<span 
class="key">name</span>:[marko],<span class="key">label</span>:person,<span 
class="key">location</span>:[san diego,santa cruz,brussels,santa fe]]
+==&gt;[<span class="key">id</span>:<span class="integer">7</span>,<span 
class="key">name</span>:[stephen],<span class="key">label</span>:person,<span 
class="key">location</span>:[centreville,dulles,purcellville]]
+==&gt;[<span class="key">id</span>:<span class="integer">8</span>,<span 
class="key">name</span>:[matthias],<span class="key">label</span>:person,<span 
class="key">location</span>:[bremen,baltimore,oakland,seattle]]
+==&gt;[<span class="key">id</span>:<span class="integer">9</span>,<span 
class="key">name</span>:[daniel],<span class="key">label</span>:person,<span 
class="key">location</span>:[spremberg,kaiserslautern,aachen]]
 gremlin&gt; g.V().hasLabel(<span class="string"><span 
class="delimiter">'</span><span class="content">person</span><span 
class="delimiter">'</span></span>).valueMap(<span 
class="predefined-constant">true</span>,<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>)
-==&gt;[<span class="key">name</span>:[marko],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">1</span>]
-==&gt;[<span class="key">name</span>:[stephen],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">7</span>]
-==&gt;[<span class="key">name</span>:[matthias],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">8</span>]
-==&gt;[<span class="key">name</span>:[daniel],<span 
class="key">label</span>:person,<span class="key">id</span>:<span 
class="integer">9</span>]
+==&gt;[<span class="key">id</span>:<span class="integer">1</span>,<span 
class="key">name</span>:[marko],<span class="key">label</span>:person]
+==&gt;[<span class="key">id</span>:<span class="integer">7</span>,<span 
class="key">name</span>:[stephen],<span class="key">label</span>:person]
+==&gt;[<span class="key">id</span>:<span class="integer">8</span>,<span 
class="key">name</span>:[matthias],<span class="key">label</span>:person]
+==&gt;[<span class="key">id</span>:<span class="integer">9</span>,<span 
class="key">name</span>:[daniel],<span class="key">label</span>:person]
 gremlin&gt; g.V().hasLabel(<span class="string"><span 
class="delimiter">'</span><span class="content">person</span><span 
class="delimiter">'</span></span>).properties(<span class="string"><span 
class="delimiter">'</span><span class="content">location</span><span 
class="delimiter">'</span></span>).valueMap(<span 
class="predefined-constant">true</span>)
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">1997</span>,<span 
class="key">endTime</span>:<span class="integer">2001</span>,<span 
class="key">id</span>:<span class="integer">6</span>,<span 
class="key">value</span>:san diego]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2001</span>,<span 
class="key">endTime</span>:<span class="integer">2004</span>,<span 
class="key">id</span>:<span class="integer">7</span>,<span 
class="key">value</span>:santa cruz]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2004</span>,<span 
class="key">endTime</span>:<span class="integer">2005</span>,<span 
class="key">id</span>:<span class="integer">8</span>,<span 
class="key">value</span>:brussels]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2005</span>,<span 
class="key">id</span>:<span class="integer">9</span>,<span 
class="key">value</span>:santa fe]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">1990</span>,<span 
class="key">endTime</span>:<span class="integer">2000</span>,<span 
class="key">id</span>:<span class="integer">10</span>,<span 
class="key">value</span>:centreville]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2000</span>,<span 
class="key">endTime</span>:<span class="integer">2006</span>,<span 
class="key">id</span>:<span class="integer">11</span>,<span 
class="key">value</span>:dulles]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2006</span>,<span 
class="key">id</span>:<span class="integer">12</span>,<span 
class="key">value</span>:purcellville]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2004</span>,<span 
class="key">endTime</span>:<span class="integer">2007</span>,<span 
class="key">id</span>:<span class="integer">13</span>,<span 
class="key">value</span>:bremen]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2007</span>,<span 
class="key">endTime</span>:<span class="integer">2011</span>,<span 
class="key">id</span>:<span class="integer">14</span>,<span 
class="key">value</span>:baltimore]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2011</span>,<span 
class="key">endTime</span>:<span class="integer">2014</span>,<span 
class="key">id</span>:<span class="integer">15</span>,<span 
class="key">value</span>:oakland]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2014</span>,<span 
class="key">id</span>:<span class="integer">16</span>,<span 
class="key">value</span>:seattle]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">1982</span>,<span 
class="key">endTime</span>:<span class="integer">2005</span>,<span 
class="key">id</span>:<span class="integer">17</span>,<span 
class="key">value</span>:spremberg]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2005</span>,<span 
class="key">endTime</span>:<span class="integer">2009</span>,<span 
class="key">id</span>:<span class="integer">18</span>,<span 
class="key">value</span>:kaiserslautern]
-==&gt;[<span class="key">key</span>:location,<span 
class="key">startTime</span>:<span class="integer">2009</span>,<span 
class="key">id</span>:<span class="integer">19</span>,<span 
class="key">value</span>:aachen]</code></pre>
+==&gt;[<span class="key">id</span>:<span class="integer">6</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">1997</span>,<span class="key">endTime</span>:<span 
class="integer">2001</span>,<span class="key">value</span>:san diego]
+==&gt;[<span class="key">id</span>:<span class="integer">7</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2001</span>,<span class="key">endTime</span>:<span 
class="integer">2004</span>,<span class="key">value</span>:santa cruz]
+==&gt;[<span class="key">id</span>:<span class="integer">8</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2004</span>,<span class="key">endTime</span>:<span 
class="integer">2005</span>,<span class="key">value</span>:brussels]
+==&gt;[<span class="key">id</span>:<span class="integer">9</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2005</span>,<span class="key">value</span>:santa fe]
+==&gt;[<span class="key">id</span>:<span class="integer">10</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">1990</span>,<span class="key">endTime</span>:<span 
class="integer">2000</span>,<span class="key">value</span>:centreville]
+==&gt;[<span class="key">id</span>:<span class="integer">11</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2000</span>,<span class="key">endTime</span>:<span 
class="integer">2006</span>,<span class="key">value</span>:dulles]
+==&gt;[<span class="key">id</span>:<span class="integer">12</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2006</span>,<span class="key">value</span>:purcellville]
+==&gt;[<span class="key">id</span>:<span class="integer">13</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2004</span>,<span class="key">endTime</span>:<span 
class="integer">2007</span>,<span class="key">value</span>:bremen]
+==&gt;[<span class="key">id</span>:<span class="integer">14</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2007</span>,<span class="key">endTime</span>:<span 
class="integer">2011</span>,<span class="key">value</span>:baltimore]
+==&gt;[<span class="key">id</span>:<span class="integer">15</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2011</span>,<span class="key">endTime</span>:<span 
class="integer">2014</span>,<span class="key">value</span>:oakland]
+==&gt;[<span class="key">id</span>:<span class="integer">16</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2014</span>,<span class="key">value</span>:seattle]
+==&gt;[<span class="key">id</span>:<span class="integer">17</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">1982</span>,<span class="key">endTime</span>:<span 
class="integer">2005</span>,<span class="key">value</span>:spremberg]
+==&gt;[<span class="key">id</span>:<span class="integer">18</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2005</span>,<span class="key">endTime</span>:<span 
class="integer">2009</span>,<span class="key">value</span>:kaiserslautern]
+==&gt;[<span class="key">id</span>:<span class="integer">19</span>,<span 
class="key">key</span>:location,<span class="key">startTime</span>:<span 
class="integer">2009</span>,<span class="key">value</span>:aachen]</code></pre>
 </div>
 </div>
 </div>
@@ -7835,8 +7844,9 @@ gremlin&gt; g.V().out().out().path().by(
 <h2 id="traversalstrategy">TraversalStrategy</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p><span class="image" style="float: right"><img 
src="../images/traversal-strategy.png" alt="traversal-strategy" 
width="125"></span> A <code>TraversalStrategy</code> can analyze a 
<code>Traversal</code> and mutate the
-traversal as it deems fit. This is useful in multiple situations:</p>
+<p><span class="image" style="float: right"><img 
src="../images/traversal-strategy.png" alt="traversal-strategy" 
width="125"></span> A <code>TraversalStrategy</code> analyzes a 
<code>Traversal</code> and, if the traversal
+meets its criteria, can mutate it accordingly. Traversal strategies are 
executed at compile-time and form the foundation
+of the Gremlin traversal machine&#8217;s compiler. There are 5 categories of 
strategies which are itemized below:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -7850,7 +7860,7 @@ traversal as it deems fit. This is usefu
 <p>There is a more efficient way to express the traversal at the graph 
system/language/driver level (<strong>provider optimization</strong>).</p>
 </li>
 <li>
-<p>There are are some final adjustments required before executing the 
traversal (<strong>finalization</strong>).</p>
+<p>There are are some final adjustments/cleanups/analyses required before 
executing the traversal (<strong>finalization</strong>).</p>
 </li>
 <li>
 <p>There are certain traversals that are not legal for the application or 
traversal engine (<strong>verification</strong>).</p>
@@ -7874,8 +7884,7 @@ The <a href="#explain-step"><code>explai
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay"><code class="java language-java"><span 
class="directive">public</span> <span class="directive">final</span> <span 
class="type">class</span> <span class="class">IdentityRemovalStrategy</span> 
<span class="directive">extends</span> 
AbstractTraversalStrategy&lt;TraversalStrategy.OptimizationStrategy&gt;
-<span class="directive">implements</span> 
TraversalStrategy.OptimizationStrategy {
+<pre class="CodeRay"><code class="java language-java"><span 
class="directive">public</span> <span class="directive">final</span> <span 
class="type">class</span> <span class="class">IdentityRemovalStrategy</span> 
<span class="directive">extends</span> 
AbstractTraversalStrategy&lt;TraversalStrategy.OptimizationStrategy&gt; <span 
class="directive">implements</span> TraversalStrategy.OptimizationStrategy {
 
     <span class="directive">private</span> <span 
class="directive">static</span> <span class="directive">final</span> 
IdentityRemovalStrategy INSTANCE = <span class="keyword">new</span> 
IdentityRemovalStrategy();
 
@@ -7884,16 +7893,15 @@ The <a href="#explain-step"><code>explai
 
     <span class="annotation">@Override</span>
     <span class="directive">public</span> <span class="type">void</span> 
apply(<span class="directive">final</span> Traversal.Admin&lt;?, ?&gt; 
traversal) {
-        <span class="keyword">if</span> 
(!TraversalHelper.hasStepOfClass(IdentityStep.class, traversal))
+        <span class="keyword">if</span> (traversal.getSteps().size() &lt;= 
<span class="integer">1</span>)
             <span class="keyword">return</span>;
 
-        TraversalHelper.getStepsOfClass(IdentityStep.class, 
traversal).stream().forEach(identityStep -&gt; {
-            <span class="directive">final</span> Step&lt;?, ?&gt; previousStep 
= identityStep.getPreviousStep();
-            <span class="keyword">if</span> (!(previousStep <span 
class="keyword">instanceof</span> EmptyStep) || 
identityStep.getLabels().isEmpty()) {
-                ((IdentityStep&lt;?&gt;) 
identityStep).getLabels().forEach(previousStep::addLabel);
+        <span class="keyword">for</span> (<span class="directive">final</span> 
IdentityStep&lt;?&gt; identityStep : 
TraversalHelper.getStepsOfClass(IdentityStep.class, traversal)) {
+            <span class="keyword">if</span> 
(identityStep.getLabels().isEmpty() || !(identityStep.getPreviousStep() <span 
class="keyword">instanceof</span> EmptyStep)) {
+                TraversalHelper.copyLabels(identityStep, 
identityStep.getPreviousStep(), <span class="predefined-constant">false</span>);
                 traversal.removeStep(identityStep);
             }
-        });
+        }
     }
 
     <span class="directive">public</span> <span 
class="directive">static</span> IdentityRemovalStrategy instance() {
@@ -7907,7 +7915,7 @@ The <a href="#explain-step"><code>explai
 is equivalent to <code>aStep().bStep()</code>. For those traversal strategies 
that require other strategies to execute prior or
 post to the strategy, then the following two methods can be defined in 
<code>TraversalStrategy</code> (with defaults being an
 empty set). If the <code>TraversalStrategy</code> is in a particular traversal 
category (i.e. decoration, optimization,
-provider-optimization, finalization, or verification), then priors and posts 
are only possible within the category.</p>
+provider-optimization, finalization, or verification), then priors and posts 
are only possible within the respective category.</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -7923,9 +7931,9 @@ provider-optimization, finalization, or
 </td>
 <td class="content">
 <code>TraversalStrategy</code> categories are sorted within their category and 
the categories are then executed in
-the following order: decoration, optimization, finalization, and verification. 
If a designed strategy does not fit
-cleanly into these categories, then it can implement 
<code>TraversalStrategy</code> and its prior and posts can reference
-strategies within any category.
+the following order: decoration, optimization, provider optimization, 
finalization, and verification. If a designed strategy
+does not fit cleanly into these categories, then it can implement 
<code>TraversalStrategy</code> and its prior and posts can reference
+strategies within any category. However, such generalization are strongly 
discouraged.
 </td>
 </tr>
 </table>
@@ -7960,7 +7968,7 @@ depending on whether there is or is not
             <span class="directive">final</span> TinkerGraphStep&lt;?, ?&gt; 
tinkerGraphStep = <span class="keyword">new</span> 
TinkerGraphStep&lt;&gt;(originalGraphStep);
             TraversalHelper.replaceStep(originalGraphStep, tinkerGraphStep, 
traversal);
             Step&lt;?, ?&gt; currentStep = tinkerGraphStep.getNextStep();
-            <span class="keyword">while</span> (currentStep <span 
class="keyword">instanceof</span> HasContainerHolder) {
+            <span class="keyword">while</span> (currentStep <span 
class="keyword">instanceof</span> HasStep) {
                 <span class="keyword">for</span> (<span 
class="directive">final</span> HasContainer hasContainer : 
((HasContainerHolder) currentStep).getHasContainers()) {
                     <span class="keyword">if</span> 
(!GraphStep.processHasContainerIds(tinkerGraphStep, hasContainer))
                         tinkerGraphStep.addHasContainer(hasContainer);
@@ -7980,11 +7988,11 @@ depending on whether there is or is not
 </div>
 <div class="paragraph">
 <p>The traversal is redefined by simply taking a chain of 
<code>has()</code>-steps after <code>g.V()</code> 
(<code>TinkerGraphStep</code>) and providing
-them to <code>TinkerGraphStep</code>. Then its up to 
<code>TinkerGraphStep</code> to determine if an appropriate index exists. In 
the code
+their <code>HasContainers</code> to <code>TinkerGraphStep</code>. Then its up 
to <code>TinkerGraphStep</code> to determine if an appropriate index exists. In 
the code
 below, review the <code>vertices()</code> method and note how if an index 
exists, for a particular <code>HasContainer</code>, then that
 index is first queried before the remaining <code>HasContainer</code> filters 
are serially applied. Given that the strategy
 uses non-TinkerPop3 provided steps, it should go into the 
<code>ProviderOptimizationStrategy</code> category to ensure the
-added step does not corrupt the <code>OptimizationStrategy</code> 
strategies.</p>
+added step does not interfere with the assumptions of the 
<code>OptimizationStrategy</code> strategies.</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -7996,67 +8004,93 @@ gremlin&gt; t.toString()
 ==&gt;[TinkerGraphStep(vertex,[name.eq(marko)])]</code></pre>
 </div>
 </div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Warning</div>
+</td>
+<td class="content">
+The reason that <code>OptimizationStrategy</code> and 
<code>ProviderOptimizationStrategy</code> are two different categories is
+that optimization strategies should only rewrite the traversal using 
TinkerPop3 steps. This ensures that the
+optimizations executed at the end of the optimization strategy round are 
TinkerPop3 compliant. From there, provider
+optimizations can analyze the traversal and rewrite the traversal as desired 
using graph system specific steps (e.g.
+replacing <code>GraphStep.HasStep...HasStep</code> with 
<code>TinkerGraphStep</code>). If provider optimizations use graph system 
specific
+steps and implement <code>OptimizationStrategy</code>, then other TinkerPop3 
optimizations may fail to optimize the traversal or
+mis-understand the graph system specific step behaviors (e.g. 
<code>ProviderVertexStep extends VertexStep</code>) and yield
+incorrect semantics.
+</td>
+</tr>
+</table>
+</div>
 <div class="paragraph">
 <p>Finally, here is a complicated traversal that has various components that 
are optimized by the default TinkerPop strategies.</p>
 </div>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; 
g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span 
class="content">person</span><span class="delimiter">'</span></span>). <span 
class="comment">//</span><b>(1)</b>
-                 and(has(<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>,<span class="string"><span 
class="delimiter">'</span><span class="content">marko</span><span 
class="delimiter">'</span></span>),filter(has(<span class="string"><span 
class="delimiter">'</span><span class="content">age</span><span 
class="delimiter">'</span></span>,gt(<span class="integer">20</span>)))). <span 
class="comment">//</span><b>(2)</b>
-           match(__.as(<span class="string"><span 
class="delimiter">'</span><span class="content">a</span><span 
class="delimiter">'</span></span>).has(<span class="string"><span 
class="delimiter">'</span><span class="content">age</span><span 
class="delimiter">'</span></span>,lt(<span class="integer">32</span>)), <span 
class="comment">//</span><b>(3)</b>
-                 __.as(<span class="string"><span 
class="delimiter">'</span><span class="content">a</span><span 
class="delimiter">'</span></span>).repeat(outE().inV()).times(<span 
class="integer">2</span>).as(<span class="string"><span 
class="delimiter">'</span><span class="content">b</span><span 
class="delimiter">'</span></span>)). <span class="comment">//</span><b>(4)</b>
-             where(<span class="string"><span class="delimiter">'</span><span 
class="content">a</span><span class="delimiter">'</span></span>,neq(<span 
class="string"><span class="delimiter">'</span><span 
class="content">b</span><span class="delimiter">'</span></span>)). <span 
class="comment">//</span><b>(5)</b>
-             where(__.as(<span class="string"><span 
class="delimiter">'</span><span class="content">b</span><span 
class="delimiter">'</span></span>).both().count().is(gt(<span 
class="integer">1</span>))). <span class="comment">//</span><b>(6)</b>
-           select(<span class="string"><span class="delimiter">'</span><span 
class="content">b</span><span class="delimiter">'</span></span>). <span 
class="comment">//</span><b>(7)</b>
+                 and(has(<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>), <span class="comment">//</span><b>(2)</b>
+                     has(<span class="string"><span 
class="delimiter">'</span><span class="content">name</span><span 
class="delimiter">'</span></span>,<span class="string"><span 
class="delimiter">'</span><span class="content">marko</span><span 
class="delimiter">'</span></span>),
+                     filter(has(<span class="string"><span 
class="delimiter">'</span><span class="content">age</span><span 
class="delimiter">'</span></span>,gt(<span class="integer">20</span>)))). <span 
class="comment">//</span><b>(3)</b>
+           match(__.as(<span class="string"><span 
class="delimiter">'</span><span class="content">a</span><span 
class="delimiter">'</span></span>).has(<span class="string"><span 
class="delimiter">'</span><span class="content">age</span><span 
class="delimiter">'</span></span>,lt(<span class="integer">32</span>)), <span 
class="comment">//</span><b>(4)</b>
+                 __.as(<span class="string"><span 
class="delimiter">'</span><span class="content">a</span><span 
class="delimiter">'</span></span>).repeat(outE().inV()).times(<span 
class="integer">2</span>).as(<span class="string"><span 
class="delimiter">'</span><span class="content">b</span><span 
class="delimiter">'</span></span>)). <span class="comment">//</span><b>(5)</b>
+             where(<span class="string"><span class="delimiter">'</span><span 
class="content">a</span><span class="delimiter">'</span></span>,neq(<span 
class="string"><span class="delimiter">'</span><span 
class="content">b</span><span class="delimiter">'</span></span>)). <span 
class="comment">//</span><b>(6)</b>
+             where(__.as(<span class="string"><span 
class="delimiter">'</span><span class="content">b</span><span 
class="delimiter">'</span></span>).both().count().is(gt(<span 
class="integer">1</span>))). <span class="comment">//</span><b>(7)</b>
+           select(<span class="string"><span class="delimiter">'</span><span 
class="content">b</span><span class="delimiter">'</span></span>). <span 
class="comment">//</span><b>(8)</b>
            groupCount().
-             by(out().count()). <span class="comment">//</span><b>(8)</b>
+             by(out().count()). <span class="comment">//</span><b>(9)</b>
            explain()
 ==&gt;Traversal Explanation
-==========================================================================================================================================================================================================================================
-Original Traversal                 [GraphStep(vertex,<span 
class="type">[]</span>), HasStep([~label.eq(person)]), 
AndStep([[HasStep([name.eq(marko)])], 
[TraversalFilterStep([HasStep([age.gt(<span class="integer">20</span>)])])]]), 
MatchStep(AND,[[MatchStartStep(a), HasStep([age.lt(<span 
class="integer">32</span>)]

[... 962 lines stripped ...]


Reply via email to