You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/10/25 20:56:31 UTC
[tinkerpop] 03/04: TINKERPOP-2443 Preserve variables in Gremlin
string translation
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2443
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 322612647e8c2eb8e157a0251279feed5b01e0a1
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Oct 23 15:23:25 2020 -0400
TINKERPOP-2443 Preserve variables in Gremlin string translation
Fixed a little gang of bugs, include TraversalStrategy issues in Python and TINKERPOP-2458 with this commit which will make sure bytecode Bindings aren't lost in some cases. Some of this work should be backported to 3.4.x. Had to remove a bunch of tests to get the core of this body of work operational - intend to add them back on a future commit.
---
CHANGELOG.asciidoc | 2 +
.../gremlin/process/traversal/Translator.java | 1 +
.../traversal/translator/PythonTranslator.java | 8 +-
.../traversal/translator/PythonTranslatorTest.java | 4 +-
.../ast/RepeatASTTransformationCustomizer.groovy | 51 ++
.../ast/VarAsBindingASTTransformation.groovy | 133 +++++
.../groovy/jsr223/GremlinGroovyScriptEngine.java | 2 +-
.../jsr223/GremlinGroovyScriptEngineTest.java | 52 ++
gremlin-python/build/generate.groovy | 120 ++++
.../gremlin_python/process/graph_traversal.py | 5 +-
.../src/main/python/radish/feature_steps.py | 78 +--
gremlin-python/src/main/python/radish/gremlin.py | 649 +++++++++++++++++++++
gremlin-python/src/main/python/radish/terrain.py | 1 +
.../tests/structure/io/test_graphbinaryV1.py | 14 +-
gremlin-test/features/branch/Repeat.feature | 1 -
gremlin-test/features/filter/Has.feature | 22 +-
gremlin-test/features/filter/Is.feature | 3 +-
gremlin-test/features/filter/Or.feature | 3 +-
gremlin-test/features/filter/Sample.feature | 1 -
gremlin-test/features/filter/SimplePath.feature | 1 -
gremlin-test/features/map/Graph.feature | 1 -
gremlin-test/features/map/Math.feature | 2 +-
gremlin-test/features/sideEffect/Sack.feature | 1 -
23 files changed, 1040 insertions(+), 115 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 84dd695..0e88a63 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -51,6 +51,8 @@ This release also includes changes from <<release-3-4-3, 3.4.3>>.
* Configured GraphBinary as the default binary serialization format for the Java Driver.
* Configured GraphSON 3.0 as the default text serialization format when no serializer can be determined.
* Configured GraphSON 3.0 as the default setting for the `GraphSONMapper`.
+* Fixed bug in `PythonTranslator` for processing `TraversalStrategy` instances in GraphBinary.
+* Fixed bug in bytecode `Bindings` where calling `of()` prior to calling a child traversal in the same parent would cause the initial binding to be lost.
* Bumped to Neo4j 3.4.11.
* Bumped to Spark 3.0.0.
* Bumped to Groovy 3.0.3.
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Translator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Translator.java
index 27972d2..fb7c487 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Translator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Translator.java
@@ -41,6 +41,7 @@ import java.util.function.BiFunction;
*
* @author Marko A. Rodriguez (http://markorodriguez.com)
* @author Stark Arya (sandszhou.zj@alibaba-inc.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
*/
public interface Translator<S, T> {
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java
index cc5eaa2..9b5f3b5 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslator.java
@@ -266,11 +266,13 @@ public final class PythonTranslator implements Translator.ScriptTranslator {
@Override
protected Script produceScript(final TraversalStrategyProxy<?> o) {
if (o.getConfiguration().isEmpty())
- return script.append("TraversalStrategy('" + o.getStrategyClass().getSimpleName() + "')");
+ return script.append("TraversalStrategy('" + o.getStrategyClass().getSimpleName() + "', None, '" + o.getStrategyClass().getName() + "')");
else {
script.append("TraversalStrategy('").append(o.getStrategyClass().getSimpleName()).append("',");
convertToScript(ConfigurationConverter.getMap(o.getConfiguration()));
- return script.append(")");
+ script.append(", '");
+ script.append(o.getStrategyClass().getName());
+ return script.append("')");
}
}
@@ -297,7 +299,7 @@ public final class PythonTranslator implements Translator.ScriptTranslator {
// python has trouble with java varargs...wrapping in collection seems to solve the problem
final boolean varargsBeware = instruction.getOperator().equals(TraversalSource.Symbols.withStrategies)
|| instruction.getOperator().equals(TraversalSource.Symbols.withoutStrategies);
- if (varargsBeware) script.append("[");
+ if (varargsBeware) script.append("*[");
final Iterator<?> itty = Stream.of(arguments).iterator();
while (itty.hasNext()) {
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslatorTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslatorTest.java
index 3528fb8..aebe27f 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslatorTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/translator/PythonTranslatorTest.java
@@ -46,7 +46,7 @@ public class PythonTranslatorTest {
}
@Test
- public void shouldTranslate() {
+ public void shouldTranslateOption() {
final String gremlinAsPython = translator.translate(
g.V().has("person", "name", "marko").asAdmin().getBytecode()).getScript();
assertEquals("g.V().has('person','name','marko')", gremlinAsPython);
@@ -84,7 +84,7 @@ public class PythonTranslatorTest {
@Test
public void shouldTranslateStrategies() {
- assertEquals("g.withStrategies([TraversalStrategy('ReadOnlyStrategy'),TraversalStrategy('SubgraphStrategy',{'checkAdjacentVertices':False,'vertices':__.hasLabel('person')})]).V().has('name')",
+ assertEquals("g.withStrategies(*[TraversalStrategy('ReadOnlyStrategy', None, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy'),TraversalStrategy('SubgraphStrategy',{'checkAdjacentVertices':False,'vertices':__.hasLabel('person')}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy')]).V().has('name')",
translator.translate(g.withStrategies(ReadOnlyStrategy.instance(),
SubgraphStrategy.build().checkAdjacentVertices(false).vertices(hasLabel("person")).create()).
V().has("name").asAdmin().getBytecode()).getScript());
diff --git a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/ast/RepeatASTTransformationCustomizer.groovy b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/ast/RepeatASTTransformationCustomizer.groovy
new file mode 100644
index 0000000..e7d3107
--- /dev/null
+++ b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/ast/RepeatASTTransformationCustomizer.groovy
@@ -0,0 +1,51 @@
+package org.apache.tinkerpop.gremlin.groovy.jsr223.ast
+
+import groovy.transform.CompilationUnitAware
+import org.codehaus.groovy.ast.ASTNode
+import org.codehaus.groovy.ast.ClassNode
+import org.codehaus.groovy.classgen.GeneratorContext
+import org.codehaus.groovy.control.SourceUnit
+import org.codehaus.groovy.control.customizers.ASTTransformationCustomizer
+import org.codehaus.groovy.transform.ASTTransformation
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Overrides the single application of the specified global AST Transformation (which is how the base
+ * {@code ASTTransformationCustomizer} works. That approach is not so helpful in the ScriptEngine where we want
+ * each script to be treated as an independent source unit. This is a bit of a hack but the use case here is fairly
+ * narrow (i.e. {@code VarAsBindingASTTransformation})
+ */
+class RepeatASTTransformationCustomizer extends ASTTransformationCustomizer {
+ RepeatASTTransformationCustomizer(final ASTTransformation transformation) {
+ super(transformation)
+ }
+
+ @Override
+ @SuppressWarnings('Instanceof')
+ void call(SourceUnit source, GeneratorContext context, ClassNode classNode) {
+ if (transformation instanceof CompilationUnitAware) {
+ transformation.compilationUnit = compilationUnit
+ }
+
+ // this is a global AST transformation
+ transformation.visit(null, source)
+ }
+}
diff --git a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/ast/VarAsBindingASTTransformation.groovy b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/ast/VarAsBindingASTTransformation.groovy
new file mode 100644
index 0000000..4e92e4e
--- /dev/null
+++ b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/ast/VarAsBindingASTTransformation.groovy
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.groovy.jsr223.ast
+
+import org.apache.tinkerpop.gremlin.process.traversal.Order
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.Translator
+import org.apache.tinkerpop.gremlin.process.traversal.Bytecode
+import org.apache.tinkerpop.gremlin.process.traversal.Bindings
+import org.codehaus.groovy.ast.ASTNode
+import org.codehaus.groovy.ast.ClassNode
+import org.codehaus.groovy.ast.CodeVisitorSupport
+import org.codehaus.groovy.ast.expr.ArgumentListExpression
+import org.codehaus.groovy.ast.expr.ClassExpression
+import org.codehaus.groovy.ast.expr.ConstantExpression
+import org.codehaus.groovy.ast.expr.DeclarationExpression
+import org.codehaus.groovy.ast.expr.Expression
+import org.codehaus.groovy.ast.expr.MethodCallExpression
+import org.codehaus.groovy.ast.expr.PropertyExpression
+import org.codehaus.groovy.ast.expr.StaticMethodCallExpression
+import org.codehaus.groovy.ast.expr.TupleExpression
+import org.codehaus.groovy.ast.expr.VariableExpression
+import org.codehaus.groovy.ast.stmt.ExpressionStatement
+import org.codehaus.groovy.control.CompilePhase
+import org.codehaus.groovy.control.SourceUnit
+import org.codehaus.groovy.syntax.Token
+import org.codehaus.groovy.syntax.Types
+import org.codehaus.groovy.transform.ASTTransformation
+import org.codehaus.groovy.transform.GroovyASTTransformation
+
+/**
+ * Converts variables used in Gremlin to {@link Bindings} declarations. By doing this, the generated traversal ends up
+ * having those {@link Bindings} in the Gremlin {@link Bytecode} which means that when passed through a
+ * {@link Translator} to generate a script form, the variables are preserved.
+ * <p/>
+ * This AST Transformation is meant to work with a single lines of Gremlin and only Gremlin. Inclusion of Groovy code
+ * might produce odd behavior as all variables found are basically treated as bindings which is not desirable for
+ * scripts in general.
+ */
+@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS)
+class VarAsBindingASTTransformation implements ASTTransformation {
+
+ private def bindingVariableName = 'bInDiNg' + UUID.randomUUID().toString().replace('-', '')
+
+ @Override
+ void visit(ASTNode[] nodes, SourceUnit source) {
+ // inject a binding declaration here using a unique variable name that should not interfere with variables
+ // in the Gremlin itself - basically generates the following line right before the Gremlin statement:
+ // bInDiNg<uuid> = Bindings.instance()
+ source.AST.statementBlock.statements.add(0, new ExpressionStatement(
+ new DeclarationExpression(
+ new VariableExpression(bindingVariableName, new ClassNode(Bindings)),
+ Token.newSymbol(Types.EQUAL, 0, 0),
+ new StaticMethodCallExpression(new ClassNode(Bindings), "instance", new TupleExpression())
+ )
+ ))
+
+ // analyze the Gremlin and detect variables replacing them with:
+ // bInDiNg<uuid>.of(<var>,<some-default>)
+ source.AST.statementBlock.statements[1].visit(new CodeVisitorSupport() {
+
+ def currentMethod
+
+ @Override
+ void visitMethodCallExpression(MethodCallExpression call) {
+ currentMethod = call.methodAsString
+ call.getArguments().visit(this)
+ call.getObjectExpression().visit(this)
+ }
+
+ @Override
+ void visitArgumentlistExpression(ArgumentListExpression expression) {
+ if (!expression.empty) {
+ expression.eachWithIndex{ Expression entry, int i ->
+ if (entry instanceof VariableExpression) {
+ // need a default binding value - any nonsense that satisfies the step argument should
+ // work typically but this is getting hacky
+ def bindingValue = new ConstantExpression(UUID.randomUUID().toString())
+ switch (currentMethod) {
+ case GraphTraversal.Symbols.map:
+ case GraphTraversal.Symbols.filter:
+ case GraphTraversal.Symbols.flatMap:
+ case GraphTraversal.Symbols.sideEffect:
+ case GraphTraversal.Symbols.choose:
+ case GraphTraversal.Symbols.until:
+ case GraphTraversal.Symbols.branch:
+ bindingValue = new StaticMethodCallExpression(new ClassNode(__), "identity", new TupleExpression())
+ break
+ case GraphTraversal.Symbols.by:
+ if (i == 1) bindingValue = new PropertyExpression(new ClassExpression(new ClassNode(Order)), "desc")
+ break
+ }
+ def bindingExpression = createBindingFromVar(entry.text, bindingVariableName, bindingValue)
+ bindingExpression.sourcePosition = entry
+ bindingExpression.copyNodeMetaData(entry)
+ expression.expressions[i] = bindingExpression
+ }
+ }
+ }
+ super.visitArgumentlistExpression(expression)
+ }
+ })
+ }
+
+ private static def createBindingFromVar(String nameOfVar, String bindingVariableName, Expression bindingValue) {
+ return new MethodCallExpression(
+ new VariableExpression(bindingVariableName),
+ new ConstantExpression("of"),
+ new ArgumentListExpression(
+ new ConstantExpression(nameOfVar),
+ bindingValue
+ )
+ )
+ }
+}
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 17de579..df9a85a 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -373,7 +373,7 @@ public class GremlinGroovyScriptEngine extends GroovyScriptEngineImpl implements
try {
registerBindingTypes(context);
- final Class clazz = getScriptClass(script);
+ final Class<?> clazz = getScriptClass(script);
if (null == clazz) throw new ScriptException("Script class is null");
return eval(clazz, context);
} catch (Exception e) {
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
index a2b8127..994c79d 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
@@ -23,8 +23,17 @@ import groovy.lang.MissingMethodException;
import groovy.lang.MissingPropertyException;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
+import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.RepeatASTTransformationCustomizer;
+import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.VarAsBindingASTTransformation;
import org.apache.tinkerpop.gremlin.jsr223.DefaultImportCustomizer;
+import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.translator.PythonTranslator;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
import org.apache.tinkerpop.gremlin.util.function.Lambda;
+import org.codehaus.groovy.control.customizers.CompilationCustomizer;
import org.javatuples.Pair;
import org.junit.Test;
@@ -45,6 +54,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.IntStream;
+import static org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource.traversal;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
@@ -426,4 +436,46 @@ public class GremlinGroovyScriptEngineTest {
final GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine(customizer);
engine.eval("__.users();[]");
}
+
+ @Test
+ public void shouldProduceBindingsForVars() throws Exception {
+ final GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine(new GroovyCustomizer() {
+ @Override
+ public CompilationCustomizer create() {
+ return new RepeatASTTransformationCustomizer(new VarAsBindingASTTransformation());
+ }
+ });
+
+ final GraphTraversalSource g = traversal().withEmbedded(EmptyGraph.instance());
+ final Bindings bindings = new SimpleBindings();
+ bindings.put("g", g);
+ engine.eval("g.V(b).out()", bindings);
+ final Traversal.Admin<Vertex, Vertex> t = (Traversal.Admin<Vertex, Vertex>)
+ engine.eval("g.V(v1Id).has(\"person\",\"age\",29).has('person','active',x).in(\"knows\")." +
+ System.lineSeparator() +
+ "choose(__.out().count()).option(two, __.values(\"name\")).option(three, __.values(\"age\"))." +
+ System.lineSeparator() +
+ "filter(outE().count().is(y))." +
+ System.lineSeparator() +
+ "map(l)." +
+ System.lineSeparator() +
+ "order().by('name',o)", bindings);
+ final Bytecode bytecode = t.getBytecode();
+ engine.eval("g.V(b).out()", bindings);
+
+ final PythonTranslator translator = PythonTranslator.of("g");
+ final String gremlinAsPython = translator.translate(bytecode).getScript();
+
+ final Map<String,Object> bytecodeBindings = bytecode.getBindings();
+ assertEquals(7, bytecodeBindings.size());
+ assertThat(bytecodeBindings.containsKey("x"), is(true));
+ assertThat(bytecodeBindings.containsKey("y"), is(true));
+ assertThat(bytecodeBindings.containsKey("v1Id"), is(true));
+ assertThat(bytecodeBindings.containsKey("l"), is(true));
+ assertThat(bytecodeBindings.containsKey("o"), is(true));
+ assertThat(bytecodeBindings.containsKey("two"), is(true));
+ assertThat(bytecodeBindings.containsKey("three"), is(true));
+
+ assertEquals("g.V(v1Id).has('person','age',29).has('person','active',x).in_('knows').choose(__.out().count()).option(two,__.name).option(three,__.age).filter(__.outE().count().is_(y)).map(l).order().by('name',o)", gremlinAsPython);
+ }
}
\ No newline at end of file
diff --git a/gremlin-python/build/generate.groovy b/gremlin-python/build/generate.groovy
new file mode 100644
index 0000000..5374f73
--- /dev/null
+++ b/gremlin-python/build/generate.groovy
@@ -0,0 +1,120 @@
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph
+import org.apache.tinkerpop.gremlin.process.traversal.translator.PythonTranslator
+import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine
+import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.VarAsBindingASTTransformation
+import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.RepeatASTTransformationCustomizer
+import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCustomizer
+import org.apache.commons.text.StringEscapeUtils
+import org.codehaus.groovy.control.customizers.CompilationCustomizer
+
+import java.io.File
+import javax.script.SimpleBindings
+import groovy.io.FileType
+
+import static org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource.traversal
+
+// file is overwritten on each generation
+radishGremlinFile = new File('/home/smallette/git/apache/tinkerpop/gremlin-python/src/main/python/radish/gremlin.py')
+
+// assumes globally unique scenario names for keys with list of Gremlin traversals as they appear
+gremlins = [:].withDefault{[]}
+
+gremlinGroovyScriptEngine = new GremlinGroovyScriptEngine(new GroovyCustomizer() {
+ public CompilationCustomizer create() {
+ return new RepeatASTTransformationCustomizer(new VarAsBindingASTTransformation())
+ }
+})
+pythonTranslator = PythonTranslator.of('g')
+g = traversal().withGraph(EmptyGraph.instance())
+bindings = new SimpleBindings()
+bindings.put('g', g)
+
+featureDir = new File('/home/smallette/git/apache/tinkerpop/gremlin-test/features')
+featureDir.eachFileRecurse (FileType.FILES) { file ->
+ // only process gherkin files with .feature extension
+ if (file.name.endsWith('.feature')) {
+ def currentGremlin = ''
+ def openTriples = false
+ def skipIgnored = false
+ def scenarioName = ''
+ file.withReader { Reader reader ->
+ reader.eachLine { String line ->
+ def cleanLine = line.trim();
+ if (cleanLine.startsWith('Scenario:')) {
+ scenarioName = cleanLine.split(':')[1].trim()
+ skipIgnored = false
+ } else if (cleanLine.startsWith('Then nothing should happen because')) {
+ skipIgnored = true
+ } else if (cleanLine.startsWith('And the graph should return')) {
+ gremlins[scenarioName] << StringEscapeUtils.unescapeJava(cleanLine.substring(cleanLine.indexOf("\"") + 1, cleanLine.lastIndexOf("\"")))
+ } else if (cleanLine.startsWith("\"\"\"")) {
+ openTriples = !openTriples
+ if (!skipIgnored && !openTriples) {
+ gremlins[scenarioName] << currentGremlin
+ currentGremlin = ""
+ println "added: " + gremlins[scenarioName]
+ }
+ } else if (openTriples && !skipIgnored) {
+ currentGremlin += cleanLine
+ }
+ }
+ }
+ }
+}
+
+radishGremlinFile.withWriter('UTF-8') { Writer writer ->
+ writer.writeLine('#\n' +
+ '# Licensed to the Apache Software Foundation (ASF) under one\n' +
+ '# or more contributor license agreements. See the NOTICE file\n' +
+ '# distributed with this work for additional information\n' +
+ '# regarding copyright ownership. The ASF licenses this file\n' +
+ '# to you under the Apache License, Version 2.0 (the\n' +
+ '# "License"); you may not use this file except in compliance\n' +
+ '# with the License. You may obtain a copy of the License at\n' +
+ '# \n' +
+ '# http://www.apache.org/licenses/LICENSE-2.0\n' +
+ '# \n' +
+ '# Unless required by applicable law or agreed to in writing,\n' +
+ '# software distributed under the License is distributed on an\n' +
+ '# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n' +
+ '# KIND, either express or implied. See the License for the\n' +
+ '# specific language governing permissions and limitations\n' +
+ '# under the License.\n' +
+ '#\n')
+ writer.writeLine(
+ 'from radish import world\n' +
+ 'from gremlin_python.process.anonymous_traversal import traversal\n' +
+ 'from gremlin_python.process.traversal import TraversalStrategy\n' +
+ 'from gremlin_python.process.graph_traversal import __\n' +
+ 'from gremlin_python.structure.graph import Graph\n' +
+ 'from gremlin_python.process.traversal import Barrier, Cardinality, P, TextP, Pop, Scope, Column, Order, Direction, T, Pick, Operator, IO, WithOptions\n')
+ writer.writeLine('world.gremlins = {')
+ gremlins.each { k,v ->
+ writer.write(" '")
+ writer.write(k)
+ writer.write("':[")
+ def collected = v.collect{
+ def t = gremlinGroovyScriptEngine.eval(it, bindings)
+ [t, t.bytecode.bindings.keySet()]
+ }
+ def uniqueBindings = collected.collect{it[1]}.flatten().unique()
+ def gremlinItty = collected.iterator()
+ while (gremlinItty.hasNext()) {
+ def t = gremlinItty.next()[0]
+ writer.write("(lambda g")
+ if (!uniqueBindings.isEmpty()) {
+ writer.write(", ")
+ writer.write(uniqueBindings.join("=None,"))
+ writer.write("=None")
+ }
+ writer.write(":")
+ writer.write(pythonTranslator.translate(t.bytecode).script)
+ writer.write(")")
+ if (gremlinItty.hasNext()) writer.write(', ')
+ }
+ writer.writeLine('], ')
+ }
+ writer.writeLine('}')
+}
+
+
diff --git a/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py b/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
index 545dce0..65f3b03 100644
--- a/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
@@ -591,6 +591,7 @@ class GraphTraversal(Traversal):
self.bytecode.add_step("sum", *args)
return self
+
class MagicType(type):
def __getattr__(cls, k):
@@ -599,8 +600,8 @@ class MagicType(type):
'Python magic methods or keys starting with double underscore cannot be used for Gremlin sugar - prefer values(' + k + ')')
return __.values(k)
-class __(object):
- __metaclass__ = MagicType
+
+class __(object, metaclass=MagicType):
graph_traversal = GraphTraversal
@classmethod
diff --git a/gremlin-python/src/main/python/radish/feature_steps.py b/gremlin-python/src/main/python/radish/feature_steps.py
index c4b3ab5..826cc75 100644
--- a/gremlin-python/src/main/python/radish/feature_steps.py
+++ b/gremlin-python/src/main/python/radish/feature_steps.py
@@ -27,21 +27,6 @@ from gremlin_python.process.traversal import Barrier, Cardinality, P, TextP, Pop
from radish import given, when, then, world
from hamcrest import *
-regex_all = re.compile(r"Pop\.all")
-regex_and = re.compile(r"([(.,\s])and\(")
-regex_as = re.compile(r"([(.,\s])as\(")
-regex_from = re.compile(r"([(.,\s])from\(")
-regex_global = re.compile(r"([(.,\s])global")
-regex_cardlist = re.compile(r"Cardinality\.list")
-regex_in = re.compile(r"([(.,\s])in\(")
-regex_is = re.compile(r"([(.,\s])is\(")
-regex_not = re.compile(r"([(.,\s])not\(")
-regex_or = re.compile(r"([(.,\s])or\(")
-regex_with = re.compile(r"([(.,\s])with\(")
-regex_true = re.compile(r"(true)")
-regex_false = re.compile(r"(false)")
-regex_null = re.compile(r"(null)")
-
outV = __.outV
label = __.label
inV = __.inV
@@ -59,7 +44,7 @@ def choose_graph(step, graph_name):
@given("the graph initializer of")
def initialize_graph(step):
- t = _make_traversal(step.context.g, step.text, {})
+ t = step.context.traversals.pop(0)(g=step.context.g)
# just be sure that the traversal returns something to prove that it worked to some degree. probably
# is overkill to try to assert the complete success of this init operation. presumably the test
@@ -67,10 +52,6 @@ def initialize_graph(step):
result = t.toList()
assert len(result) > 0
- # add the first result - if a map - to the bindings. this is useful for cases when parameters for
- # the test traversal need to come from the original graph initializer (i.e. a new graph is created
- # and you need the id of a vertex from that graph)
-
@given("an unsupported test")
def unsupported_scenario(step):
@@ -96,10 +77,10 @@ def add_parameter(step, param_name, param):
@given("the traversal of")
def translate_traversal(step):
- step.context.ignore = ignores.__contains__(step.text)
- step.context.traversal = _make_traversal(
- step.context.g, step.text,
- step.context.traversal_params if hasattr(step.context, "traversal_params") else {})
+ step.context.ignore = step.text in ignores
+ p = step.context.traversal_params if hasattr(step.context, "traversal_params") else {}
+ p['g'] = step.context.g
+ step.context.traversal = step.context.traversals.pop(0)(**p)
@when("iterated to list")
@@ -140,8 +121,10 @@ def assert_side_effects(step, count, traversal_string):
if step.context.ignore:
return
- t = _make_traversal(step.context.g, traversal_string.replace('\\"', '"'),
- step.context.traversal_params if hasattr(step.context, "traversal_params") else {})
+ p = step.context.traversal_params if hasattr(step.context, "traversal_params") else {}
+ p['g'] = step.context.g
+ t = step.context.traversals.pop(0)(**p)
+
assert_that(t.count().next(), equal_to(count))
@@ -157,7 +140,7 @@ def nothing_happening(step):
def _convert(val, ctx):
graph_name = ctx.graph_name
- if isinstance(val, dict): # convert dictionary keys/values
+ if isinstance(val, dict): # convert dictionary keys/values
n = {}
for key, value in val.items():
n[_convert(key, ctx)] = _convert(value, ctx)
@@ -243,44 +226,3 @@ def _table_assertion(data, result, ctx, ordered):
if not ordered:
assert_that(len(results_to_test), is_(0))
-
-
-def _translate(traversal_):
- replaced = traversal_.replace("\n", "")
- replaced = regex_all.sub(r"Pop.all_", replaced)
- replaced = regex_cardlist.sub(r"Cardinality.list_", replaced)
- replaced = regex_and.sub(r"\1and_(", replaced)
- replaced = regex_from.sub(r"\1from_(", replaced)
- replaced = regex_global.sub(r"\1global_", replaced)
- replaced = regex_as.sub(r"\1as_(", replaced)
- replaced = regex_is.sub(r"\1is_(", replaced)
- replaced = regex_not.sub(r"\1not_(", replaced)
- replaced = regex_or.sub(r"\1or_(", replaced)
- replaced = regex_in.sub(r"\1in_(", replaced)
- replaced = regex_with.sub(r"\1with_(", replaced)
- replaced = regex_true.sub(r"True", replaced)
- replaced = regex_false.sub(r"False", replaced)
- return regex_null.sub(r"None", replaced)
-
-
-def _make_traversal(g, traversal_string, params):
- b = {"g": g,
- "__": __,
- "Barrier": Barrier,
- "Cardinality": Cardinality,
- "Column": Column,
- "Direction": Direction,
- "Order": Order,
- "P": P,
- "TextP": TextP,
- "IO": IO,
- "Pick": Pick,
- "Pop": Pop,
- "Scope": Scope,
- "Operator": Operator,
- "T": T,
- "WithOptions": WithOptions}
-
- b.update(params)
-
- return eval(_translate(traversal_string), b)
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
new file mode 100644
index 0000000..7cf94c4
--- /dev/null
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -0,0 +1,649 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from radish import world
+from gremlin_python.process.anonymous_traversal import traversal
+from gremlin_python.process.traversal import TraversalStrategy
+from gremlin_python.process.graph_traversal import __
+from gremlin_python.structure.graph import Graph
+from gremlin_python.process.traversal import Barrier, Cardinality, P, TextP, Pop, Scope, Column, Order, Direction, T, Pick, Operator, IO, WithOptions
+
+world.gremlins = {
+ 'g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX':[(lambda g, v1Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5 [...]
+ 'g_V_addVXanimalX_propertyXage_0X':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang','java') [...]
+ 'g_addVXpersonX_propertyXname_stephenX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang','j [...]
+ 'g_V_hasLabelXpersonX_propertyXname_nullX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang' [...]
+ 'g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).proper [...]
+ 'get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property [...]
+ 'g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).pro [...]
+ 'g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').prope [...]
+ 'g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripp [...]
+ 'g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.i [...]
+ 'g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software'). [...]
+ 'g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property [...]
+ 'g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripp [...]
+ 'g_V_asXaX_hasXname_markoX_outXcreatedX_asXbX_addVXselectXaX_labelX_propertyXtest_selectXbX_labelX_valueMap_withXtokensX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('jos [...]
+ 'g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').pro [...]
+ 'g_addVXnullX_propertyXid_nullX':[(lambda g:g.addV(None).property(T.id,None)), (lambda g:g.V().hasLabel('vertex'))],
+ 'g_addV_propertyXlabel_personX':[(lambda g:g.addV().property(T.label,'person')), (lambda g:g.V().hasLabel('person'))],
+ 'g_VX1X_mapXnameX':[(lambda g, v1Id=None,l=None:g.V(v1Id).map(l))],
+ 'g_VX1X_outE_label_mapXlengthX':[(lambda g, v1Id=None,l=None:g.V(v1Id).outE().label().map(l))],
+ 'g_VX1X_out_mapXnameX_mapXlengthX':[(lambda g, v1Id=None,l1=None,l2=None:g.V(v1Id).out().map(l1).map(l2))],
+ 'g_withPath_V_asXaX_out_mapXa_nameX':[(lambda g, l=None:g.withPath().V().as_('a').out().map(l))],
+ 'g_withPath_V_asXaX_out_out_mapXa_name_it_nameX':[(lambda g, l=None:g.withPath().V().as_('a').out().out().map(l))],
+ 'g_V_mapXselectXaXX':[(lambda g:g.V().as_('a').map(__.select('a')))],
+ 'g_V_mapXconstantXnullXX':[(lambda g:g.V().map(__.constant(None)))],
+ 'g_V_age_sum':[(lambda g:g.V().age.sum())],
+ 'g_V_foo_sum':[(lambda g:g.V().foo.sum())],
+ 'g_V_age_fold_sumXlocalX':[(lambda g:g.V().age.fold().sum(Scope.local))],
+ 'g_V_foo_fold_sumXlocalX':[(lambda g:g.V().foo.fold().sum(Scope.local))],
+ 'g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_sumX':[(lambda g:g.V().hasLabel('software').group().by('name').by(__.bothE().weight.sum()))],
+ 'g_VX1X_name_path':[(lambda g, v1Id=None:g.V(v1Id).name.path())],
+ 'g_VX1X_out_path_byXageX_byXnameX':[(lambda g, v1Id=None:g.V(v1Id).out().path().by('age').by('name'))],
+ 'g_V_repeatXoutX_timesX2X_path_byXitX_byXnameX_byXlangX':[(lambda g:g.V().repeat(__.out()).times(2).path().by().by('name').by('lang'))],
+ 'g_V_out_out_path_byXnameX_byXageX':[(lambda g:g.V().out().out().path().by('name').by('age'))],
+ 'g_V_asXaX_hasXname_markoX_asXbX_hasXage_29X_asXcX_path':[(lambda g:g.V().as_('a').has('name','marko').as_('b').has('age',29).as_('c').path())],
+ 'g_VX1X_outEXcreatedX_inV_inE_outV_path':[(lambda g, v1Id=None:g.V(v1Id).outE('created').inV().inE().outV().path())],
+ 'g_V_asXaX_out_asXbX_out_asXcX_path_fromXbX_toXcX_byXnameX':[(lambda g:g.V().as_('a').out().as_('b').out().as_('c').path().from_('b').to('c').by('name'))],
+ 'g_V_hasXageX_propertiesXnameX':[(lambda g:g.V().has('age').properties('name').value())],
+ 'g_V_hasXageX_propertiesXname_ageX_value':[(lambda g:g.V().has('age').properties('name','age').value())],
+ 'g_V_hasXageX_propertiesXage_nameX_value':[(lambda g:g.V().has('age').properties('age','name').value())],
+ 'g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX':[(lambda g, v1Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple [...]
+ 'g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X':[(lambda g, v1Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).prop [...]
+ 'g_V_outE_propertyXweight_nullX':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang','java').a [...]
+ 'g_V_aggregateXxX_asXaX_selectXxX_unfold_addEXexistsWithX_toXaX_propertyXtime_nowX':[(lambda g, v1Id=None,v2Id=None,v3Id=None,v4Id=None,v5Id=None,v6Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').prop [...]
+ 'g_V_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_asXbX_addEXcodeveloperX_fromXaX_toXbX_propertyXyear_2009X':[(lambda g, v1Id=None,v2Id=None,v4Id=None,v6Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh') [...]
+ 'g_V_asXaX_inXcreatedX_addEXcreatedByX_fromXaX_propertyXyear_2009X_propertyXacl_publicX':[(lambda g, v1Id=None,v2Id=None,v3Id=None,v4Id=None,v5Id=None,v6Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh') [...]
+ 'g_withSideEffectXb_bX_VXaX_addEXknowsX_toXbX_propertyXweight_0_5X':[(lambda g, v6=None,v1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5) [...]
+ 'g_addV_asXfirstX_repeatXaddEXnextX_toXaddVX_inVX_timesX5X_addEXnextX_toXselectXfirstXX':[(lambda g:g.addV().as_('first').repeat(__.addE('next').to(__.addV()).inV()).times(5).addE('next').to(__.select('first'))), (lambda g:g.V()), (lambda g:g.E()), (lambda g:g.E().hasLabel('next')), (lambda g:g.V()[0:1].bothE()), (lambda g:g.V()[0:1].inE()), (lambda g:g.V()[0:1].outE())],
+ 'g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX':[(lambda g, v1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.i [...]
+ 'g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX':[(lambda g, v2=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').prop [...]
+ 'g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X':[(lambda g, v6=None,v1=None,dotOne=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).prop [...]
+ 'g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X':[(lambda g, v6=None,v1=None,dotOne=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).propert [...]
+ 'g_V_name_order':[(lambda g:g.V().name.order())],
+ 'g_V_name_order_byXa1_b1X_byXb2_a2X':[(lambda g, l1=None,l2=None:g.V().name.order().by(l1).by(l2))],
+ 'g_V_order_byXname_ascX_name':[(lambda g:g.V().order().by('name',Order.asc).name)],
+ 'g_V_order_byXnameX_name':[(lambda g:g.V().order().by('name').name)],
+ 'g_V_outE_order_byXweight_descX_weight':[(lambda g:g.V().outE().order().by('weight',Order.desc).weight)],
+ 'g_V_order_byXname_a1_b1X_byXname_b2_a2X_name':[(lambda g, l1=None,l2=None:g.V().order().by('name',l1).by('name',l2).name)],
+ 'g_V_asXaX_outXcreatedX_asXbX_order_byXshuffleX_selectXa_bX':[(lambda g:g.V().as_('a').out('created').as_('b').order().by(Order.shuffle).select('a','b'))],
+ 'g_V_both_hasLabelXpersonX_order_byXage_descX_limitX5X_name':[(lambda g:g.V().both().hasLabel('person').order().by('age',Order.desc)[0:5].name)],
+ 'g_V_properties_order_byXkey_descX_key':[(lambda g:g.V().properties().order().by(T.key,Order.desc).key())],
+ 'g_V_hasLabelXpersonX_order_byXvalueXageX_descX_name':[(lambda g, l1=None:g.V().hasLabel('person').order().by(l1,Order.desc).name)],
+ 'g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX':[(lambda g:g.V().hasLabel('person').group().by('name').by(__.outE().weight.sum()).order(Scope.local).by(Column.values))],
+ 'g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX':[(lambda g:g.V().map(__.bothE().weight.fold()).order().by(__.sum(Scope.local),Order.desc))],
+ 'g_V_group_byXlabelX_byXname_order_byXdescX_foldX':[(lambda g:g.V().group().by(T.label).by(__.name.order().by(Order.desc).fold()))],
+ 'g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_descX':[(lambda g:g.V().hasLabel('person').group().by('name').by(__.outE().weight.sum()).unfold().order().by(Column.values,Order.desc))],
+ 'g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_descX':[(lambda g:g.V().as_('v').map(__.bothE().weight.fold()).sum(Scope.local).as_('s').select('v','s').order().by(__.select('s'),Order.desc))],
+ 'g_V_hasLabelXpersonX_fold_orderXlocalX_byXageX':[(lambda g:g.V().hasLabel('person').fold().order(Scope.local).by('age'))],
+ 'g_V_both_hasLabelXpersonX_order_byXage_descX_name':[(lambda g:g.V().both().hasLabel('person').order().by('age',Order.desc).name)],
+ 'g_V_order_byXoutE_count_descX':[(lambda g:g.V().order().by(__.outE().count(),Order.desc))],
+ 'g_V_hasLabelXpersonX_order_byXageX':[(lambda g:g.V().hasLabel('person').order().by('age'))],
+ 'g_VX1X_hasXlabel_personX_mapXmapXint_ageXX_orderXlocalX_byXvalues_descX_byXkeys_ascX':[(lambda g, l1=None,v1=None:g.V(v1).hasLabel('person').map(l1).order(Scope.local).by(Column.values,Order.desc).by(Column.keys,Order.asc))],
+ 'g_VX1X_elementMap_orderXlocalX_byXkeys_descXunfold':[(lambda g, v1Id=None:g.V(v1Id).elementMap().order(Scope.local).by(Column.keys,Order.desc).unfold())],
+ 'g_V_coalesceXoutXfooX_outXbarXX':[(lambda g:g.V().coalesce(__.out('foo'),__.out('bar')))],
+ 'g_VX1X_coalesceXoutXknowsX_outXcreatedXX_valuesXnameX':[(lambda g, v1Id=None:g.V(v1Id).coalesce(__.out('knows'),__.out('created')).name)],
+ 'g_VX1X_coalesceXoutXcreatedX_outXknowsXX_valuesXnameX':[(lambda g, v1Id=None:g.V(v1Id).coalesce(__.out('created'),__.out('knows')).name)],
+ 'g_V_coalesceXoutXlikesX_outXknowsX_inXcreatedXX_groupCount_byXnameX':[(lambda g:g.V().coalesce(__.out('likes'),__.out('knows'),__.out('created')).groupCount().by('name'))],
+ 'g_V_coalesceXoutEXknowsX_outEXcreatedXX_otherV_path_byXnameX_byXlabelX':[(lambda g:g.V().coalesce(__.outE('knows'),__.outE('created')).otherV().path().by('name').by(T.label))],
+ 'g_V_outXcreatedX_order_byXnameX_coalesceXname_constantXxXX':[(lambda g:g.V().out('created').order().by('name').coalesce(__.name,__.constant('x')))],
+ 'g_V_age_max':[(lambda g:g.V().age.max())],
+ 'g_V_foo_max':[(lambda g:g.V().foo.max())],
+ 'g_V_name_max':[(lambda g:g.V().name.max())],
+ 'g_V_age_fold_maxXlocalX':[(lambda g:g.V().age.fold().max(Scope.local))],
+ 'g_V_foo_fold_maxXlocalX':[(lambda g:g.V().foo.fold().max(Scope.local))],
+ 'g_V_name_fold_maxXlocalX':[(lambda g:g.V().name.fold().max(Scope.local))],
+ 'g_V_repeatXbothX_timesX5X_age_max':[(lambda g:g.V().repeat(__.both()).times(5).age.max())],
+ 'g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_maxX':[(lambda g:g.V().hasLabel('software').group().by('name').by(__.bothE().weight.max()))],
+ 'get_g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('knows').as_('b').select('a','b'))],
+ 'g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX_byXnameX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('knows').as_('b').select('a','b').by('name'))],
+ 'g_VX1X_asXaX_outXknowsX_asXbX_selectXaX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('knows').as_('b').select('a'))],
+ 'g_VX1X_asXaX_outXknowsX_asXbX_selectXaX_byXnameX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('knows').as_('b').select('a').by('name'))],
+ 'g_V_asXaX_out_asXbX_selectXa_bX_byXnameX':[(lambda g:g.V().as_('a').out().as_('b').select('a','b').by('name'))],
+ 'g_V_asXaX_out_aggregateXxX_asXbX_selectXa_bX_byXnameX':[(lambda g:g.V().as_('a').out().aggregate('x').as_('b').select('a','b').by('name'))],
+ 'g_V_asXaX_name_order_asXbX_selectXa_bX_byXnameX_by_XitX':[(lambda g:g.V().as_('a').name.order().as_('b').select('a','b').by('name').by())],
+ 'g_V_hasXname_gremlinX_inEXusesX_order_byXskill_ascX_asXaX_outV_asXbX_selectXa_bX_byXskillX_byXnameX':[(lambda g:g.V().has('name','gremlin').inE('uses').order().by('skill',Order.asc).as_('a').outV().as_('b').select('a','b').by('skill').by('name'))],
+ 'g_V_hasXname_isXmarkoXX_asXaX_selectXaX':[(lambda g:g.V().has('name',__.is_('marko')).as_('a').select('a'))],
+ 'g_V_label_groupCount_asXxX_selectXxX':[(lambda g:g.V().label().groupCount().as_('x').select('x'))],
+ 'g_V_hasLabelXpersonX_asXpX_mapXbothE_label_groupCountX_asXrX_selectXp_rX':[(lambda g:g.V().hasLabel('person').as_('p').map(__.bothE().label().groupCount()).as_('r').select('p','r'))],
+ 'g_V_chooseXoutE_count_isX0X__asXaX__asXbXX_chooseXselectXaX__selectXaX__selectXbXX':[(lambda g, zero=None:g.V().choose(__.outE().count().is_(zero),__.as_('a'),__.as_('b')).choose(__.select('a'),__.select('a'),__.select('b')))],
+ 'g_VX1X_groupXaX_byXconstantXaXX_byXnameX_selectXaX_selectXaX':[(lambda g, v1Id=None:g.V(v1Id).group('a').by(__.constant('a')).by(__.name).barrier().select('a').select('a'))],
+ 'g_VX1X_asXhereX_out_selectXhereX':[(lambda g, v1Id=None:g.V(v1Id).as_('here').out().select('here'))],
+ 'g_VX4X_out_asXhereX_hasXlang_javaX_selectXhereX':[(lambda g, v4Id=None:g.V(v4Id).as_('here').out().select('here'))],
+ 'g_VX4X_out_asXhereX_hasXlang_javaX_selectXhereX_name':[(lambda g, v4Id=None:g.V(v4Id).out().as_('here').has('lang','java').select('here').name)],
+ 'g_VX1X_outE_asXhereX_inV_hasXname_vadasX_selectXhereX':[(lambda g, v1Id=None:g.V(v1Id).outE().as_('here').inV().has('name','vadas').select('here'))],
+ 'g_VX1X_outEXknowsX_hasXweight_1X_asXhereX_inV_hasXname_joshX_selectXhereX':[(lambda g, v1Id=None:g.V(v1Id).outE('knows').has('weight',float(1.0)).as_('here').inV().has('name','josh').select('here'))],
+ 'g_VX1X_outEXknowsX_asXhereX_hasXweight_1X_asXfakeX_inV_hasXname_joshX_selectXhereX':[(lambda g, v1Id=None:g.V(v1Id).outE('knows').as_('here').has('weight',float(1.0)).as_('fake').inV().has('name','josh').select('here'))],
+ 'g_V_asXhereXout_name_selectXhereX':[(lambda g:g.V().as_('here').out().name.select('here'))],
+ 'g_V_outXcreatedX_unionXasXprojectX_inXcreatedX_hasXname_markoX_selectXprojectX__asXprojectX_inXcreatedX_inXknowsX_hasXname_markoX_selectXprojectXX_groupCount_byXnameX':[(lambda g:g.V().out('created').union(__.as_('project').in_('created').has('name','marko').select('project'),__.as_('project').in_('created').in_('knows').has('name','marko').select('project')).groupCount().by('name'))],
+ 'g_V_untilXout_outX_repeatXin_asXaXX_selectXaX_byXtailXlocalX_nameX':[(lambda g:g.V().until(__.out().out()).repeat(__.in_().as_('a')).select('a').by(__.tail(Scope.local).name))],
+ 'g_V_outE_weight_groupCount_selectXkeysX_unfold':[(lambda g:g.V().outE().weight.groupCount().select(Column.keys).unfold())],
+ 'g_V_hasLabelXsoftwareX_asXnameX_asXlanguageX_asXcreatorsX_selectXname_language_creatorsX_byXnameX_byXlangX_byXinXcreatedX_name_fold_orderXlocalXX':[(lambda g:g.V().hasLabel('software').as_('name').as_('language').as_('creators').select('name','language','creators').by('name').by('lang').by(__.in_('created').name.fold().order(Scope.local)))],
+ 'g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold':[(lambda g:g.V().outE().weight.groupCount().unfold().select(Column.keys).unfold())],
+ 'g_V_outE_weight_groupCount_unfold_selectXvaluesX_unfold':[(lambda g:g.V().outE().weight.groupCount().unfold().select(Column.values).unfold())],
+ 'g_V_untilXout_outX_repeatXin_asXaX_in_asXbXX_selectXa_bX_byXnameX':[(lambda g:g.V().until(__.out().out()).repeat(__.in_().as_('a').in_().as_('b')).select('a','b').by('name'))],
+ 'g_V_outE_weight_groupCount_selectXvaluesX_unfold':[(lambda g:g.V().outE().weight.groupCount().select(Column.values).unfold())],
+ 'g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('knows').as_('b').select('a','b'))],
+ 'g_V_asXaX_whereXoutXknowsXX_selectXaX':[(lambda g:g.V().as_('a').where(__.out('knows')).select('a'))],
+ 'g_VX1X_asXaX_repeatXout_asXaXX_timesX2X_selectXfirst_aX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').repeat(__.out().as_('a')).times(2).select(Pop.first,'a'))],
+ 'g_V_asXaX_outXknowsX_asXbX_localXselectXa_bX_byXnameXX':[(lambda g:g.V().as_('a').out('knows').as_('b').local(__.select('a','b').by('name')))],
+ 'g_VX1X_asXaX_repeatXout_asXaXX_timesX2X_selectXlast_aX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').repeat(__.out().as_('a')).times(2).select(Pop.last,'a'))],
+ 'g_VX1X_outEXknowsX_asXhereX_hasXweight_1X_inV_hasXname_joshX_selectXhereX':[(lambda g, v1Id=None:g.V(v1Id).outE('knows').as_('here').has('weight',float(1.0)).inV().has('name','josh').select('here'))],
+ 'g_V_asXaX_hasXname_markoX_asXbX_asXcX_selectXa_b_cX_by_byXnameX_byXageX':[(lambda g:g.V().as_('a').has('name','marko').as_('b').as_('c').select('a','b','c').by().by('name').by('age'))],
+ 'g_V_outE_weight_groupCount_selectXvaluesX_unfold_groupCount_selectXvaluesX_unfold':[(lambda g:g.V().outE().weight.groupCount().select(Column.values).unfold().groupCount().select(Column.values).unfold())],
+ 'g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX':[(lambda g:g.V().as_('a').group('m').by().by(__.bothE().count()).barrier().select('m').select(__.select('a')))],
+ 'g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX_byXmathX_plus_XX':[(lambda g:g.V().as_('a').group('m').by().by(__.bothE().count()).barrier().select('m').select(__.select('a')).by(__.math('_+_')))],
+ 'g_V_asXaX_outXknowsX_asXaX_selectXall_constantXaXX':[(lambda g:g.V().as_('a').out('knows').as_('a').select(Pop.all_,__.constant('a')))],
+ 'g_V_selectXaX':[(lambda g:g.V().select('a'))],
+ 'g_V_selectXaX_count':[(lambda g:g.V().select('a').count())],
+ 'g_V_selectXa_bX':[(lambda g:g.V().select('a','b'))],
+ 'g_V_valueMap_selectXaX':[(lambda g:g.V().valueMap().select('a'))],
+ 'g_V_valueMap_selectXa_bX':[(lambda g:g.V().valueMap().select('a','b'))],
+ 'g_V_selectXfirst_aX':[(lambda g:g.V().select(Pop.first,'a'))],
+ 'g_V_selectXfirst_a_bX':[(lambda g:g.V().select(Pop.first,'a','b'))],
+ 'g_V_valueMap_selectXfirst_aX':[(lambda g:g.V().valueMap().select(Pop.first,'a'))],
+ 'g_V_valueMap_selectXfirst_a_bX':[(lambda g:g.V().valueMap().select(Pop.first,'a','b'))],
+ 'g_V_selectXlast_aX':[(lambda g:g.V().select(Pop.last,'a'))],
+ 'g_V_selectXlast_a_bX':[(lambda g:g.V().select(Pop.last,'a','b'))],
+ 'g_V_valueMap_selectXlast_aX':[(lambda g:g.V().valueMap().select(Pop.last,'a'))],
+ 'g_V_valueMap_selectXlast_a_bX':[(lambda g:g.V().valueMap().select(Pop.last,'a','b'))],
+ 'g_V_selectXall_aX':[(lambda g:g.V().select(Pop.all_,'a'))],
+ 'g_V_selectXall_a_bX':[(lambda g:g.V().select(Pop.all_,'a','b'))],
+ 'g_V_valueMap_selectXall_aX':[(lambda g:g.V().valueMap().select(Pop.all_,'a'))],
+ 'g_V_valueMap_selectXall_a_bX':[(lambda g:g.V().valueMap().select(Pop.all_,'a','b'))],
+ 'g_V_asXa_bX_out_asXcX_path_selectXkeysX':[(lambda g:g.V().as_('a','b').out().as_('c').path().select(Column.keys)), (lambda g:g.V().as_('a','b').out().as_('c').path().select(Column.keys))],
+ 'g_V_hasXperson_name_markoX_barrier_asXaX_outXknows_selectXaX':[(lambda g:g.V().has('person','name','marko').barrier().as_('a').out('knows').select('a'))],
+ 'g_V_hasXperson_name_markoX_elementMapXnameX_asXaX_unionXidentity_identityX_selectXaX_selectXnameX':[(lambda g:g.V().has('person','name','marko').elementMap('name').as_('a').union(__.identity(),__.identity()).select('a').select('name'))],
+ 'g_V_hasXperson_name_markoX_count_asXaX_unionXidentity_identityX_selectXaX':[(lambda g:g.V().has('person','name','marko').count().as_('a').union(__.identity(),__.identity()).select('a'))],
+ 'g_V_hasXperson_name_markoX_path_asXaX_unionXidentity_identityX_selectXaX_unfold':[(lambda g:g.V().has('person','name','marko').path().as_('a').union(__.identity(),__.identity()).select('a').unfold())],
+ 'g_EX11X_propertiesXweightX_asXaX_selectXaX_byXkeyX':[(lambda g, e11Id=None:g.E(e11Id).properties('weight').as_('a').select('a').by(T.key))],
+ 'g_EX11X_propertiesXweightX_asXaX_selectXaX_byXvalueX':[(lambda g, e11Id=None:g.E(e11Id).properties('weight').as_('a').select('a').by(T.value))],
+ 'g_V_connectedComponent_hasXcomponentX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().connectedComponent().has('gremlin.connectedComponentVertexProgram.component'))],
+ 'g_V_dedup_connectedComponent_hasXcomponentX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().dedup().connectedComponent().has('gremlin.connectedComponentVertexProgram.component'))],
+ 'g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('software').connectedComponent().project('name','component').by('name').by('gremlin.connectedComponentVertexProgram.component'))],
+ 'g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX_project_byXnameX_byXclusterX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('person').connectedComponent().with_('~tinkerpop.connectedComponent.edges',__.bothE('knows')).with_('~tinkerpop. [...]
+ 'g_V_age_mean':[(lambda g:g.V().age.mean())],
+ 'g_V_foo_mean':[(lambda g:g.V().foo.mean())],
+ 'g_V_age_fold_meanXlocalX':[(lambda g:g.V().age.fold().mean(Scope.local))],
+ 'g_V_foo_fold_meanXlocalX':[(lambda g:g.V().foo.fold().mean(Scope.local))],
+ 'g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_meanX':[(lambda g:g.V().hasLabel('software').group().by('name').by(__.bothE().weight.mean()))],
+ 'g_V_valueMap_matchXa_selectXnameX_bX':[(lambda g:g.V().valueMap().match(__.as_('a').select('name').as_('b')))],
+ 'g_V_matchXa_out_bX':[(lambda g:g.V().match(__.as_('a').out().as_('b')))],
+ 'g_V_matchXa_out_bX_selectXb_idX':[(lambda g:g.V().match(__.as_('a').out().as_('b')).select('b').by(T.id))],
+ 'g_V_matchXa_knows_b__b_created_cX':[(lambda g:g.V().match(__.as_('a').out('knows').as_('b'),__.as_('b').out('created').as_('c')))],
+ 'g_V_matchXb_created_c__a_knows_bX':[(lambda g:g.V().match(__.as_('b').out('created').as_('c'),__.as_('a').out('knows').as_('b')))],
+ 'g_V_matchXa_created_b__b_0created_cX_whereXa_neq_cX_selectXa_cX':[(lambda g:g.V().match(__.as_('a').out('created').as_('b'),__.as_('b').in_('created').as_('c')).where('a',P.neq('c')).select('a','c'))],
+ 'g_V_matchXd_0knows_a__d_hasXname_vadasX__a_knows_b__b_created_cX':[(lambda g:g.V().match(__.as_('d').in_('knows').as_('a'),__.as_('d').has('name','vadas'),__.as_('a').out('knows').as_('b'),__.as_('b').out('created').as_('c')))],
+ 'g_V_matchXa_created_lop_b__b_0created_29_c__c_whereXrepeatXoutX_timesX2XXX':[(lambda g:g.V().match(__.as_('a').out('created').has('name','lop').as_('b'),__.as_('b').in_('created').has('age',29).as_('c'),__.as_('c').where(__.repeat(__.out()).times(2))))],
+ 'g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX':[(lambda g:g.V().as_('a').out().as_('b').match(__.as_('a').out().count().as_('c'),__.as_('b').in_().count().as_('c')))],
+ 'g_V_matchXa__a_out_b__notXa_created_bXX':[(lambda g:g.V().match(__.as_('a').out().as_('b'),__.not_(__.as_('a').out('created').as_('b'))))],
+ 'g_V_matchXa_created_lop_b__b_0created_29_cX_whereXc_repeatXoutX_timesX2XX_selectXa_b_cX':[(lambda g:g.V().match(__.as_('a').out('created').has('name','lop').as_('b'),__.as_('b').in_('created').has('age',29).as_('c')).where(__.as_('c').repeat(__.out()).times(2)).select('a','b','c'))],
+ 'g_V_out_out_matchXa_0created_b__b_0knows_cX_selectXcX_outXcreatedX_name':[(lambda g:g.V().out().out().match(__.as_('a').in_('created').as_('b'),__.as_('b').in_('knows').as_('c')).select('c').out('created').name)],
+ 'g_V_matchXa_knows_b__b_created_c__a_created_cX_dedupXa_b_cX_selectXaX_byXnameX':[(lambda g:g.V().match(__.as_('a').out('knows').as_('b'),__.as_('b').out('created').as_('c'),__.as_('a').out('created').as_('c')).dedup('a','b','c').select('a').by('name'))],
+ 'g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX':[(lambda g:g.V().match(__.as_('a').out('created').as_('b'),__.as_('a').repeat(__.out()).times(2).as_('b')).select('a','b'))],
+ 'g_V_notXmatchXa_age_b__a_name_cX_whereXb_eqXcXX_selectXaXX_name':[(lambda g:g.V().not_(__.match(__.as_('a').age.as_('b'),__.as_('a').name.as_('c')).where('b',P.eq('c')).select('a')).name)],
+ 'g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX':[(lambda g:g.V().match(__.as_('a').out('knows').as_('b'),__.and_(__.as_('a').out('created').as_('c'),__.as_('b').out('created').as_('c'),__.and_(__.as_('b').out('created').count().as_('d'),__.as_('a').out('knows').count().as_('d')))))],
+ 'g_V_matchXa_whereXa_neqXcXX__a_created_b__orXa_knows_vadas__a_0knows_and_a_hasXlabel_personXX__b_0created_c__b_0created_count_isXgtX1XXX_selectXa_b_cX_byXidX':[(lambda g:g.V().match(__.where('a',P.neq('c')),__.as_('a').out('created').as_('b'),__.or_(__.as_('a').out('knows').has('name','vadas'),__.as_('a').in_('knows').and_().as_('a').has(T.label,'person')),__.as_('b').in_('created').as_('c'),__.as_('b').in_('created').count().is_(P.gt(1))).select('a','b','c').by(T.id))],
+ 'g_V_matchXa__a_both_b__b_both_cX_dedupXa_bX':[(lambda g:g.V().match(__.as_('a').both().as_('b'),__.as_('b').both().as_('c')).dedup('a','b'))],
+ 'g_V_matchXa_knows_b__b_created_lop__b_matchXb_created_d__d_0created_cX_selectXcX_cX_selectXa_b_cX':[(lambda g:g.V().match(__.as_('a').out('knows').as_('b'),__.as_('b').out('created').has('name','lop'),__.as_('b').match(__.as_('b').out('created').as_('d'),__.as_('d').in_('created').as_('c')).select('c').as_('c')).select('a','b','c'))],
+ 'g_V_matchXa_knows_b__a_created_cX':[(lambda g:g.V().match(__.as_('a').out('knows').as_('b'),__.as_('a').out('created').as_('c')))],
+ 'g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX':[(lambda g:g.V().match(__.where(__.and_(__.as_('a').out('created').as_('b'),__.as_('b').in_('created').count().is_(P.eq(3)))),__.as_('a').both().as_('b'),__.where(__.as_('b').in_())))],
+ 'g_V_matchXa_outEXcreatedX_order_byXweight_descX_limitX1X_inV_b__b_hasXlang_javaXX_selectXa_bX_byXnameX':[(lambda g:g.V().match(__.as_('a').outE('created').order().by('weight',Order.desc)[0:1].inV().as_('b'),__.as_('b').has('lang','java')).select('a','b').by('name'))],
+ 'g_V_matchXa_both_b__b_both_cX_dedupXa_bX_byXlabelX':[(lambda g:g.V().match(__.as_('a').both().as_('b'),__.as_('b').both().as_('c')).dedup('a','b').by(T.label))],
+ 'g_V_matchXa_created_b__b_0created_aX':[(lambda g:g.V().match(__.as_('a').out('created').as_('b'),__.as_('b').in_('created').as_('a')))],
+ 'g_V_asXaX_out_asXbX_matchXa_out_count_c__orXa_knows_b__b_in_count_c__and__c_isXgtX2XXXX':[(lambda g:g.V().as_('a').out().as_('b').match(__.as_('a').out().count().as_('c'),__.or_(__.as_('a').out('knows').as_('b'),__.as_('b').in_().count().as_('c').and_().as_('c').is_(P.gt(2)))))],
+ 'g_V_matchXa_knows_count_bX_selectXbX':[(lambda g:g.V().match(__.as_('a').out('knows').count().as_('b')).select('b'))],
+ 'g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_d__c_sungBy_d__d_hasXname_GarciaXX':[(lambda g:g.V().match(__.as_('a').in_('sungBy').as_('b'),__.as_('a').in_('writtenBy').as_('c'),__.as_('b').out('writtenBy').as_('d'),__.as_('c').out('sungBy').as_('d'),__.as_('d').has('name','Garcia')))],
+ 'g_V_matchXa_hasXsong_name_sunshineX__a_mapX0followedBy_weight_meanX_b__a_0followedBy_c__c_filterXweight_whereXgteXbXXX_outV_dX_selectXdX_byXnameX':[(lambda g:g.V().match(__.as_('a').has('song','name','HERE COMES SUNSHINE'),__.as_('a').map(__.inE('followedBy').weight.mean()).as_('b'),__.as_('a').inE('followedBy').as_('c'),__.as_('c').filter(__.weight.where(P.gte('b'))).outV().as_('d')).select('d').by('name'))],
+ 'g_V_matchXa_0sungBy_b__a_0sungBy_c__b_writtenBy_d__c_writtenBy_e__d_hasXname_George_HarisonX__e_hasXname_Bob_MarleyXX':[(lambda g:g.V().match(__.as_('a').in_('sungBy').as_('b'),__.as_('a').in_('sungBy').as_('c'),__.as_('b').out('writtenBy').as_('d'),__.as_('c').out('writtenBy').as_('e'),__.as_('d').has('name','George_Harrison'),__.as_('e').has('name','Bob_Marley')))],
+ 'g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__a_0sungBy_bX':[(lambda g:g.V().match(__.as_('a').has('name','Garcia'),__.as_('a').in_('writtenBy').as_('b'),__.as_('a').in_('sungBy').as_('b')))],
+ 'g_V_hasLabelXsongsX_matchXa_name_b__a_performances_cX_selectXb_cX_count':[(lambda g:g.V().hasLabel('song').match(__.as_('a').name.as_('b'),__.as_('a').performances.as_('c')).select('b','c').count())],
+ 'g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count':[(lambda g:g.V().match(__.as_('a').out('followedBy').count().is_(P.gt(10)).as_('b'),__.as_('a').in_('followedBy').count().is_(P.gt(10)).as_('b')).count())],
+ 'g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_dX_whereXc_sungBy_dX_whereXd_hasXname_GarciaXX':[(lambda g:g.V().match(__.as_('a').in_('sungBy').as_('b'),__.as_('a').in_('writtenBy').as_('c'),__.as_('b').out('writtenBy').as_('d')).where(__.as_('c').out('sungBy').as_('d')).where(__.as_('d').has('name','Garcia')))],
+ 'g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__b_followedBy_c__c_writtenBy_d__whereXd_neqXaXXX':[(lambda g:g.V().match(__.as_('a').has('name','Garcia'),__.as_('a').in_('writtenBy').as_('b'),__.as_('b').out('followedBy').as_('c'),__.as_('c').out('writtenBy').as_('d'),__.where('d',P.neq('a'))))],
+ 'g_V_count':[(lambda g:g.V().count())],
+ 'g_V_out_count':[(lambda g:g.V().out().count())],
+ 'g_V_both_both_count':[(lambda g:g.V().both().both().count())],
+ 'g_V_fold_countXlocalX':[(lambda g:g.V().fold().count(Scope.local))],
+ 'g_V_hasXnoX_count':[(lambda g:g.V().has('no').count())],
+ 'g_V_whereXinXkknowsX_outXcreatedX_count_is_0XX_name':[(lambda g:g.V().where(__.in_('knows').out('created').count().is_(0)).name)],
+ 'g_V_repeatXoutX_timesX8X_count':[(lambda g:g.V().repeat(__.out()).times(8).count())],
+ 'g_V_repeatXoutX_timesX5X_asXaX_outXwrittenByX_asXbX_selectXa_bX_count':[(lambda g:g.V().repeat(__.out()).times(5).as_('a').out('writtenBy').as_('b').select('a','b').count())],
+ 'g_V_repeatXoutX_timesX3X_count':[(lambda g:g.V().repeat(__.out()).times(3).count())],
+ 'g_VX1X_repeatXboth_simplePathX_untilXhasXname_peterX_or_loops_isX3XX_hasXname_peterX_path_byXnameX':[(lambda g, v1Id=None:g.V(v1Id).repeat(__.both().simplePath()).until(__.has('name','peter').or_().loops().is_(3)).has('name','peter').path().by('name'))],
+ 'g_VX1X_repeatXboth_simplePathX_untilXhasXname_peterX_or_loops_isX2XX_hasXname_peterX_path_byXnameX':[(lambda g, v1Id=None:g.V(v1Id).repeat(__.both().simplePath()).until(__.has('name','peter').or_().loops().is_(2)).has('name','peter').path().by('name'))],
+ 'g_VX1X_repeatXboth_simplePathX_untilXhasXname_peterX_and_loops_isX3XX_hasXname_peterX_path_byXnameX':[(lambda g, v1Id=None:g.V(v1Id).repeat(__.both().simplePath()).until(__.has('name','peter').and_().loops().is_(3)).has('name','peter').path().by('name'))],
+ 'g_V_emitXhasXname_markoX_or_loops_isX2XX_repeatXoutX_valuesXnameX':[(lambda g:g.V().emit(__.has('name','marko').or_().loops().is_(2)).repeat(__.out()).name)],
+ 'g_V_elementMap':[(lambda g:g.V().elementMap())],
+ 'g_V_elementMapXname_ageX':[(lambda g:g.V().elementMap('name','age'))],
+ 'g_EX11X_elementMap':[(lambda g, e11Id=None:g.E(e11Id).elementMap())],
+ 'g_V_asXaX_flatMapXselectXaXX':[(lambda g:g.V().as_('a').flatMap(__.select('a')))],
+ 'g_V_peerPressure_hasXclusterX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().peerPressure().has('gremlin.peerPressureVertexProgram.cluster')), (lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.comp [...]
+ 'g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().peerPressure().with_('~tinkerpop.peerPressure.propertyName [...]
+ 'g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withyXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','ripple').in_('created').peerPressure().with_('~tinkerpop [...]
+ 'g_VX1X_V_valuesXnameX':[(lambda g, v1Id=None:g.V(v1Id).V().name)],
+ 'g_V_outXknowsX_V_name':[(lambda g:g.V().out('knows').V().name)],
+ 'g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name':[(lambda g:g.V().has('artist','name','Garcia').in_('sungBy').as_('song').V().has('artist','name','Willie_Dixon').in_('writtenBy').where(P.eq('song')).name)],
+ 'g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX':[(lambda g, software=None,v1Id=None,v2Id=None,v3Id=None,v4Id=None,v5Id=None,v6Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32) [...]
+ 'g_V_pageRank_hasXpageRankX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().has('gremlin.pageRankVertexProgram.pageRank')), (lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.Graph [...]
+ 'g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().out('created').pageRank().with_('~tinkerpop.pageRank.edges',__.bothE()).with_('~tinkerpop.pageRank.propertyNam [...]
+ 'g_V_pageRank_order_byXpageRank_descX_byXnameX_name':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().order().by('gremlin.pageRankVertexProgram.pageRank',Order.desc).by('name').name)],
+ 'g_V_pageRank_order_byXpageRank_descX_name_limitX2X':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().order().by('gremlin.pageRankVertexProgram.pageRank',Order.desc).name[0:2])],
+ 'g_V_pageRank_withXedges_outEXknowsXX_withXpropertyName_friendRankX_project_byXnameX_byXvaluesXfriendRankX_mathX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().with_('~tinkerpop.pageRank.edges',__.outE('knows')).with_('~tinkerpop.pageRank.propertyName','friendRan [...]
+ 'g_V_hasLabelXpersonX_pageRank_withXpropertyName_kpageRankX_project_byXnameX_byXvaluesXpageRankX_mathX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('person').pageRank().with_('~tinkerpop.pageRank.propertyName','pageRank').project('name','pageRank').by('name').by( [...]
+ 'g_V_pageRank_withXpropertyName_pageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX_by_byXmathX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().with_('~tinkerpop.pageRank.propertyName','pageRank').as_('a').out('knows').values('pageRank').as_('b').select('a','b') [...]
+ 'g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_withXedges_inEXcreatedX_withXtimes_1X_withXpropertyName_priorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('software').has('name','ripple').pageRank(flo [...]
+ 'g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankX_withXedges_inEX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().out('created').group('m').by(T.label).pageRank(float(1.0)).with_('~tinkerpop.pa [...]
+ 'g_V_localXoutE_foldX_unfold':[(lambda g:g.V().local(__.outE().fold()).unfold())],
+ 'g_V_valueMap_unfold_mapXkeyX':[(lambda g, l=None:g.V().valueMap().unfold().map(l))],
+ 'g_VX1X_repeatXboth_simplePathX_untilXhasIdX6XX_path_byXnameX_unfold':[(lambda g, v1Id=None,v6Id=None:g.V(v1Id).repeat(__.both().simplePath()).until(__.hasId(v6Id)).path().by('name').unfold())],
+ 'g_VXlistX1_2_3XX_name':[(lambda g, vx=None:g.V(vx).name)],
+ 'g_VXlistXv1_v2_v3XX_name':[(lambda g, vx=None:g.V(vx).name)],
+ 'g_V':[(lambda g:g.V())],
+ 'g_VXv1X_out':[(lambda g, v1=None:g.V(v1).out())],
+ 'g_VX1X_out':[(lambda g, v1Id=None:g.V(v1Id).out())],
+ 'g_VX2X_in':[(lambda g, v2Id=None:g.V(v2Id).in_())],
+ 'g_VX4X_both':[(lambda g, v4Id=None:g.V(v4Id).both())],
+ 'g_E':[(lambda g:g.E())],
+ 'g_EX11X':[(lambda g, e11Id=None:g.E(e11Id))],
+ 'g_EX11AsStringX':[(lambda g, e11Id=None:g.E(e11Id))],
+ 'g_EXe11X':[(lambda g, e11=None:g.E(e11))],
+ 'g_EXe7_e11X':[(lambda g, e7=None,e11=None:g.E(e7,e11))],
+ 'g_EXlistXe7_e11XX':[(lambda g, l=None:g.E(l))],
+ 'g_VX1X_outE':[(lambda g, v1Id=None:g.V(v1Id).outE())],
+ 'g_VX2X_outE':[(lambda g, v2Id=None:g.V(v2Id).inE())],
+ 'g_VX4X_bothEXcreatedX':[(lambda g, v4Id=None:g.V(v4Id).bothE('created'))],
+ 'g_VX4X_bothE':[(lambda g, v4Id=None:g.V(v4Id).bothE())],
+ 'g_VX1X_outE_inV':[(lambda g, v1Id=None:g.V(v1Id).both())],
+ 'g_VX2X_inE_outV':[(lambda g, v2Id=None:g.V(v2Id).inE().outV())],
+ 'g_V_outE_hasXweight_1X_outV':[(lambda g:g.V().outE().has('weight',float(1.0)).outV())],
+ 'g_V_out_outE_inV_inE_inV_both_name':[(lambda g:g.V().out().outE().inV().inE().inV().both().name)],
+ 'g_VX1X_outEXknowsX_bothV_name':[(lambda g, v1Id=None:g.V(v1Id).outE('knows').bothV().name)],
+ 'g_VX1X_outE_otherV':[(lambda g, v1Id=None:g.V(v1Id).outE().otherV())],
+ 'g_VX4X_bothE_otherV':[(lambda g, v4Id=None:g.V(v4Id).bothE().otherV())],
+ 'g_VX4X_bothE_hasXweight_lt_1X_otherV':[(lambda g, v4Id=None:g.V(v4Id).bothE().has('weight',P.lt(float(1.0))).otherV())],
+ 'g_VX2X_inE':[(lambda g, v2Id=None:g.V(v2Id).bothE())],
+ 'get_g_VX1X_outE_otherV':[(lambda g, v1Id=None:g.V(v1Id).outE().otherV())],
+ 'g_VX1X_outXknowsX':[(lambda g, v1Id=None:g.V(v1Id).out('knows'))],
+ 'g_VX1AsStringX_outXknowsX':[(lambda g, v1Id=None:g.V(v1Id).out('knows'))],
+ 'g_VX1X_outXknows_createdX':[(lambda g, v1Id=None:g.V(v1Id).out('knows','created'))],
+ 'g_VX1X_outEXknowsX_inV':[(lambda g, v1Id=None:g.V(v1Id).outE('knows').inV())],
+ 'g_VX1X_outEXknows_createdX_inV':[(lambda g, v1Id=None:g.V(v1Id).outE('knows','created').inV())],
+ 'g_V_out_out':[(lambda g:g.V().out().out())],
+ 'g_VX1X_out_out_out':[(lambda g, v1Id=None:g.V(v1Id).out().out().out())],
+ 'g_VX1X_out_name':[(lambda g, v1Id=None:g.V(v1Id).out().name)],
+ 'g_VX1X_to_XOUT_knowsX':[(lambda g, v1Id=None:g.V(v1Id).to(Direction.OUT,'knows'))],
+ 'g_VX1_2_3_4X_name':[(lambda g, v1Id=None,v2Id=None,v3Id=None,v4Id=None:g.V(v1Id,v2Id,v3Id,v4Id).name)],
+ 'g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name':[(lambda g:g.V().hasLabel('person').V().hasLabel('software').name)],
+ 'g_V_hasLabelXloopsX_bothEXselfX':[(lambda g:g.V().hasLabel('loops').bothE('self'))],
+ 'g_V_hasLabelXloopsX_bothXselfX':[(lambda g:g.V().hasLabel('loops').both('self'))],
+ 'g_V_shortestPath':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath())],
+ 'g_V_both_dedup_shortestPath':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().both().dedup().shortestPath())],
+ 'g_V_shortestPath_edgesIncluded':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.includeEdges'))],
+ 'g_V_shortestPath_directionXINX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.edges',Direction.IN))],
+ 'g_V_shortestPath_edgesXoutEX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.edges',__.outE()))],
+ 'g_V_shortestPath_edgesIncluded_edgesXoutEX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.includeEdges').with_('~tinkerpop.shortestPath.edges',__.outE()))],
+ 'g_V_hasXname_markoX_shortestPath':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath())],
+ 'g_V_shortestPath_targetXhasXname_markoXX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','marko')))],
+ 'g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.target',__.name.is_('marko')))],
+ 'g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.target',__.hasLabel('software')))],
+ 'g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','josh')).with_('~tinkerpop.shortestPath.distance','weight'))],
+ 'g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','daniel').shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','stephen')).with_('~tinkerpop.shortestPath.edges',__.bothE [...]
+ 'g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('song','name','MIGHT AS WELL').shortestPath().with_('~tinkerpop.shortestPath.target',_ [...]
+ 'g_V_hasXname_markoX_shortestPath_maxDistanceX1X':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.maxDistance',1))],
+ 'g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X':[(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','vadas').shortestPath().with_('~tinkerpop.shortestPath.distance','weight').with_('~tinkerpop.shortestPath.maxDistance',float(1.3)))],
+ 'g_V_fold':[(lambda g:g.V().fold())],
+ 'g_V_fold_unfold':[(lambda g:g.V().fold().unfold())],
+ 'g_V_age_foldX0_plusX':[(lambda g:g.V().age.fold(0,Operator.sum))],
+ 'g_V_valueMap':[(lambda g:g.V().valueMap())],
+ 'g_V_valueMapXtrueX':[(lambda g:g.V().valueMap(True))],
+ 'g_V_valueMap_withXtokensX':[(lambda g:g.V().valueMap().with_('~tinkerpop.valueMap.tokens'))],
+ 'g_V_valueMapXname_ageX':[(lambda g:g.V().valueMap('name','age'))],
+ 'g_V_valueMapXtrue_name_ageX':[(lambda g:g.V().valueMap(True,'name','age'))],
+ 'g_V_valueMapXname_ageX_withXtokensX':[(lambda g:g.V().valueMap('name','age').with_('~tinkerpop.valueMap.tokens'))],
+ 'g_V_valueMapXname_ageX_withXtokens_labelsX_byXunfoldX':[(lambda g:g.V().valueMap('name','age').with_('~tinkerpop.valueMap.tokens',2).by(__.unfold()))],
+ 'g_V_valueMapXname_ageX_withXtokens_idsX_byXunfoldX':[(lambda g:g.V().valueMap('name','age').with_('~tinkerpop.valueMap.tokens',1).by(__.unfold()))],
+ 'g_VX1X_outXcreatedX_valueMap':[(lambda g, v1Id=None:g.V(v1Id).out('created').valueMap())],
+ 'g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMapXtrueX':[(lambda g:g.V().hasLabel('person').filter(__.outE('created')).valueMap(True))],
+ 'g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMap_withXtokensX':[(lambda g:g.V().hasLabel('person').filter(__.outE('created')).valueMap().with_('~tinkerpop.valueMap.tokens'))],
+ 'g_VX1X_valueMapXname_locationX_byXunfoldX_by':[(lambda g, v1Id=None:g.V(v1Id).valueMap('name','location').by(__.unfold()).by())],
+ 'g_V_hasLabelXsoftwareX_index_unfold':[(lambda g:g.V().hasLabel('software').index().unfold())],
+ 'g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX':[(lambda g:g.V().hasLabel('software').order().by('name').index().with_('~tinkerpop.index.indexer',1))],
+ 'g_V_hasLabelXsoftwareX_name_fold_orderXlocalX_index_unfold_order_byXtailXlocal_1XX':[(lambda g:g.V().hasLabel('software').name.fold().order(Scope.local).index().unfold().order().by(__.tail(Scope.local,1)))],
+ 'g_V_hasLabelXpersonX_name_fold_orderXlocalX_index_withXmapX':[(lambda g:g.V().hasLabel('person').name.fold().order(Scope.local).index().with_('~tinkerpop.index.indexer',1))],
+ 'g_V_outE_mathX0_minus_itX_byXweightX':[(lambda g:g.V().outE().math('0-_').by('weight'))],
+ 'g_V_hasXageX_valueMap_mathXit_plus_itXbyXselectXageX_unfoldXX':[(lambda g:g.V().has('age').valueMap().math('_+_').by(__.select('age').unfold()))],
+ 'g_V_asXaX_outXknowsX_asXbX_mathXa_plus_bX_byXageX':[(lambda g:g.V().as_('a').out('knows').as_('b').math('a + b').by('age'))],
+ 'g_withSideEffectXx_100X_V_age_mathX__plus_xX':[(lambda g, x=None:g.withSideEffect('x',x).V().age.math('_ + x'))],
+ 'g_V_asXaX_outXcreatedX_asXbX_mathXb_plus_aX_byXinXcreatedX_countX_byXageX':[(lambda g:g.V().as_('a').out('created').as_('b').math('b + a').by(__.in_('created').count()).by('age'))],
+ 'g_withSackX1X_injectX1X_repeatXsackXsumX_byXconstantX1XXX_timesX5X_emit_mathXsin__X_byXsackX':[(lambda g:g.withSack(1).inject(1).repeat(__.sack(Operator.sum).by(__.constant(1))).times(5).emit().math('sin _').by(__.sack()))],
+ 'g_V_projectXa_b_cX_byXbothE_weight_sumX_byXbothE_countX_byXnameX_order_byXmathXa_div_bX_descX_selectXcX':[(lambda g:g.V().project('a','b','c').by(__.bothE().weight.sum()).by(__.bothE().count()).by('name').order().by(__.math('a / b'),Order.desc).select('c'))],
+ 'g_V_constantX123X':[(lambda g:g.V().constant(123))],
+ 'g_V_constantXnullX':[(lambda g:g.V().constant(None))],
+ 'g_V_chooseXhasLabelXpersonX_valuesXnameX_constantXinhumanXX':[(lambda g:g.V().choose(__.hasLabel('person'),__.name,__.constant('inhuman')))],
+ 'g_V_hasLabelXpersonX_projectXa_bX_byXoutE_countX_byXageX':[(lambda g:g.V().hasLabel('person').project('a','b').by(__.outE().count()).by('age'))],
+ 'g_V_outXcreatedX_projectXa_bX_byXnameX_byXinXcreatedX_countX_order_byXselectXbX__descX_selectXaX':[(lambda g:g.V().out('created').project('a','b').by('name').by(__.in_('created').count()).order().by(__.select('b'),Order.desc).select('a'))],
+ 'g_V_valueMap_projectXxX_byXselectXnameXX':[(lambda g:g.V().valueMap().project('x').by(__.select('name')))],
+ 'g_V_age_min':[(lambda g:g.V().age.min())],
+ 'g_V_foo_min':[(lambda g:g.V().foo.min())],
+ 'g_V_name_min':[(lambda g:g.V().name.min())],
+ 'g_V_age_fold_minXlocalX':[(lambda g:g.V().age.fold().min(Scope.local))],
+ 'g_V_foo_fold_minXlocalX':[(lambda g:g.V().foo.fold().min(Scope.local))],
+ 'g_V_name_fold_minXlocalX':[(lambda g:g.V().name.fold().min(Scope.local))],
+ 'g_V_repeatXbothX_timesX5X_age_min':[(lambda g:g.V().repeat(__.both()).times(5).age.min())],
+ 'g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_minX':[(lambda g:g.V().hasLabel('software').group().by('name').by(__.bothE().weight.min()))],
+ 'g_V_foo_injectX9999999999X_min':[(lambda g, injectVal=None:g.V().foo.inject(injectVal).min())],
+ 'g_VX1X_out_injectXv2X_name':[(lambda g, v1Id=None,v2=None:g.V(v1Id).out().inject(v2).name)],
+ 'g_VX1X_out_name_injectXdanielX_asXaX_mapXlengthX_path':[(lambda g, v1Id=None,c=None:g.V(v1Id).out().name.inject('daniel').as_('a').map(c).path())],
+ 'g_VX1X_injectXg_VX4XX_out_name':[(lambda g, v1Id=None,v4=None:g.V(v1Id).inject(v4).out().name)],
+ 'g_injectXnull_1_3_nullX':[(lambda g:g.inject(None,1,3,None))],
+ 'g_injectX10_20_null_20_10_10X_groupCountXxX_dedup_asXyX_projectXa_bX_by_byXselectXxX_selectXselectXyXXX':[(lambda g:g.inject(10,20,None,20,10,10).groupCount('x').dedup().as_('y').project('a','b').by().by(__.select('x').select(__.select('y'))))],
+ 'g_injectXname_marko_age_nullX_selectXname_ageX':[(lambda g, m=None:g.inject(m).select('name','age'))],
+ 'g_io_readXkryoX':[(lambda g:g.io('data/tinkerpop-modern.kryo').read()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_io_read_withXreader_gryoX':[(lambda g:g.io('data/tinkerpop-modern.kryo').with_('~tinkerpop.io.reader','gryo').read()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_io_readXgraphsonX':[(lambda g:g.io('data/tinkerpop-modern.json').read()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_io_read_withXreader_graphsonX':[(lambda g:g.io('data/tinkerpop-modern.json').with_('~tinkerpop.io.reader','graphson').read()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_io_readXgraphmlX':[(lambda g:g.io('data/tinkerpop-modern.xml').read()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_io_read_withXreader_graphmlX':[(lambda g:g.io('data/tinkerpop-modern.xml').with_('~tinkerpop.io.reader','graphml').read()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_V_storeXa_nameX_out_capXaX':[(lambda g:g.V().store('a').by('name').out().cap('a'))],
+ 'g_VX1X_storeXaX_byXnameX_out_storeXaX_byXnameX_name_capXaX':[(lambda g, v1Id=None:g.V(v1Id).store('a').by('name').out().store('a').by('name').name.cap('a'))],
+ 'g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX':[(lambda g, initial=None:g.withSideEffect('a',initial).V().both().name.store('a').cap('a'))],
+ 'g_V_storeXaX_byXoutEXcreatedX_countX_out_out_storeXaX_byXinEXcreatedX_weight_sumX':[(lambda g:g.V().store('a').by(__.outE('created').count()).out().out().store('a').by(__.inE('created').weight.sum()).cap('a'))],
+ 'g_V_group_byXnameX':[(lambda g:g.V().group().by('name'))],
+ 'g_V_group_byXageX':[(lambda g:g.V().group().by('age'))],
+ 'g_V_group_byXnameX_by':[(lambda g:g.V().group().by('name').by())],
+ 'g_V_groupXaX_byXnameX_capXaX':[(lambda g:g.V().group('a').by('name').cap('a'))],
+ 'g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX':[(lambda g:g.V().has('lang').group('a').by('lang').by('name').out().cap('a'))],
+ 'g_V_hasXlangX_group_byXlangX_byXcountX':[(lambda g:g.V().has('lang').group().by('lang').by(__.count()))],
+ 'g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX':[(lambda g:g.V().repeat(__.out().group('a').by('name').by(__.count())).times(2).cap('a'))],
+ 'g_V_group_byXoutE_countX_byXnameX':[(lambda g:g.V().group().by(__.outE().count()).by('name'))],
+ 'g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX':[(lambda g:g.V().group('a').by(T.label).by(__.outE().weight.sum()).cap('a'))],
+ 'g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX':[(lambda g:g.V().repeat(__.both('followedBy')).times(2).group().by('songType').by(__.count()))],
+ 'g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX':[(lambda g:g.V().repeat(__.both('followedBy')).times(2).group('a').by('songType').by(__.count()).cap('a'))],
+ 'g_V_group_byXname_substring_1X_byXconstantX1XX':[(lambda g, l1=None:g.V().group().by(l1).by(__.constant(1)))],
+ 'g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX':[(lambda g, l1=None:g.V().group('a').by(l1).by(__.constant(1)).cap('a'))],
+ 'g_V_out_group_byXlabelX_selectXpersonX_unfold_outXcreatedX_name_limitX2X':[(lambda g:g.V().out().group().by(T.label).select('person').unfold().out('created').name[0:2])],
+ 'g_V_hasLabelXsongX_group_byXnameX_byXproperties_groupCount_byXlabelXX':[(lambda g:g.V().hasLabel('song').group().by('name').by(__.properties().groupCount().by(T.label)))],
+ 'g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX':[(lambda g:g.V().hasLabel('song').group('a').by('name').by(__.properties().groupCount().by(T.label)).out().cap('a'))],
+ 'g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX':[(lambda g:g.V().out('followedBy').group().by('songType').by(__.bothE().group().by(T.label).by(__.weight.sum())))],
+ 'g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX':[(lambda g:g.V().group('m').by('name').by(__.in_('knows').name).cap('m'))],
+ 'g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX':[(lambda g:g.V().group().by(T.label).by(__.bothE().group('a').by(T.label).by(__.weight.sum()).weight.sum()))],
+ 'g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX':[(lambda g, m=None:g.withSideEffect('a',m).V().group('a').by('name').by(__.outE().label().fold()).cap('a'))],
+ 'g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX':[(lambda g:g.V().hasLabel('person').as_('p').out('created').group().by('name').by(__.select('p').age.sum()))],
+ 'g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX':[(lambda g:g.V().hasLabel('person').as_('p').out('created').group('a').by('name').by(__.select('p').age.sum()).cap('a'))],
+ 'g_V_group_byXlabelX_byXlabel_countX':[(lambda g:g.V().group().by(__.label()).by(__.label().count()))],
+ 'g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX':[(lambda g:g.V().group('m').by(__.label()).by(__.label().count()).cap('m'))],
+ 'g_V_outXcreatedX_groupCount_byXnameX':[(lambda g:g.V().out('created').groupCount().by('name'))],
+ 'g_V_outXcreatedX_name_groupCount':[(lambda g:g.V().out('created').name.groupCount())],
+ 'g_V_outXcreatedX_groupCountXaX_byXnameX_capXaX':[(lambda g:g.V().out('created').groupCount('a').by('name').cap('a'))],
+ 'g_V_outXcreatedX_name_groupCountXaX_capXaX':[(lambda g:g.V().out('created').name.groupCount('a').cap('a'))],
+ 'g_V_repeatXout_groupCountXaX_byXnameXX_timesX2X_capXaX':[(lambda g:g.V().repeat(__.out().groupCount('a').by('name')).times(2).cap('a'))],
+ 'g_V_both_groupCountXaX_byXlabelX_asXbX_barrier_whereXselectXaX_selectXsoftwareX_isXgtX2XXX_selectXbX_name':[(lambda g:g.V().both().groupCount('a').by(T.label).as_('b').barrier().where(__.select('a').select('software').is_(P.gt(2))).select('b').name)],
+ 'g_V_unionXoutXknowsX__outXcreatedX_inXcreatedXX_groupCount_selectXvaluesX_unfold_sum':[(lambda g:g.V().union(__.out('knows'),__.out('created').in_('created')).groupCount().select(Column.values).unfold().sum())],
+ 'g_V_hasXnoX_groupCount':[(lambda g:g.V().has('no').groupCount())],
+ 'g_V_hasXnoX_groupCountXaX_capXaX':[(lambda g:g.V().has('no').groupCount('a').cap('a'))],
+ 'g_V_unionXrepeatXoutX_timesX2X_groupCountXmX_byXlangXX__repeatXinX_timesX2X_groupCountXmX_byXnameXX_capXmX':[(lambda g:g.V().union(__.repeat(__.out()).times(2).groupCount('m').by('lang'),__.repeat(__.in_()).times(2).groupCount('m').by('name')).cap('m'))],
+ 'g_V_outXcreatedX_groupCountXxX_capXxX':[(lambda g:g.V().out('created').groupCount('x').cap('x'))],
+ 'g_V_groupCount_byXbothE_countX':[(lambda g:g.V().groupCount().by(__.bothE().count()))],
+ 'g_V_both_groupCountXaX_out_capXaX_selectXkeysX_unfold_both_groupCountXaX_capXaX':[(lambda g:g.V().both().groupCount('a').out().cap('a').select(Column.keys).unfold().both().groupCount('a').cap('a'))],
+ 'g_V_valueXnameX_aggregateXxX_capXxX':[(lambda g:g.V().name.aggregate('x').cap('x'))],
+ 'g_V_valueXnameX_aggregateXglobal_xX_capXxX':[(lambda g:g.V().name.aggregate(Scope.global_,'x').cap('x'))],
+ 'g_V_aggregateXxX_byXnameX_capXxX':[(lambda g:g.V().aggregate('x').by('name').cap('x'))],
+ 'g_V_out_aggregateXaX_path':[(lambda g:g.V().out().aggregate('a').path())],
+ 'g_V_hasLabelXpersonX_aggregateXxX_byXageX_capXxX_asXyX_selectXyX':[(lambda g:g.V().hasLabel('person').aggregate('x').by('age').cap('x').as_('y').select('y'))],
+ 'g_V_aggregateXlocal_a_nameX_out_capXaX':[(lambda g:g.V().aggregate(Scope.local,'a').by('name').out().cap('a'))],
+ 'g_VX1X_aggregateXlocal_aX_byXnameX_out_aggregateXlocal_aX_byXnameX_name_capXaX':[(lambda g, v1Id=None:g.V(v1Id).aggregate(Scope.local,'a').by('name').out().aggregate(Scope.local,'a').by('name').name.cap('a'))],
+ 'g_withSideEffectXa_setX_V_both_name_aggregateXlocal_aX_capXaX':[(lambda g, initial=None:g.withSideEffect('a',initial).V().both().name.aggregate(Scope.local,'a').cap('a'))],
+ 'g_V_aggregateXlocal_aX_byXoutEXcreatedX_countX_out_out_aggregateXlocal_aX_byXinEXcreatedX_weight_sumX':[(lambda g:g.V().aggregate(Scope.local,'a').by(__.outE('created').count()).out().out().aggregate(Scope.local,'a').by(__.inE('created').weight.sum()).cap('a'))],
+ 'g_withSackXhelloX_V_outE_sackXassignX_byXlabelX_inV_sack':[(lambda g:g.withSack('hello').V().outE().sack(Operator.assign).by(T.label).inV().sack())],
+ 'g_withSackX0X_V_outE_sackXsumX_byXweightX_inV_sack_sum':[(lambda g:g.withSack(float(0.0)).V().outE().sack(Operator.sum).by('weight').inV().sack().sum())],
+ 'g_withSackX0X_V_repeatXoutE_sackXsumX_byXweightX_inVX_timesX2X_sack':[(lambda g:g.withSack(float(0.0)).V().repeat(__.outE().sack(Operator.sum).by('weight').inV()).times(2).sack())],
+ 'g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack':[(lambda g, v1Id=None:g.withBulk(False).withSack(float(1.0),Operator.sum).V(v1Id).local(__.outE('knows').barrier(Barrier.normSack).inV()).in_('knows').barrier().sack())],
+ 'g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack':[(lambda g:g.withBulk(False).withSack(1,Operator.sum).V().out().barrier().sack())],
+ 'g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack':[(lambda g, v1Id=None:g.withSack(float(1.0),Operator.sum).V(v1Id).local(__.out('knows').barrier(Barrier.normSack)).in_('knows').barrier().sack())],
+ 'g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX':[(lambda g:g.V().has('age').groupCount('a').by('name').out().cap('a'))],
+ 'g_V_unionXout__inX_name':[(lambda g:g.V().union(__.out(),__.in_()).name)],
+ 'g_VX1X_unionXrepeatXoutX_timesX2X__outX_name':[(lambda g, v1Id=None:g.V(v1Id).union(__.repeat(__.out()).times(2),__.out()).name)],
+ 'g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX':[(lambda g:g.V().choose(__.label().is_('person'),__.union(__.out().lang,__.out().name),__.in_().label()))],
+ 'g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount':[(lambda g:g.V().choose(__.label().is_('person'),__.union(__.out().lang,__.out().name),__.in_().label()).groupCount())],
+ 'g_V_unionXrepeatXunionXoutXcreatedX__inXcreatedXX_timesX2X__repeatXunionXinXcreatedX__outXcreatedXX_timesX2XX_label_groupCount':[(lambda g:g.V().union(__.repeat(__.union(__.out('created'),__.in_('created'))).times(2),__.repeat(__.union(__.in_('created'),__.out('created'))).times(2)).label().groupCount())],
+ 'g_VX1_2X_unionXoutE_count__inE_count__outE_weight_sumX':[(lambda g, v1Id=None,v2Id=None:g.V(v1Id,v2Id).union(__.outE().count(),__.inE().count(),__.outE().weight.sum()))],
+ 'g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX':[(lambda g, v1Id=None,v2Id=None:g.V(v1Id,v2Id).local(__.union(__.outE().count(),__.inE().count(),__.outE().weight.sum())))],
+ 'g_VX1_2X_localXunionXcountXX':[(lambda g, v1Id=None,v2Id=None:g.V(v1Id,v2Id).local(__.union(__.count())))],
+ 'g_V_chooseXout_countX_optionX2L_nameX_optionX3L_ageX':[(lambda g, two=None,three=None:g.V().choose(__.out().count()).option(two,__.name).option(three,__.age))],
+ 'g_V_chooseXlabel_eqXpersonX__outXknowsX__inXcreatedXX_name':[(lambda g, l1=None:g.V().choose(l1,__.out('knows'),__.in_('created')).name)],
+ 'g_V_chooseXhasLabelXpersonX_and_outXcreatedX__outXknowsX__identityX_name':[(lambda g:g.V().choose(__.hasLabel('person').and_().out('created'),__.out('knows'),__.identity()).name)],
+ 'g_V_chooseXlabelX_optionXblah__outXknowsXX_optionXbleep__outXcreatedXX_optionXnone__identityX_name':[(lambda g:g.V().choose(__.label()).option('blah',__.out('knows')).option('bleep',__.out('created')).option(Pick.none,__.identity()).name)],
+ 'g_V_chooseXoutXknowsX_count_isXgtX0XX__outXknowsXX_name':[(lambda g:g.V().choose(__.out('knows').count().is_(P.gt(0)),__.out('knows')).name)],
+ 'g_V_hasLabelXpersonX_asXp1X_chooseXoutEXknowsX__outXknowsXX_asXp2X_selectXp1_p2X_byXnameX':[(lambda g:g.V().hasLabel('person').as_('p1').choose(__.outE('knows'),__.out('knows')).as_('p2').select('p1','p2').by('name'))],
+ 'g_V_hasLabelXpersonX_chooseXageX__optionX27L__constantXyoungXX_optionXnone__constantXoldXX_groupCount':[(lambda g, d27=None:g.V().hasLabel('person').choose(__.age).option(d27,__.constant('young')).option(Pick.none,__.constant('old')).groupCount())],
+ 'g_injectX1X_chooseXisX1X__constantX10Xfold__foldX':[(lambda g, d10=None,d1=None:g.inject(d1).choose(__.is_(d1),__.constant(d10).fold(),__.fold()))],
+ 'g_injectX2X_chooseXisX1X__constantX10Xfold__foldX':[(lambda g, d10=None,d1=None,d2=None:g.inject(d2).choose(__.is_(d1),__.constant(d10).fold(),__.fold()))],
+ 'g_V_localXpropertiesXlocationX_order_byXvalueX_limitX2XX_value':[(lambda g:g.V().local(__.properties('location').order().by(T.value,Order.asc)[0:2]).value())],
+ 'g_V_hasXlabel_personX_asXaX_localXoutXcreatedX_asXbXX_selectXa_bX_byXnameX_byXidX':[(lambda g:g.V().has(T.label,'person').as_('a').local(__.out('created').as_('b')).select('a','b').by('name').by(T.id))],
+ 'g_V_localXoutE_countX':[(lambda g:g.V().local(__.outE().count()))],
+ 'g_VX1X_localXoutEXknowsX_limitX1XX_inV_name':[(lambda g, v1Id=None:g.V(v1Id).local(__.outE('knows')[0:1]).inV().name)],
+ 'g_V_localXbothEXcreatedX_limitX1XX_otherV_name':[(lambda g:g.V().local(__.bothE('created')[0:1]).otherV().name)],
+ 'g_VX4X_localXbothEX1_createdX_limitX1XX':[(lambda g, v4Id=None:g.V(v4Id).local(__.bothE('created')[0:1]))],
+ 'g_VX4X_localXbothEXknows_createdX_limitX1XX':[(lambda g, v4Id=None:g.V(v4Id).local(__.bothE('knows','created')[0:1]))],
+ 'g_VX4X_localXbothE_limitX1XX_otherV_name':[(lambda g, v4Id=None:g.V(v4Id).local(__.bothE()[0:1]).otherV().name)],
+ 'g_VX4X_localXbothE_limitX2XX_otherV_name':[(lambda g, v4Id=None:g.V(v4Id).local(__.bothE()[0:2]).otherV().name)],
+ 'g_V_localXinEXknowsX_limitX2XX_outV_name':[(lambda g:g.V().local(__.inE('knows')[0:2]).outV().name)],
+ 'g_V_localXmatchXproject__created_person__person_name_nameX_selectXname_projectX_by_byXnameX':[(lambda g:g.V().local(__.match(__.as_('project').in_('created').as_('person'),__.as_('person').name.as_('name'))).select('name','project').by().by('name'))],
+ 'g_VX2X_optionalXoutXknowsXX':[(lambda g, v2Id=None:g.V(v2Id).optional(__.out('knows')))],
+ 'g_VX2X_optionalXinXknowsXX':[(lambda g, v2Id=None:g.V(v2Id).optional(__.in_('knows')))],
+ 'g_V_hasLabelXpersonX_optionalXoutXknowsX_optionalXoutXcreatedXXX_path':[(lambda g:g.V().hasLabel('person').optional(__.out('knows').optional(__.out('created'))).path())],
+ 'g_V_optionalXout_optionalXoutXX_path':[(lambda g:g.V().optional(__.out().optional(__.out())).path())],
+ 'g_VX1X_optionalXaddVXdogXX_label':[(lambda g, v1Id=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('la [...]
+ 'g_V_repeatXoutX_timesX2X_emit_path':[(lambda g:g.V().repeat(__.out()).times(2).emit().path())],
+ 'g_V_repeatXoutX_timesX2X_repeatXinX_timesX2X_name':[(lambda g:g.V().repeat(__.out()).times(2).repeat(__.in_()).times(2).name)],
+ 'g_V_repeatXoutX_timesX2X':[(lambda g:g.V().repeat(__.out()).times(2))],
+ 'g_V_repeatXoutX_timesX2X_emit':[(lambda g:g.V().repeat(__.out()).times(2).emit())],
+ 'g_VX1X_timesX2X_repeatXoutX_name':[(lambda g, v1Id=None:g.V(v1Id).times(2).repeat(__.out()).name)],
+ 'g_V_emit_timesX2X_repeatXoutX_path':[(lambda g:g.V().emit().times(2).repeat(__.out()).path())],
+ 'g_V_emit_repeatXoutX_timesX2X_path':[(lambda g:g.V().emit().repeat(__.out()).times(2).path())],
+ 'g_VX1X_emitXhasXlabel_personXX_repeatXoutX_name':[(lambda g, v1Id=None:g.V(v1Id).emit(__.has(T.label,'person')).repeat(__.out()).name)],
+ 'g_V_repeatXgroupCountXmX_byXnameX_outX_timesX2X_capXmX':[(lambda g:g.V().repeat(__.groupCount('m').by('name').out()).times(2).cap('m'))],
+ 'g_VX1X_repeatXgroupCountXmX_byXloopsX_outX_timesX3X_capXmX':[(lambda g, v1Id=None:g.V(v1Id).repeat(__.groupCount('m').by(__.loops()).out()).times(3).cap('m'))],
+ 'g_V_repeatXbothX_timesX10X_asXaX_out_asXbX_selectXa_bX':[(lambda g:g.V().repeat(__.both()).times(10).as_('a').out().as_('b').select('a','b').count())],
+ 'g_VX1X_repeatXoutX_untilXoutE_count_isX0XX_name':[(lambda g, v1Id=None:g.V(v1Id).repeat(__.out()).until(__.outE().count().is_(0)).name)],
+ 'g_V_repeatXbothX_untilXname_eq_marko_or_loops_gt_1X_groupCount_byXnameX':[(lambda g, l=None:g.V().repeat(__.both()).until(l).groupCount().by('name'))],
+ 'g_V_hasXname_markoX_repeatXoutE_inV_simplePathX_untilXhasXname_rippleXX_path_byXnameX_byXlabelX':[(lambda g:g.V().has('name','marko').repeat(__.outE().inV().simplePath()).until(__.has('name','ripple')).path().by('name').by(T.label))],
+ 'g_V_hasXloop_name_loopX_repeatXinX_timesX5X_path_by_name':[(lambda g:g.V().has('loops','name','loop').repeat(__.in_()).times(5).path().by('name'))],
+ 'g_V_repeatXout_repeatXoutX_timesX1XX_timesX1X_limitX1X_path_by_name':[(lambda g:g.V().repeat(__.out().repeat(__.out()).times(1)).times(1)[0:1].path().by('name'))],
+ 'g_V_repeatXoutXknowsXX_untilXrepeatXoutXcreatedXX_emitXhasXname_lopXXX_path_byXnameX':[(lambda g:g.V().repeat(__.out('knows')).until(__.repeat(__.out('created')).emit(__.has('name','lop'))).path().by('name'))],
+ 'g_V_repeatXrepeatXout_createdXX_untilXhasXname_rippleXXXemit_lang':[(lambda g:g.V().repeat(__.repeat(__.out('created')).until(__.has('name','ripple'))).emit().lang)],
+ 'g_V_untilXconstantXtrueXX_repeatXrepeatXout_createdXX_untilXhasXname_rippleXXXemit_lang':[(lambda g:g.V().until(__.constant(True)).repeat(__.repeat(__.out('created')).until(__.has('name','ripple'))).emit().lang)],
+ 'g_V_emit_repeatXa_outXknows_filterXloops_isX0XX_lang':[(lambda g:g.V().emit().repeat('a',__.out('knows').filter(__.loops('a').is_(0))).lang)],
+ 'g_VX3X_repeatXbothX_createdXX_untilXloops_is_40XXemit_repeatXin_knowsXX_emit_loopsXisX1Xdedup_values':[(lambda g, v3Id=None:g.V(v3Id).repeat(__.both('created')).until(__.loops().is_(40)).emit(__.repeat(__.in_('knows')).emit(__.loops().is_(1))).dedup().name)],
+ 'g_VX1X_repeatXrepeatXunionXout_uses_out_traversesXX_whereXloops_isX0X_timesX1X_timeX2X_name':[(lambda g, v1Id=None:g.V(v1Id).repeat(__.repeat(__.union(__.out('uses'),__.out('traverses')).where(__.loops().is_(0))).times(1)).times(2).name)],
+ 'g_V_repeatXa_outXknows_repeatXb_outXcreatedX_filterXloops_isX0XX_emit_lang':[(lambda g:g.V().repeat('a',__.out('knows').repeat('b',__.out('created').filter(__.loops('a').is_(0))).emit()).emit().lang)],
+ 'g_VX6X_repeatXa_bothXcreatedX_simplePathX_emitXrepeatXb_bothXknowsXX_untilXloopsXbX_asXb_whereXloopsXaX_asXbX_hasXname_vadasXX_dedup_name':[(lambda g, v6Id=None:g.V(v6Id).repeat('a',__.both('created').simplePath()).emit(__.repeat('b',__.both('knows')).until(__.loops('b').as_('b').where(__.loops('a').as_('b'))).has('name','vadas')).dedup().name)],
+ 'g_V_branchXlabel_eq_person__a_bX_optionXa__ageX_optionXb__langX_optionXb__nameX':[(lambda g, l1=None:g.V().branch(l1).option('a',__.age).option('b',__.lang).option('b',__.name))],
+ 'g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX':[(lambda g, zero=None,one=None:g.V().branch(__.label().is_('person').count()).option(one,__.age).option(zero,__.lang).option(zero,__.name))],
+ 'g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX_optionXany__labelX':[(lambda g, zero=None,one=None:g.V().branch(__.label().is_('person').count()).option(one,__.age).option(zero,__.lang).option(zero,__.name).option(Pick.any,__.label()))],
+ 'g_V_branchXageX_optionXltX30X__youngX_optionXgtX30X__oldX_optionXnone__on_the_edgeX':[(lambda g:g.V().hasLabel('person').branch(__.age).option(P.lt(30),__.constant('young')).option(P.gt(30),__.constant('old')).option(Pick.none,__.constant('on the edge')))],
+ 'g_V_branchXidentityX_optionXhasLabelXsoftwareX__inXcreatedX_name_order_foldX_optionXhasXname_vadasX__ageX_optionXneqX123X__bothE_countX':[(lambda g:g.V().branch(__.identity()).option(__.hasLabel('software'),__.in_('created').name.order().fold()).option(__.has('name','vadas'),__.age).option(P.neq(123),__.bothE().count()))],
+ 'g_V_valuesXnameX_order_tailXglobal_2X':[(lambda g:g.V().name.order().tail(Scope.global_,2))],
+ 'g_V_valuesXnameX_order_tailX2X':[(lambda g:g.V().name.order().tail(2))],
+ 'g_V_valuesXnameX_order_tail':[(lambda g:g.V().name.order().tail())],
+ 'g_V_valuesXnameX_order_tailX7X':[(lambda g:g.V().name.order().tail(7))],
+ 'g_V_repeatXbothX_timesX3X_tailX7X':[(lambda g:g.V().repeat(__.both()).times(3).tail(7))],
+ 'g_V_repeatXin_outX_timesX3X_tailX7X_count':[(lambda g:g.V().repeat(__.in_().out()).times(3).tail(7).count())],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocal_1X':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select('a').by(__.unfold().name.fold()).tail(Scope.local,1))],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocalX':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select('a').by(__.unfold().name.fold()).tail(Scope.local))],
+ 'g_V_asXaX_out_asXbX_out_asXcX_selectXa_b_cX_byXnameX_tailXlocal_2X':[(lambda g:g.V().as_('a').out().as_('b').out().as_('c').select('a','b','c').by('name').tail(Scope.local,2))],
+ 'g_V_asXaX_out_asXbX_out_asXcX_selectXa_b_cX_byXnameX_tailXlocal_1X':[(lambda g:g.V().as_('a').out().as_('b').out().as_('c').select('a','b','c').by('name').tail(Scope.local,1))],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocal_1X':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).tail(Scope.local,1))],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocalX':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).tail(Scope.local))],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXlimitXlocal_0XX_tailXlocal_1X':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select(Pop.mixed,'a').by(__.limit(Scope.local,0)).tail(Scope.local,1))],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocal_2X':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).tail(Scope.local,2))],
+ 'g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_eqXbXX':[(lambda g:g.V().has('age').as_('a').out().in_().has('age').as_('b').select('a','b').where('a',P.eq('b')))],
+ 'g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_neqXbXX':[(lambda g:g.V().has('age').as_('a').out().in_().has('age').as_('b').select('a','b').where('a',P.neq('b')))],
+ 'g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXb_hasXname_markoXX':[(lambda g:g.V().has('age').as_('a').out().in_().has('age').as_('b').select('a','b').where(__.as_('b').has('name','marko')))],
+ 'g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_outXknowsX_bX':[(lambda g:g.V().has('age').as_('a').out().in_().has('age').as_('b').select('a','b').where(__.as_('a').out('knows').as_('b')))],
+ 'g_V_asXaX_outXcreatedX_whereXasXaX_name_isXjoshXX_inXcreatedX_name':[(lambda g:g.V().as_('a').out('created').where(__.as_('a').name.is_('josh')).in_('created').name)],
+ 'g_withSideEffectXa_josh_peterX_VX1X_outXcreatedX_inXcreatedX_name_whereXwithinXaXX':[(lambda g, v1Id=None,l=None:g.withSideEffect('a',l).V(v1Id).out('created').in_('created').name.where(P.within(['a'])))],
+ 'g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('created').in_('created').as_('b').where('a',P.neq('b')).name)],
+ 'g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXasXbX_outXcreatedX_hasXname_rippleXX_valuesXage_nameX':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('created').in_('created').as_('b').where(__.as_('b').out('created').has('name','ripple')).values('age','name'))],
+ 'g_VX1X_asXaX_outXcreatedX_inXcreatedX_whereXeqXaXX_name':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('created').in_('created').where(P.eq('a')).name)],
+ 'g_VX1X_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_name':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('created').in_('created').where(P.neq('a')).name)],
+ 'g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX':[(lambda g, v1Id=None:g.V(v1Id).out().aggregate('x').out().where(P.without(['x'])))],
+ 'g_withSideEffectXa_g_VX2XX_VX1X_out_whereXneqXaXX':[(lambda g, v1Id=None,v2=None:g.withSideEffect('a',v2).V(v1Id).out().where(P.neq('a')))],
+ 'g_VX1X_repeatXbothEXcreatedX_whereXwithoutXeXX_aggregateXeX_otherVX_emit_path':[(lambda g, v1Id=None:g.V(v1Id).repeat(__.bothE('created').where(P.without(['e'])).aggregate('e').otherV()).emit().path())],
+ 'g_V_whereXnotXoutXcreatedXXX_name':[(lambda g:g.V().where(__.not_(__.out('created'))).name)],
+ 'g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX':[(lambda g:g.V().as_('a').out().as_('b').where(__.and_(__.as_('a').out('knows').as_('b'),__.or_(__.as_('b').out('created').has('name','ripple'),__.as_('b').in_('knows').count().is_(P.neq(0))))).select('a','b'))],
+ 'g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX':[(lambda g:g.V().where(__.out('created').and_().out('knows').or_().in_('knows')).name)],
+ 'g_V_asXaX_outXcreatedX_asXbX_whereXandXasXbX_in__notXasXaX_outXcreatedX_hasXname_rippleXXX_selectXa_bX':[(lambda g:g.V().as_('a').out('created').as_('b').where(__.and_(__.as_('b').in_(),__.not_(__.as_('a').out('created').has('name','ripple')))).select('a','b'))],
+ 'g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX':[(lambda g:g.V().as_('a').out('created').as_('b').in_('created').as_('c').both('knows').both('knows').as_('d').where('c',P.neq('a').and_(P.neq('d'))).select('a','b','c','d'))],
+ 'g_V_asXaX_out_asXbX_whereXin_count_isXeqX3XX_or_whereXoutXcreatedX_and_hasXlabel_personXXX_selectXa_bX':[(lambda g:g.V().as_('a').out().as_('b').where(__.as_('b').in_().count().is_(P.eq(3)).or_().where(__.as_('b').out('created').and_().as_('b').has(T.label,'person'))).select('a','b'))],
+ 'g_V_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_gtXbXX_byXageX_selectXa_bX_byXnameX':[(lambda g:g.V().as_('a').out('created').in_('created').as_('b').where('a',P.gt('b')).by('age').select('a','b').by('name'))],
+ 'g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX':[(lambda g:g.V().as_('a').outE('created').as_('b').inV().as_('c').where('a',P.gt('b').or_(P.eq('b'))).by('age').by('weight').by('weight').select('a','c').by('name'))],
+ 'g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX':[(lambda g:g.V().as_('a').outE('created').as_('b').inV().as_('c').in_('created').as_('d').where('a',P.lt('b').or_(P.gt('c')).and_(P.neq('d'))).by('age').by('weight').by(__.in_('created').age.min()).select('a','c','d').by('name'))],
+ 'g_VX1X_asXaX_out_hasXageX_whereXgtXaXX_byXageX_name':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out().has('age').where(P.gt('a')).by('age').name)],
+ 'g_V_drop':[(lambda g:g.addV().as_('a').addV().as_('b').addE('knows').to('a')), (lambda g:g.V().drop()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_V_outE_drop':[(lambda g:g.addV().as_('a').addV().as_('b').addE('knows').to('a')), (lambda g:g.V().outE().drop()), (lambda g:g.V()), (lambda g:g.E())],
+ 'g_V_properties_drop':[(lambda g:g.addV().property('name','bob').addV().property('name','alice')), (lambda g:g.V().properties().drop()), (lambda g:g.V()), (lambda g:g.V().properties())],
+ 'g_E_propertiesXweightX_drop':[(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang','java').as_( [...]
+ 'g_V_properties_propertiesXstartTimeX_drop':[(lambda g:g.addV().property('name','bob').property(Cardinality.list_,'location','ny','startTime',2014,'endTime',2016).property(Cardinality.list_,'location','va','startTime',2016).addV().property('name','alice').property(Cardinality.list_,'location','va','startTime',2014,'endTime',2016).property(Cardinality.list_,'location','ny','startTime',2016)), (lambda g:g.V().properties().properties('startTime').drop()), (lambda g:g.V().properties().pr [...]
+ 'g_E_sampleX1X':[(lambda g:g.E().sample(1))],
+ 'g_E_sampleX2X_byXweightX':[(lambda g:g.E().sample(2).by('weight'))],
+ 'g_V_localXoutE_sampleX1X_byXweightXX':[(lambda g:g.V().local(__.outE().sample(1).by('weight')))],
+ 'g_V_group_byXlabelX_byXbothE_weight_sampleX2X_foldX':[(lambda g:g.V().group().by(T.label).by(__.bothE().weight.sample(2).fold()))],
+ 'g_V_group_byXlabelX_byXbothE_weight_fold_sampleXlocal_5XX':[(lambda g:g.V().group().by(T.label).by(__.bothE().weight.fold().sample(Scope.local,5)))],
+ 'g_V_filterXfalseX':[(lambda g, l1=None:g.V().filter(l1))],
+ 'g_V_filterXtrueX':[(lambda g, l1=None:g.V().filter(l1))],
+ 'g_V_filterXlang_eq_javaX':[(lambda g, l1=None:g.V().filter(l1))],
+ 'g_VX1X_filterXage_gt_30X':[(lambda g, v1Id=None,l1=None:g.V(v1Id).filter(l1))],
+ 'g_VX2X_filterXage_gt_30X':[(lambda g, v2Id=None,l1=None:g.V(v2Id).filter(l1))],
+ 'g_VX1X_out_filterXage_gt_30X':[(lambda g, v1Id=None,l1=None:g.V(v1Id).out().filter(l1))],
+ 'g_V_filterXname_startsWith_m_OR_name_startsWith_pX':[(lambda g, l1=None:g.V().filter(l1))],
+ 'g_E_filterXfalseX':[(lambda g, l1=None:g.E().filter(l1))],
+ 'g_E_filterXtrueX':[(lambda g, l1=None:g.E().filter(l1))],
+ 'g_V_valuesXageX_isX32X':[(lambda g:g.V().age.is_(32))],
+ 'g_V_valuesXageX_isXlte_30X':[(lambda g:g.V().age.is_(P.lte(30)))],
+ 'g_V_valuesXageX_isXgte_29X_isXlt_34X':[(lambda g:g.V().age.is_(P.gte(29)).is_(P.lt(34)))],
+ 'g_V_whereXinXcreatedX_count_isX1XX_valuesXnameX':[(lambda g:g.V().where(__.in_('created').count().is_(1)).name)],
+ 'g_V_whereXinXcreatedX_count_isXgte_2XX_valuesXnameX':[(lambda g:g.V().where(__.in_('created').count().is_(P.gte(2))).name)],
+ 'g_V_orXhasXage_gt_27X__outE_count_gte_2X_name':[(lambda g:g.V().or_(__.has('age',P.gt(27)),__.outE().count().is_(P.gte(2))).name)],
+ 'g_V_orXoutEXknowsX__hasXlabel_softwareX_or_hasXage_gte_35XX_name':[(lambda g:g.V().or_(__.outE('knows'),__.has(T.label,'software').or_().has('age',P.gte(35))).name)],
+ 'g_V_asXaX_orXselectXaX_selectXaXX':[(lambda g:g.V().as_('a').or_(__.select('a'),__.select('a')))],
+ 'g_VX1X_outXcreatedX_inXcreatedX_simplePath':[(lambda g, v1Id=None:g.V(v1Id).out('created').in_('created').simplePath())],
+ 'g_V_repeatXboth_simplePathX_timesX3X_path':[(lambda g:g.V().repeat(__.both().simplePath()).times(3).path())],
+ 'g_V_asXaX_out_asXbX_out_asXcX_simplePath_byXlabelX_fromXbX_toXcX_path_byXnameX':[(lambda g:g.V().as_('a').out().as_('b').out().as_('c').simplePath().by(T.label).from_('b').to('c').path().by('name'))],
+ 'g_VX1X_outXcreatedX_inXcreatedX_cyclicPath':[(lambda g, v1Id=None:g.V(v1Id).out('created').in_('created').cyclicPath())],
+ 'g_VX1X_outXcreatedX_inXcreatedX_cyclicPath_path':[(lambda g, v1Id=None:g.V(v1Id).out('created').in_('created').cyclicPath().path())],
+ 'g_VX1X_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_cyclicPath_fromXaX_toXbX_path':[(lambda g, v1Id=None:g.V(v1Id).as_('a').out('created').as_('b').in_('created').as_('c').cyclicPath().from_('a').to('b').path())],
+ 'g_V_outXcreatedX_hasXname__mapXlengthX_isXgtX3XXX_name':[(lambda g, l1=None:g.V().out('created').has('name',__.map(l1).is_(P.gt(3))).name)],
+ 'g_VX1X_hasXnameX':[(lambda g, v1Id=None:g.V(v1Id).has('name'))],
+ 'g_VX1X_hasXcircumferenceX':[(lambda g, v1Id=None:g.V(v1Id).has('circumference'))],
+ 'g_VX1X_hasXname_markoX':[(lambda g, v1Id=None:g.V(v1Id).has('name','marko'))],
+ 'g_VX2X_hasXname_markoX':[(lambda g, v1Id=None:g.V(v1Id).has('name','marko'))],
+ 'g_V_hasXname_markoX':[(lambda g:g.V().has('name','marko'))],
+ 'g_V_hasXname_blahX':[(lambda g:g.V().has('name','blah'))],
+ 'g_V_hasXage_gt_30X':[(lambda g:g.V().has('age',P.gt(30)))],
+ 'g_V_hasXage_isXgt_30XX':[(lambda g:g.V().has('age',__.is_(P.gt(30))))],
+ 'g_V_hasXlabel_isXsoftwareXX':[(lambda g:g.V().has(T.label,__.is_('software')))],
+ 'g_VX1X_hasXage_gt_30X':[(lambda g, v1Id=None:g.V(v1Id).has('age',P.gt(30)))],
+ 'g_VX4X_hasXage_gt_30X':[(lambda g, v4Id=None:g.V(v4Id).has('age',P.gt(30)))],
+ 'g_VXv1X_hasXage_gt_30X':[(lambda g, v1=None:g.V(v1).has('age',P.gt(30)))],
+ 'g_VXv4X_hasXage_gt_30X':[(lambda g, v4=None:g.V(v4).has('age',P.gt(30)))],
+ 'g_VX1AsStringX_out_hasXid_2AsStringX':[(lambda g, v1Id=None,v2Id=None:g.V(v1Id).out().hasId(v2Id))],
+ 'g_VX1X_out_hasXid_2X':[(lambda g, v2=None:g.V(v2).has('age',P.gt(30)))],
+ 'g_VX1X_out_hasIdX2X':[(lambda g, v1Id=None,v2Id=None:g.V(v1Id).out().hasId(v2Id))],
+ 'g_VX1X_out_hasXid_2_3X':[(lambda g, v1Id=None,v2Id=None,v3Id=None:g.V(v1Id).out().hasId(v2Id,v3Id))],
+ 'g_VX1X_out_hasXid_2AsString_3AsStringX':[(lambda g, v1Id=None,v2Id=None,v3Id=None:g.V(v1Id).out().hasId(v2Id,v3Id))],
+ 'g_V_hasXblahX':[(lambda g:g.V().has('blah'))],
+ 'g_EX7X_hasXlabelXknowsX':[(lambda g, e7Id=None:g.E(e7Id).hasLabel('knows'))],
+ 'g_E_hasXlabelXknowsX':[(lambda g:g.E().hasLabel('knows'))],
+ 'g_E_hasLabelXuses_traversesX':[(lambda g:g.E().hasLabel('uses','traverses'))],
+ 'g_V_hasLabelXperson_software_blahX':[(lambda g:g.V().hasLabel('person','software','blah'))],
+ 'g_V_hasXperson_name_markoX_age':[(lambda g:g.V().has('person','name','marko').age)],
+ 'g_VX1X_outE_hasXweight_inside_0_06X_inV':[(lambda g, v1Id=None:g.V(v1Id).outE().has('weight',P.gt(float(0.0)).and_(P.lt(float(0.6)))).inV())],
+ 'g_EX11X_outV_outE_hasXid_10X':[(lambda g, e11Id=None,e10Id=None:g.E(e11Id).outV().outE().has(T.id,e10Id))],
+ 'g_EX11X_outV_outE_hasXid_10AsStringX':[(lambda g, e11Id=None,e10Id=None:g.E(e11Id).outV().outE().has(T.id,e10Id))],
+ 'g_V_hasXlocationX':[(lambda g:g.V().has('location'))],
+ 'g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name':[(lambda g:g.V().hasLabel('person').has('age',P.gt(10).or_(P.gte(11).and_(P.lt(20))).and_(P.lt(29).or_(P.eq(35)))).name)],
+ 'g_V_hasXage_withinX27X_count':[(lambda g:g.V().has('age',P.within([27])).count())],
+ 'g_V_hasXage_withinX27_29X_count':[(lambda g:g.V().has('age',P.within([27,29])).count())],
+ 'g_V_hasXage_withoutX27X_count':[(lambda g:g.V().has('age',P.without([27])).count())],
+ 'g_V_hasXage_withoutX27_29X_count':[(lambda g:g.V().has('age',P.without([27,29])).count())],
+ 'g_V_both_dedup_properties_hasKeyXageX_value':[(lambda g:g.V().both().properties().dedup().hasKey('age').value())],
+ 'g_V_both_dedup_properties_hasKeyXageX_hasValueXgtX30XX_value':[(lambda g:g.V().both().properties().dedup().hasKey('age').hasValue(P.gt(30)).value())],
+ 'g_V_bothE_properties_dedup_hasKeyXweightX_value':[(lambda g:g.V().bothE().properties().dedup().hasKey('weight').value())],
+ 'g_V_bothE_properties_dedup_hasKeyXweightX_hasValueXltX0d3XX_value':[(lambda g:g.V().bothE().properties().dedup().hasKey('weight').hasValue(P.lt(float(0.3))).value())],
+ 'g_V_hasNotXageX_name':[(lambda g:g.V().hasNot('age').name)],
+ 'g_V_hasIdX1X_hasIdX2X':[(lambda g, v1Id=None,v2Id=None:g.V().hasId(v1Id).hasId(v2Id))],
+ 'g_V_hasLabelXpersonX_hasLabelXsoftwareX':[(lambda g:g.V().hasLabel('person').hasLabel('software'))],
+ 'g_V_hasIdXemptyX_count':[(lambda g, l=None:g.V().hasId(l).count())],
+ 'g_V_hasXname_containingXarkXX':[(lambda g:g.V().has('name',TextP.containing('ark')))],
+ 'g_V_hasXname_startingWithXmarXX':[(lambda g:g.V().has('name',TextP.startingWith('mar')))],
+ 'g_V_hasXname_endingWithXasXX':[(lambda g:g.V().has('name',TextP.endingWith('as')))],
+ 'g_V_hasXperson_name_containingXoX_andXltXmXXX':[(lambda g:g.V().has('person','name',TextP.containing('o').and_(P.lt('m'))))],
+ 'g_V_hasXname_gtXmX_andXcontainingXoXXX':[(lambda g:g.V().has('name',P.gt('m').and_(TextP.containing('o'))))],
+ 'g_V_hasXname_not_containingXarkXX':[(lambda g:g.V().has('name',TextP.notContaining('ark')))],
+ 'g_V_hasXname_not_startingWithXmarXX':[(lambda g:g.V().has('name',TextP.notStartingWith('mar')))],
+ 'g_V_hasXname_not_endingWithXasXX':[(lambda g:g.V().has('name',TextP.notEndingWith('as')))],
+ 'g_V_hasXp_neqXvXX':[(lambda g:g.V().has('p',P.neq('v')))],
+ 'g_V_coinX1X':[(lambda g:g.V().coin(float(1.0)))],
+ 'g_V_coinX0X':[(lambda g:g.V().coin(float(0.0)))],
+ 'g_V_out_in_valuesXnameX_fold_dedupXlocalX_unfold':[(lambda g:g.V().out().in_().name.fold().dedup(Scope.local).unfold())],
+ 'g_V_out_asXxX_in_asXyX_selectXx_yX_byXnameX_fold_dedupXlocal_x_yX_unfold':[(lambda g:g.V().out().as_('x').in_().as_('y').select('x','y').by('name').fold().dedup(Scope.local,'x','y').unfold())],
+ 'g_V_both_dedup_name':[(lambda g:g.V().both().dedup().name)],
+ 'g_V_both_hasXlabel_softwareX_dedup_byXlangX_name':[(lambda g:g.V().both().has(T.label,'software').dedup().by('lang').name)],
+ 'g_V_both_name_order_byXa_bX_dedup_value':[(lambda g, l=None:g.V().both().properties('name').order().by(l).dedup().value())],
+ 'g_V_both_both_name_dedup':[(lambda g:g.V().both().both().name.dedup())],
+ 'g_V_both_both_dedup':[(lambda g:g.V().both().both().dedup())],
+ 'g_V_both_both_dedup_byXlabelX':[(lambda g:g.V().both().both().dedup().by(T.label))],
+ 'g_V_group_byXlabelX_byXbothE_weight_dedup_foldX':[(lambda g:g.V().group().by(T.label).by(__.bothE().weight.dedup().fold()))],
+ 'g_V_asXaX_both_asXbX_dedupXa_bX_byXlabelX_selectXa_bX':[(lambda g:g.V().as_('a').both().as_('b').dedup('a','b').by(T.label).select('a','b'))],
+ 'g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_dedupXa_bX_path':[(lambda g:g.V().as_('a').out('created').as_('b').in_('created').as_('c').dedup('a','b').path())],
+ 'g_V_outE_asXeX_inV_asXvX_selectXeX_order_byXweight_ascX_selectXvX_valuesXnameX_dedup':[(lambda g:g.V().outE().as_('e').inV().as_('v').select('e').order().by('weight',Order.asc).select('v').name.dedup())],
+ 'g_V_both_both_dedup_byXoutE_countX_name':[(lambda g:g.V().both().both().dedup().by(__.outE().count()).name)],
+ 'g_V_groupCount_selectXvaluesX_unfold_dedup':[(lambda g:g.V().groupCount().select(Column.values).unfold().dedup())],
+ 'g_V_asXaX_repeatXbothX_timesX3X_emit_name_asXbX_group_byXselectXaXX_byXselectXbX_dedup_order_foldX_selectXvaluesX_unfold_dedup':[(lambda g:g.V().as_('a').repeat(__.both()).times(3).emit().name.as_('b').group().by(__.select('a')).by(__.select('b').dedup().order().fold()).select(Column.values).unfold().dedup())],
+ 'g_V_repeatXdedupX_timesX2X_count':[(lambda g:g.V().repeat(__.dedup()).times(2).count())],
+ 'g_V_bothE_properties_dedup_count':[(lambda g:g.V().bothE().properties().dedup().count())],
+ 'g_V_both_properties_dedup_count':[(lambda g:g.V().both().properties().dedup().count())],
+ 'g_V_both_properties_properties_dedup_count':[(lambda g:g.V().both().properties().properties().dedup().count())],
+ 'g_V_andXhasXage_gt_27X__outE_count_gte_2X_name':[(lambda g:g.V().and_(__.has('age',P.gt(27)),__.outE().count().is_(P.gte(2))).name)],
+ 'g_V_andXoutE__hasXlabel_personX_and_hasXage_gte_32XX_name':[(lambda g:g.V().and_(__.outE(),__.has(T.label,'person').and_().has('age',P.gte(32))).name)],
+ 'g_V_asXaX_outXknowsX_and_outXcreatedX_inXcreatedX_asXaX_name':[(lambda g:g.V().as_('a').out('knows').and_().out('created').in_('created').as_('a').name)],
+ 'g_V_asXaX_andXselectXaX_selectXaXX':[(lambda g:g.V().as_('a').and_(__.select('a'),__.select('a')))],
+ 'g_V_hasXname_markoX_and_hasXname_markoX_and_hasXname_markoX':[(lambda g:g.V().has('name','marko').and_().has('name','marko').and_().has('name','marko'))],
+ 'g_VX1X_out_limitX2X':[(lambda g, v1Id=None:g.V(v1Id).out()[0:2])],
+ 'g_V_localXoutE_limitX1X_inVX_limitX3X':[(lambda g:g.V().local(__.outE()[0:1]).inV()[0:3])],
+ 'g_VX1X_outXknowsX_outEXcreatedX_rangeX0_1X_inV':[(lambda g, v1Id=None:g.V(v1Id).out('knows').outE('created')[0].inV())],
+ 'g_VX1X_outXknowsX_outXcreatedX_rangeX0_1X':[(lambda g, v1Id=None:g.V(v1Id).out('knows').out('created')[0])],
+ 'g_VX1X_outXcreatedX_inXcreatedX_rangeX1_3X':[(lambda g, v1Id=None:g.V(v1Id).out('created').in_('created')[1:3])],
+ 'g_VX1X_outXcreatedX_inEXcreatedX_rangeX1_3X_outV':[(lambda g, v1Id=None:g.V(v1Id).out('created').inE('created')[1:3].outV())],
+ 'g_V_repeatXbothX_timesX3X_rangeX5_11X':[(lambda g:g.V().repeat(__.both()).times(3)[5:11])],
+ 'g_V_asXaX_in_asXbX_in_asXcX_selectXa_b_cX_byXnameX_limitXlocal_2X':[(lambda g:g.V().as_('a').in_().as_('b').in_().as_('c').select('a','b','c').by('name').limit(Scope.local,2))],
+ 'g_V_asXaX_in_asXbX_in_asXcX_selectXa_b_cX_byXnameX_limitXlocal_1X':[(lambda g:g.V().as_('a').in_().as_('b').in_().as_('c').select('a','b','c').by('name').limit(Scope.local,1))],
+ 'g_V_asXaX_out_asXbX_out_asXcX_selectXa_b_cX_byXnameX_rangeXlocal_1_3X':[(lambda g:g.V().as_('a').out().as_('b').out().as_('c').select('a','b','c').by('name').range(Scope.local,1,3))],
+ 'g_V_asXaX_out_asXbX_out_asXcX_selectXa_b_cX_byXnameX_rangeXlocal_1_2X':[(lambda g:g.V().as_('a').out().as_('b').out().as_('c').select('a','b','c').by('name').range(Scope.local,1,2))],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_1_3X':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).range(Scope.local,1,3))],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_1_2X':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).range(Scope.local,1,2))],
+ 'g_V_hasLabelXpersonX_order_byXageX_skipX1X_valuesXnameX':[(lambda g:g.V().hasLabel('person').order().by('age').skip(1).name)],
+ 'g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_4_5X':[(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).range(Scope.local,4,5))],
+ 'g_V_outE_valuesXweightX_fold_orderXlocalX_skipXlocal_2X':[(lambda g:g.V().outE().weight.fold().order(Scope.local).skip(Scope.local,2))],
+ 'g_V_asXaX_in_asXaX_in_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_limitXlocal_1X':[(lambda g:g.V().as_('a').in_().as_('a').in_().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).limit(Scope.local,1))],
+ 'g_V_asXaX_in_asXaX_in_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_limitXlocal_2X':[(lambda g:g.V().as_('a').in_().as_('a').in_().as_('a').select(Pop.mixed,'a').by(__.unfold().name.fold()).limit(Scope.local,2))],
+ 'g_V_hasLabelXpersonX_order_byXageX_valuesXnameX_skipX1X':[(lambda g:g.V().hasLabel('person').order().by('age').name.skip(1))],
+}
diff --git a/gremlin-python/src/main/python/radish/terrain.py b/gremlin-python/src/main/python/radish/terrain.py
index 9f1f792..24a102c 100644
--- a/gremlin-python/src/main/python/radish/terrain.py
+++ b/gremlin-python/src/main/python/radish/terrain.py
@@ -68,6 +68,7 @@ def prepare_traversal_source(scenario):
# some tests create data - create a fresh remote to the empty graph and clear that graph prior to each test
remote = __create_remote("ggraph")
scenario.context.remote_conn["empty"] = remote
+ scenario.context.traversals = world.gremlins.get(scenario.sentence, None)
g = traversal().withRemote(remote)
g.V().drop().iterate()
diff --git a/gremlin-python/src/main/python/tests/structure/io/test_graphbinaryV1.py b/gremlin-python/src/main/python/tests/structure/io/test_graphbinaryV1.py
index cee1bb2..2f2b211 100644
--- a/gremlin-python/src/main/python/tests/structure/io/test_graphbinaryV1.py
+++ b/gremlin-python/src/main/python/tests/structure/io/test_graphbinaryV1.py
@@ -18,20 +18,13 @@ under the License.
"""
import datetime
-import calendar
-import time
import uuid
import math
-from decimal import *
-
-from mock import Mock
from gremlin_python.statics import timestamp, long, SingleByte, SingleChar, ByteBufferType
-from gremlin_python.structure.graph import Vertex, Edge, Property, VertexProperty, Graph, Path
-from gremlin_python.structure.io.graphbinaryV1 import GraphBinaryWriter, GraphBinaryReader, DataType
-from gremlin_python.process.traversal import P, Barrier, Binding, Bytecode
-from gremlin_python.process.strategies import SubgraphStrategy
-from gremlin_python.process.graph_traversal import __
+from gremlin_python.structure.graph import Vertex, Edge, Property, VertexProperty, Path
+from gremlin_python.structure.io.graphbinaryV1 import GraphBinaryWriter, GraphBinaryReader
+from gremlin_python.process.traversal import Barrier, Binding, Bytecode
class TestGraphBinaryReader(object):
@@ -218,4 +211,3 @@ class TestGraphSONWriter(object):
x = datetime.timedelta(seconds=1000, microseconds=1000)
output = self.graphbinary_reader.readObject(self.graphbinary_writer.writeObject(x))
assert x == output
-
diff --git a/gremlin-test/features/branch/Repeat.feature b/gremlin-test/features/branch/Repeat.feature
index 30615a5..17b1d81 100644
--- a/gremlin-test/features/branch/Repeat.feature
+++ b/gremlin-test/features/branch/Repeat.feature
@@ -200,7 +200,6 @@ Feature: Step - repeat()
Scenario: g_V_repeatXbothX_untilXname_eq_marko_or_loops_gt_1X_groupCount_byXnameX
Given the modern graph
- And using the parameter v1Id defined as "v[marko].id"
And using the parameter l defined as "c[t -> t.get().value('name').equals('lop') || t.loops() > 1]"
And the traversal of
"""
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index 2f08a6b..2dae1c0 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -164,10 +164,9 @@ Feature: Step - has()
Scenario: g_VXv4X_hasXage_gt_30X
Given the modern graph
And using the parameter v4 defined as "v[josh]"
- And using the parameter d30 defined as "d[30].i"
And the traversal of
"""
- g.V(v4).has("age", P.gt(d30))
+ g.V(v4).has("age", P.gt(30))
"""
When iterated to list
Then the result should be unordered
@@ -182,10 +181,6 @@ Feature: Step - has()
"""
g.V(v1Id).out().has(T.id, ltXv3IdX)
"""
- When iterated to list
- Then the result should be unordered
- | result |
- | v[vadas] |
Scenario: g_VX1AsStringX_out_hasXid_2AsStringX
Given the modern graph
@@ -337,11 +332,9 @@ Feature: Step - has()
Scenario: g_VX1X_outE_hasXweight_inside_0_06X_inV
Given the modern graph
And using the parameter v1Id defined as "v[marko].id"
- And using the parameter lower defined as "d[0.0].d"
- And using the parameter upper defined as "d[0.6].d"
And the traversal of
"""
- g.V(v1Id).outE().has("weight", P.inside(lower, upper)).inV()
+ g.V(v1Id).outE().has("weight", P.inside(0.0, 0.6)).inV()
"""
When iterated to list
Then the result should be unordered
@@ -391,14 +384,9 @@ Feature: Step - has()
Scenario: g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name
Given the modern graph
- And using the parameter d10 defined as "d[10].i"
- And using the parameter d11 defined as "d[11].i"
- And using the parameter d20 defined as "d[20].i"
- And using the parameter d29 defined as "d[29].i"
- And using the parameter d35 defined as "d[35].i"
And the traversal of
"""
- g.V().hasLabel("person").has("age", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values("name")
+ g.V().hasLabel("person").has("age", P.not(P.lte(10).and(P.not(P.between(11, 20)))).and(P.lt(29).or(P.eq(35)))).values("name")
"""
When iterated to list
Then the result should be unordered
@@ -480,10 +468,9 @@ Feature: Step - has()
Scenario: g_V_both_dedup_properties_hasKeyXageX_hasValueXgtX30XX_value
Given the modern graph
- And using the parameter d30 defined as "d[30].i"
And the traversal of
"""
- g.V().both().properties().dedup().hasKey("age").hasValue(P.gt(d30)).value()
+ g.V().both().properties().dedup().hasKey("age").hasValue(P.gt(30)).value()
"""
When iterated to list
Then the result should be unordered
@@ -507,7 +494,6 @@ Feature: Step - has()
Scenario: g_V_bothE_properties_dedup_hasKeyXweightX_hasValueXltX0d3XX_value
Given the modern graph
- And using the parameter d0d3 defined as "d[0.3].d"
And the traversal of
"""
g.V().bothE().properties().dedup().hasKey("weight").hasValue(P.lt(0.3)).value()
diff --git a/gremlin-test/features/filter/Is.feature b/gremlin-test/features/filter/Is.feature
index 70c7a9a..9a68d18 100644
--- a/gremlin-test/features/filter/Is.feature
+++ b/gremlin-test/features/filter/Is.feature
@@ -65,10 +65,9 @@ Feature: Step - coin()
Scenario: g_V_whereXinXcreatedX_count_isXgte_2XX_valuesXnameX
Given the modern graph
- And using the parameter two defined as "d[2].l"
And the traversal of
"""
- g.V().where(__.in("created").count().is(P.gte(two))).values("name")
+ g.V().where(__.in("created").count().is(P.gte(2))).values("name")
"""
When iterated to list
Then the result should be unordered
diff --git a/gremlin-test/features/filter/Or.feature b/gremlin-test/features/filter/Or.feature
index 437bcd1..b294532 100644
--- a/gremlin-test/features/filter/Or.feature
+++ b/gremlin-test/features/filter/Or.feature
@@ -19,10 +19,9 @@ Feature: Step - or()
Scenario: g_V_orXhasXage_gt_27X__outE_count_gte_2X_name
Given the modern graph
- And using the parameter two defined as "d[2].l"
And the traversal of
"""
- g.V().or(__.has("age", P.gt(27)), __.outE().count().is(P.gte(two))).values("name")
+ g.V().or(__.has("age", P.gt(27)), __.outE().count().is(P.gte(2))).values("name")
"""
When iterated to list
Then the result should be unordered
diff --git a/gremlin-test/features/filter/Sample.feature b/gremlin-test/features/filter/Sample.feature
index ab3a9ae..eb7d3a3 100644
--- a/gremlin-test/features/filter/Sample.feature
+++ b/gremlin-test/features/filter/Sample.feature
@@ -28,7 +28,6 @@ Feature: Step - sample()
Scenario: g_E_sampleX2X_byXweightX
Given the modern graph
- And using the parameter v1Id defined as "v[marko].id"
And the traversal of
"""
g.E().sample(2).by("weight")
diff --git a/gremlin-test/features/filter/SimplePath.feature b/gremlin-test/features/filter/SimplePath.feature
index ed66e8b..ef0a316 100644
--- a/gremlin-test/features/filter/SimplePath.feature
+++ b/gremlin-test/features/filter/SimplePath.feature
@@ -60,7 +60,6 @@ Feature: Step - simplePath()
Scenario: g_V_asXaX_out_asXbX_out_asXcX_simplePath_byXlabelX_fromXbX_toXcX_path_byXnameX
Given the modern graph
- And using the parameter v1Id defined as "v[marko].id"
And the traversal of
"""
g.V().as("a").out().as("b").out().as("c").simplePath().by(T.label).from("b").to("c").path().by("name")
diff --git a/gremlin-test/features/map/Graph.feature b/gremlin-test/features/map/Graph.feature
index 249d6a3..ff337ff 100644
--- a/gremlin-test/features/map/Graph.feature
+++ b/gremlin-test/features/map/Graph.feature
@@ -36,7 +36,6 @@ Feature: Step - V()
Scenario: g_V_outXknowsX_V_name
Given the modern graph
- And using the parameter v1Id defined as "v[marko].id"
And the traversal of
"""
g.V().out("knows").V().values("name")
diff --git a/gremlin-test/features/map/Math.feature b/gremlin-test/features/map/Math.feature
index 5216241..f6eaafa 100644
--- a/gremlin-test/features/map/Math.feature
+++ b/gremlin-test/features/map/Math.feature
@@ -64,7 +64,7 @@ Feature: Step - math()
And using the parameter x defined as "d[100].i"
And the traversal of
"""
- g.withSideEffect("x", 100).V().values("age").math("_ + x")
+ g.withSideEffect("x", x).V().values("age").math("_ + x")
"""
When iterated to list
Then the result should be unordered
diff --git a/gremlin-test/features/sideEffect/Sack.feature b/gremlin-test/features/sideEffect/Sack.feature
index 0166934..1dfd2a4 100644
--- a/gremlin-test/features/sideEffect/Sack.feature
+++ b/gremlin-test/features/sideEffect/Sack.feature
@@ -70,7 +70,6 @@ Feature: Step - sack()
Scenario: g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack
Given the modern graph
- And using the parameter v1Id defined as "v[marko].id"
And the traversal of
"""
g.withBulk(false).withSack(1, Operator.sum).V().out().barrier().sack()