diff --git a/asterix-graphix/pom.xml b/asterix-graphix/pom.xml
index c21c4ea..e1d517c 100644
--- a/asterix-graphix/pom.xml
+++ b/asterix-graphix/pom.xml
@@ -236,7 +236,7 @@
     <dependency>
       <groupId>org.apache.asterix</groupId>
       <artifactId>asterix-test-framework</artifactId>
-      <version>0.9.7-SNAPSHOT</version>
+      <version>${asterix.version}</version>
       <scope>test</scope>
     </dependency>
 
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/algebra/compiler/provider/GraphixCompilationProvider.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/algebra/compiler/provider/GraphixCompilationProvider.java
index 13d8c48..79a2b68 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/algebra/compiler/provider/GraphixCompilationProvider.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/algebra/compiler/provider/GraphixCompilationProvider.java
@@ -18,16 +18,26 @@
  */
 package org.apache.asterix.graphix.algebra.compiler.provider;
 
+import java.util.Set;
+
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslatorFactory;
 import org.apache.asterix.compiler.provider.IRuleSetFactory;
 import org.apache.asterix.compiler.provider.SqlppCompilationProvider;
 import org.apache.asterix.graphix.algebra.translator.GraphixExpressionToPlanTranslatorFactory;
 import org.apache.asterix.graphix.lang.parser.GraphixParserFactory;
 import org.apache.asterix.graphix.lang.rewrites.GraphixRewriterFactory;
+import org.apache.asterix.graphix.lang.rewrites.print.GraphixASTPrintVisitorFactory;
+import org.apache.asterix.lang.common.base.IAstPrintVisitorFactory;
 import org.apache.asterix.lang.common.base.IParserFactory;
 import org.apache.asterix.lang.common.base.IRewriterFactory;
 
 public class GraphixCompilationProvider extends SqlppCompilationProvider {
+    public static final String PRINT_REWRITE_METADATA_CONFIG = "graphix.print-rewrite";
+    public static final String RESOLVER_METADATA_CONFIG = "graphix.resolver";
+    public static final String RESOLVER_ITERATION_MAX_METADATA_CONFIG = "graphix.max-resolution-iterations";
+    public static final String MATCH_EVALUATION_METADATA_CONFIG = "graphix.match-evaluation";
+    public static final String EDGE_STRATEGY_METADATA_CONFIG = "graphix.edge-strategy";
+
     @Override
     public IParserFactory getParserFactory() {
         return new GraphixParserFactory();
@@ -44,7 +54,20 @@
     }
 
     @Override
+    public IAstPrintVisitorFactory getAstPrintVisitorFactory() {
+        return new GraphixASTPrintVisitorFactory();
+    }
+
+    @Override
     public ILangExpressionToPlanTranslatorFactory getExpressionToPlanTranslatorFactory() {
         return new GraphixExpressionToPlanTranslatorFactory();
     }
+
+    @Override
+    public Set<String> getCompilerOptions() {
+        Set<String> parentConfigurableParameters = super.getCompilerOptions();
+        parentConfigurableParameters.addAll(Set.of(PRINT_REWRITE_METADATA_CONFIG, MATCH_EVALUATION_METADATA_CONFIG,
+                RESOLVER_METADATA_CONFIG, RESOLVER_ITERATION_MAX_METADATA_CONFIG, EDGE_STRATEGY_METADATA_CONFIG));
+        return parentConfigurableParameters;
+    }
 }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/app/translator/GraphixQueryTranslator.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/app/translator/GraphixQueryTranslator.java
index 59889a3..101fc06 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/app/translator/GraphixQueryTranslator.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/app/translator/GraphixQueryTranslator.java
@@ -18,11 +18,11 @@
  */
 package org.apache.asterix.graphix.app.translator;
 
-import java.util.Collections;
-import java.util.Iterator;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Optional;
+import java.util.Set;
 import java.util.concurrent.ExecutorService;
-import java.util.function.Function;
 
 import org.apache.asterix.app.translator.QueryTranslator;
 import org.apache.asterix.common.api.IResponsePrinter;
@@ -33,30 +33,34 @@
 import org.apache.asterix.common.metadata.DataverseName;
 import org.apache.asterix.compiler.provider.ILangCompilationProvider;
 import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
-import org.apache.asterix.graphix.lang.expression.GraphElementExpr;
+import org.apache.asterix.graphix.lang.expression.GraphElementBodyExpr;
 import org.apache.asterix.graphix.lang.rewrites.GraphixQueryRewriter;
 import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
 import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
 import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
-import org.apache.asterix.graphix.metadata.entities.Graph;
+import org.apache.asterix.graphix.lang.util.GraphStatementHandlingUtil;
+import org.apache.asterix.graphix.metadata.entity.dependency.DependencyIdentifier;
+import org.apache.asterix.graphix.metadata.entity.dependency.FunctionRequirements;
+import org.apache.asterix.graphix.metadata.entity.dependency.IEntityRequirements;
+import org.apache.asterix.graphix.metadata.entity.dependency.ViewRequirements;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.lang.common.base.IStatementRewriter;
 import org.apache.asterix.lang.common.base.Statement;
+import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
+import org.apache.asterix.lang.common.statement.CreateFunctionStatement;
+import org.apache.asterix.lang.common.statement.CreateViewStatement;
 import org.apache.asterix.lang.common.statement.DataverseDropStatement;
 import org.apache.asterix.lang.common.statement.DropDatasetStatement;
 import org.apache.asterix.lang.common.statement.FunctionDropStatement;
 import org.apache.asterix.lang.common.statement.Query;
 import org.apache.asterix.lang.common.statement.SynonymDropStatement;
 import org.apache.asterix.lang.common.statement.ViewDropStatement;
-import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.util.ExpressionUtils;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.MetadataTransactionContext;
 import org.apache.asterix.metadata.declared.MetadataProvider;
-import org.apache.asterix.metadata.entities.DependencyKind;
 import org.apache.asterix.translator.IRequestParameters;
 import org.apache.asterix.translator.SessionOutput;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.algebricks.common.utils.Triple;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 
 public class GraphixQueryTranslator extends QueryTranslator {
@@ -73,14 +77,128 @@
     public void setGraphElementNormalizedBody(MetadataProvider metadataProvider, GraphElementDecl graphElementDecl,
             GraphixQueryRewriter queryRewriter) throws CompilationException {
         // Create a query AST for our rewriter to walk through.
-        GraphElementExpr functionCall = new GraphElementExpr(graphElementDecl.getIdentifier());
+        GraphElementBodyExpr functionCall = new GraphElementBodyExpr(graphElementDecl.getIdentifier());
         Query query = ExpressionUtils.createWrappedQuery(functionCall, graphElementDecl.getSourceLocation());
 
-        // We call our rewriter to set the normalized bodies of {@code graphElementDecl}.
-        GraphixRewritingContext graphixRewritingContext =
-                new GraphixRewritingContext(metadataProvider, declaredFunctions, null,
-                        Collections.singletonList(graphElementDecl), warningCollector, query.getVarCounter());
-        queryRewriter.loadNormalizedGraphElements(graphixRewritingContext, query);
+        // We call our rewriter to set the normalized bodies of GRAPH-ELEMENT-DECL.
+        LangRewritingContext langRewritingContext = new LangRewritingContext(metadataProvider, declaredFunctions, null,
+                warningCollector, query.getVarCounter());
+        GraphixRewritingContext graphixRewritingContext = new GraphixRewritingContext(langRewritingContext);
+        queryRewriter.loadNormalizedGraphElement(graphixRewritingContext, query, graphElementDecl);
+    }
+
+    /**
+     * To create a view, we must perform the following:
+     * a) Check the view body for any named graphs.
+     * b) Rewrite graph expressions into pure SQL++ expressions. The dependencies associated with the rewritten
+     * expressions will be recorded in the "Dataset" dataset.
+     * c) Record any graph-related dependencies for the view in our metadata.
+     */
+    @Override
+    protected CreateResult doCreateView(MetadataProvider metadataProvider, CreateViewStatement cvs,
+            DataverseName dataverseName, String viewName, DataverseName itemTypeDataverseName, String itemTypeName,
+            IStatementRewriter stmtRewriter, IRequestParameters requestParameters) throws Exception {
+        // Before executing our parent, analyze our view body for graph dependencies.
+        Set<DependencyIdentifier> graphDependencies = new HashSet<>();
+        GraphStatementHandlingUtil.collectDependenciesOnGraph(cvs.getViewBodyExpression(), dataverseName,
+                graphDependencies);
+
+        // Now execute the parent CREATE-VIEW function. Ensure that our VIEW is valid.
+        CreateResult createResult = super.doCreateView(metadataProvider, cvs, dataverseName, viewName,
+                itemTypeDataverseName, itemTypeName, stmtRewriter, requestParameters);
+        if (createResult == CreateResult.NOOP) {
+            return createResult;
+        }
+
+        // Our view is valid. Proceed by inserting / upserting a new dependence record.
+        GraphStatementHandlingUtil.acquireGraphExtensionWriteLocks(metadataProvider, dataverseName, viewName);
+        MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+        metadataProvider.setMetadataTxnContext(mdTxnCtx);
+
+        // If we have an existing graph-dependency, fetch it first.
+        Optional<IEntityRequirements> existingRequirements = GraphixMetadataExtension.getAllEntityRequirements(mdTxnCtx)
+                .stream().filter(r -> r.getDataverseName().equals(dataverseName))
+                .filter(r -> r.getEntityName().equals(cvs.getViewName()))
+                .filter(r -> r.getDependentKind() == IEntityRequirements.DependentKind.VIEW).findFirst();
+        if (existingRequirements.isPresent() && !cvs.getReplaceIfExists()) {
+            throw new CompilationException(ErrorCode.COMPILATION_ERROR, cvs.getSourceLocation(),
+                    "Graph dependency record for " + cvs.getViewName() + " already exists.");
+        }
+
+        // Insert / upsert into our GraphDependency dataset.
+        if (!graphDependencies.isEmpty()) {
+            ViewRequirements viewRequirements = new ViewRequirements(getActiveDataverseName(cvs.getDataverseName()),
+                    cvs.getViewName(), graphDependencies);
+            if (!existingRequirements.isPresent()) {
+                MetadataManager.INSTANCE.addEntity(mdTxnCtx, viewRequirements);
+
+            } else {
+                MetadataManager.INSTANCE.upsertEntity(mdTxnCtx, viewRequirements);
+            }
+        }
+        MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+
+        // Exit here. Our parent will release all locks.
+        return createResult;
+    }
+
+    /**
+     * To create a function, we must perform the following:
+     * a) Check the function body for any named graphs.
+     * b) Rewrite graph expressions into pure SQL++ expressions. The dependencies associated with the rewritten
+     * expressions will be recorded in the "Function" dataset.
+     * c) Record any graph-related dependencies for the function in our metadata.
+     */
+    @Override
+    protected CreateResult doCreateFunction(MetadataProvider metadataProvider, CreateFunctionStatement cfs,
+            FunctionSignature functionSignature, IStatementRewriter stmtRewriter, IRequestParameters requestParameters)
+            throws Exception {
+        // Before executing our parent, analyze our function body for graph dependencies.
+        Set<DependencyIdentifier> graphDependencies = new HashSet<>();
+        GraphStatementHandlingUtil.collectDependenciesOnGraph(cfs.getFunctionBodyExpression(),
+                cfs.getFunctionSignature().getDataverseName(), graphDependencies);
+
+        // Execute the parent CREATE-FUNCTION function. Ensure that our FUNCTION is valid.
+        CreateResult createResult =
+                super.doCreateFunction(metadataProvider, cfs, functionSignature, stmtRewriter, requestParameters);
+        if (createResult == CreateResult.NOOP) {
+            return createResult;
+        }
+
+        // Our function is valid. Proceed by inserting / upserting a new dependence record.
+        DataverseName dataverseName = functionSignature.getDataverseName();
+        GraphStatementHandlingUtil.acquireGraphExtensionWriteLocks(metadataProvider, dataverseName,
+                cfs.getFunctionSignature().toString());
+        MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+        metadataProvider.setMetadataTxnContext(mdTxnCtx);
+
+        // If we have an existing requirement record, fetch it first.
+        DataverseName activeDataverseName = functionSignature.getDataverseName();
+        Optional<FunctionRequirements> existingRequirements = GraphixMetadataExtension
+                .getAllEntityRequirements(mdTxnCtx).stream()
+                .filter(r -> r.getDataverseName().equals(activeDataverseName))
+                .filter(r -> r.getDependentKind() == IEntityRequirements.DependentKind.FUNCTION)
+                .map(r -> (FunctionRequirements) r).filter(f -> f.getEntityName().equals(functionSignature.getName()))
+                .filter(f -> Integer.parseInt(f.getArityAsString()) == functionSignature.getArity()).findFirst();
+        if (existingRequirements.isPresent() && !cfs.getReplaceIfExists()) {
+            throw new CompilationException(ErrorCode.COMPILATION_ERROR, cfs.getSourceLocation(),
+                    "Graph dependency record for " + functionSignature.getName() + " already exists.");
+        }
+
+        // Insert / upsert into our GraphDependency dataset.
+        if (!graphDependencies.isEmpty()) {
+            FunctionRequirements requirements = new FunctionRequirements(cfs.getFunctionSignature(), graphDependencies);
+            if (!existingRequirements.isPresent()) {
+                MetadataManager.INSTANCE.addEntity(mdTxnCtx, requirements);
+
+            } else {
+                MetadataManager.INSTANCE.upsertEntity(mdTxnCtx, requirements);
+            }
+        }
+        MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+
+        // Exit here. Our parent will release all locks.
+        return createResult;
     }
 
     @Override
@@ -89,17 +207,22 @@
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
 
         // Forbid dropping the synonym if any graphs depend on this synonym.
-        DataverseName workingDataverse = getActiveDataverseName(((SynonymDropStatement) stmt).getDataverseName());
-        String synonymName = ((SynonymDropStatement) stmt).getSynonymName();
-        throwErrorIfDependentExists(mdTxnCtx, workingDataverse,
-                (dependency) -> dependency.first == DependencyKind.SYNONYM
-                        && dependency.second.second.equals(synonymName));
+        SynonymDropStatement sds = (SynonymDropStatement) stmt;
+        DataverseName workingDataverse = getActiveDataverseName(sds.getDataverseName());
+        DependencyIdentifier dependencyIdentifier =
+                new DependencyIdentifier(workingDataverse, sds.getSynonymName(), DependencyIdentifier.Kind.SYNONYM);
+        GraphStatementHandlingUtil.throwIfDependentExists(mdTxnCtx, dependencyIdentifier);
 
         // Finish this transaction and perform the remainder of the DROP SYNONYM statement.
         MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
         super.handleDropSynonymStatement(metadataProvider, stmt);
     }
 
+    /**
+     * Before dropping a function, we perform the following:
+     * 1. Check if any of our existing graphs depend on the function to-be-dropped.
+     * 2. Remove the GraphDependency record for the function to-be-dropped if it exists.
+     */
     @Override
     protected void handleFunctionDropStatement(MetadataProvider metadataProvider, Statement stmt,
             IRequestParameters requestParameters) throws Exception {
@@ -109,27 +232,52 @@
         // Forbid dropping the function if any graphs depend on this function.
         FunctionSignature functionSignature = ((FunctionDropStatement) stmt).getFunctionSignature();
         DataverseName workingDataverse = getActiveDataverseName(functionSignature.getDataverseName());
-        throwErrorIfDependentExists(mdTxnCtx, workingDataverse,
-                (dependency) -> dependency.first == DependencyKind.FUNCTION
-                        && dependency.second.second.equals(functionSignature.getName())
-                        && dependency.second.third.equals(Integer.toString(functionSignature.getArity())));
+        DependencyIdentifier dependencyIdentifier =
+                new DependencyIdentifier(workingDataverse, functionSignature.getName(),
+                        String.valueOf(functionSignature.getArity()), DependencyIdentifier.Kind.FUNCTION);
+        GraphStatementHandlingUtil.throwIfDependentExists(mdTxnCtx, dependencyIdentifier);
+
+        // Drop the GraphDependency record associated with this function, if it exists.
+        Optional<FunctionRequirements> existingRequirements = GraphixMetadataExtension
+                .getAllEntityRequirements(mdTxnCtx).stream().filter(r -> r.getDataverseName().equals(workingDataverse))
+                .filter(r -> r.getEntityName().equals(functionSignature.getName()))
+                .filter(r -> r.getDependentKind() == IEntityRequirements.DependentKind.FUNCTION)
+                .map(r -> (FunctionRequirements) r)
+                .filter(f -> Integer.parseInt(f.getArityAsString()) == functionSignature.getArity()).findFirst();
+        if (existingRequirements.isPresent()) {
+            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, existingRequirements.get());
+        }
 
         // Finish this transaction and perform the remainder of the DROP FUNCTION statement.
         MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
         super.handleFunctionDropStatement(metadataProvider, stmt, requestParameters);
     }
 
+    /**
+     * Before dropping a view, we perform the following:
+     * 1. Check if any of our existing graphs depend on the view to-be-dropped.
+     * 2. Remove the GraphDependency record for the view to-be-dropped if it exists.
+     */
     @Override
     public void handleViewDropStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
 
-        // Forbid dropping the dataset if any graphs depend on this dataset.
-        DataverseName workingDataverse = getActiveDataverseName(((ViewDropStatement) stmt).getDataverseName());
-        Identifier dsId = ((ViewDropStatement) stmt).getViewName();
-        throwErrorIfDependentExists(mdTxnCtx, workingDataverse,
-                (dependency) -> dependency.first == DependencyKind.DATASET
-                        && dependency.second.second.equals(dsId.getValue()));
+        // Forbid dropping the dataset if any graphs depend on this view (dataset).
+        ViewDropStatement vds = (ViewDropStatement) stmt;
+        DataverseName workingDataverse = getActiveDataverseName(vds.getDataverseName());
+        DependencyIdentifier dependencyIdentifier = new DependencyIdentifier(workingDataverse,
+                vds.getViewName().getValue(), DependencyIdentifier.Kind.DATASET);
+        GraphStatementHandlingUtil.throwIfDependentExists(mdTxnCtx, dependencyIdentifier);
+
+        // Drop the GraphDependency record associated with this view, if it exists.
+        Optional<IEntityRequirements> existingRequirements = GraphixMetadataExtension.getAllEntityRequirements(mdTxnCtx)
+                .stream().filter(r -> r.getDataverseName().equals(workingDataverse))
+                .filter(r -> r.getEntityName().equals(vds.getViewName().getValue()))
+                .filter(r -> r.getDependentKind() == IEntityRequirements.DependentKind.FUNCTION).findFirst();
+        if (existingRequirements.isPresent()) {
+            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, existingRequirements.get());
+        }
 
         // Finish this transaction and perform the remainder of the DROP VIEW statement.
         MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
@@ -143,70 +291,57 @@
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
 
         // Forbid dropping the dataset if any graphs depend on this dataset.
-        DataverseName workingDataverse = getActiveDataverseName(((DropDatasetStatement) stmt).getDataverseName());
-        Identifier dsId = ((DropDatasetStatement) stmt).getDatasetName();
-        throwErrorIfDependentExists(mdTxnCtx, workingDataverse,
-                (dependency) -> dependency.first == DependencyKind.DATASET
-                        && dependency.second.second.equals(dsId.getValue()));
+        DropDatasetStatement dds = (DropDatasetStatement) stmt;
+        DataverseName workingDataverse = getActiveDataverseName(dds.getDataverseName());
+        DependencyIdentifier dependencyIdentifier = new DependencyIdentifier(workingDataverse,
+                dds.getDatasetName().toString(), DependencyIdentifier.Kind.DATASET);
+        GraphStatementHandlingUtil.throwIfDependentExists(mdTxnCtx, dependencyIdentifier);
 
         // Finish this transaction and perform the remainder of the DROP DATASET statement.
         MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
         super.handleDatasetDropStatement(metadataProvider, stmt, hcc, requestParameters);
     }
 
-    private void throwErrorIfDependentExists(MetadataTransactionContext mdTxnCtx, DataverseName workingDataverse,
-            Function<Pair<DependencyKind, Triple<DataverseName, String, String>>, Boolean> isEntityDependent)
-            throws AlgebricksException {
-        List<Graph> allGraphs = GraphixMetadataExtension.getGraphs(mdTxnCtx, workingDataverse);
-        for (Graph graph : allGraphs) {
-            if (!graph.getDataverseName().equals(workingDataverse)) {
-                continue;
-            }
-            Iterator<Pair<DependencyKind, Triple<DataverseName, String, String>>> dependencyIterator =
-                    graph.getDependencies().getIterator();
-            while (dependencyIterator.hasNext()) {
-                Pair<DependencyKind, Triple<DataverseName, String, String>> dependency = dependencyIterator.next();
-                if (isEntityDependent.apply(dependency)) {
-                    throw new CompilationException(ErrorCode.CANNOT_DROP_OBJECT_DEPENDENT_EXISTS, dependency.first,
-                            dependency.first.getDependencyDisplayName(dependency.second), "graph",
-                            graph.getGraphName());
-                }
-            }
-        }
-    }
-
+    /**
+     * Before dropping a dataverse, we perform the following:
+     * 1. Check if any other entities outside the dataverse to-be-dropped depend on any entities inside the dataverse.
+     * 2. Remove all GraphDependency records associated with the dataverse to-be-dropped.
+     * 3. Remove all Graph records associated with the dataverse to-be-dropped.
+     */
     @Override
     protected void handleDataverseDropStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc, IRequestParameters requestParameters) throws Exception {
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
 
-        // Forbid dropping this dataverse if other graphs that are outside this dataverse depend on this dataverse.
+        // Forbid dropping this dataverse if other entities that are outside this dataverse depend on this dataverse.
         DataverseName droppedDataverse = ((DataverseDropStatement) stmt).getDataverseName();
-        List<Graph> allGraphs = GraphixMetadataExtension.getGraphs(mdTxnCtx, null);
-        for (Graph graph : allGraphs) {
-            if (graph.getDataverseName().equals(droppedDataverse)) {
+        List<IEntityRequirements> requirementsList = GraphixMetadataExtension.getAllEntityRequirements(mdTxnCtx);
+        for (IEntityRequirements requirements : requirementsList) {
+            if (requirements.getDataverseName().equals(droppedDataverse)) {
                 continue;
             }
-            Iterator<Pair<DependencyKind, Triple<DataverseName, String, String>>> dependencyIterator =
-                    graph.getDependencies().getIterator();
-            while (dependencyIterator.hasNext()) {
-                Pair<DependencyKind, Triple<DataverseName, String, String>> dependency = dependencyIterator.next();
-                if (dependency.second.first.equals(droppedDataverse)) {
-                    throw new CompilationException(ErrorCode.CANNOT_DROP_DATAVERSE_DEPENDENT_EXISTS, dependency.first,
-                            dependency.first.getDependencyDisplayName(dependency.second), "graph",
-                            graph.getGraphName());
+            for (DependencyIdentifier dependency : requirements) {
+                if (dependency.getDataverseName().equals(droppedDataverse)) {
+                    throw new CompilationException(ErrorCode.CANNOT_DROP_DATAVERSE_DEPENDENT_EXISTS,
+                            dependency.getDependencyKind(), dependency.getDisplayName(),
+                            requirements.getDependentKind(), requirements.getDisplayName());
                 }
             }
         }
 
+        // Perform a drop for all GraphDependency records contained in this dataverse.
+        for (IEntityRequirements requirements : requirementsList) {
+            if (!requirements.getDataverseName().equals(droppedDataverse)) {
+                continue;
+            }
+            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, requirements);
+        }
+
         // Perform a drop for all graphs contained in this dataverse.
         MetadataProvider tempMdProvider = MetadataProvider.create(appCtx, metadataProvider.getDefaultDataverse());
         tempMdProvider.getConfig().putAll(metadataProvider.getConfig());
-        for (Graph graph : allGraphs) {
-            if (!graph.getDataverseName().equals(droppedDataverse)) {
-                continue;
-            }
+        for (Graph graph : GraphixMetadataExtension.getAllGraphs(mdTxnCtx, droppedDataverse)) {
             tempMdProvider.getLocks().reset();
             GraphDropStatement gds = new GraphDropStatement(droppedDataverse, graph.getGraphName(), false);
             gds.handle(hcc, this, requestParameters, tempMdProvider, 0);
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphElementIdentifier.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphElementIdentifier.java
index fdd4ed4..f440c2f 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphElementIdentifier.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphElementIdentifier.java
@@ -21,16 +21,24 @@
 import java.io.Serializable;
 import java.util.Objects;
 
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+
+/**
+ * A unique identifier for a graph element (vertex or edge). A graph element is uniquely identified by:
+ * 1. The graph identifier associated with the graph element itself.
+ * 2. The kind of the element (vertex or edge).
+ * 3. The label associated with the element itself- a graph element has only one label in our user model.
+ */
 public class GraphElementIdentifier implements Serializable {
     private static final long serialVersionUID = 1L;
     private final GraphIdentifier graphIdentifier;
     private final Kind elementKind;
-    private final String labelName;
+    private final ElementLabel elementLabel;
 
-    public GraphElementIdentifier(GraphIdentifier graphIdentifier, Kind elementKind, String labelName) {
+    public GraphElementIdentifier(GraphIdentifier graphIdentifier, Kind elementKind, ElementLabel elementLabel) {
         this.graphIdentifier = graphIdentifier;
         this.elementKind = elementKind;
-        this.labelName = labelName;
+        this.elementLabel = elementLabel;
     }
 
     public GraphIdentifier getGraphIdentifier() {
@@ -41,13 +49,13 @@
         return elementKind;
     }
 
-    public String getLabelName() {
-        return labelName;
+    public ElementLabel getElementLabel() {
+        return elementLabel;
     }
 
     @Override
     public String toString() {
-        return graphIdentifier + "#" + labelName + " ( " + elementKind + " )";
+        return graphIdentifier + "#" + elementLabel + " ( " + elementKind + " )";
     }
 
     @Override
@@ -58,30 +66,18 @@
         if (o instanceof GraphElementIdentifier) {
             GraphElementIdentifier that = (GraphElementIdentifier) o;
             return graphIdentifier.equals(that.graphIdentifier) && elementKind.equals(that.elementKind)
-                    && labelName.equals(that.labelName);
+                    && elementLabel.equals(that.elementLabel);
         }
         return false;
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(graphIdentifier, elementKind, labelName);
+        return Objects.hash(graphIdentifier, elementKind, elementLabel);
     }
 
     public enum Kind {
         VERTEX,
-        EDGE;
-
-        @Override
-        public String toString() {
-            switch (this) {
-                case EDGE:
-                    return "edge";
-                case VERTEX:
-                    return "vertex";
-                default:
-                    throw new IllegalStateException("Unknown graph element kind.");
-            }
-        }
+        EDGE
     }
 }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphIdentifier.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphIdentifier.java
index 4b78434..c3cc5bd 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphIdentifier.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/common/metadata/GraphIdentifier.java
@@ -23,14 +23,19 @@
 
 import org.apache.asterix.common.metadata.DataverseName;
 
+/**
+ * A unique identifier for a graph. A graph is uniquely identified by:
+ * 1. The dataverse associated with the graph. A graph identifier must always belong to some dataverse.
+ * 2. The name of the graph. Anonymous graphs should have a name generated from its respective GRAPH-CONSTRUCTOR.
+ */
 public class GraphIdentifier implements Serializable {
     private static final long serialVersionUID = 1L;
     private final DataverseName dataverseName;
     private final String graphName;
 
     public GraphIdentifier(DataverseName dataverseName, String graphName) {
-        this.dataverseName = dataverseName;
-        this.graphName = graphName;
+        this.dataverseName = Objects.requireNonNull(dataverseName);
+        this.graphName = Objects.requireNonNull(graphName);
     }
 
     public DataverseName getDataverseName() {
@@ -53,7 +58,7 @@
         }
         if (o instanceof GraphIdentifier) {
             GraphIdentifier that = (GraphIdentifier) o;
-            return dataverseName.equals(that.dataverseName) && graphName.equals(that.graphName);
+            return dataverseName.equals(that.dataverseName) && Objects.equals(graphName, that.graphName);
         }
         return false;
     }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/extension/GraphixMetadataExtension.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/extension/GraphixMetadataExtension.java
index 68df8b4..e4894af 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/extension/GraphixMetadataExtension.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/extension/GraphixMetadataExtension.java
@@ -19,15 +19,17 @@
 package org.apache.asterix.graphix.extension;
 
 import java.rmi.RemoteException;
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.asterix.common.api.ExtensionId;
 import org.apache.asterix.common.exceptions.ACIDException;
 import org.apache.asterix.common.metadata.DataverseName;
-import org.apache.asterix.graphix.metadata.bootstrap.GraphixMetadataIndexes;
-import org.apache.asterix.graphix.metadata.bootstrap.GraphixMetadataRecordTypes;
-import org.apache.asterix.graphix.metadata.entities.Graph;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixIndexDetailProvider;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider;
+import org.apache.asterix.graphix.metadata.bootstrap.IGraphixIndexDetail;
+import org.apache.asterix.graphix.metadata.bootstrap.IRecordTypeDetail;
+import org.apache.asterix.graphix.metadata.entity.dependency.IEntityRequirements;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.MetadataNode;
 import org.apache.asterix.metadata.MetadataTransactionContext;
@@ -52,12 +54,12 @@
 
     public static Graph getGraph(MetadataTransactionContext mdTxnCtx, DataverseName dataverseName, String graphName)
             throws AlgebricksException {
-        IExtensionMetadataSearchKey graphSearchKey = new IExtensionMetadataSearchKey() {
+        IExtensionMetadataSearchKey searchKey = new IExtensionMetadataSearchKey() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ExtensionMetadataDatasetId getDatasetId() {
-                return GraphixMetadataIndexes.GRAPH_METADATA_DATASET_EXTENSION_ID;
+                return GraphixIndexDetailProvider.getGraphIndexDetail().getExtensionDatasetID();
             }
 
             @Override
@@ -65,18 +67,18 @@
                 return MetadataNode.createTuple(dataverseName, graphName);
             }
         };
-        List<Graph> graphs = MetadataManager.INSTANCE.getEntities(mdTxnCtx, graphSearchKey);
+        List<Graph> graphs = MetadataManager.INSTANCE.getEntities(mdTxnCtx, searchKey);
         return (graphs.isEmpty()) ? null : graphs.get(0);
     }
 
-    public static List<Graph> getGraphs(MetadataTransactionContext mdTxnTtx, DataverseName dataverseName)
+    public static List<Graph> getAllGraphs(MetadataTransactionContext mdTxnTtx, DataverseName dataverseName)
             throws AlgebricksException {
-        IExtensionMetadataSearchKey graphDataverseSearchKey = new IExtensionMetadataSearchKey() {
+        IExtensionMetadataSearchKey dataverseSearchKey = new IExtensionMetadataSearchKey() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ExtensionMetadataDatasetId getDatasetId() {
-                return GraphixMetadataIndexes.GRAPH_METADATA_DATASET_EXTENSION_ID;
+                return GraphixIndexDetailProvider.getGraphIndexDetail().getExtensionDatasetID();
             }
 
             @Override
@@ -84,7 +86,25 @@
                 return (dataverseName == null) ? null : MetadataNode.createTuple(dataverseName);
             }
         };
-        return MetadataManager.INSTANCE.getEntities(mdTxnTtx, graphDataverseSearchKey);
+        return MetadataManager.INSTANCE.getEntities(mdTxnTtx, dataverseSearchKey);
+    }
+
+    public static List<IEntityRequirements> getAllEntityRequirements(MetadataTransactionContext mdTxnTtx)
+            throws AlgebricksException {
+        IExtensionMetadataSearchKey searchKey = new IExtensionMetadataSearchKey() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public ExtensionMetadataDatasetId getDatasetId() {
+                return GraphixIndexDetailProvider.getGraphDependencyIndexDetail().getExtensionDatasetID();
+            }
+
+            @Override
+            public ITupleReference getSearchKey() {
+                return null;
+            }
+        };
+        return MetadataManager.INSTANCE.getEntities(mdTxnTtx, searchKey);
     }
 
     @Override
@@ -106,7 +126,8 @@
     @Override
     public List<ExtensionMetadataDataset> getExtensionIndexes() {
         try {
-            return Collections.singletonList(GraphixMetadataIndexes.GRAPH_DATASET);
+            return List.of(GraphixIndexDetailProvider.getGraphIndexDetail().getExtensionDataset(),
+                    GraphixIndexDetailProvider.getGraphDependencyIndexDetail().getExtensionDataset());
 
         } catch (Throwable th) {
             th.printStackTrace();
@@ -117,19 +138,29 @@
     @Override
     public void initializeMetadata(INCServiceContext appCtx)
             throws HyracksDataException, RemoteException, ACIDException {
-        MetadataBootstrap.enlistMetadataDataset(appCtx, GraphixMetadataIndexes.GRAPH_DATASET);
+        // Enlist our datasets.
+        IGraphixIndexDetail<?> graphIndexDetail = GraphixIndexDetailProvider.getGraphIndexDetail();
+        IGraphixIndexDetail<?> dependencyIndexDetail = GraphixIndexDetailProvider.getGraphDependencyIndexDetail();
+        MetadataBootstrap.enlistMetadataDataset(appCtx, graphIndexDetail.getExtensionDataset());
+        MetadataBootstrap.enlistMetadataDataset(appCtx, dependencyIndexDetail.getExtensionDataset());
+
+        // If this is a new universe, insert our extension datasets.
         if (MetadataBootstrap.isNewUniverse()) {
             MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
             try {
-                // Insert our sole new metadata dataset (Graph).
-                MetadataBootstrap.insertMetadataDatasets(mdTxnCtx,
-                        new IMetadataIndex[] { GraphixMetadataIndexes.GRAPH_DATASET });
+                // Insert our two new metadata datasets (Graph and GraphDependency).
+                MetadataBootstrap.insertMetadataDatasets(mdTxnCtx, new IMetadataIndex[] {
+                        graphIndexDetail.getExtensionDataset(), dependencyIndexDetail.getExtensionDataset() });
 
-                // Insert our sole datatype (Graph).
+                // Insert two new datatype (Graph and GraphDependency).
+                IRecordTypeDetail graphRecordDetail = GraphixRecordDetailProvider.getGraphRecordDetail();
+                IRecordTypeDetail dependencyRecordDetail = GraphixRecordDetailProvider.getGraphDependencyRecordDetail();
+                MetadataManager.INSTANCE.addDatatype(mdTxnCtx, new Datatype(MetadataConstants.METADATA_DATAVERSE_NAME,
+                        graphRecordDetail.getRecordType().getTypeName(), graphRecordDetail.getRecordType(), false));
                 MetadataManager.INSTANCE.addDatatype(mdTxnCtx,
                         new Datatype(MetadataConstants.METADATA_DATAVERSE_NAME,
-                                GraphixMetadataRecordTypes.GRAPH_RECORDTYPE.getTypeName(),
-                                GraphixMetadataRecordTypes.GRAPH_RECORDTYPE, false));
+                                dependencyRecordDetail.getRecordType().getTypeName(),
+                                dependencyRecordDetail.getRecordType(), false));
 
                 MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
 
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/FunctionRewriteMap.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/FunctionRewriteMap.java
new file mode 100644
index 0000000..0903a08
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/FunctionRewriteMap.java
@@ -0,0 +1,131 @@
+/*
+ * 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.asterix.graphix.function;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.function.rewrite.EdgeVertexFunctionRewrite;
+import org.apache.asterix.graphix.function.rewrite.IFunctionRewrite;
+import org.apache.asterix.graphix.function.rewrite.PathEdgesFunctionRewrite;
+import org.apache.asterix.graphix.function.rewrite.PathHopCountFunctionRewrite;
+import org.apache.asterix.graphix.function.rewrite.PathLabelsFunctionRewrite;
+import org.apache.asterix.graphix.function.rewrite.PathVerticesFunctionRewrite;
+import org.apache.asterix.graphix.lang.rewrites.record.EdgeRecord;
+import org.apache.asterix.graphix.lang.rewrites.record.IElementRecord;
+import org.apache.asterix.graphix.lang.rewrites.record.VertexRecord;
+import org.apache.asterix.graphix.lang.rewrites.visitor.GraphixFunctionCallVisitor;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+/**
+ * @see GraphixFunctionCallVisitor
+ */
+public class FunctionRewriteMap {
+    private final static Map<FunctionIdentifier, IFunctionRewrite> graphixFunctionMap;
+
+    static {
+        graphixFunctionMap = new HashMap<>();
+
+        // Add our element function rewrites.
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.ELEMENT_LABEL, (c, a) -> {
+            final Identifier detailSuffix = new Identifier(IElementRecord.ELEMENT_DETAIL_NAME);
+            final Identifier labelSuffix = new Identifier(IElementRecord.ELEMENT_LABEL_FIELD_NAME);
+            FieldAccessor detailAccess = new FieldAccessor(a.get(0), detailSuffix);
+            return new FieldAccessor(detailAccess, labelSuffix);
+        });
+
+        // Add our vertex function rewrites.
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.VERTEX_PROPERTIES, (c, a) -> {
+            FunctionSignature functionSignature = new FunctionSignature(BuiltinFunctions.RECORD_REMOVE);
+            LiteralExpr elementDetailName = new LiteralExpr(new StringLiteral(IElementRecord.ELEMENT_DETAIL_NAME));
+            LiteralExpr vertexDetailName = new LiteralExpr(new StringLiteral(VertexRecord.VERTEX_DETAIL_NAME));
+            CallExpr removeElementDetailExpr = new CallExpr(functionSignature, List.of(a.get(0), elementDetailName));
+            return new CallExpr(functionSignature, List.of(removeElementDetailExpr, vertexDetailName));
+        });
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.VERTEX_KEY, (c, a) -> {
+            final Identifier detailSuffix = new Identifier(VertexRecord.VERTEX_DETAIL_NAME);
+            final Identifier keySuffix = new Identifier(VertexRecord.PRIMARY_KEY_FIELD_NAME);
+            FieldAccessor detailAccess = new FieldAccessor(a.get(0), detailSuffix);
+            return new FieldAccessor(detailAccess, keySuffix);
+        });
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.VERTEX_DETAIL, (c, a) -> {
+            final Identifier elementDetailSuffix = new Identifier(IElementRecord.ELEMENT_DETAIL_NAME);
+            final Identifier vertexDetailSuffix = new Identifier(VertexRecord.VERTEX_DETAIL_NAME);
+            FieldAccessor elementDetailAccess = new FieldAccessor(a.get(0), elementDetailSuffix);
+            FieldAccessor vertexDetailAccess = new FieldAccessor(a.get(0), vertexDetailSuffix);
+            FunctionSignature functionSignature = new FunctionSignature(BuiltinFunctions.RECORD_MERGE);
+            return new CallExpr(functionSignature, List.of(elementDetailAccess, vertexDetailAccess));
+        });
+
+        // Add our edge function rewrites.
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.EDGE_PROPERTIES, (c, a) -> {
+            FunctionSignature functionSignature = new FunctionSignature(BuiltinFunctions.RECORD_REMOVE);
+            LiteralExpr elementDetailName = new LiteralExpr(new StringLiteral(IElementRecord.ELEMENT_DETAIL_NAME));
+            LiteralExpr edgeDetailName = new LiteralExpr(new StringLiteral(EdgeRecord.EDGE_DETAIL_NAME));
+            CallExpr removeElementDetailExpr = new CallExpr(functionSignature, List.of(a.get(0), elementDetailName));
+            return new CallExpr(functionSignature, List.of(removeElementDetailExpr, edgeDetailName));
+        });
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.EDGE_SOURCE_KEY, (c, a) -> {
+            final Identifier detailSuffix = new Identifier(EdgeRecord.EDGE_DETAIL_NAME);
+            final Identifier sourceKeySuffix = new Identifier(EdgeRecord.SOURCE_KEY_FIELD_NAME);
+            FieldAccessor detailAccess = new FieldAccessor(a.get(0), detailSuffix);
+            return new FieldAccessor(detailAccess, sourceKeySuffix);
+        });
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.EDGE_DEST_KEY, (c, a) -> {
+            final Identifier detailSuffix = new Identifier(EdgeRecord.EDGE_DETAIL_NAME);
+            final Identifier destKeySuffix = new Identifier(EdgeRecord.DEST_KEY_FIELD_NAME);
+            FieldAccessor detailAccess = new FieldAccessor(a.get(0), detailSuffix);
+            return new FieldAccessor(detailAccess, destKeySuffix);
+        });
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.EDGE_DIRECTION, (c, a) -> {
+            final Identifier detailSuffix = new Identifier(EdgeRecord.EDGE_DETAIL_NAME);
+            final Identifier directionSuffix = new Identifier(EdgeRecord.DIRECTION_FIELD_NAME);
+            FieldAccessor detailAccess = new FieldAccessor(a.get(0), detailSuffix);
+            return new FieldAccessor(detailAccess, directionSuffix);
+        });
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.EDGE_DETAIL, (c, a) -> {
+            final Identifier elementDetailSuffix = new Identifier(IElementRecord.ELEMENT_DETAIL_NAME);
+            final Identifier edgeDetailSuffix = new Identifier(EdgeRecord.EDGE_DETAIL_NAME);
+            FieldAccessor elementDetailAccess = new FieldAccessor(a.get(0), elementDetailSuffix);
+            FieldAccessor edgeDetailAccess = new FieldAccessor(a.get(0), edgeDetailSuffix);
+            FunctionSignature functionSignature = new FunctionSignature(BuiltinFunctions.RECORD_MERGE);
+            return new CallExpr(functionSignature, List.of(elementDetailAccess, edgeDetailAccess));
+        });
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.EDGE_SOURCE_VERTEX, new EdgeVertexFunctionRewrite(true));
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.EDGE_DEST_VERTEX, new EdgeVertexFunctionRewrite(false));
+
+        // Add our path function rewrites.
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.PATH_HOP_COUNT, new PathHopCountFunctionRewrite());
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.PATH_LABELS, new PathLabelsFunctionRewrite());
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.PATH_VERTICES, new PathVerticesFunctionRewrite());
+        graphixFunctionMap.put(GraphixFunctionIdentifiers.PATH_EDGES, new PathEdgesFunctionRewrite());
+    }
+
+    public static IFunctionRewrite getFunctionRewrite(FunctionIdentifier functionIdentifier) {
+        return graphixFunctionMap.getOrDefault(functionIdentifier, null);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionAliases.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionAliases.java
new file mode 100644
index 0000000..fcfa7bd
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionAliases.java
@@ -0,0 +1,63 @@
+/*
+ * 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.asterix.graphix.function;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+public class GraphixFunctionAliases {
+    private static final Map<String, FunctionIdentifier> functionAliasMap;
+
+    static {
+        functionAliasMap = new HashMap<>();
+
+        // Build aliases for our vertex + edge functions.
+        functionAliasMap.put("label", GraphixFunctionIdentifiers.ELEMENT_LABEL);
+
+        // Build aliases for edge functions.
+        functionAliasMap.put("source-key", GraphixFunctionIdentifiers.EDGE_SOURCE_KEY);
+        functionAliasMap.put("dest-key", GraphixFunctionIdentifiers.EDGE_DEST_KEY);
+        functionAliasMap.put("edge-destination-key", GraphixFunctionIdentifiers.EDGE_DEST_KEY);
+        functionAliasMap.put("destination-key", GraphixFunctionIdentifiers.EDGE_DEST_KEY);
+        functionAliasMap.put("dir", GraphixFunctionIdentifiers.EDGE_DIRECTION);
+        functionAliasMap.put("direction", GraphixFunctionIdentifiers.EDGE_DIRECTION);
+        functionAliasMap.put("edge-source-vertex", GraphixFunctionIdentifiers.EDGE_SOURCE_VERTEX);
+        functionAliasMap.put("source-vertex", GraphixFunctionIdentifiers.EDGE_SOURCE_VERTEX);
+        functionAliasMap.put("edge-dest-vertex", GraphixFunctionIdentifiers.EDGE_DEST_VERTEX);
+        functionAliasMap.put("dest-vertex", GraphixFunctionIdentifiers.EDGE_DEST_VERTEX);
+        functionAliasMap.put("edge-destination-vertex", GraphixFunctionIdentifiers.EDGE_DEST_VERTEX);
+        functionAliasMap.put("destination-vertex", GraphixFunctionIdentifiers.EDGE_DEST_VERTEX);
+
+        // Build aliases for path functions.
+        functionAliasMap.put("hop-count", GraphixFunctionIdentifiers.PATH_HOP_COUNT);
+        functionAliasMap.put("edge-count", GraphixFunctionIdentifiers.PATH_HOP_COUNT);
+        functionAliasMap.put("labels", GraphixFunctionIdentifiers.PATH_LABELS);
+        functionAliasMap.put("vertices", GraphixFunctionIdentifiers.PATH_VERTICES);
+        functionAliasMap.put("edges", GraphixFunctionIdentifiers.PATH_EDGES);
+    }
+
+    /**
+     * @return {@link FunctionIdentifier} associated with the given function alias. Null otherwise.
+     */
+    public static FunctionIdentifier getFunctionIdentifier(String aliasName) {
+        return functionAliasMap.getOrDefault(aliasName, null);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionIdentifiers.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionIdentifiers.java
new file mode 100644
index 0000000..d743369
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionIdentifiers.java
@@ -0,0 +1,104 @@
+/*
+ * 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.asterix.graphix.function;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Consumer;
+
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+public class GraphixFunctionIdentifiers {
+    private static final Map<String, FunctionIdentifier> functionIdentifierMap;
+
+    // Graphix functions should exist separate from the "ASTERIX_DV" dataverse.
+    public static final DataverseName GRAPHIX_DV = DataverseName.createBuiltinDataverseName("graphix");
+
+    /**
+     * @return {@link FunctionIdentifier} associated with the given function name. Null otherwise.
+     */
+    public static FunctionIdentifier getFunctionIdentifier(String functionName) {
+        return functionIdentifierMap.getOrDefault(functionName, null);
+    }
+
+    // Function to be used when we normalize a graph-element body.
+    public static final FunctionIdentifier GRAPH_ELEMENT_BODY =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "graph-element-body", 5);
+
+    // Functions that can be called on vertices and edges.
+    public static final FunctionIdentifier ELEMENT_LABEL =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "element-label", 1);
+
+    // Functions that can be called on vertices.
+    public static final FunctionIdentifier VERTEX_PROPERTIES =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "vertex-properties", 1);
+    public static final FunctionIdentifier VERTEX_DETAIL =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "vertex-detail", 1);
+    public static final FunctionIdentifier VERTEX_KEY =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "vertex-key", 1);
+
+    // Functions that can be called on edges.
+    public static final FunctionIdentifier EDGE_PROPERTIES =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "edge-properties", 1);
+    public static final FunctionIdentifier EDGE_DETAIL =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "edge-detail", 1);
+    public static final FunctionIdentifier EDGE_SOURCE_KEY =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "edge-source-key", 1);
+    public static final FunctionIdentifier EDGE_DEST_KEY =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "edge-dest-key", 1);
+    public static final FunctionIdentifier EDGE_DIRECTION =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "edge-direction", 1);
+    public static final FunctionIdentifier EDGE_SOURCE_VERTEX =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "edge-source", 3);
+    public static final FunctionIdentifier EDGE_DEST_VERTEX =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "edge-dest", 3);
+
+    // Functions that can be called on paths.
+    public static final FunctionIdentifier PATH_HOP_COUNT =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "path-hop-count", 1);
+    public static final FunctionIdentifier PATH_VERTICES =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "path-vertices", 1);
+    public static final FunctionIdentifier PATH_EDGES =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "path-edges", 1);
+    public static final FunctionIdentifier PATH_LABELS =
+            new FunctionIdentifier(GRAPHIX_DV.getCanonicalForm(), "path-labels", 1);
+
+    static {
+        functionIdentifierMap = new HashMap<>();
+
+        // Register all the functions above.
+        Consumer<FunctionIdentifier> functionRegister = f -> functionIdentifierMap.put(f.getName(), f);
+        functionRegister.accept(ELEMENT_LABEL);
+        functionRegister.accept(VERTEX_PROPERTIES);
+        functionRegister.accept(VERTEX_DETAIL);
+        functionRegister.accept(VERTEX_KEY);
+        functionRegister.accept(EDGE_PROPERTIES);
+        functionRegister.accept(EDGE_DETAIL);
+        functionRegister.accept(EDGE_SOURCE_KEY);
+        functionRegister.accept(EDGE_DEST_KEY);
+        functionRegister.accept(EDGE_DIRECTION);
+        functionRegister.accept(EDGE_SOURCE_VERTEX);
+        functionRegister.accept(EDGE_DEST_VERTEX);
+        functionRegister.accept(PATH_HOP_COUNT);
+        functionRegister.accept(PATH_VERTICES);
+        functionRegister.accept(PATH_EDGES);
+        functionRegister.accept(PATH_LABELS);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionResolver.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionResolver.java
new file mode 100644
index 0000000..60c1f21
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/GraphixFunctionResolver.java
@@ -0,0 +1,91 @@
+/*
+ * 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.asterix.graphix.function;
+
+import java.util.Map;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.functions.FunctionConstants;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.lang.common.statement.FunctionDecl;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+/**
+ * Resolve any functions found in {@link GraphixFunctionIdentifiers}. If any user-defined functions have the same name
+ * as a Graphix function, we defer resolution to the SQL++ rewriter. If we find a system defined function, we also
+ * defer resolution to the SQL++ rewriter.
+ */
+public class GraphixFunctionResolver {
+    private final Map<FunctionSignature, FunctionDecl> declaredFunctionMap;
+    private final MetadataProvider metadataProvider;
+
+    public GraphixFunctionResolver(MetadataProvider metadataProvider,
+            Map<FunctionSignature, FunctionDecl> declaredFunctionMap) {
+        this.declaredFunctionMap = declaredFunctionMap;
+        this.metadataProvider = metadataProvider;
+    }
+
+    public FunctionSignature resolve(FunctionSignature functionSignature) throws CompilationException {
+        DataverseName workingDataverseName = functionSignature.getDataverseName();
+        if (workingDataverseName == null) {
+            workingDataverseName = metadataProvider.getDefaultDataverseName();
+        }
+
+        // Attempt to **find** if a user-defined function exists. We do not resolve these calls here.
+        if (!workingDataverseName.equals(FunctionConstants.ASTERIX_DV)
+                && !workingDataverseName.equals(FunctionConstants.ALGEBRICKS_DV)
+                && !workingDataverseName.equals(GraphixFunctionIdentifiers.GRAPHIX_DV)) {
+            FunctionDecl functionDecl;
+
+            // First, try resolve the call with the given number of arguments.
+            FunctionSignature signatureWithDataverse = functionSignature;
+            if (functionSignature.getDataverseName() == null) {
+                signatureWithDataverse = new FunctionSignature(workingDataverseName, functionSignature.getName(),
+                        functionSignature.getArity());
+            }
+            functionDecl = declaredFunctionMap.get(signatureWithDataverse);
+
+            // If this has failed, retry with a variable number of arguments.
+            if (functionDecl == null) {
+                FunctionSignature signatureWithVarArgs = new FunctionSignature(workingDataverseName,
+                        functionSignature.getName(), FunctionIdentifier.VARARGS);
+                functionDecl = declaredFunctionMap.get(signatureWithVarArgs);
+            }
+
+            if (functionDecl != null) {
+                return null;
+            }
+        }
+
+        // We could not find a declared user-defined function. See if this is a Graphix-function call.
+        String functionName = functionSignature.getName().toLowerCase().replaceAll("_", "-");
+        FunctionIdentifier graphixFunctionIdentifier = GraphixFunctionIdentifiers.getFunctionIdentifier(functionName);
+        if (graphixFunctionIdentifier == null) {
+            graphixFunctionIdentifier = GraphixFunctionAliases.getFunctionIdentifier(functionName);
+        }
+        if (graphixFunctionIdentifier != null) {
+            return new FunctionSignature(graphixFunctionIdentifier);
+        }
+
+        // This is either a SQL++ built-in function or an error. Defer this to the SQL++ rewrites.
+        return null;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/EdgeVertexFunctionRewrite.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/EdgeVertexFunctionRewrite.java
new file mode 100644
index 0000000..983c7f8
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/EdgeVertexFunctionRewrite.java
@@ -0,0 +1,76 @@
+/*
+ * 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.asterix.graphix.function.rewrite;
+
+import java.util.List;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.rewrites.record.EdgeRecord;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.OperatorExpr;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.common.literal.TrueLiteral;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.struct.OperatorType;
+import org.apache.asterix.lang.sqlpp.expression.CaseExpression;
+
+/**
+ * Given the expression *_VERTEX(myEdgeVar, leftVertexVar, rightVertexVar), rewrite this function to return either
+ * vertex (depending on our owner).
+ * 2. Build two conditions: one where our edge direction is equal to LEFT_TO_RIGHT, and another where our edge direction
+ * is equal to RIGHT_TO_LEFT.
+ * 3. Build our case statement.
+ */
+public class EdgeVertexFunctionRewrite implements IFunctionRewrite {
+    private final boolean isSourceVertex;
+
+    public EdgeVertexFunctionRewrite(boolean isSourceVertex) {
+        this.isSourceVertex = isSourceVertex;
+    }
+
+    @Override
+    public Expression apply(GraphixRewritingContext graphixRewritingContext, List<Expression> callArguments)
+            throws CompilationException {
+        // Fetch our edge direction.
+        final Identifier detailSuffix = new Identifier(EdgeRecord.EDGE_DETAIL_NAME);
+        final Identifier directionSuffix = new Identifier(EdgeRecord.DIRECTION_FIELD_NAME);
+        FieldAccessor edgeDetailAccess = new FieldAccessor(callArguments.get(0), detailSuffix);
+        FieldAccessor edgeDirAccess = new FieldAccessor(edgeDetailAccess, directionSuffix);
+
+        // Create a LEFT_TO_RIGHT condition.
+        LiteralExpr l2RLiteral = new LiteralExpr(new StringLiteral(EdgeDescriptor.EdgeType.LEFT_TO_RIGHT.name()));
+        List<Expression> l2ROperands = List.of(edgeDirAccess, l2RLiteral);
+        OperatorExpr l2RCondition = new OperatorExpr(l2ROperands, List.of(OperatorType.EQ), false);
+
+        // Create a RIGHT_TO_LEFT condition.
+        LiteralExpr r2LLiteral = new LiteralExpr(new StringLiteral(EdgeDescriptor.EdgeType.RIGHT_TO_LEFT.name()));
+        List<Expression> r2LOperands = List.of(edgeDirAccess, r2LLiteral);
+        OperatorExpr r2LCondition = new OperatorExpr(r2LOperands, List.of(OperatorType.EQ), false);
+
+        // Build our CASE expression.
+        List<Expression> thenExpressionList = isSourceVertex ? List.of(callArguments.get(1), callArguments.get(2))
+                : List.of(callArguments.get(2), callArguments.get(1));
+        return new CaseExpression(new LiteralExpr(TrueLiteral.INSTANCE), List.of(l2RCondition, r2LCondition),
+                thenExpressionList, null);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/IFunctionRewrite.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/IFunctionRewrite.java
new file mode 100644
index 0000000..7288aa7
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/IFunctionRewrite.java
@@ -0,0 +1,35 @@
+/*
+ * 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.asterix.graphix.function.rewrite;
+
+import java.util.List;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.function.FunctionRewriteMap;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.lang.common.base.Expression;
+
+/**
+ * @see FunctionRewriteMap
+ */
+@FunctionalInterface
+public interface IFunctionRewrite {
+    Expression apply(GraphixRewritingContext graphixRewritingContext, List<Expression> callArguments)
+            throws CompilationException;
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathEdgesFunctionRewrite.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathEdgesFunctionRewrite.java
new file mode 100644
index 0000000..b961000
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathEdgesFunctionRewrite.java
@@ -0,0 +1,58 @@
+/*
+ * 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.asterix.graphix.function.rewrite;
+
+import java.util.List;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.rewrites.record.PathRecord;
+import org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.WhereClause;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+
+/**
+ * Given the expression PATH_EDGES(myPathVar), rewrite this function to extract all edges from the given path.
+ * 1. Create a field access to get the edge of our path record.
+ * 2. Filter out unknown edges (may occur w/ dangling vertices in paths).
+ * 2. Build up a SELECT-EXPR whose FROM-TERM is our path variable.
+ */
+public class PathEdgesFunctionRewrite implements IFunctionRewrite {
+    @Override
+    public Expression apply(GraphixRewritingContext graphixRewritingContext, List<Expression> callArguments)
+            throws CompilationException {
+        // Build the SELECT-EXPR. We want to get the edge from our path record.
+        VariableExpr edgeVar = new VariableExpr(graphixRewritingContext.getNewVariable());
+        FromTerm fromTerm = new FromTerm(callArguments.get(0), edgeVar, null, null);
+        FunctionSignature isUnknownFunctionSignature = new FunctionSignature(BuiltinFunctions.IS_UNKNOWN);
+        FunctionSignature notFunctionSignature = new FunctionSignature(BuiltinFunctions.NOT);
+        FieldAccessor edgeAccess = new FieldAccessor(edgeVar, new Identifier(PathRecord.EDGE_FIELD_NAME));
+        List<AbstractClause> whereClauses = List.of(new WhereClause(new CallExpr(notFunctionSignature,
+                List.of(new CallExpr(isUnknownFunctionSignature, List.of(edgeAccess))))));
+        return LowerRewritingUtil.buildSelectWithFromAndElement(fromTerm, whereClauses, edgeAccess);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathHopCountFunctionRewrite.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathHopCountFunctionRewrite.java
new file mode 100644
index 0000000..9b1801f
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathHopCountFunctionRewrite.java
@@ -0,0 +1,66 @@
+/*
+ * 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.asterix.graphix.function.rewrite;
+
+import java.util.List;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.rewrites.record.PathRecord;
+import org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.WhereClause;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.literal.IntegerLiteral;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+
+/**
+ * Given the expression PATH_HOP_COUNT(myPathVar), rewrite this function to return a count of edges in the given path.
+ * 1. First, create a field access to get the edge of our path record.
+ * 2. Next, filter out all unknown edges of our path. An path-edge can be unknown if a dangling vertex exists.
+ * 3. Build up a SELECT-EXPR whose FROM-TERM is our path variable.
+ * 4. Finally, return the LENGTH of the SELECT-EXPR list.
+ */
+public class PathHopCountFunctionRewrite implements IFunctionRewrite {
+    @Override
+    public Expression apply(GraphixRewritingContext graphixRewritingContext, List<Expression> callArguments)
+            throws CompilationException {
+        // We only want edges that are not unknown.
+        VariableExpr edgeVar = new VariableExpr(graphixRewritingContext.getNewVariable());
+        FromTerm fromTerm = new FromTerm(callArguments.get(0), edgeVar, null, null);
+        FieldAccessor edgeAccess = new FieldAccessor(edgeVar, new Identifier(PathRecord.EDGE_FIELD_NAME));
+        FunctionSignature isUnknownFunctionSignature = new FunctionSignature(BuiltinFunctions.IS_UNKNOWN);
+        FunctionSignature notFunctionSignature = new FunctionSignature(BuiltinFunctions.NOT);
+        CallExpr callExpr = new CallExpr(notFunctionSignature,
+                List.of(new CallExpr(isUnknownFunctionSignature, List.of(edgeAccess))));
+        SelectExpression selectExpression = LowerRewritingUtil.buildSelectWithFromAndElement(fromTerm,
+                List.of(new WhereClause(callExpr)), new LiteralExpr(new IntegerLiteral(1)));
+
+        // Our SELECT returns a list. Count the length of this list.
+        FunctionSignature lengthFunctionSignature = new FunctionSignature(BuiltinFunctions.LEN);
+        return new CallExpr(lengthFunctionSignature, List.of(selectExpression));
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathLabelsFunctionRewrite.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathLabelsFunctionRewrite.java
new file mode 100644
index 0000000..f998ce3
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathLabelsFunctionRewrite.java
@@ -0,0 +1,79 @@
+/*
+ * 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.asterix.graphix.function.rewrite;
+
+import java.util.List;
+import java.util.function.Function;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.rewrites.record.IElementRecord;
+import org.apache.asterix.graphix.lang.rewrites.record.PathRecord;
+import org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.ListConstructor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.UnnestClause;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.optype.UnnestType;
+
+/**
+ * Given the expression PATH_LABELS(myPathVar), rewrite this function to extract unique labels from the given path.
+ * 1. First, we create a FROM-TERM from the given call argument. We assume that this is a path variable.
+ * 2. Next, we build an ordered-list expression of LABEL accesses to the left vertex, edge, and right vertex of our
+ * path record.
+ * 3. UNNEST this ordered-list expression to get the label values, and mark the associated SELECT-EXPR as DISTINCT to
+ * remove duplicates labels. Building this ordered-list and then UNNESTing said list is required to get a flat list of
+ * label values.
+ *
+ * TODO (GLENN): We can definitely remove the "DISTINCT" and "UNNEST", but this is logically equivalent.
+ */
+public class PathLabelsFunctionRewrite implements IFunctionRewrite {
+    @Override
+    public Expression apply(GraphixRewritingContext graphixRewritingContext, List<Expression> callArguments)
+            throws CompilationException {
+        // Access the label field in each of edge record fields.
+        VariableExpr edgeVar = new VariableExpr(graphixRewritingContext.getNewVariable());
+        Function<String, FieldAccessor> labelAccessBuilder = i -> {
+            final Identifier detailSuffix = new Identifier(IElementRecord.ELEMENT_DETAIL_NAME);
+            final Identifier labelSuffix = new Identifier(IElementRecord.ELEMENT_LABEL_FIELD_NAME);
+            FieldAccessor elementAccess = new FieldAccessor(edgeVar, new Identifier(i));
+            FieldAccessor detailAccess = new FieldAccessor(elementAccess, detailSuffix);
+            return new FieldAccessor(detailAccess, labelSuffix);
+        };
+        FieldAccessor leftVertexLabel = labelAccessBuilder.apply(PathRecord.LEFT_VERTEX_FIELD_NAME);
+        FieldAccessor edgeLabel = labelAccessBuilder.apply(PathRecord.EDGE_FIELD_NAME);
+        FieldAccessor rightVertexLabel = labelAccessBuilder.apply(PathRecord.RIGHT_VERTEX_FIELD_NAME);
+
+        // Build a list of labels, and UNNEST this list to get a flat list of labels.
+        ListConstructor listConstructor = new ListConstructor(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR,
+                List.of(leftVertexLabel, edgeLabel, rightVertexLabel));
+        VariableExpr labelVar = new VariableExpr(graphixRewritingContext.getNewVariable());
+        UnnestClause edgeUnnest = new UnnestClause(UnnestType.INNER, listConstructor, labelVar, null, null);
+        FromTerm fromTerm = new FromTerm(callArguments.get(0), edgeVar, null, List.of(edgeUnnest));
+
+        // Build the SELECT-EXPR. We will also mark this SELECT-CLAUSE as DISTINCT.
+        SelectExpression selectExpr = LowerRewritingUtil.buildSelectWithFromAndElement(fromTerm, null, labelVar);
+        selectExpr.getSelectSetOperation().getLeftInput().getSelectBlock().getSelectClause().setDistinct(true);
+        return selectExpr;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathVerticesFunctionRewrite.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathVerticesFunctionRewrite.java
new file mode 100644
index 0000000..4ffb338
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/function/rewrite/PathVerticesFunctionRewrite.java
@@ -0,0 +1,80 @@
+/*
+ * 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.asterix.graphix.function.rewrite;
+
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildSelectWithFromAndElement;
+
+import java.util.List;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.rewrites.record.PathRecord;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.WhereClause;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.ListConstructor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.UnnestClause;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.optype.UnnestType;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+
+/**
+ * Given the expression PATH_VERTICES(myPathVar), rewrite this function to extract all vertices from the given path.
+ * 1. First, we create a FROM-TERM from the given call argument. We assume that this is a path variable.
+ * 2. Next, we build an ordered-list expression of accesses to the left vertex and the right vertex of our path record.
+ * 3. UNNEST this ordered-list expression to get the vertex values, and mark the associated SELECT-EXPR as DISTINCT to
+ * remove duplicates vertices. Building this ordered-list and then UNNESTing said list is required to get a flat list of
+ * vertices.
+ *
+ * TODO (GLENN): We can definitely remove the "DISTINCT" and "UNNEST", but this is logically equivalent.
+ */
+public class PathVerticesFunctionRewrite implements IFunctionRewrite {
+    @Override
+    public Expression apply(GraphixRewritingContext graphixRewritingContext, List<Expression> callArguments)
+            throws CompilationException {
+        // Access the left and right vertices of our edge record.
+        VariableExpr edgeVar = new VariableExpr(graphixRewritingContext.getNewVariable());
+        FieldAccessor leftVertex = new FieldAccessor(edgeVar, new Identifier(PathRecord.LEFT_VERTEX_FIELD_NAME));
+        FieldAccessor rightVertex = new FieldAccessor(edgeVar, new Identifier(PathRecord.RIGHT_VERTEX_FIELD_NAME));
+
+        // Build a list of vertices, and UNNEST this list to get a flat list of vertices.
+        ListConstructor listConstructor =
+                new ListConstructor(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR, List.of(leftVertex, rightVertex));
+        VariableExpr vertexVar = new VariableExpr(graphixRewritingContext.getNewVariable());
+        UnnestClause edgeUnnest = new UnnestClause(UnnestType.INNER, listConstructor, vertexVar, null, null);
+
+        // Ensure that we filter out unknown vertices (can occur with dangling vertices).
+        FunctionSignature isUnknownFunctionSignature = new FunctionSignature(BuiltinFunctions.IS_UNKNOWN);
+        FunctionSignature notFunctionSignature = new FunctionSignature(BuiltinFunctions.NOT);
+        List<AbstractClause> whereClauses = List.of(new WhereClause(new CallExpr(notFunctionSignature,
+                List.of(new CallExpr(isUnknownFunctionSignature, List.of(vertexVar))))));
+        FromTerm fromTerm = new FromTerm(callArguments.get(0), edgeVar, null, List.of(edgeUnnest));
+
+        // Build the SELECT-EXPR. We will also mark this SELECT-CLAUSE as DISTINCT.
+        SelectExpression selectExpr = buildSelectWithFromAndElement(fromTerm, whereClauses, vertexVar);
+        selectExpr.getSelectSetOperation().getLeftInput().getSelectBlock().getSelectClause().setDistinct(true);
+        return selectExpr;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/FromGraphClause.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/FromGraphClause.java
new file mode 100644
index 0000000..0e93470
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/FromGraphClause.java
@@ -0,0 +1,131 @@
+/*
+ * 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.asterix.graphix.lang.clause;
+
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+
+/**
+ * The logical starting AST node for Graphix queries. A FROM-GRAPH node includes the following:
+ * - Either a {@link GraphConstructor} OR a [dataverse, graph name] pair. The former indicates that we are dealing with
+ * an anonymous graph, while the latter indicates that we must search our metadata for the graph.
+ * - A list of {@link MatchClause} nodes, with a minimum size of one. The first MATCH node type must always be LEADING.
+ * - A list of {@link AbstractBinaryCorrelateClause} nodes, which may be empty. These include UNNEST and explicit JOINs.
+ */
+public class FromGraphClause extends AbstractClause {
+    // A FROM-MATCH must either have a graph constructor...
+    private final GraphConstructor graphConstructor;
+
+    // Or a reference to a named graph (both cannot be specified).
+    private final DataverseName dataverse;
+    private final Identifier name;
+
+    // Every FROM-MATCH **MUST** include at-least a single MATCH clause. Correlated clauses are optional.
+    private final List<MatchClause> matchClauses;
+    private final List<AbstractBinaryCorrelateClause> correlateClauses;
+
+    public FromGraphClause(DataverseName dataverse, Identifier name, List<MatchClause> matchClauses,
+            List<AbstractBinaryCorrelateClause> correlateClauses) {
+        this.graphConstructor = null;
+        this.dataverse = dataverse;
+        this.name = Objects.requireNonNull(name);
+        this.matchClauses = Objects.requireNonNull(matchClauses);
+        this.correlateClauses = Objects.requireNonNull(correlateClauses);
+
+        if (matchClauses.isEmpty()) {
+            throw new IllegalArgumentException("FROM-MATCH requires at least one MATCH clause.");
+        }
+    }
+
+    public FromGraphClause(GraphConstructor graphConstructor, List<MatchClause> matchClauses,
+            List<AbstractBinaryCorrelateClause> correlateClauses) {
+        this.graphConstructor = Objects.requireNonNull(graphConstructor);
+        this.dataverse = null;
+        this.name = null;
+        this.matchClauses = Objects.requireNonNull(matchClauses);
+        this.correlateClauses = Objects.requireNonNull(correlateClauses);
+
+        if (matchClauses.isEmpty()) {
+            throw new IllegalArgumentException("FROM-MATCH requires at least one MATCH clause.");
+        }
+    }
+
+    public GraphConstructor getGraphConstructor() {
+        return graphConstructor;
+    }
+
+    public DataverseName getDataverseName() {
+        return dataverse;
+    }
+
+    public Identifier getGraphName() {
+        return name;
+    }
+
+    public List<MatchClause> getMatchClauses() {
+        return matchClauses;
+    }
+
+    public List<AbstractBinaryCorrelateClause> getCorrelateClauses() {
+        return correlateClauses;
+    }
+
+    @Override
+    public ClauseType getClauseType() {
+        return null;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
+        return ((IGraphixLangVisitor<R, T>) visitor).visit(this, arg);
+    }
+
+    @Override
+    public String toString() {
+        return (graphConstructor == null) ? dataverse.toString() + "." + name : graphConstructor.toString();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(graphConstructor, dataverse, name, matchClauses, correlateClauses);
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (!(object instanceof FromGraphClause)) {
+            return false;
+        }
+        FromGraphClause that = (FromGraphClause) object;
+        return Objects.equals(graphConstructor, that.graphConstructor) && Objects.equals(dataverse, that.dataverse)
+                && Objects.equals(name, that.name) && matchClauses.equals(that.matchClauses)
+                && Objects.equals(correlateClauses, that.correlateClauses);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/GraphSelectBlock.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/GraphSelectBlock.java
new file mode 100644
index 0000000..693ee70
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/GraphSelectBlock.java
@@ -0,0 +1,108 @@
+/*
+ * 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.asterix.graphix.lang.clause;
+
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.clause.GroupbyClause;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+import org.apache.asterix.lang.sqlpp.clause.SelectClause;
+import org.apache.asterix.lang.sqlpp.visitor.base.ISqlppVisitor;
+
+/**
+ * Starting AST node for a Graphix query, which will replace the FROM-CLAUSE with a {@link FromGraphClause} on
+ * parse. The goal of our Graphix rewriter is to replace these {@link FromGraphClause} nodes with applicable
+ * {@link org.apache.asterix.lang.sqlpp.clause.FromClause} nodes.
+ */
+public class GraphSelectBlock extends SelectBlock {
+    private FromGraphClause fromGraphClause;
+
+    public GraphSelectBlock(SelectClause selectClause, FromGraphClause fromGraphClause,
+            List<AbstractClause> letWhereClauses, GroupbyClause groupbyClause,
+            List<AbstractClause> letHavingClausesAfterGby) {
+        super(selectClause, null, letWhereClauses, groupbyClause, letHavingClausesAfterGby);
+        this.fromGraphClause = fromGraphClause;
+    }
+
+    public FromGraphClause getFromGraphClause() {
+        return fromGraphClause;
+    }
+
+    public void setFromGraphClause(FromGraphClause fromGraphClause) {
+        this.fromGraphClause = fromGraphClause;
+    }
+
+    public boolean hasFromGraphClause() {
+        return fromGraphClause != null;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
+        if (hasFromGraphClause()) {
+            return ((IGraphixLangVisitor<R, T>) visitor).visit(this, arg);
+
+        } else {
+            return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
+        }
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getFromClause(), getFromGraphClause(), getGroupbyClause(), getLetWhereList(),
+                getLetHavingListAfterGroupby(), getSelectClause());
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (!(object instanceof GraphSelectBlock)) {
+            return false;
+        }
+        GraphSelectBlock target = (GraphSelectBlock) object;
+        return super.equals(target) && Objects.equals(getFromGraphClause(), target.getFromGraphClause());
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getSelectClause());
+        if (hasFromClause()) {
+            sb.append(' ').append(getFromClause());
+        } else if (hasFromGraphClause()) {
+            sb.append(' ').append(getFromGraphClause());
+        }
+        if (hasLetWhereClauses()) {
+            sb.append(' ').append(getLetWhereList());
+        }
+        if (hasGroupbyClause()) {
+            sb.append(' ').append(getGroupbyClause());
+        }
+        if (hasLetHavingClausesAfterGroupby()) {
+            sb.append(' ').append(getLetHavingListAfterGroupby());
+        }
+        return sb.toString();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/MatchClause.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/MatchClause.java
new file mode 100644
index 0000000..e0fbf7f
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/clause/MatchClause.java
@@ -0,0 +1,73 @@
+/*
+ * 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.asterix.graphix.lang.clause;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.optype.MatchType;
+import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+
+/**
+ * Container for a collection of {@link PathPatternExpr} nodes.
+ * - A MATCH node has three types: LEADING (indicating that this node is first), INNER (indicating that this node is not
+ * first, but all patterns must be matched), and LEFTOUTER (indicating that this node is optionally matched).
+ * - Under isomorphism semantics, two patterns in different MATCH nodes (one pattern in a LEADING MATCH node and
+ * one pattern in an INNER MATCH node) are equivalent to two patterns in a single LEADING MATCH node. See
+ * {@link org.apache.asterix.graphix.lang.rewrites.lower.assembly.IsomorphismLowerAssembly} for more detail.
+ */
+public class MatchClause extends AbstractClause {
+    private final List<PathPatternExpr> pathExpressions;
+    private final MatchType matchType;
+
+    public MatchClause(List<PathPatternExpr> pathExpressions, MatchType matchType) {
+        this.pathExpressions = Objects.requireNonNull(pathExpressions);
+        this.matchType = matchType;
+    }
+
+    public List<PathPatternExpr> getPathExpressions() {
+        return pathExpressions;
+    }
+
+    public MatchType getMatchType() {
+        return matchType;
+    }
+
+    @Override
+    public ClauseType getClauseType() {
+        return null;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
+        return ((IGraphixLangVisitor<R, T>) visitor).visit(this, arg);
+    }
+
+    @Override
+    public String toString() {
+        String pathString = pathExpressions.stream().map(PathPatternExpr::toString).collect(Collectors.joining("\n"));
+        return matchType.toString() + " " + pathString;
+
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/EdgePatternExpr.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/EdgePatternExpr.java
new file mode 100644
index 0000000..d7d194f
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/EdgePatternExpr.java
@@ -0,0 +1,97 @@
+/*
+ * 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.asterix.graphix.lang.expression;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.base.AbstractExpression;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+
+/**
+ * A query edge (not to be confused with an edge constructor) is composed of a {@link EdgeDescriptor} (containing the
+ * edge labels, an optional edge variable, and the hop range), an list of optional internal {@link VertexPatternExpr}
+ * instances, a left {@link VertexPatternExpr}, and a right {@link VertexPatternExpr}.
+ */
+public class EdgePatternExpr extends AbstractExpression implements IGraphExpr {
+    private final List<VertexPatternExpr> internalVertices;
+    private final VertexPatternExpr leftVertex;
+    private final VertexPatternExpr rightVertex;
+    private final EdgeDescriptor edgeDescriptor;
+
+    public EdgePatternExpr(VertexPatternExpr leftVertex, VertexPatternExpr rightVertex, EdgeDescriptor edgeDescriptor) {
+        this.leftVertex = Objects.requireNonNull(leftVertex);
+        this.rightVertex = Objects.requireNonNull(rightVertex);
+        this.edgeDescriptor = Objects.requireNonNull(edgeDescriptor);
+        this.internalVertices = new ArrayList<>();
+
+        if (edgeDescriptor.getEdgeClass() == GraphExprKind.PATH_PATTERN) {
+            // If we have a sub-path, we have an internal vertex that we need to manage.
+            for (int i = 0; i < edgeDescriptor.getMaximumHops() - 1; i++) {
+                this.internalVertices.add(new VertexPatternExpr(null, new HashSet<>()));
+            }
+        }
+    }
+
+    public VertexPatternExpr getLeftVertex() {
+        return leftVertex;
+    }
+
+    public VertexPatternExpr getRightVertex() {
+        return rightVertex;
+    }
+
+    public EdgeDescriptor getEdgeDescriptor() {
+        return edgeDescriptor;
+    }
+
+    public List<VertexPatternExpr> getInternalVertices() {
+        return internalVertices;
+    }
+
+    public void replaceInternalVertices(List<VertexPatternExpr> internalVertices) {
+        this.internalVertices.clear();
+        this.internalVertices.addAll(internalVertices);
+    }
+
+    @Override
+    public String toString() {
+        return leftVertex.toString() + edgeDescriptor.toString() + rightVertex.toString();
+    }
+
+    @Override
+    public Kind getKind() {
+        return null;
+    }
+
+    @Override
+    public GraphExprKind getGraphExprKind() {
+        return edgeDescriptor.getEdgeClass();
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
+        return ((IGraphixLangVisitor<R, T>) visitor).visit(this, arg);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphConstructor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphConstructor.java
index 8ba4cea..e06893a 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphConstructor.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphConstructor.java
@@ -19,29 +19,44 @@
 package org.apache.asterix.graphix.lang.expression;
 
 import java.util.List;
+import java.util.Objects;
+import java.util.UUID;
 
 import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
 import org.apache.asterix.lang.common.base.AbstractExpression;
 import org.apache.asterix.lang.common.base.AbstractLangExpression;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 
-public class GraphConstructor extends AbstractExpression {
-    private final List<VertexElement> vertexElements;
-    private final List<EdgeElement> edgeElements;
+/**
+ * An expression which describes the schema of a graph, containing a list of vertices ({@link VertexConstructor}) and
+ * a list of edges ({@link EdgeConstructor}) that connect the aforementioned vertices.
+ */
+public class GraphConstructor extends AbstractExpression implements IGraphExpr {
+    private final List<VertexConstructor> vertexConstructors;
+    private final List<EdgeConstructor> edgeConstructors;
 
-    public GraphConstructor(List<VertexElement> vertexElements, List<EdgeElement> edgeElements) {
-        this.vertexElements = vertexElements;
-        this.edgeElements = edgeElements;
+    // On parsing, we want to identify which graph-constructors are unique from one another.
+    private final UUID instanceID;
+
+    public GraphConstructor(List<VertexConstructor> vertexConstructors, List<EdgeConstructor> edgeConstructors) {
+        this.vertexConstructors = vertexConstructors;
+        this.edgeConstructors = edgeConstructors;
+        this.instanceID = UUID.randomUUID();
     }
 
-    public List<VertexElement> getVertexElements() {
-        return vertexElements;
+    public List<VertexConstructor> getVertexElements() {
+        return vertexConstructors;
     }
 
-    public List<EdgeElement> getEdgeElements() {
-        return edgeElements;
+    public List<EdgeConstructor> getEdgeElements() {
+        return edgeConstructors;
+    }
+
+    public String getInstanceID() {
+        return instanceID.toString();
     }
 
     @Override
@@ -50,11 +65,21 @@
     }
 
     @Override
+    public GraphExprKind getGraphExprKind() {
+        return GraphExprKind.GRAPH_CONSTRUCTOR;
+    }
+
+    @Override
     public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IGraphixLangVisitor<R, T>) visitor).visit(this, arg);
     }
 
     @Override
+    public int hashCode() {
+        return Objects.hash(vertexConstructors, edgeConstructors);
+    }
+
+    @Override
     public boolean equals(Object object) {
         if (this == object) {
             return true;
@@ -63,17 +88,24 @@
             return false;
         }
         GraphConstructor that = (GraphConstructor) object;
-        return vertexElements.equals(that.vertexElements) && edgeElements.equals(that.edgeElements);
+        return vertexConstructors.equals(that.vertexConstructors) && edgeConstructors.equals(that.edgeConstructors);
     }
 
-    public static class VertexElement extends AbstractLangExpression {
+    /**
+     * A vertex constructor (not be confused with a query vertex) is composed of the following:
+     * - An AST containing the vertex body expression, as well as the raw body string itself.
+     * - A single label that groups the aforementioned body with other vertices of the same label.
+     * - A list of primary key fields, which must be the same as other vertices of the same label. These fields are
+     * used in the JOIN clause with edges.
+     */
+    public static class VertexConstructor extends AbstractLangExpression {
         private final List<Integer> primaryKeySourceIndicators;
         private final List<List<String>> primaryKeyFields;
         private final Expression expression;
+        private final ElementLabel label;
         private final String definition;
-        private final String label;
 
-        public VertexElement(String label, List<List<String>> primaryKeyFields,
+        public VertexConstructor(ElementLabel label, List<List<String>> primaryKeyFields,
                 List<Integer> primaryKeySourceIndicators, Expression expression, String definition) {
             this.primaryKeySourceIndicators = primaryKeySourceIndicators;
             this.primaryKeyFields = primaryKeyFields;
@@ -98,7 +130,7 @@
             return definition;
         }
 
-        public String getLabel() {
+        public ElementLabel getLabel() {
             return label;
         }
 
@@ -113,44 +145,55 @@
         }
 
         @Override
+        public int hashCode() {
+            return Objects.hash(primaryKeyFields, expression, definition, label);
+        }
+
+        @Override
         public boolean equals(Object object) {
             if (this == object) {
                 return true;
             }
-            if (!(object instanceof VertexElement)) {
+            if (!(object instanceof VertexConstructor)) {
                 return false;
             }
-            VertexElement that = (VertexElement) object;
+            VertexConstructor that = (VertexConstructor) object;
             return primaryKeySourceIndicators.equals(that.primaryKeySourceIndicators)
                     && primaryKeyFields.equals(that.primaryKeyFields) && expression.equals(that.expression)
                     && definition.equals(that.definition) && label.equals(that.label);
         }
     }
 
-    public static class EdgeElement extends AbstractLangExpression {
+    /**
+     * An edge constructor (not be confused with a query edge) is composed of the following:
+     * - An AST containing the edge body expression, as well as the raw body string itself.
+     * - A single edge label that groups the aforementioned body with other edges of the same label.
+     * - A single label that denotes the source vertices of this edge, as well as another label that denotes the
+     * destination vertices of this edge.
+     * - A list of source key fields, which must be the same as other edges of the same label. These fields are used in
+     * the JOIN clause with the corresponding source vertices.
+     * - A list of destination key fields, which must be the same as other edges of the same label. These fields are
+     * used in the JOIN clause with the corresponding destination vertices.
+     */
+    public static class EdgeConstructor extends AbstractLangExpression {
         private final List<Integer> destinationKeySourceIndicators;
         private final List<Integer> sourceKeySourceIndicators;
-        private final List<Integer> primaryKeySourceIndicators;
 
         private final List<List<String>> destinationKeyFields;
         private final List<List<String>> sourceKeyFields;
-        private final List<List<String>> primaryKeyFields;
 
-        private final String destinationLabel, edgeLabel, sourceLabel;
+        private final ElementLabel destinationLabel, edgeLabel, sourceLabel;
         private final Expression expression;
         private final String definition;
 
-        public EdgeElement(String edgeLabel, String destinationLabel, String sourceLabel,
-                List<List<String>> primaryKeyFields, List<Integer> primaryKeySourceIndicators,
+        public EdgeConstructor(ElementLabel edgeLabel, ElementLabel destinationLabel, ElementLabel sourceLabel,
                 List<List<String>> destinationKeyFields, List<Integer> destinationKeySourceIndicators,
                 List<List<String>> sourceKeyFields, List<Integer> sourceKeySourceIndicators, Expression expression,
                 String definition) {
             this.destinationKeySourceIndicators = destinationKeySourceIndicators;
             this.sourceKeySourceIndicators = sourceKeySourceIndicators;
-            this.primaryKeySourceIndicators = primaryKeySourceIndicators;
             this.destinationKeyFields = destinationKeyFields;
             this.sourceKeyFields = sourceKeyFields;
-            this.primaryKeyFields = primaryKeyFields;
             this.destinationLabel = destinationLabel;
             this.edgeLabel = edgeLabel;
             this.sourceLabel = sourceLabel;
@@ -166,10 +209,6 @@
             return sourceKeySourceIndicators;
         }
 
-        public List<Integer> getPrimaryKeySourceIndicators() {
-            return primaryKeySourceIndicators;
-        }
-
         public List<List<String>> getDestinationKeyFields() {
             return destinationKeyFields;
         }
@@ -178,19 +217,15 @@
             return sourceKeyFields;
         }
 
-        public List<List<String>> getPrimaryKeyFields() {
-            return primaryKeyFields;
-        }
-
-        public String getDestinationLabel() {
+        public ElementLabel getDestinationLabel() {
             return destinationLabel;
         }
 
-        public String getEdgeLabel() {
+        public ElementLabel getEdgeLabel() {
             return edgeLabel;
         }
 
-        public String getSourceLabel() {
+        public ElementLabel getSourceLabel() {
             return sourceLabel;
         }
 
@@ -208,7 +243,7 @@
             String sourceNodePattern = "(:" + sourceLabel + ")";
             String destinationNodePattern = "(:" + destinationLabel + ")";
             String edgePattern = sourceNodePattern + "-" + edgeBodyPattern + "->" + destinationNodePattern;
-            return (definition == null) ? edgePattern : (edgePattern + " AS " + definition);
+            return edgePattern + " AS " + definition;
         }
 
         @Override
@@ -217,22 +252,26 @@
         }
 
         @Override
+        public int hashCode() {
+            return Objects.hash(destinationKeyFields, sourceKeyFields, destinationLabel, edgeLabel, sourceLabel,
+                    expression, definition);
+        }
+
+        @Override
         public boolean equals(Object object) {
             if (this == object) {
                 return true;
             }
-            if (!(object instanceof EdgeElement)) {
+            if (!(object instanceof EdgeConstructor)) {
                 return false;
             }
-            EdgeElement that = (EdgeElement) object;
+            EdgeConstructor that = (EdgeConstructor) object;
             return destinationKeySourceIndicators.equals(that.destinationKeySourceIndicators)
                     && sourceKeySourceIndicators.equals(that.sourceKeySourceIndicators)
-                    && primaryKeySourceIndicators.equals(that.primaryKeySourceIndicators)
                     && destinationKeyFields.equals(that.destinationKeyFields)
-                    && sourceKeyFields.equals(that.sourceKeyFields) && primaryKeyFields.equals(that.primaryKeyFields)
-                    && destinationLabel.equals(that.destinationLabel) && edgeLabel.equals(that.edgeLabel)
-                    && sourceLabel.equals(that.sourceLabel) && expression.equals(that.expression)
-                    && definition.equals(that.definition);
+                    && sourceKeyFields.equals(that.sourceKeyFields) && destinationLabel.equals(that.destinationLabel)
+                    && edgeLabel.equals(that.edgeLabel) && sourceLabel.equals(that.sourceLabel)
+                    && expression.equals(that.expression) && definition.equals(that.definition);
         }
     }
 }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphElementBodyExpr.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphElementBodyExpr.java
new file mode 100644
index 0000000..bb711f9
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphElementBodyExpr.java
@@ -0,0 +1,55 @@
+/*
+ * 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.asterix.graphix.lang.expression;
+
+import java.util.Collections;
+
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.function.GraphixFunctionIdentifiers;
+import org.apache.asterix.lang.common.expression.CallExpr;
+
+public class GraphElementBodyExpr extends CallExpr implements IGraphExpr {
+    // A graph element is uniquely identified by its identifier.
+    private final GraphElementIdentifier identifier;
+
+    public GraphElementBodyExpr(GraphElementIdentifier identifier) {
+        super(new FunctionSignature(GraphixFunctionIdentifiers.GRAPH_ELEMENT_BODY), Collections.emptyList(), null);
+        this.identifier = identifier;
+    }
+
+    public GraphElementIdentifier getIdentifier() {
+        return identifier;
+    }
+
+    public GraphIdentifier getGraphIdentifier() {
+        return identifier.getGraphIdentifier();
+    }
+
+    @Override
+    public Kind getKind() {
+        return null;
+    }
+
+    @Override
+    public GraphExprKind getGraphExprKind() {
+        return GraphExprKind.GRAPH_ELEMENT_BODY;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphElementExpr.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphElementExpr.java
deleted file mode 100644
index 11c1e34..0000000
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/GraphElementExpr.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.asterix.graphix.lang.expression;
-
-import java.util.Collections;
-
-import org.apache.asterix.common.functions.FunctionConstants;
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
-import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
-import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
-import org.apache.asterix.lang.common.expression.CallExpr;
-import org.apache.asterix.lang.common.statement.Query;
-import org.apache.asterix.lang.common.util.ExpressionUtils;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
-
-public class GraphElementExpr extends CallExpr {
-    public static final String GRAPH_ELEMENT_FUNCTION_NAME = "graph-element";
-    public static final FunctionIdentifier GRAPH_ELEMENT_FUNCTION_ID =
-            new FunctionIdentifier(FunctionConstants.ASTERIX_NS, GRAPH_ELEMENT_FUNCTION_NAME, 5);
-
-    // A graph element is uniquely identified by its identifier.
-    private final GraphElementIdentifier identifier;
-
-    public GraphElementExpr(GraphElementIdentifier identifier) {
-        super(new FunctionSignature(GRAPH_ELEMENT_FUNCTION_ID), Collections.emptyList(), null);
-        this.identifier = identifier;
-    }
-
-    public GraphElementIdentifier getIdentifier() {
-        return identifier;
-    }
-
-    public GraphIdentifier getGraphIdentifier() {
-        return identifier.getGraphIdentifier();
-    }
-
-    public static Query createGraphElementAccessorQuery(GraphElementDecl graphElementDecl) {
-        GraphElementExpr functionCall = new GraphElementExpr(graphElementDecl.getIdentifier());
-        return ExpressionUtils.createWrappedQuery(functionCall, graphElementDecl.getSourceLocation());
-    }
-}
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/IGraphExpr.java
similarity index 68%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/IGraphExpr.java
index 9667fd6..18440d7 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/IGraphExpr.java
@@ -16,7 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.asterix.graphix.lang.expression;
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+import org.apache.asterix.lang.common.base.ILangExpression;
+
+public interface IGraphExpr extends ILangExpression {
+    GraphExprKind getGraphExprKind();
+
+    enum GraphExprKind {
+        GRAPH_CONSTRUCTOR,
+        GRAPH_ELEMENT_BODY,
+
+        EDGE_PATTERN,
+        VERTEX_PATTERN,
+        PATH_PATTERN
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/PathPatternExpr.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/PathPatternExpr.java
new file mode 100644
index 0000000..0091ec7
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/PathPatternExpr.java
@@ -0,0 +1,76 @@
+/*
+ * 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.asterix.graphix.lang.expression;
+
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.lang.common.base.AbstractExpression;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+
+/**
+ * A path is composed of a list of {@link VertexPatternExpr} instances and a list of {@link EdgePatternExpr} that
+ * utilize the aforementioned vertices. Users can also optionally specify a variable.
+ */
+public class PathPatternExpr extends AbstractExpression implements IGraphExpr {
+    private final List<VertexPatternExpr> vertexExpressions;
+    private final List<EdgePatternExpr> edgeExpressions;
+    private VariableExpr variableExpr;
+
+    public PathPatternExpr(List<VertexPatternExpr> vertexExpressions, List<EdgePatternExpr> edgeExpressions,
+            VariableExpr variableExpr) {
+        this.vertexExpressions = Objects.requireNonNull(vertexExpressions);
+        this.edgeExpressions = Objects.requireNonNull(edgeExpressions);
+        this.variableExpr = variableExpr;
+    }
+
+    public List<VertexPatternExpr> getVertexExpressions() {
+        return vertexExpressions;
+    }
+
+    public List<EdgePatternExpr> getEdgeExpressions() {
+        return edgeExpressions;
+    }
+
+    public VariableExpr getVariableExpr() {
+        return variableExpr;
+    }
+
+    public void setVariableExpr(VariableExpr variableExpr) {
+        this.variableExpr = variableExpr;
+    }
+
+    @Override
+    public Kind getKind() {
+        return null;
+    }
+
+    @Override
+    public GraphExprKind getGraphExprKind() {
+        return GraphExprKind.PATH_PATTERN;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
+        return ((IGraphixLangVisitor<R, T>) visitor).visit(this, arg);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/VertexPatternExpr.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/VertexPatternExpr.java
new file mode 100644
index 0000000..a9b4ca6
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/expression/VertexPatternExpr.java
@@ -0,0 +1,86 @@
+/*
+ * 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.asterix.graphix.lang.expression;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.lang.common.base.AbstractExpression;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+
+/**
+ * A query vertex (not to be confused with a vertex constructor) is composed of a set of labels (which may be empty)
+ * and a variable (which may initially be null).
+ */
+public class VertexPatternExpr extends AbstractExpression implements IGraphExpr {
+    private final Set<ElementLabel> labels;
+    private VariableExpr variableExpr;
+
+    public VertexPatternExpr(VariableExpr variableExpr, Set<ElementLabel> labels) {
+        this.variableExpr = variableExpr;
+        this.labels = labels;
+    }
+
+    public Set<ElementLabel> getLabels() {
+        return labels;
+    }
+
+    public VariableExpr getVariableExpr() {
+        return variableExpr;
+    }
+
+    public void setVariableExpr(VariableExpr variableExpr) {
+        this.variableExpr = variableExpr;
+    }
+
+    public List<GraphElementIdentifier> generateIdentifiers(GraphIdentifier graphIdentifier) {
+        return labels.stream()
+                .map(v -> new GraphElementIdentifier(graphIdentifier, GraphElementIdentifier.Kind.VERTEX, v))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public String toString() {
+        String labelsString = labels.stream().map(ElementLabel::toString).collect(Collectors.joining("|"));
+        String variableString = (variableExpr != null) ? variableExpr.getVar().toString() : "";
+        return String.format("(%s:%s)", variableString, labelsString);
+    }
+
+    @Override
+    public Kind getKind() {
+        return null;
+    }
+
+    @Override
+    public GraphExprKind getGraphExprKind() {
+        return GraphExprKind.VERTEX_PATTERN;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
+        return ((IGraphixLangVisitor<R, T>) visitor).visit(this, arg);
+    }
+}
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/optype/MatchType.java
similarity index 81%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/optype/MatchType.java
index 9667fd6..1e75f3f 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/optype/MatchType.java
@@ -16,7 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.asterix.graphix.lang.optype;
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+/**
+ * @see org.apache.asterix.graphix.lang.clause.MatchClause
+ */
+public enum MatchType {
+    LEADING,
+    INNER,
+    LEFTOUTER
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/parser/GraphElementBodyParser.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/parser/GraphElementBodyParser.java
index b1337b7..c4634e0 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/parser/GraphElementBodyParser.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/parser/GraphElementBodyParser.java
@@ -19,24 +19,29 @@
 package org.apache.asterix.graphix.lang.parser;
 
 import java.io.StringReader;
-import java.util.Objects;
 
 import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
 import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
-import org.apache.asterix.graphix.metadata.entities.Graph;
+import org.apache.asterix.graphix.metadata.entity.schema.Element;
 import org.apache.hyracks.api.exceptions.IWarningCollector;
 
 public final class GraphElementBodyParser {
     // Just a wrapper for the parseGraphElementBody method.
-    public static GraphElementDecl parse(Graph.Element element, GraphixParserFactory parserFactory,
+    public static GraphElementDecl parse(Element element, GraphixParserFactory parserFactory,
             IWarningCollector warningCollector) throws CompilationException {
         GraphElementDecl graphElementDecl = null;
-        for (String definition : element.getDefinitions()) {
-            if (Objects.equals(definition, "")) {
-                continue;
-            }
+        for (String definition : element.getDefinitionBodies()) {
+            // Parse our the definition.
             GraphixParser parser = (GraphixParser) parserFactory.createParser(new StringReader(definition));
-            GraphElementDecl parsedElementDecl = parser.parseGraphElementBody(element.getIdentifier());
+            GraphElementDecl parsedElementDecl;
+            try {
+                parsedElementDecl = parser.parseGraphElementBody(element.getIdentifier());
+
+            } catch (CompilationException e) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR,
+                        "Bad definition for a graph element: " + e.getMessage());
+            }
 
             // Accumulate the element bodies.
             if (graphElementDecl == null) {
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixQueryRewriter.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixQueryRewriter.java
index 9e88251..0348eb8 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixQueryRewriter.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixQueryRewriter.java
@@ -18,66 +18,120 @@
  */
 package org.apache.asterix.graphix.lang.rewrites;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.ArrayDeque;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Deque;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.algebra.compiler.provider.GraphixCompilationProvider;
 import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
 import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
-import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
-import org.apache.asterix.graphix.lang.expression.GraphElementExpr;
-import org.apache.asterix.graphix.lang.parser.GraphElementBodyParser;
+import org.apache.asterix.graphix.function.GraphixFunctionIdentifiers;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.expression.GraphElementBodyExpr;
 import org.apache.asterix.graphix.lang.parser.GraphixParserFactory;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.graphix.lang.rewrites.print.SqlppASTPrintQueryVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.ElementAnalysisVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.ElementLookupTableVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.ElementResolutionVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.GenerateVariableVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.GraphixFunctionCallVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.GraphixLoweringVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.PostRewriteCheckVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.PreRewriteCheckVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.ScopingCheckVisitor;
 import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
-import org.apache.asterix.graphix.metadata.entities.Graph;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.IParserFactory;
 import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.expression.AbstractCallExpression;
+import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
 import org.apache.asterix.lang.common.statement.Query;
 import org.apache.asterix.lang.common.struct.VarIdentifier;
 import org.apache.asterix.lang.common.util.ExpressionUtils;
+import org.apache.asterix.lang.sqlpp.rewrites.SqlppFunctionBodyRewriter;
 import org.apache.asterix.lang.sqlpp.rewrites.SqlppQueryRewriter;
 import org.apache.asterix.lang.sqlpp.rewrites.visitor.SqlppGatherFunctionCallsVisitor;
+import org.apache.asterix.metadata.declared.MetadataProvider;
 import org.apache.asterix.metadata.entities.Dataverse;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
+/**
+ * Rewriter for Graphix queries, which will lower all graph AST nodes into SQL++ AST nodes. We perform the following:
+ * 1. Perform an error-checking on the fresh AST (immediately after parsing).
+ * 2. Populate the unknowns in our AST (e.g. vertex / edge variables, projections, GROUP-BY keys).
+ * 3. Perform a variable-scoping pass to identify illegal variables (either duplicate or out-of-scope).
+ * 4. For the remainder of our Graphix function calls, rewrite each call into a subtree w/o Graphix functions.
+ * 5. Perform resolution of unlabeled vertices / edges, as well as edge directions.
+ * 6. Using the labels of the vertices / edges in our AST, fetch the relevant graph elements from our metadata.
+ * 7. Perform an analysis pass to find a) all vertices that are not attached to an edge (i.e. dangling vertices), b)
+ * a list of edges, ordered by their dependencies on other edges, and c) a list of optional vertices (from LEFT-MATCH
+ * clauses).
+ * 8. Perform Graphix AST node lowering to SQL++ AST nodes.
+ */
 public class GraphixQueryRewriter extends SqlppQueryRewriter {
+    private static final Logger LOGGER = LogManager.getLogger(GraphixQueryRewriter.class);
+
     private final GraphixParserFactory parserFactory;
     private final SqlppQueryRewriter bodyRewriter;
 
     public GraphixQueryRewriter(IParserFactory parserFactory) {
         super(parserFactory);
-
-        // We can safely downcast to our specific parser factory here.
         this.parserFactory = (GraphixParserFactory) parserFactory;
-        this.bodyRewriter = new SqlppQueryRewriter(parserFactory);
+        this.bodyRewriter = getFunctionAndViewBodyRewriter();
     }
 
-    public void rewrite(GraphixRewritingContext rewriteContext, IReturningStatement topStatement,
+    @Override
+    public void rewrite(LangRewritingContext langRewritingContext, IReturningStatement topStatement,
             boolean allowNonStoredUdfCalls, boolean inlineUdfsAndViews, Collection<VarIdentifier> externalVars)
             throws CompilationException {
-        // Get the graph elements in the top statement.
-        Map<GraphElementIdentifier, GraphElementDecl> graphElements =
-                loadNormalizedGraphElements(rewriteContext, topStatement);
+        LOGGER.debug("Starting Graphix AST rewrites.");
 
-        // Perform the remainder of our rewrites in our parent.
-        super.rewrite(rewriteContext.getLangRewritingContext(), topStatement, allowNonStoredUdfCalls,
-                inlineUdfsAndViews, externalVars);
+        // Perform an initial error-checking pass to validate our user query.
+        LOGGER.trace("Performing pre-rewrite check (user query validation).");
+        PreRewriteCheckVisitor preRewriteCheckVisitor = new PreRewriteCheckVisitor(langRewritingContext);
+        topStatement.getBody().accept(preRewriteCheckVisitor, null);
+
+        // Perform the Graphix rewrites.
+        rewriteGraphixASTNodes(langRewritingContext, topStatement);
+
+        // Sanity check: ensure that no graph AST nodes exist after this point.
+        LOGGER.trace("Performing post-rewrite check (making sure no graph AST nodes exist).");
+        PostRewriteCheckVisitor postRewriteCheckVisitor = new PostRewriteCheckVisitor();
+        topStatement.getBody().accept(postRewriteCheckVisitor, null);
+
+        // Perform the remainder of the SQL++ rewrites.
+        LOGGER.debug("Ending Graphix AST rewrites. Now starting SQL++ AST rewrites.");
+        super.rewrite(langRewritingContext, topStatement, allowNonStoredUdfCalls, inlineUdfsAndViews, externalVars);
+        LOGGER.debug("Ending SQL++ AST rewrites.");
+
+        // If desired, log the SQL++ query equivalent (i.e. turn the AST back into a query and log this).
+        MetadataProvider metadataProvider = langRewritingContext.getMetadataProvider();
+        String printRewriteMetadataKeyName = GraphixCompilationProvider.PRINT_REWRITE_METADATA_CONFIG;
+        String printRewriteOption = (String) metadataProvider.getConfig().get(printRewriteMetadataKeyName);
+        if ((printRewriteOption != null && printRewriteOption.equalsIgnoreCase("true")) || LOGGER.isTraceEnabled()) {
+            StringWriter stringWriter = new StringWriter();
+            PrintWriter printWriter = new PrintWriter(stringWriter);
+            new SqlppASTPrintQueryVisitor(printWriter).visit((Query) topStatement, null);
+            LOGGER.log(LOGGER.getLevel(), "Rewritten Graphix query: " + stringWriter);
+        }
     }
 
-    public Map<GraphElementIdentifier, GraphElementDecl> loadNormalizedGraphElements(
-            GraphixRewritingContext rewriteContext, IReturningStatement topExpr) throws CompilationException {
-        Map<GraphElementIdentifier, GraphElementDecl> graphElements = new HashMap<>();
-
+    public void loadNormalizedGraphElement(GraphixRewritingContext graphixRewritingContext, IReturningStatement topExpr,
+            GraphElementDecl graphElementDecl) throws CompilationException {
         // Gather all function calls.
         Deque<AbstractCallExpression> workQueue = new ArrayDeque<>();
         SqlppGatherFunctionCallsVisitor callVisitor = new SqlppGatherFunctionCallsVisitor(workQueue);
@@ -87,71 +141,114 @@
 
         AbstractCallExpression fnCall;
         while ((fnCall = workQueue.poll()) != null) {
-            // Load only the graph element declarations (we will load the rest of the elements in the parent).
-            if (!fnCall.getKind().equals(Expression.Kind.CALL_EXPRESSION)
-                    || !fnCall.getFunctionSignature().getName().equals(GraphElementExpr.GRAPH_ELEMENT_FUNCTION_NAME)) {
+            // We only care about graph element declarations.
+            FunctionSignature functionSignature = fnCall.getFunctionSignature();
+            if (!functionSignature.getName().equals(GraphixFunctionIdentifiers.GRAPH_ELEMENT_BODY.getName())
+                    || !Objects.equals(functionSignature.getDataverseName(), GraphixFunctionIdentifiers.GRAPHIX_DV)) {
                 continue;
             }
-            GraphElementExpr graphElementExpr = (GraphElementExpr) fnCall;
-            GraphElementIdentifier identifier = graphElementExpr.getIdentifier();
-            if (!graphElements.containsKey(identifier)) {
 
-                // First, check if we have already loaded this graph element.
-                GraphElementDecl elementDecl = rewriteContext.getDeclaredGraphElements().get(identifier);
-
-                // If we cannot find the graph element in our context, search our metadata.
-                if (elementDecl == null) {
-                    GraphIdentifier graphIdentifier = identifier.getGraphIdentifier();
-                    Graph graph;
-                    try {
-                        graph = GraphixMetadataExtension.getGraph(
-                                rewriteContext.getMetadataProvider().getMetadataTxnContext(),
-                                graphIdentifier.getDataverseName(), graphIdentifier.getGraphName());
-
-                    } catch (AlgebricksException e) {
-                        throw new CompilationException(ErrorCode.COMPILATION_ERROR,
-                                graphElementExpr.getSourceLocation(),
-                                "Graph " + graphIdentifier.getGraphName() + " does not exist.");
-                    }
-
-                    // Parse our graph element.
-                    if (graph == null) {
-                        throw new CompilationException(ErrorCode.COMPILATION_ERROR,
-                                graphElementExpr.getSourceLocation(),
-                                "Graph " + graphIdentifier.getGraphName() + " does not exist.");
-                    }
-                    Graph.Element element = graph.getGraphSchema().getElement(identifier);
-                    elementDecl = GraphElementBodyParser.parse(element, parserFactory,
-                            rewriteContext.getLangRewritingContext().getWarningCollector());
-                }
-
-                // Get our normalized element bodies.
-                List<Expression> normalizedBodies = elementDecl.getNormalizedBodies();
-                if (normalizedBodies.size() != elementDecl.getBodies().size()) {
-                    GraphIdentifier graphIdentifier = elementDecl.getGraphIdentifier();
-                    for (Expression body : elementDecl.getBodies()) {
-                        Expression normalizedBody =
-                                rewriteGraphElementBody(rewriteContext, graphIdentifier.getDataverseName(), body,
-                                        Collections.emptyList(), elementDecl.getSourceLocation());
-                        normalizedBodies.add(normalizedBody);
-                    }
-                }
-
-                // Store the element declaration in our map, and iterate over this body.
-                graphElements.put(identifier, elementDecl);
-                for (Expression e : elementDecl.getNormalizedBodies()) {
-                    e.accept(callVisitor, null);
+            // Get our normalized element bodies, by calling our rewriter.
+            List<Expression> normalizedBodies = graphElementDecl.getNormalizedBodies();
+            if (normalizedBodies.size() != graphElementDecl.getBodies().size()) {
+                GraphIdentifier graphIdentifier = graphElementDecl.getGraphIdentifier();
+                for (Expression body : graphElementDecl.getBodies()) {
+                    Expression normalizedBody =
+                            rewriteGraphElementBody(graphixRewritingContext, graphIdentifier.getDataverseName(), body,
+                                    Collections.emptyList(), graphElementDecl.getSourceLocation());
+                    normalizedBodies.add(normalizedBody);
                 }
             }
-        }
 
-        return graphElements;
+            // We should only have one element. We can safely break here.
+            break;
+        }
     }
 
-    private Expression rewriteGraphElementBody(GraphixRewritingContext rewriteContext, DataverseName elementDataverse,
-            Expression bodyExpr, List<VarIdentifier> externalVars, SourceLocation sourceLoc)
+    public void rewriteGraphixASTNodes(LangRewritingContext langRewritingContext, IReturningStatement topStatement)
             throws CompilationException {
-        Dataverse defaultDataverse = rewriteContext.getMetadataProvider().getDefaultDataverse();
+        // Generate names for unnamed graph elements, projections in our SELECT CLAUSE, and keys in our GROUP BY.
+        LOGGER.trace("Generating names for unnamed elements (both graph and non-graph) in our AST.");
+        GraphixRewritingContext graphixRewritingContext = new GraphixRewritingContext(langRewritingContext);
+        GenerateVariableVisitor generateVariableVisitor = new GenerateVariableVisitor(graphixRewritingContext);
+        topStatement.getBody().accept(generateVariableVisitor, null);
+
+        // Verify that variables are properly within scope.
+        LOGGER.trace("Verifying that variables are unique and are properly scoped.");
+        ScopingCheckVisitor scopingCheckVisitor = new ScopingCheckVisitor(langRewritingContext);
+        topStatement.getBody().accept(scopingCheckVisitor, null);
+
+        // Handle all Graphix-specific function calls to SQL++ rewrites.
+        LOGGER.trace("Rewriting all Graphix function calls to a SQL++ subtree or a function-less Graphix subtree.");
+        GraphixFunctionCallVisitor graphixFunctionCallVisitor = new GraphixFunctionCallVisitor(graphixRewritingContext);
+        topStatement.getBody().accept(graphixFunctionCallVisitor, null);
+
+        // Attempt to resolve our vertex labels, edge labels, and edge directions.
+        LOGGER.trace("Performing label and edge direction resolution.");
+        ElementResolutionVisitor elementResolutionVisitor = new ElementResolutionVisitor(
+                graphixRewritingContext.getMetadataProvider(), graphixRewritingContext.getWarningCollector());
+        topStatement.getBody().accept(elementResolutionVisitor, null);
+
+        // Fetch all relevant graph element declarations, using the element labels.
+        LOGGER.trace("Fetching relevant edge and vertex bodies from our graph schema.");
+        ElementLookupTable<GraphElementIdentifier> elementLookupTable = new ElementLookupTable<>();
+        ElementLookupTableVisitor elementLookupTableVisitor =
+                new ElementLookupTableVisitor(elementLookupTable, graphixRewritingContext.getMetadataProvider(),
+                        parserFactory, graphixRewritingContext.getWarningCollector());
+        topStatement.getBody().accept(elementLookupTableVisitor, null);
+        for (GraphElementDecl graphElementDecl : elementLookupTable) {
+            Query wrappedQuery = ExpressionUtils.createWrappedQuery(
+                    new GraphElementBodyExpr(graphElementDecl.getIdentifier()), graphElementDecl.getSourceLocation());
+            loadNormalizedGraphElement(graphixRewritingContext, wrappedQuery, graphElementDecl);
+        }
+
+        // Perform an analysis pass to get our edge dependencies, dangling vertices, and FROM-GRAPH-CLAUSE variables.
+        LOGGER.trace("Collecting edge dependencies, dangling vertices, and FROM-GRAPH-CLAUSE specific variables.");
+        ElementAnalysisVisitor elementAnalysisVisitor = new ElementAnalysisVisitor();
+        topStatement.getBody().accept(elementAnalysisVisitor, null);
+        Map<FromGraphClause, ElementAnalysisVisitor.FromGraphClauseContext> fromGraphClauseContextMap =
+                elementAnalysisVisitor.getFromGraphClauseContextMap();
+
+        // Transform all graph AST nodes (i.e. perform the representation lowering).
+        LOGGER.trace("Lowering the Graphix AST representation to a pure SQL++ representation.");
+        GraphixLoweringVisitor graphixLoweringVisitor =
+                new GraphixLoweringVisitor(fromGraphClauseContextMap, elementLookupTable, graphixRewritingContext);
+        topStatement.getBody().accept(graphixLoweringVisitor, null);
+    }
+
+    @Override
+    protected SqlppFunctionBodyRewriter getFunctionAndViewBodyRewriter() {
+        return new SqlppFunctionBodyRewriter(parserFactory) {
+            @Override
+            public void rewrite(LangRewritingContext langRewritingContext, IReturningStatement topStatement,
+                    boolean allowNonStoredUdfCalls, boolean inlineUdfsAndViews, Collection<VarIdentifier> externalVars)
+                    throws CompilationException {
+                // Perform an initial error-checking pass to validate our body.
+                LOGGER.trace("Performing pre-rewrite check (user query validation).");
+                PreRewriteCheckVisitor preRewriteCheckVisitor = new PreRewriteCheckVisitor(langRewritingContext);
+                topStatement.getBody().accept(preRewriteCheckVisitor, null);
+
+                // Perform the Graphix rewrites.
+                rewriteGraphixASTNodes(langRewritingContext, topStatement);
+
+                // Sanity check: ensure that no graph AST nodes exist after this point.
+                LOGGER.trace("Performing post-rewrite check (making sure no graph AST nodes exist).");
+                PostRewriteCheckVisitor postRewriteCheckVisitor = new PostRewriteCheckVisitor();
+                topStatement.getBody().accept(postRewriteCheckVisitor, null);
+
+                // Perform the remainder of the SQL++ rewrites.
+                LOGGER.debug("Ending Graphix AST rewrites. Now starting SQL++ AST rewrites.");
+                super.rewrite(langRewritingContext, topStatement, allowNonStoredUdfCalls, inlineUdfsAndViews,
+                        externalVars);
+                LOGGER.debug("Ending SQL++ AST rewrites.");
+            }
+        };
+    }
+
+    private Expression rewriteGraphElementBody(GraphixRewritingContext graphixRewritingContext,
+            DataverseName elementDataverse, Expression bodyExpr, List<VarIdentifier> externalVars,
+            SourceLocation sourceLoc) throws CompilationException {
+        Dataverse defaultDataverse = graphixRewritingContext.getMetadataProvider().getDefaultDataverse();
         Dataverse targetDataverse;
 
         // We might need to change our dataverse, if the element definition requires a different one.
@@ -160,18 +257,19 @@
 
         } else {
             try {
-                targetDataverse = rewriteContext.getMetadataProvider().findDataverse(elementDataverse);
+                targetDataverse = graphixRewritingContext.getMetadataProvider().findDataverse(elementDataverse);
 
             } catch (AlgebricksException e) {
                 throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, e, sourceLoc, elementDataverse);
             }
         }
-        rewriteContext.getMetadataProvider().setDefaultDataverse(targetDataverse);
+        graphixRewritingContext.getMetadataProvider().setDefaultDataverse(targetDataverse);
 
         // Get the body of the rewritten query.
         try {
             Query wrappedQuery = ExpressionUtils.createWrappedQuery(bodyExpr, sourceLoc);
-            bodyRewriter.rewrite(rewriteContext.getLangRewritingContext(), wrappedQuery, false, false, externalVars);
+            LangRewritingContext langRewritingContext = graphixRewritingContext.getLangRewritingContext();
+            bodyRewriter.rewrite(langRewritingContext, wrappedQuery, false, false, externalVars);
             return wrappedQuery.getBody();
 
         } catch (CompilationException e) {
@@ -180,7 +278,7 @@
 
         } finally {
             // Switch back to the working dataverse.
-            rewriteContext.getMetadataProvider().setDefaultDataverse(defaultDataverse);
+            graphixRewritingContext.getMetadataProvider().setDefaultDataverse(defaultDataverse);
         }
     }
 }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixRewritingContext.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixRewritingContext.java
index e62d337..70e749b 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixRewritingContext.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/GraphixRewritingContext.java
@@ -1,58 +1,60 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.asterix.graphix.lang.rewrites;
 
-import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
-import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
 import org.apache.asterix.lang.common.statement.FunctionDecl;
-import org.apache.asterix.lang.common.statement.ViewDecl;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
 import org.apache.asterix.metadata.declared.MetadataProvider;
 import org.apache.hyracks.api.exceptions.IWarningCollector;
 
+/**
+ * Wrapper class for {@link org.apache.asterix.lang.common.rewrites.LangRewritingContext}. We are particularly
+ * interested in creating our own system-generated variables (distinct from those generated in the SQL++ rewrites).
+ */
 public class GraphixRewritingContext {
-    private final Map<GraphElementIdentifier, GraphElementDecl> graphElementDeclMap = new HashMap<>();
     private final LangRewritingContext langRewritingContext;
 
-    public GraphixRewritingContext(MetadataProvider metadataProvider, List<FunctionDecl> declaredFunctions,
-            List<ViewDecl> declaredViews, List<GraphElementDecl> declaredGraphElements,
-            IWarningCollector warningCollector, int varCounter) {
-        if (declaredGraphElements != null) {
-            declaredGraphElements.forEach(e -> graphElementDeclMap.put(e.getIdentifier(), e));
-        }
-        langRewritingContext = new LangRewritingContext(metadataProvider, declaredFunctions, declaredViews,
-                warningCollector, varCounter);
+    public GraphixRewritingContext(LangRewritingContext langRewritingContext) {
+        this.langRewritingContext = langRewritingContext;
     }
 
-    public Map<GraphElementIdentifier, GraphElementDecl> getDeclaredGraphElements() {
-        return graphElementDeclMap;
+    public MetadataProvider getMetadataProvider() {
+        return langRewritingContext.getMetadataProvider();
+    }
+
+    public IWarningCollector getWarningCollector() {
+        return langRewritingContext.getWarningCollector();
     }
 
     public LangRewritingContext getLangRewritingContext() {
         return langRewritingContext;
     }
 
-    public MetadataProvider getMetadataProvider() {
-        return langRewritingContext.getMetadataProvider();
+    public Map<FunctionSignature, FunctionDecl> getDeclaredFunctions() {
+        return langRewritingContext.getDeclaredFunctions();
+    }
+
+    public VarIdentifier getNewVariable() {
+        VarIdentifier langRewriteGeneratedVar = langRewritingContext.newVariable();
+        String graphixGeneratedName = "#GG_" + langRewriteGeneratedVar.getValue().substring(1);
+        return new VarIdentifier(graphixGeneratedName, langRewriteGeneratedVar.getId());
     }
 }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/assembly/ExprAssembler.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/assembly/ExprAssembler.java
new file mode 100644
index 0000000..e78d935
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/assembly/ExprAssembler.java
@@ -0,0 +1,52 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.assembly;
+
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.Iterator;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+
+/**
+ * A generic assembler for building a list of T instances, where incoming instances take the last T instance as input.
+ */
+public class ExprAssembler<T> implements Iterable<T> {
+    private final Deque<T> assemblyQueue = new ArrayDeque<>();
+
+    public void bind(IExprAssembly<T> assembly) throws CompilationException {
+        if (assemblyQueue.isEmpty()) {
+            assemblyQueue.addLast(assembly.apply(null));
+
+        } else {
+            T currentLastAssembly = assemblyQueue.getLast();
+            assemblyQueue.add(assembly.apply(currentLastAssembly));
+
+        }
+    }
+
+    public T getLast() {
+        return assemblyQueue.getLast();
+    }
+
+    @Override
+    public Iterator<T> iterator() {
+        return assemblyQueue.iterator();
+    }
+}
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/assembly/IExprAssembly.java
similarity index 74%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/assembly/IExprAssembly.java
index 9667fd6..25efe98 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/assembly/IExprAssembly.java
@@ -16,7 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.asterix.graphix.lang.rewrites.assembly;
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+import org.apache.asterix.common.exceptions.CompilationException;
+
+/**
+ * @see ExprAssembler
+ */
+@FunctionalInterface
+public interface IExprAssembly<T> {
+    T apply(T input) throws CompilationException;
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/common/EdgeDependencyGraph.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/common/EdgeDependencyGraph.java
new file mode 100644
index 0000000..847c0d9
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/common/EdgeDependencyGraph.java
@@ -0,0 +1,101 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.common;
+
+import java.util.ArrayDeque;
+import java.util.Collections;
+import java.util.Deque;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.lang.common.struct.Identifier;
+
+/**
+ * A two-level ordered list of {@link EdgePatternExpr} instances, whose order depends on the input edge-dependency
+ * graphs (represented as an adjacency list). Ideally, we want to return the smallest set of Hamilton
+ * {@link EdgePatternExpr} paths, but this is an NP-hard problem. Instead, we find the **first** set of paths that
+ * visit each {@link EdgePatternExpr} once. This inner-order is dependent on the order of the adjacency map iterators.
+ *
+ * @see org.apache.asterix.graphix.lang.rewrites.visitor.ElementAnalysisVisitor
+ */
+public class EdgeDependencyGraph implements Iterable<Iterable<EdgePatternExpr>> {
+    private final List<Map<Identifier, List<Identifier>>> adjacencyMaps;
+    private final Map<Identifier, EdgePatternExpr> edgePatternMap;
+
+    public EdgeDependencyGraph(List<Map<Identifier, List<Identifier>>> adjacencyMaps,
+            Map<Identifier, EdgePatternExpr> edgePatternMap) {
+        this.adjacencyMaps = adjacencyMaps;
+        this.edgePatternMap = edgePatternMap;
+    }
+
+    private Iterator<EdgePatternExpr> buildEdgeOrdering(Map<Identifier, List<Identifier>> adjacencyMap) {
+        Set<Identifier> visitedSet = new HashSet<>();
+        Deque<Identifier> edgeStack = new ArrayDeque<>();
+
+        if (!adjacencyMap.entrySet().isEmpty()) {
+            // We start with the first inserted edge into our graph.
+            Iterator<Map.Entry<Identifier, List<Identifier>>> adjacencyMapIterator = adjacencyMap.entrySet().iterator();
+            Map.Entry<Identifier, List<Identifier>> seedEdge = adjacencyMapIterator.next();
+            edgeStack.addFirst(seedEdge.getKey());
+            edgeStack.addAll(seedEdge.getValue());
+
+            // Continue until all entries in our adjacency map have been inserted.
+            while (adjacencyMapIterator.hasNext()) {
+                Map.Entry<Identifier, List<Identifier>> followingEdge = adjacencyMapIterator.next();
+                for (Identifier followingEdgeDependent : followingEdge.getValue()) {
+                    if (!edgeStack.contains(followingEdgeDependent)) {
+                        edgeStack.addLast(followingEdgeDependent);
+                    }
+                }
+            }
+
+            return new Iterator<>() {
+                @Override
+                public boolean hasNext() {
+                    // We are done once we have visited every node.
+                    return visitedSet.size() != adjacencyMap.size();
+                }
+
+                @Override
+                public EdgePatternExpr next() {
+                    Identifier edgeIdentifier = edgeStack.removeFirst();
+                    for (Identifier dependency : adjacencyMap.get(edgeIdentifier)) {
+                        if (!visitedSet.contains(dependency)) {
+                            edgeStack.push(dependency);
+                        }
+                    }
+                    visitedSet.add(edgeIdentifier);
+                    return edgePatternMap.get(edgeIdentifier);
+                }
+            };
+
+        } else {
+            return Collections.emptyIterator();
+        }
+    }
+
+    @Override
+    public Iterator<Iterable<EdgePatternExpr>> iterator() {
+        return adjacencyMaps.stream().map(m -> (Iterable<EdgePatternExpr>) () -> buildEdgeOrdering(m)).iterator();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/common/ElementLookupTable.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/common/ElementLookupTable.java
new file mode 100644
index 0000000..747cdae
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/common/ElementLookupTable.java
@@ -0,0 +1,96 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.common;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+
+/**
+ * Lookup table for {@link GraphElementDecl} instances, vertex keys, edge destination keys / labels, and edge source
+ * keys / labels-- indexed by {@link T} instances.
+ */
+public class ElementLookupTable<T> implements Iterable<GraphElementDecl> {
+    private final Map<T, GraphElementDecl> graphElementDeclMap = new HashMap<>();
+    private final Map<T, List<List<String>>> vertexKeyMap = new HashMap<>();
+    private final Map<T, List<List<String>>> edgeDestKeysMap = new HashMap<>();
+    private final Map<T, List<List<String>>> edgeSourceKeysMap = new HashMap<>();
+
+    // In addition to keys, maintain the source and destination labels associated with each edge.
+    private final Map<T, ElementLabel> edgeDestLabelMap = new HashMap<>();
+    private final Map<T, ElementLabel> edgeSourceLabelMap = new HashMap<>();
+
+    public void put(T identifier, GraphElementDecl graphElementDecl) {
+        if (graphElementDeclMap.containsKey(identifier)) {
+            graphElementDeclMap.get(identifier).getBodies().addAll(graphElementDecl.getBodies());
+
+        } else {
+            graphElementDeclMap.put(identifier, graphElementDecl);
+        }
+    }
+
+    public void putVertexKey(T identifier, List<List<String>> primaryKey) {
+        vertexKeyMap.put(identifier, primaryKey);
+    }
+
+    public void putEdgeKeys(T identifier, List<List<String>> sourceKey, List<List<String>> destinationKey) {
+        // We know that a source key and destination key are the same for all edge definitions of the same label.
+        edgeSourceKeysMap.put(identifier, sourceKey);
+        edgeDestKeysMap.put(identifier, destinationKey);
+    }
+
+    public void putEdgeLabels(T identifier, ElementLabel sourceLabel, ElementLabel destinationLabel) {
+        // Multiple edge definitions for the same label will always have the same source and destination labels.
+        edgeSourceLabelMap.put(identifier, sourceLabel);
+        edgeDestLabelMap.put(identifier, destinationLabel);
+    }
+
+    public GraphElementDecl getElementDecl(T identifier) {
+        return graphElementDeclMap.get(identifier);
+    }
+
+    public List<List<String>> getVertexKey(T identifier) {
+        return vertexKeyMap.get(identifier);
+    }
+
+    public List<List<String>> getEdgeDestKeys(T identifier) {
+        return edgeDestKeysMap.get(identifier);
+    }
+
+    public List<List<String>> getEdgeSourceKeys(T identifier) {
+        return edgeSourceKeysMap.get(identifier);
+    }
+
+    public ElementLabel getEdgeDestLabel(T identifier) {
+        return edgeDestLabelMap.get(identifier);
+    }
+
+    public ElementLabel getEdgeSourceLabel(T identifier) {
+        return edgeSourceLabelMap.get(identifier);
+    }
+
+    @Override
+    public Iterator<GraphElementDecl> iterator() {
+        return graphElementDeclMap.values().iterator();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/DirectedFixedPathExpansion.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/DirectedFixedPathExpansion.java
new file mode 100644
index 0000000..214e0a1
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/DirectedFixedPathExpansion.java
@@ -0,0 +1,86 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.expand;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+
+/**
+ * Given a sub-path that is **not** {@link EdgeDescriptor.EdgeType#UNDIRECTED} but is fixed in the number of hops
+ * (denoted N), we build a single set of N directed simple edges.
+ */
+public class DirectedFixedPathExpansion implements IEdgePatternExpansion {
+    private final PathEnumerationEnvironment pathEnumerationEnvironment;
+
+    public DirectedFixedPathExpansion(PathEnumerationEnvironment pathEnumerationEnvironment) {
+        this.pathEnumerationEnvironment = pathEnumerationEnvironment;
+    }
+
+    @Override
+    public Iterable<Iterable<EdgePatternExpr>> expand(EdgePatternExpr edgePatternExpr) {
+        // Ensure we have been given the correct type of sub-path.
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        if (edgeDescriptor.getEdgeClass() != IGraphExpr.GraphExprKind.PATH_PATTERN
+                || edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.UNDIRECTED
+                || !Objects.equals(edgeDescriptor.getMinimumHops(), edgeDescriptor.getMaximumHops())) {
+            throw new IllegalArgumentException("Expected a directed fixed sub-path, but given a " + edgeDescriptor);
+        }
+
+        pathEnumerationEnvironment.reset();
+        List<EdgePatternExpr> decomposedEdgeList = new ArrayList<>();
+        VertexPatternExpr workingLeftVertex = edgePatternExpr.getLeftVertex();
+        for (int i = 0; i < edgePatternExpr.getEdgeDescriptor().getMinimumHops(); i++) {
+            VertexPatternExpr rightVertex;
+            if (i == edgePatternExpr.getEdgeDescriptor().getMinimumHops() - 1) {
+                // This is the final vertex in our path.
+                rightVertex = edgePatternExpr.getRightVertex();
+
+            } else {
+                // We need to generate an intermediate vertex.
+                rightVertex = new VertexPatternExpr(pathEnumerationEnvironment.getNewVertexVar(),
+                        edgePatternExpr.getInternalVertices().get(i).getLabels());
+            }
+
+            // Build our EDGE-PATTERN-EXPR.
+            EdgeDescriptor newEdgeDescriptor = new EdgeDescriptor(edgePatternExpr.getEdgeDescriptor().getEdgeType(),
+                    IGraphExpr.GraphExprKind.EDGE_PATTERN, edgePatternExpr.getEdgeDescriptor().getEdgeLabels(),
+                    pathEnumerationEnvironment.getNewEdgeVar(), null, null);
+            EdgePatternExpr newEdgePattern = new EdgePatternExpr(workingLeftVertex, rightVertex, newEdgeDescriptor);
+            decomposedEdgeList.add(newEdgePattern);
+
+            // Build the associated path record (for our environment to hold).
+            pathEnumerationEnvironment.buildPathRecord(workingLeftVertex.getVariableExpr(),
+                    newEdgeDescriptor.getVariableExpr(), rightVertex.getVariableExpr());
+
+            // Move our "vertex cursor".
+            workingLeftVertex = rightVertex;
+        }
+
+        // We do not have any undirected edges. Return a singleton list with the EDGE-PATTERN-EXPRs above.
+        pathEnumerationEnvironment.publishIsomorphism();
+        pathEnumerationEnvironment.publishRebindings();
+        return List.of(decomposedEdgeList);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/DirectedVarPathExpansion.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/DirectedVarPathExpansion.java
new file mode 100644
index 0000000..91d58d0
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/DirectedVarPathExpansion.java
@@ -0,0 +1,72 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.expand;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+
+/**
+ * Given a path of variable length, there are {@link EdgeDescriptor#getMaximumHops()} -
+ * {@link EdgeDescriptor#getMinimumHops()} valid paths that could appear in our result. Generate a fixed sub-path for
+ * each of the aforementioned paths and decompose according to {@link DirectedFixedPathExpansion}.
+ *
+ * @see DirectedFixedPathExpansion
+ */
+public class DirectedVarPathExpansion implements IEdgePatternExpansion {
+    private final PathEnumerationEnvironment pathEnumerationEnvironment;
+
+    public DirectedVarPathExpansion(PathEnumerationEnvironment pathEnumerationEnvironment) {
+        this.pathEnumerationEnvironment = pathEnumerationEnvironment;
+    }
+
+    @Override
+    public Iterable<Iterable<EdgePatternExpr>> expand(EdgePatternExpr edgePatternExpr) {
+        // Ensure we have been given the correct type of sub-path.
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        if (edgeDescriptor.getEdgeClass() != IGraphExpr.GraphExprKind.PATH_PATTERN
+                || edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.UNDIRECTED
+                || Objects.equals(edgeDescriptor.getMinimumHops(), edgeDescriptor.getMaximumHops())) {
+            throw new IllegalArgumentException("Expected a directed var sub-path, but given a " + edgeDescriptor);
+        }
+
+        List<List<EdgePatternExpr>> decomposedEdgeList = new ArrayList<>();
+        for (int i = edgeDescriptor.getMinimumHops(); i <= edgeDescriptor.getMaximumHops(); i++) {
+            EdgeDescriptor fixedEdgeDescriptor =
+                    new EdgeDescriptor(edgeDescriptor.getEdgeType(), IGraphExpr.GraphExprKind.PATH_PATTERN,
+                            edgeDescriptor.getEdgeLabels(), edgeDescriptor.getVariableExpr(), i, i);
+            EdgePatternExpr fixedEdgePattern = new EdgePatternExpr(edgePatternExpr.getLeftVertex(),
+                    edgePatternExpr.getRightVertex(), fixedEdgeDescriptor);
+            fixedEdgePattern.replaceInternalVertices(edgePatternExpr.getInternalVertices());
+
+            // We defer the decomposition of each individual path to DirectedFixedPathExpansion.
+            new DirectedFixedPathExpansion(pathEnumerationEnvironment).expand(fixedEdgePattern).forEach(e -> {
+                List<EdgePatternExpr> decompositionIntermediate = new ArrayList<>();
+                e.forEach(decompositionIntermediate::add);
+                decomposedEdgeList.add(decompositionIntermediate);
+            });
+        }
+
+        return new ArrayList<>(decomposedEdgeList);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/IEdgePatternExpansion.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/IEdgePatternExpansion.java
new file mode 100644
index 0000000..cd62074
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/IEdgePatternExpansion.java
@@ -0,0 +1,32 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.expand;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+
+/**
+ * Interface for decomposing an edge / sub-path into a two-level collection of simple directed edges. An inner list of
+ * {@link EdgePatternExpr} instances will be lowered into a single {@link org.apache.asterix.lang.sqlpp.clause.FromTerm}
+ * with correlated clauses. Multiple inner-lists will generate several FROM-TERM nodes, which will be UNION-ALLed into
+ * a single FROM-TERM.
+ */
+@FunctionalInterface
+public interface IEdgePatternExpansion {
+    Iterable<Iterable<EdgePatternExpr>> expand(EdgePatternExpr inputEdgePatternExpr);
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/PathEnumerationEnvironment.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/PathEnumerationEnvironment.java
new file mode 100644
index 0000000..7cc63dd
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/PathEnumerationEnvironment.java
@@ -0,0 +1,136 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.expand;
+
+import static org.apache.asterix.graphix.lang.rewrites.lower.assembly.IsomorphismLowerAssembly.populateVariableMap;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierContext;
+import org.apache.asterix.graphix.lang.rewrites.lower.assembly.IsomorphismLowerAssembly;
+import org.apache.asterix.graphix.lang.rewrites.record.PathRecord;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.LetClause;
+import org.apache.asterix.lang.common.expression.ListConstructor;
+import org.apache.asterix.lang.common.expression.OperatorExpr;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+
+public class PathEnumerationEnvironment {
+    private final LowerSupplierContext lowerSupplierContext;
+    private final EdgePatternExpr edgePatternExpr;
+
+    // We build the following as we decompose a path instance.
+    private final Map<ElementLabel, List<VariableExpr>> collectedVertexVariables = new HashMap<>();
+    private final Map<ElementLabel, List<VariableExpr>> collectedEdgeVariables = new HashMap<>();
+    private final Set<VariableExpr> nonTerminalVertexVariables = new HashSet<>();
+    private final List<PathRecord> generatedPathRecords = new ArrayList<>();
+
+    // The following callbacks are invoked on publish.
+    private final Consumer<List<Expression>> vertexConjunctsCallback;
+    private final Consumer<List<Expression>> edgeConjunctsCallback;
+    private final Consumer<List<LetClause>> reboundExpressionsCallback;
+    private int internalVertexCursor;
+
+    public PathEnumerationEnvironment(EdgePatternExpr edgePatternExpr, LowerSupplierContext lowerSupplierContext,
+            Consumer<List<Expression>> vertexConjunctsCallback, Consumer<List<Expression>> edgeConjunctsCallback,
+            Consumer<List<LetClause>> reboundExpressionsCallback) {
+        this.lowerSupplierContext = lowerSupplierContext;
+        this.edgePatternExpr = edgePatternExpr;
+        this.vertexConjunctsCallback = vertexConjunctsCallback;
+        this.edgeConjunctsCallback = edgeConjunctsCallback;
+        this.reboundExpressionsCallback = reboundExpressionsCallback;
+        this.internalVertexCursor = 0;
+    }
+
+    public void reset() {
+        nonTerminalVertexVariables.clear();
+        collectedVertexVariables.clear();
+        collectedEdgeVariables.clear();
+        generatedPathRecords.clear();
+        this.internalVertexCursor = 0;
+    }
+
+    public void publishIsomorphism() {
+        // Ensure that isomorphism between our internal vertices and our terminal vertices is applied.
+        VertexPatternExpr leftVertex = edgePatternExpr.getLeftVertex();
+        VertexPatternExpr rightVertex = edgePatternExpr.getRightVertex();
+        VarIdentifier leftVertexVar = leftVertex.getVariableExpr().getVar();
+        VarIdentifier rightVertexVar = rightVertex.getVariableExpr().getVar();
+        populateVariableMap(leftVertex.getLabels(), new VariableExpr(leftVertexVar), collectedVertexVariables);
+        populateVariableMap(rightVertex.getLabels(), new VariableExpr(rightVertexVar), collectedVertexVariables);
+
+        // Add isomorphism constraints between all vertices and all edges.
+        List<Expression> vertexConjuncts = collectedVertexVariables.values().stream()
+                .map(v -> v.stream().map(w -> (Expression) w).collect(Collectors.toList()))
+                .map(IsomorphismLowerAssembly::generateIsomorphismConjuncts).flatMap(Collection::stream).filter(c -> {
+                    // Do not include the conjunct to compare the terminal vertices. These will be handled later.
+                    OperatorExpr operatorExpr = (OperatorExpr) c;
+                    VariableExpr leftSourceVar = (VariableExpr) operatorExpr.getExprList().get(0);
+                    VariableExpr rightSourceVar = (VariableExpr) operatorExpr.getExprList().get(1);
+                    return nonTerminalVertexVariables.contains(leftSourceVar)
+                            || nonTerminalVertexVariables.contains(rightSourceVar);
+                }).collect(Collectors.toList());
+        List<Expression> edgeConjuncts = collectedEdgeVariables.values().stream()
+                .map(e -> e.stream().map(w -> (Expression) w).collect(Collectors.toList()))
+                .map(IsomorphismLowerAssembly::generateIsomorphismConjuncts).flatMap(Collection::stream)
+                .collect(Collectors.toList());
+        vertexConjunctsCallback.accept(vertexConjuncts);
+        edgeConjunctsCallback.accept(edgeConjuncts);
+    }
+
+    public void publishRebindings() {
+        // Bind our previous edge variable to our list of path records.
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        VariableExpr subPathVariable = new VariableExpr(edgeDescriptor.getVariableExpr().getVar());
+        Expression subPathExpr = new ListConstructor(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR,
+                generatedPathRecords.stream().map(PathRecord::getExpression).collect(Collectors.toList()));
+        reboundExpressionsCallback.accept(List.of(new LetClause(subPathVariable, subPathExpr)));
+    }
+
+    public VariableExpr getNewVertexVar() {
+        VariableExpr vertexVariable = new VariableExpr(lowerSupplierContext.getNewVariable());
+        VertexPatternExpr workingInternalVertex = edgePatternExpr.getInternalVertices().get(internalVertexCursor);
+        populateVariableMap(workingInternalVertex.getLabels(), vertexVariable, collectedVertexVariables);
+        nonTerminalVertexVariables.add(vertexVariable);
+        return vertexVariable;
+    }
+
+    public VariableExpr getNewEdgeVar() {
+        VariableExpr edgeVariable = new VariableExpr(lowerSupplierContext.getNewVariable());
+        populateVariableMap(edgePatternExpr.getEdgeDescriptor().getEdgeLabels(), edgeVariable, collectedEdgeVariables);
+        return edgeVariable;
+    }
+
+    public void buildPathRecord(VariableExpr leftVertexVar, VariableExpr edgeVar, VariableExpr rightVertexVar) {
+        generatedPathRecords.add(new PathRecord(leftVertexVar, edgeVar, rightVertexVar));
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedEdgeExpansion.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedEdgeExpansion.java
new file mode 100644
index 0000000..f01ba0d
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedEdgeExpansion.java
@@ -0,0 +1,60 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.expand;
+
+import java.util.List;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+
+/**
+ * Given an undirected edge, generate two edges (to feed to the caller's UNION): one edge directed from
+ * {@link EdgeDescriptor.EdgeType#LEFT_TO_RIGHT},and another edge directed from
+ * {@link EdgeDescriptor.EdgeType#RIGHT_TO_LEFT}.
+ */
+public class UndirectedEdgeExpansion implements IEdgePatternExpansion {
+    @Override
+    public Iterable<Iterable<EdgePatternExpr>> expand(EdgePatternExpr edgePatternExpr) {
+        // Ensure we have been given the correct type of edge.
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        if (edgeDescriptor.getEdgeClass() != IGraphExpr.GraphExprKind.EDGE_PATTERN
+                || edgeDescriptor.getEdgeType() != EdgeDescriptor.EdgeType.UNDIRECTED) {
+            throw new IllegalArgumentException("Expected an undirected edge, but given a " + edgeDescriptor);
+        }
+        VertexPatternExpr leftVertex = edgePatternExpr.getLeftVertex();
+        VertexPatternExpr rightVertex = edgePatternExpr.getRightVertex();
+
+        // Build our LEFT_TO_RIGHT edge...
+        EdgeDescriptor leftToRightEdgeDescriptor =
+                new EdgeDescriptor(EdgeDescriptor.EdgeType.LEFT_TO_RIGHT, IGraphExpr.GraphExprKind.EDGE_PATTERN,
+                        edgeDescriptor.getEdgeLabels(), edgeDescriptor.getVariableExpr(), null, null);
+        EdgePatternExpr leftToRightEdge = new EdgePatternExpr(leftVertex, rightVertex, leftToRightEdgeDescriptor);
+
+        // ...and our RIGHT_TO_LEFT edge...
+        EdgeDescriptor rightToLeftEdgeDescriptor =
+                new EdgeDescriptor(EdgeDescriptor.EdgeType.RIGHT_TO_LEFT, IGraphExpr.GraphExprKind.EDGE_PATTERN,
+                        edgeDescriptor.getEdgeLabels(), edgeDescriptor.getVariableExpr(), null, null);
+        EdgePatternExpr rightToLeftEdge = new EdgePatternExpr(leftVertex, rightVertex, rightToLeftEdgeDescriptor);
+
+        // Return two singleton lists (these should be UNION-ALLed).
+        return List.of(List.of(leftToRightEdge), List.of(rightToLeftEdge));
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedFixedPathExpansion.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedFixedPathExpansion.java
new file mode 100644
index 0000000..044a58b
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedFixedPathExpansion.java
@@ -0,0 +1,110 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.expand;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+
+/**
+ * Given a sub-path that is {@link EdgeDescriptor.EdgeType#UNDIRECTED} but is fixed in the number of hops (denoted N),
+ * we generate N sets of directed simple edges (the total of which is equal to 2^N).
+ */
+public class UndirectedFixedPathExpansion implements IEdgePatternExpansion {
+    private final PathEnumerationEnvironment pathEnumerationEnvironment;
+
+    public UndirectedFixedPathExpansion(PathEnumerationEnvironment pathEnumerationEnvironment) {
+        this.pathEnumerationEnvironment = pathEnumerationEnvironment;
+    }
+
+    @Override
+    public Iterable<Iterable<EdgePatternExpr>> expand(EdgePatternExpr edgePatternExpr) {
+        // Ensure we have been given the correct type of sub-path.
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        if (edgeDescriptor.getEdgeClass() != IGraphExpr.GraphExprKind.PATH_PATTERN
+                || edgeDescriptor.getEdgeType() != EdgeDescriptor.EdgeType.UNDIRECTED
+                || !Objects.equals(edgeDescriptor.getMinimumHops(), edgeDescriptor.getMaximumHops())) {
+            throw new IllegalArgumentException("Expected an undirected fixed sub-path, but given a " + edgeDescriptor);
+        }
+        pathEnumerationEnvironment.reset();
+
+        // The number of items in the final state of our queue will be 2^{number of hops}.
+        Deque<List<EdgePatternExpr>> decompositionQueue = new ArrayDeque<>();
+        decompositionQueue.addLast(new ArrayList<>());
+        VertexPatternExpr workingLeftVertex = edgePatternExpr.getLeftVertex();
+        for (int i = 0; i < edgePatternExpr.getEdgeDescriptor().getMinimumHops(); i++) {
+            VertexPatternExpr rightVertex;
+            if (i == edgePatternExpr.getEdgeDescriptor().getMinimumHops() - 1) {
+                // This is the final vertex in our path.
+                rightVertex = edgePatternExpr.getRightVertex();
+
+            } else {
+                // We need to generate an intermediate vertex.
+                rightVertex = new VertexPatternExpr(pathEnumerationEnvironment.getNewVertexVar(),
+                        edgePatternExpr.getInternalVertices().get(i).getLabels());
+            }
+
+            VariableExpr graphEdgeVar = pathEnumerationEnvironment.getNewEdgeVar();
+            List<List<EdgePatternExpr>> visitedEdgeLists = new ArrayList<>();
+            while (!decompositionQueue.isEmpty()) {
+                // Pull from our queue...
+                List<EdgePatternExpr> workingEdgePatternList = decompositionQueue.removeLast();
+
+                // ...and generate two new variants that have an additional LEFT_TO_RIGHT edge...
+                EdgeDescriptor leftToRightEdgeDescriptor =
+                        new EdgeDescriptor(EdgeDescriptor.EdgeType.LEFT_TO_RIGHT, IGraphExpr.GraphExprKind.EDGE_PATTERN,
+                                edgePatternExpr.getEdgeDescriptor().getEdgeLabels(), graphEdgeVar, null, null);
+                List<EdgePatternExpr> leftToRightList = new ArrayList<>(workingEdgePatternList);
+                leftToRightList.add(new EdgePatternExpr(workingLeftVertex, rightVertex, leftToRightEdgeDescriptor));
+                visitedEdgeLists.add(leftToRightList);
+
+                // ...and a RIGHT_TO_LEFT edge.
+                EdgeDescriptor rightToLeftEdgeDescriptor =
+                        new EdgeDescriptor(EdgeDescriptor.EdgeType.RIGHT_TO_LEFT, IGraphExpr.GraphExprKind.EDGE_PATTERN,
+                                edgePatternExpr.getEdgeDescriptor().getEdgeLabels(), graphEdgeVar, null, null);
+                List<EdgePatternExpr> rightToLeftList = new ArrayList<>(workingEdgePatternList);
+                rightToLeftList.add(new EdgePatternExpr(workingLeftVertex, rightVertex, rightToLeftEdgeDescriptor));
+                visitedEdgeLists.add(rightToLeftList);
+            }
+            decompositionQueue.addAll(visitedEdgeLists);
+
+            // Build the associated path record (for our environment to hold).
+            pathEnumerationEnvironment.buildPathRecord(workingLeftVertex.getVariableExpr(), graphEdgeVar,
+                    rightVertex.getVariableExpr());
+
+            // Move our "vertex cursor".
+            workingLeftVertex = rightVertex;
+        }
+
+        // Publish our isomorphism and rebindings.
+        for (List<EdgePatternExpr> ignored : decompositionQueue) {
+            pathEnumerationEnvironment.publishIsomorphism();
+            pathEnumerationEnvironment.publishRebindings();
+        }
+        return new ArrayList<>(decompositionQueue);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedVarPathExpansion.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedVarPathExpansion.java
new file mode 100644
index 0000000..9c85b77
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/expand/UndirectedVarPathExpansion.java
@@ -0,0 +1,72 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.expand;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+
+/**
+ * Given a path of variable length, there are {@link EdgeDescriptor#getMaximumHops()} -
+ * {@link EdgeDescriptor#getMinimumHops()} valid paths that could appear in our result. Generate a fixed sub-path for
+ * each of the aforementioned paths and decompose according to {@link UndirectedFixedPathExpansion}.
+ *
+ * @see UndirectedFixedPathExpansion
+ */
+public class UndirectedVarPathExpansion implements IEdgePatternExpansion {
+    private final PathEnumerationEnvironment pathEnumerationEnvironment;
+
+    public UndirectedVarPathExpansion(PathEnumerationEnvironment pathEnumerationEnvironment) {
+        this.pathEnumerationEnvironment = pathEnumerationEnvironment;
+    }
+
+    @Override
+    public Iterable<Iterable<EdgePatternExpr>> expand(EdgePatternExpr edgePatternExpr) {
+        // Ensure we have been given the correct type of sub-path.
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        if (edgeDescriptor.getEdgeClass() != IGraphExpr.GraphExprKind.PATH_PATTERN
+                || edgeDescriptor.getEdgeType() != EdgeDescriptor.EdgeType.UNDIRECTED
+                || Objects.equals(edgeDescriptor.getMinimumHops(), edgeDescriptor.getMaximumHops())) {
+            throw new IllegalArgumentException("Expected an undirected var sub-path, but given a " + edgeDescriptor);
+        }
+
+        List<List<EdgePatternExpr>> decomposedEdgeList = new ArrayList<>();
+        for (int i = edgeDescriptor.getMinimumHops(); i <= edgeDescriptor.getMaximumHops(); i++) {
+            EdgeDescriptor fixedEdgeDescriptor =
+                    new EdgeDescriptor(EdgeDescriptor.EdgeType.UNDIRECTED, IGraphExpr.GraphExprKind.PATH_PATTERN,
+                            edgeDescriptor.getEdgeLabels(), edgeDescriptor.getVariableExpr(), i, i);
+            EdgePatternExpr fixedEdgePattern = new EdgePatternExpr(edgePatternExpr.getLeftVertex(),
+                    edgePatternExpr.getRightVertex(), fixedEdgeDescriptor);
+            fixedEdgePattern.replaceInternalVertices(edgePatternExpr.getInternalVertices());
+
+            // We defer the decomposition of each individual path to UndirectedFixedPathExpansion.
+            new UndirectedFixedPathExpansion(pathEnumerationEnvironment).expand(fixedEdgePattern).forEach(e -> {
+                List<EdgePatternExpr> decompositionIntermediate = new ArrayList<>();
+                e.forEach(decompositionIntermediate::add);
+                decomposedEdgeList.add(decompositionIntermediate);
+            });
+        }
+
+        return new ArrayList<>(decomposedEdgeList);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/GraphixLowerSupplier.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/GraphixLowerSupplier.java
new file mode 100644
index 0000000..8433a9f
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/GraphixLowerSupplier.java
@@ -0,0 +1,168 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.BinaryOperator;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.assembly.ExprAssembler;
+import org.apache.asterix.graphix.lang.rewrites.assembly.IExprAssembly;
+import org.apache.asterix.graphix.lang.rewrites.common.EdgeDependencyGraph;
+import org.apache.asterix.graphix.lang.rewrites.lower.assembly.DanglingVertexLowerAssembly;
+import org.apache.asterix.graphix.lang.rewrites.lower.assembly.IsomorphismLowerAssembly;
+import org.apache.asterix.graphix.lang.rewrites.lower.assembly.NamedPathLowerAssembly;
+import org.apache.asterix.graphix.lang.rewrites.util.EdgeRewritingUtil;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.Literal;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.JoinClause;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.optype.JoinType;
+
+/**
+ * Supplier for lower AST nodes (i.e. SQL++ AST nodes). We perform the following process:
+ * 1. Given the edge-dependency graph, fetch all supplied orderings of {@link EdgePatternExpr}. We will create a
+ * separate assembly branch for each ordering.
+ * 2. Once each assembly branch has been built, construct a left-deep LEFT-OUTER-JOIN tree out of the tail of each
+ * assembly. This will result in one representative "junction" {@link LowerSupplierNode} node.
+ * 3. If there are dangling vertices, merge the junction node from #2 with a lower node that represents all dangling
+ * vertices.
+ * 4. Gather all projected vertices and edges and attach isomorphism conjuncts to the tail {@link LowerSupplierNode}
+ * node. Unlike our previous steps, this does not produce a new lower node.
+ * 5. If there are any named paths (i.e. not sub-paths within {@link EdgePatternExpr}}, modify the tail
+ * {@link LowerSupplierNode} to define a LET-CLAUSE that binds the path variable, and a projection to output said
+ * path variable. Similar to the previous step, this does not produce a new lower node.
+ */
+public class GraphixLowerSupplier {
+    private final Function<EdgePatternExpr, IExprAssembly<LowerSupplierNode>> lowerStrategyNodeSupplier;
+    private final LowerSupplierContext lowerSupplierContext;
+    private final EdgeDependencyGraph edgeDependencyGraph;
+
+    public GraphixLowerSupplier(LowerSupplierContext lowerSupplierContext, EdgeDependencyGraph edgeDependencyGraph,
+            Function<EdgePatternExpr, IExprAssembly<LowerSupplierNode>> lowerStrategyNodeSupplier) {
+        this.edgeDependencyGraph = edgeDependencyGraph;
+        this.lowerSupplierContext = lowerSupplierContext;
+        this.lowerStrategyNodeSupplier = lowerStrategyNodeSupplier;
+    }
+
+    public void invoke(Consumer<LowerSupplierNode> lowerNodeConsumer) throws CompilationException {
+        // Handle each of our edge orderings. Additionally, hand off each generated LET-CLAUSE to our caller.
+        List<ExprAssembler<LowerSupplierNode>> edgeAssemblers = new ArrayList<>();
+        for (Iterable<EdgePatternExpr> edgeOrdering : edgeDependencyGraph) {
+            ExprAssembler<LowerSupplierNode> edgeAssembler = new ExprAssembler<>();
+            for (EdgePatternExpr edgePatternExpr : edgeOrdering) {
+                edgeAssembler.bind(lowerStrategyNodeSupplier.apply(edgePatternExpr));
+            }
+            edgeAssembler.iterator().forEachRemaining(lowerNodeConsumer);
+            edgeAssemblers.add(edgeAssembler);
+        }
+
+        // Join each parallel assembly with a LEFT-OUTER-JOIN.
+        LowerSupplierNode tailLowerNode = edgeAssemblers.stream().sequential().map(ExprAssembler::getLast)
+                .reduce(buildLowerNodeMerger(JoinType.LEFTOUTER, lowerNodeConsumer)).orElse(null);
+
+        // If dangling vertices exist, merge the previous node with the dangling-vertex assembly.
+        if (!lowerSupplierContext.getDanglingVertices().isEmpty()) {
+            ExprAssembler<LowerSupplierNode> danglingVertexAssembler = new ExprAssembler<>();
+            danglingVertexAssembler.bind(new DanglingVertexLowerAssembly(lowerSupplierContext));
+            lowerNodeConsumer.accept(danglingVertexAssembler.getLast());
+
+            // Connect this assembler to the edge assembly tail.
+            if (tailLowerNode != null) {
+                tailLowerNode = buildLowerNodeMerger(JoinType.INNER, lowerNodeConsumer).apply(tailLowerNode,
+                        danglingVertexAssembler.getLast());
+
+            } else {
+                tailLowerNode = danglingVertexAssembler.getLast();
+            }
+        }
+
+        // Attach our isomorphism conjuncts (and disjuncts) to the tail node (if necessary).
+        IsomorphismLowerAssembly isomorphismLowerAssembly = new IsomorphismLowerAssembly(
+                lowerSupplierContext.getDanglingVertices(), lowerSupplierContext.getOptionalVariables(),
+                edgeDependencyGraph, lowerSupplierContext.getMetadataProvider());
+        tailLowerNode = isomorphismLowerAssembly.apply(Objects.requireNonNull(tailLowerNode));
+
+        // If we have any named paths (i.e. not a sub-path in an EDGE-PATTERN-EXPR), add them to the tail lower node.
+        List<PathPatternExpr> pathPatternExprList = lowerSupplierContext.getPathPatternExprList();
+        NamedPathLowerAssembly namedPathLowerAssembly = new NamedPathLowerAssembly(pathPatternExprList);
+        namedPathLowerAssembly.apply(tailLowerNode);
+    }
+
+    private BinaryOperator<LowerSupplierNode> buildLowerNodeMerger(JoinType joinType,
+            Consumer<LowerSupplierNode> mergerCallbackConsumer) {
+        return (n1, n2) -> {
+            // Build a reference to our N1 node.
+            VariableExpr n1BindingVar = n1.getBindingVar();
+            VariableExpr n1ReferenceVar = new VariableExpr(lowerSupplierContext.getNewVariable());
+
+            // Build a reference to our N2 node.
+            VariableExpr n2BindingVar = n2.getBindingVar();
+            VariableExpr n2ReferenceVar = new VariableExpr(lowerSupplierContext.getNewVariable());
+
+            // Build the JOIN-CLAUSE, and add the reference to N2 in a correlated clause to a FROM-TERM of N1.
+            Expression whereConjunct = null;
+            for (Projection n2Projection : n2.getProjectionList()) {
+                Expression toProjectionExpr = new FieldAccessor(n2ReferenceVar, new Identifier(n2Projection.getName()));
+                whereConjunct = EdgeRewritingUtil.buildInputAssemblyJoin(n1, n1ReferenceVar, toProjectionExpr,
+                        whereConjunct, n -> n.equals(n2Projection.getName()));
+            }
+            List<AbstractBinaryCorrelateClause> correlateClauses = new ArrayList<>();
+            correlateClauses.add(new JoinClause(joinType, n2BindingVar, n2ReferenceVar, null, whereConjunct,
+                    (joinType == JoinType.INNER) ? null : Literal.Type.MISSING));
+            FromTerm fromTerm = new FromTerm(n1BindingVar, n1ReferenceVar, null, correlateClauses);
+
+            // Combine the projection list from N1 and N2. Avoid duplicates.
+            List<Projection> projectionList = n1.getProjectionList().stream().map(p -> {
+                String n1VarName = p.getName();
+                VariableExpr n1ProjectionVar = new VariableExpr(new VarIdentifier(n1VarName));
+                FieldAccessor n1ProjectionAccess = new FieldAccessor(n1ReferenceVar, n1ProjectionVar.getVar());
+                return new Projection(Projection.Kind.NAMED_EXPR, n1ProjectionAccess, n1VarName);
+            }).collect(Collectors.toList());
+            for (Projection n2Projection : n2.getProjectionList()) {
+                String n2VarName = n2Projection.getName();
+                if (projectionList.stream().map(Projection::getName).noneMatch(n2VarName::equals)) {
+                    VariableExpr n2ProjectionVar = new VariableExpr(new VarIdentifier(n2VarName));
+                    FieldAccessor n2ProjectionAccess = new FieldAccessor(n2ReferenceVar, n2ProjectionVar.getVar());
+                    projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, n2ProjectionAccess, n2VarName));
+                }
+            }
+
+            // Assemble the new lowering node.
+            LowerSupplierNode outputLowerSupplierNode = new LowerSupplierNode(Collections.singletonList(fromTerm), null,
+                    projectionList, new VariableExpr(lowerSupplierContext.getNewVariable()));
+            mergerCallbackConsumer.accept(outputLowerSupplierNode);
+            return outputLowerSupplierNode;
+        };
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/LowerSupplierContext.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/LowerSupplierContext.java
new file mode 100644
index 0000000..1c24588
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/LowerSupplierContext.java
@@ -0,0 +1,78 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower;
+
+import java.util.List;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+
+public class LowerSupplierContext {
+    private final GraphixRewritingContext graphixRewritingContext;
+    private final GraphIdentifier graphIdentifier;
+    private final List<VertexPatternExpr> danglingVertices;
+    private final List<VarIdentifier> optionalVariables;
+    private final List<PathPatternExpr> pathPatternExprList;
+    private final ElementLookupTable<GraphElementIdentifier> elementLookupTable;
+
+    public LowerSupplierContext(GraphixRewritingContext graphixRewritingContext, GraphIdentifier graphIdentifier,
+            List<VertexPatternExpr> danglingVertices, List<VarIdentifier> optionalVariables,
+            List<PathPatternExpr> pathPatternExprList, ElementLookupTable<GraphElementIdentifier> elementLookupTable) {
+        this.elementLookupTable = elementLookupTable;
+        this.danglingVertices = danglingVertices;
+        this.optionalVariables = optionalVariables;
+        this.graphIdentifier = graphIdentifier;
+        this.pathPatternExprList = pathPatternExprList;
+        this.graphixRewritingContext = graphixRewritingContext;
+    }
+
+    public GraphIdentifier getGraphIdentifier() {
+        return graphIdentifier;
+    }
+
+    public ElementLookupTable<GraphElementIdentifier> getElementLookupTable() {
+        return elementLookupTable;
+    }
+
+    public List<VertexPatternExpr> getDanglingVertices() {
+        return danglingVertices;
+    }
+
+    public List<VarIdentifier> getOptionalVariables() {
+        return optionalVariables;
+    }
+
+    public MetadataProvider getMetadataProvider() {
+        return graphixRewritingContext.getMetadataProvider();
+    }
+
+    public VarIdentifier getNewVariable() {
+        return graphixRewritingContext.getNewVariable();
+    }
+
+    public List<PathPatternExpr> getPathPatternExprList() {
+        return pathPatternExprList;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/LowerSupplierNode.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/LowerSupplierNode.java
new file mode 100644
index 0000000..0d07ae2
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/LowerSupplierNode.java
@@ -0,0 +1,66 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower;
+
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildLetClauseWithFromList;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.asterix.graphix.lang.rewrites.lower.assembly.AbstractLowerAssembly;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.clause.LetClause;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+
+/**
+ * A helper class for building the {@link LetClause} that represents the final lowered representation of a query edge.
+ * This is used as the node type for {@link AbstractLowerAssembly}.
+ */
+public class LowerSupplierNode {
+    private final List<FromTerm> fromTermList;
+    private final List<AbstractClause> whereClauses;
+    private final List<Projection> projectionList;
+    private final VariableExpr bindingVar;
+
+    public LowerSupplierNode(List<FromTerm> fromTermList, List<AbstractClause> whereClauses,
+            List<Projection> projectionList, VariableExpr bindingVar) {
+        this.fromTermList = fromTermList;
+        this.projectionList = projectionList;
+        this.bindingVar = bindingVar;
+        this.whereClauses = (whereClauses == null) ? new ArrayList<>() : whereClauses;
+    }
+
+    public List<Projection> getProjectionList() {
+        return projectionList;
+    }
+
+    public VariableExpr getBindingVar() {
+        return bindingVar;
+    }
+
+    public List<AbstractClause> getWhereClauses() {
+        return whereClauses;
+    }
+
+    public LetClause buildLetClause() {
+        return buildLetClauseWithFromList(fromTermList, whereClauses, projectionList, bindingVar);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/AbstractLowerAssembly.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/AbstractLowerAssembly.java
new file mode 100644
index 0000000..e7459e0
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/AbstractLowerAssembly.java
@@ -0,0 +1,105 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower.assembly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.rewrites.assembly.IExprAssembly;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierContext;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierNode;
+import org.apache.asterix.graphix.lang.rewrites.util.EdgeRewritingUtil;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.WhereClause;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+
+/**
+ * Abstract lowering assembly for creating a new {@link LowerSupplierNode} out of some input {@link LowerSupplierNode}.
+ * There are two parts to function application here: (1) building a new FROM-TERM and (2) building a list of
+ * projections- both of which will be used to create a FROM-CLAUSE that will be wrapped in a LET-CLAUSE.
+ */
+public abstract class AbstractLowerAssembly implements IExprAssembly<LowerSupplierNode> {
+    protected final ElementLookupTable<GraphElementIdentifier> elementLookupTable;
+    protected final LowerSupplierContext lowerSupplierContext;
+    protected final GraphIdentifier graphIdentifier;
+
+    public AbstractLowerAssembly(LowerSupplierContext lowerSupplierContext) {
+        this.elementLookupTable = lowerSupplierContext.getElementLookupTable();
+        this.graphIdentifier = lowerSupplierContext.getGraphIdentifier();
+        this.lowerSupplierContext = lowerSupplierContext;
+    }
+
+    protected abstract List<Projection> buildOutputProjections() throws CompilationException;
+
+    protected abstract FromTerm buildOutputFromTerm() throws CompilationException;
+
+    @Override
+    public LowerSupplierNode apply(LowerSupplierNode inputNode) throws CompilationException {
+        // Build the output FROM-TERM and PROJECTION list.
+        List<FromTerm> fromTermList = new ArrayList<>();
+        FromTerm outputFromTerm = buildOutputFromTerm();
+        List<Projection> projectionList = buildOutputProjections();
+        fromTermList.add(outputFromTerm);
+
+        Expression joinConjuncts = null;
+        if (inputNode != null) {
+            // Build a FROM-TERM using our input.
+            VariableExpr bindingInputLetVar = inputNode.getBindingVar();
+            VariableExpr leadingVariable = new VariableExpr(lowerSupplierContext.getNewVariable());
+            FromTerm inputFromTerm = new FromTerm(bindingInputLetVar, leadingVariable, null, null);
+            fromTermList.add(inputFromTerm);
+
+            // If we find any projections from our input that match our output, add the predicate here.
+            for (Projection outputProjection : projectionList) {
+                joinConjuncts = EdgeRewritingUtil.buildInputAssemblyJoin(inputNode, leadingVariable,
+                        outputProjection.getExpression(), joinConjuncts, n -> n.equals(outputProjection.getName()));
+            }
+
+            // Add all projections from our input, if they do not already exist.
+            for (Projection inputProjection : inputNode.getProjectionList()) {
+                VarIdentifier inputProjectionVariable = new VarIdentifier(inputProjection.getName());
+                VariableExpr inputProjectionVariableExpr = new VariableExpr(inputProjectionVariable);
+                if (projectionList.stream().map(Projection::getName)
+                        .noneMatch(p -> inputProjectionVariableExpr.getVar().getValue().equals(p))) {
+                    Projection outputProjection = new Projection(Projection.Kind.NAMED_EXPR,
+                            new FieldAccessor(leadingVariable, inputProjectionVariableExpr.getVar()),
+                            inputProjectionVariableExpr.getVar().getValue());
+                    projectionList.add(outputProjection);
+                }
+            }
+        }
+
+        // Finally, return the constructed lowering node.
+        List<AbstractClause> letWhereClauseList = new ArrayList<>();
+        if (joinConjuncts != null) {
+            letWhereClauseList.add(new WhereClause(joinConjuncts));
+        }
+        VariableExpr bindingOutputVar = new VariableExpr(lowerSupplierContext.getNewVariable());
+        return new LowerSupplierNode(fromTermList, letWhereClauseList, projectionList, bindingOutputVar);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/DanglingVertexLowerAssembly.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/DanglingVertexLowerAssembly.java
new file mode 100644
index 0000000..7c93d2b
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/DanglingVertexLowerAssembly.java
@@ -0,0 +1,82 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower.assembly;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierContext;
+import org.apache.asterix.graphix.lang.rewrites.record.VertexRecord;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.literal.TrueLiteral;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.JoinClause;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.optype.JoinType;
+import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
+
+/**
+ * Lower node for handling vertices that are not attached to an edge.
+ * - The output FROM-TERM is a cross-product of all dangling vertices.
+ * - The output projections are the variable expressions associated with each vertex.
+ */
+public class DanglingVertexLowerAssembly extends AbstractLowerAssembly {
+    public DanglingVertexLowerAssembly(LowerSupplierContext lowerSupplierContext) {
+        super(lowerSupplierContext);
+    }
+
+    @Override
+    protected FromTerm buildOutputFromTerm() {
+        List<Expression> vertexExpressions = lowerSupplierContext.getDanglingVertices().stream()
+                .map(v -> new VertexRecord(v, graphIdentifier, lowerSupplierContext)).map(VertexRecord::getExpression)
+                .collect(Collectors.toList());
+
+        // Our FROM-TERM will start with the first defined vertex.
+        Expression leadingVertexExpression = vertexExpressions.get(0);
+        VariableExpr leadingVariable = lowerSupplierContext.getDanglingVertices().get(0).getVariableExpr();
+        FromTerm fromTerm = new FromTerm(leadingVertexExpression,
+                new VariableExpr(new VarIdentifier(leadingVariable.getVar())), null, null);
+
+        // Perform a CROSS-JOIN with all subsequent dangling vertices.
+        List<AbstractBinaryCorrelateClause> correlateClauses = fromTerm.getCorrelateClauses();
+        for (int i = 1; i < vertexExpressions.size(); i++) {
+            VertexPatternExpr followingVertexPattern = lowerSupplierContext.getDanglingVertices().get(i);
+            VariableExpr followingVariable = followingVertexPattern.getVariableExpr();
+            correlateClauses.add(new JoinClause(JoinType.INNER, vertexExpressions.get(i),
+                    new VariableExpr(new VarIdentifier(followingVariable.getVar())), null,
+                    new LiteralExpr(TrueLiteral.INSTANCE), null));
+        }
+
+        return fromTerm;
+    }
+
+    @Override
+    protected List<Projection> buildOutputProjections() {
+        return lowerSupplierContext.getDanglingVertices().stream().map(v -> {
+            String projectionName = SqlppVariableUtil.toUserDefinedName(v.getVariableExpr().getVar().getValue());
+            VariableExpr variableExpr = new VariableExpr(v.getVariableExpr().getVar());
+            return new Projection(Projection.Kind.NAMED_EXPR, variableExpr, projectionName);
+        }).collect(Collectors.toList());
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/ExpandEdgeLowerAssembly.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/ExpandEdgeLowerAssembly.java
new file mode 100644
index 0000000..88575ec
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/ExpandEdgeLowerAssembly.java
@@ -0,0 +1,315 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower.assembly;
+
+import static org.apache.asterix.graphix.lang.rewrites.lower.assembly.IsomorphismLowerAssembly.getMatchEvaluationKind;
+import static org.apache.asterix.graphix.lang.rewrites.util.ClauseRewritingUtil.buildConnectedClauses;
+import static org.apache.asterix.graphix.lang.rewrites.util.EdgeRewritingUtil.buildEdgeKeyBuilder;
+import static org.apache.asterix.graphix.lang.rewrites.util.EdgeRewritingUtil.buildEdgeLabelPredicateBuilder;
+import static org.apache.asterix.graphix.lang.rewrites.util.EdgeRewritingUtil.buildVertexEdgeJoin;
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildAccessorList;
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildSetOpInputWithFrom;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.assembly.ExprAssembler;
+import org.apache.asterix.graphix.lang.rewrites.expand.DirectedFixedPathExpansion;
+import org.apache.asterix.graphix.lang.rewrites.expand.DirectedVarPathExpansion;
+import org.apache.asterix.graphix.lang.rewrites.expand.IEdgePatternExpansion;
+import org.apache.asterix.graphix.lang.rewrites.expand.PathEnumerationEnvironment;
+import org.apache.asterix.graphix.lang.rewrites.expand.UndirectedEdgeExpansion;
+import org.apache.asterix.graphix.lang.rewrites.expand.UndirectedFixedPathExpansion;
+import org.apache.asterix.graphix.lang.rewrites.expand.UndirectedVarPathExpansion;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierContext;
+import org.apache.asterix.graphix.lang.rewrites.record.EdgeRecord;
+import org.apache.asterix.graphix.lang.rewrites.record.VertexRecord;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.AbstractExpression;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.LetClause;
+import org.apache.asterix.lang.common.clause.WhereClause;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.OperatorType;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.JoinClause;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.clause.SelectSetOperation;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.optype.JoinType;
+import org.apache.asterix.lang.sqlpp.optype.SetOpType;
+import org.apache.asterix.lang.sqlpp.struct.SetOperationInput;
+import org.apache.asterix.lang.sqlpp.struct.SetOperationRight;
+import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
+
+/**
+ * Edge expansion lowering assembly for handling {@link EdgePatternExpr} lowering.
+ * - The output FROM-TERM is a collection of 2-way JOINs between the intermediate lowered edge ({@link EdgeRecord}
+ * instance) and the corresponding vertices (as {@link VertexRecord} instances). The order of which vertex is JOINed
+ * first depends on which vertex is the source and which vertex is the destination. In the case of a bidirectional edge
+ * and/or sub-paths, we return a FROM-TERM that is the UNION of simple directed 1-hop edges.
+ * - The output projections are minimally composed of the edge variable expression and the two corresponding vertex
+ * variable expressions. If we have a bidirectional edge and/or a sub-path, then we must qualify all of our projections
+ * to account for the additional subtree (i.e. the UNION-ALL).
+ */
+public class ExpandEdgeLowerAssembly extends AbstractLowerAssembly {
+    public final static String METADATA_CONFIG_NAME = "expand-edge";
+
+    private final Deque<FromTermEnvironment> environmentStack;
+    private final EdgePatternExpr inputEdgePatternExpr;
+
+    // The lists below are specific to each FROM-TERM chain.
+    private final Deque<List<LetClause>> generatedReboundExpressions = new ArrayDeque<>();
+    private final Deque<List<Expression>> generatedEdgeConjuncts = new ArrayDeque<>();
+    private final Deque<List<Expression>> generatedVertexConjuncts = new ArrayDeque<>();
+
+    // We will introduce this after we collect each FROM-TERM chain.
+    private VariableExpr qualifyingIdentifier;
+
+    public ExpandEdgeLowerAssembly(EdgePatternExpr inputEdgePatternExpr, LowerSupplierContext lowerSupplierContext) {
+        super(lowerSupplierContext);
+        this.inputEdgePatternExpr = inputEdgePatternExpr;
+        this.environmentStack = new ArrayDeque<>();
+    }
+
+    private Iterable<Iterable<EdgePatternExpr>> expandEdgePatternExpr(EdgePatternExpr edgePatternExpr) {
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+
+        if (edgeDescriptor.getEdgeType() != EdgeDescriptor.EdgeType.UNDIRECTED
+                && edgeDescriptor.getEdgeClass() == IGraphExpr.GraphExprKind.EDGE_PATTERN) {
+            // We have a single directed edge. We do not need to break this up.
+            return List.of(List.of(edgePatternExpr));
+
+        } else if (edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.UNDIRECTED
+                && edgeDescriptor.getEdgeClass() == IGraphExpr.GraphExprKind.EDGE_PATTERN) {
+            return new UndirectedEdgeExpansion().expand(edgePatternExpr);
+
+        } else { // edgeDescriptor.getEdgeClass() == IGraphExpr.GraphExprKind.PATH_PATTERN
+            PathEnumerationEnvironment decompositionEnvironment = new PathEnumerationEnvironment(edgePatternExpr,
+                    lowerSupplierContext, generatedVertexConjuncts::addLast, generatedEdgeConjuncts::addLast,
+                    generatedReboundExpressions::addLast);
+
+            IEdgePatternExpansion edgePatternDecomposition;
+            if (edgeDescriptor.getEdgeType() != EdgeDescriptor.EdgeType.UNDIRECTED
+                    && Objects.equals(edgeDescriptor.getMinimumHops(), edgeDescriptor.getMaximumHops())) {
+                edgePatternDecomposition = new DirectedFixedPathExpansion(decompositionEnvironment);
+
+            } else if (edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.UNDIRECTED
+                    && Objects.equals(edgeDescriptor.getMinimumHops(), edgeDescriptor.getMaximumHops())) {
+                edgePatternDecomposition = new UndirectedFixedPathExpansion(decompositionEnvironment);
+
+            } else if (edgeDescriptor.getEdgeType() != EdgeDescriptor.EdgeType.UNDIRECTED
+                    && !Objects.equals(edgeDescriptor.getMinimumHops(), edgeDescriptor.getMaximumHops())) {
+                edgePatternDecomposition = new DirectedVarPathExpansion(decompositionEnvironment);
+
+            } else { // == ...UNDIRECTED && !Objects.equals(...getMinimumHops(), ...getMaximumHops())
+                edgePatternDecomposition = new UndirectedVarPathExpansion(decompositionEnvironment);
+            }
+            return edgePatternDecomposition.expand(edgePatternExpr);
+        }
+    }
+
+    @Override
+    protected List<Projection> buildOutputProjections() {
+        VariableExpr leftVarExpr = inputEdgePatternExpr.getLeftVertex().getVariableExpr();
+        VariableExpr rightVarExpr = inputEdgePatternExpr.getRightVertex().getVariableExpr();
+        VariableExpr edgeVarExpr = inputEdgePatternExpr.getEdgeDescriptor().getVariableExpr();
+
+        // Qualify our output projections (if necessary).
+        AbstractExpression leftVar = leftVarExpr, rightVar = rightVarExpr, edgeVar = edgeVarExpr;
+        if (qualifyingIdentifier != null) {
+            VarIdentifier leftVarID = SqlppVariableUtil.toUserDefinedVariableName(leftVarExpr.getVar());
+            VarIdentifier rightVarID = SqlppVariableUtil.toUserDefinedVariableName(rightVarExpr.getVar());
+            VarIdentifier edgeVarID = SqlppVariableUtil.toUserDefinedVariableName(edgeVarExpr.getVar());
+            leftVar = new FieldAccessor(qualifyingIdentifier, leftVarID);
+            rightVar = new FieldAccessor(qualifyingIdentifier, rightVarID);
+            edgeVar = new FieldAccessor(qualifyingIdentifier, edgeVarID);
+        }
+
+        // Determine the name to assign to our projections.
+        String leftVarAs = SqlppVariableUtil.toUserDefinedName(leftVarExpr.getVar().getValue());
+        String rightVarAs = SqlppVariableUtil.toUserDefinedName(rightVarExpr.getVar().getValue());
+        String edgeVarAs = SqlppVariableUtil.toUserDefinedName(edgeVarExpr.getVar().getValue());
+
+        // Add our vertices and our edge.
+        List<Projection> projectionList = new ArrayList<>();
+        projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, leftVar, leftVarAs));
+        projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, rightVar, rightVarAs));
+        projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, edgeVar, edgeVarAs));
+
+        return projectionList;
+    }
+
+    @Override
+    protected FromTerm buildOutputFromTerm() throws CompilationException {
+        for (Iterable<EdgePatternExpr> edgePatternCollection : expandEdgePatternExpr(inputEdgePatternExpr)) {
+            // Build the initial FROM-TERM for this set of EDGE-PATTERN-EXPR.
+            ExprAssembler<FromTerm> fromTermAssembler = new ExprAssembler<>();
+            fromTermAssembler.bind(inputFromTerm -> {
+                VertexPatternExpr leftPattern = edgePatternCollection.iterator().next().getLeftVertex();
+                VertexRecord leftVertexRecord = new VertexRecord(leftPattern, graphIdentifier, lowerSupplierContext);
+                VarIdentifier leadingIdentifier = new VarIdentifier(leftVertexRecord.getVarExpr().getVar());
+                VariableExpr leadingVariable = new VariableExpr(leadingIdentifier);
+                return new FromTerm(leftVertexRecord.getExpression(), leadingVariable, null, null);
+            });
+
+            // Build our correlated clauses from this collection.
+            for (EdgePatternExpr edgePatternExpr : edgePatternCollection) {
+                EdgeRecord edgeRecord = new EdgeRecord(edgePatternExpr, graphIdentifier, lowerSupplierContext);
+
+                // Lower our left and right vertices.
+                VertexPatternExpr leftPattern = edgePatternExpr.getLeftVertex();
+                VertexPatternExpr rightPattern = edgePatternExpr.getRightVertex();
+                VertexRecord leftRecord = new VertexRecord(leftPattern, graphIdentifier, lowerSupplierContext);
+                VertexRecord rightRecord = new VertexRecord(rightPattern, graphIdentifier, lowerSupplierContext);
+
+                // Attach the correlated clauses associated with this edge.
+                EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+                fromTermAssembler.bind(inputFromTerm -> {
+                    // We need to determine which fields to access for our edge.
+                    Function<GraphElementIdentifier, ElementLabel> leftEdgeLabelAccess;
+                    Function<GraphElementIdentifier, ElementLabel> rightEdgeLabelAccess;
+                    Function<GraphElementIdentifier, List<List<String>>> leftEdgeKeyAccess;
+                    Function<GraphElementIdentifier, List<List<String>>> rightEdgeKeyAccess;
+                    if (edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.LEFT_TO_RIGHT) {
+                        leftEdgeKeyAccess = elementLookupTable::getEdgeSourceKeys;
+                        rightEdgeKeyAccess = elementLookupTable::getEdgeDestKeys;
+                        leftEdgeLabelAccess = elementLookupTable::getEdgeSourceLabel;
+                        rightEdgeLabelAccess = elementLookupTable::getEdgeDestLabel;
+
+                    } else {
+                        leftEdgeKeyAccess = elementLookupTable::getEdgeDestKeys;
+                        rightEdgeKeyAccess = elementLookupTable::getEdgeSourceKeys;
+                        leftEdgeLabelAccess = elementLookupTable::getEdgeDestLabel;
+                        rightEdgeLabelAccess = elementLookupTable::getEdgeSourceLabel;
+                    }
+
+                    // Build the join predicate to connect our left vertex to our edge...
+                    VariableExpr leftVar = new VariableExpr(leftRecord.getVarExpr().getVar());
+                    VariableExpr edgeVar = new VariableExpr(edgeRecord.getVarExpr().getVar());
+                    Expression leftToEdgeJoinPredicate =
+                            buildVertexEdgeJoin(leftRecord.getElementIdentifiers(), edgeRecord.getElementIdentifiers(),
+                                    buildEdgeLabelPredicateBuilder(leftVar, edgeVar, leftEdgeLabelAccess),
+                                    (v, e) -> v.getElementLabel().equals(leftEdgeLabelAccess.apply(e)),
+                                    v -> buildAccessorList(leftVar, elementLookupTable.getVertexKey(v)),
+                                    buildEdgeKeyBuilder(edgeVar, elementLookupTable, leftEdgeKeyAccess));
+
+                    // ...and attach the INNER-JOIN node to our FROM-TERM.
+                    VariableExpr leftToEdgeVar = new VariableExpr(new VarIdentifier(edgeVar.getVar()));
+                    inputFromTerm.getCorrelateClauses().add(new JoinClause(JoinType.INNER, edgeRecord.getExpression(),
+                            leftToEdgeVar, null, leftToEdgeJoinPredicate, null));
+
+                    // Build the join predicate to connect our right vertex to our edge...
+                    VariableExpr rightVar = new VariableExpr(rightRecord.getVarExpr().getVar());
+                    Expression rightToEdgeJoinPredicate =
+                            buildVertexEdgeJoin(rightRecord.getElementIdentifiers(), edgeRecord.getElementIdentifiers(),
+                                    buildEdgeLabelPredicateBuilder(rightVar, edgeVar, rightEdgeLabelAccess),
+                                    (v, e) -> v.getElementLabel().equals(rightEdgeLabelAccess.apply(e)),
+                                    v -> buildAccessorList(rightVar, elementLookupTable.getVertexKey(v)),
+                                    buildEdgeKeyBuilder(edgeVar, elementLookupTable, rightEdgeKeyAccess));
+
+                    // ...and attach the INNER-JOIN node to our FROM-TERM.
+                    VariableExpr edgeToRightVar = new VariableExpr(new VarIdentifier(rightVar.getVar()));
+                    inputFromTerm.getCorrelateClauses().add(new JoinClause(JoinType.INNER, rightRecord.getExpression(),
+                            edgeToRightVar, null, rightToEdgeJoinPredicate, null));
+
+                    return inputFromTerm;
+                });
+            }
+
+            // Save our state onto our stack.
+            FromTermEnvironment fromTermEnvironment = new FromTermEnvironment();
+            fromTermEnvironment.fromTermAssembler = fromTermAssembler;
+            fromTermEnvironment.outputProjections = buildOutputProjections();
+            fromTermEnvironment.outputLetWhereClauses = buildLetWhereClauses();
+            environmentStack.addLast(fromTermEnvironment);
+        }
+
+        // At this point, we should have a collection of FROM-TERMs. Build SET-OP-INPUT for each FROM-TERM.
+        Iterator<FromTermEnvironment> environmentIterator = environmentStack.iterator();
+        Deque<SetOperationInput> setOpInputStack =
+                environmentStack.stream().map(e -> e.fromTermAssembler.getLast()).map(f -> {
+                    FromTermEnvironment fromTermEnvironment = environmentIterator.next();
+                    List<Projection> outputProjections = fromTermEnvironment.outputProjections;
+                    List<AbstractClause> outputLetWhereClauses = fromTermEnvironment.outputLetWhereClauses;
+                    return buildSetOpInputWithFrom(f, outputProjections, outputLetWhereClauses);
+                }).collect(Collectors.toCollection(ArrayDeque::new));
+
+        // UNION-ALL each SET-OP-INPUT (if we have any).
+        SetOperationInput leftSetOpInput = setOpInputStack.removeFirst();
+        SelectSetOperation selectSetOperation = new SelectSetOperation(leftSetOpInput, setOpInputStack.stream()
+                .map(s -> new SetOperationRight(SetOpType.UNION, false, s)).collect(Collectors.toList()));
+
+        // We return a new FROM-TERM which will bind the SELECT-EXPR above to our qualifying var.
+        qualifyingIdentifier = new VariableExpr(lowerSupplierContext.getNewVariable());
+        SelectExpression selectExpression = new SelectExpression(null, selectSetOperation, null, null, true);
+        return new FromTerm(selectExpression, qualifyingIdentifier, null, null);
+    }
+
+    private List<AbstractClause> buildLetWhereClauses() throws CompilationException {
+        // Determine if any isomorphism is desired.
+        List<Expression> isomorphismConjuncts = new ArrayList<>();
+        switch (getMatchEvaluationKind(lowerSupplierContext.getMetadataProvider())) {
+            case TOTAL_ISOMORPHISM:
+            case VERTEX_ISOMORPHISM:
+                if (!generatedVertexConjuncts.isEmpty()) {
+                    isomorphismConjuncts = generatedVertexConjuncts.removeFirst();
+                }
+                break;
+
+            case EDGE_ISOMORPHISM:
+                if (!generatedEdgeConjuncts.isEmpty()) {
+                    isomorphismConjuncts = generatedEdgeConjuncts.removeFirst();
+                }
+                break;
+        }
+
+        // Finally, build our LET-WHERE list.
+        List<AbstractClause> letWhereClauseList = new ArrayList<>();
+        if (!isomorphismConjuncts.isEmpty()) {
+            letWhereClauseList.add(new WhereClause(buildConnectedClauses(isomorphismConjuncts, OperatorType.AND)));
+        }
+        if (!generatedReboundExpressions.isEmpty() && !generatedReboundExpressions.getLast().isEmpty()) {
+            letWhereClauseList.addAll(generatedReboundExpressions.removeFirst());
+        }
+        return letWhereClauseList;
+    }
+
+    // If multiple FROM-TERMs are required, our environment stack will have more than one element.
+    private static class FromTermEnvironment {
+        ExprAssembler<FromTerm> fromTermAssembler;
+        List<Projection> outputProjections;
+        List<AbstractClause> outputLetWhereClauses;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/IsomorphismLowerAssembly.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/IsomorphismLowerAssembly.java
new file mode 100644
index 0000000..bba86fd
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/IsomorphismLowerAssembly.java
@@ -0,0 +1,258 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower.assembly;
+
+import static org.apache.asterix.graphix.lang.rewrites.util.ClauseRewritingUtil.buildConnectedClauses;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.algebra.compiler.provider.GraphixCompilationProvider;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.assembly.IExprAssembly;
+import org.apache.asterix.graphix.lang.rewrites.common.EdgeDependencyGraph;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierNode;
+import org.apache.asterix.graphix.lang.rewrites.visitor.ElementResolutionVisitor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.WhereClause;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.OperatorExpr;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.OperatorType;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+
+/**
+ * Define which graph elements are *not* equal to each other. We assume that all elements are named at this point
+ * (i.e. {@link ElementResolutionVisitor} must run before this). We enforce the following:
+ * 1. By default, we enforce vertex isomorphism. No vertex (and consequently, no edge) can appear more than once across
+ * all patterns of all {@link MatchClause} nodes.
+ * 2. If edge-isomorphism is desired, then we only enforce that no edge can appear more than once across all
+ * {@link MatchClause} nodes.
+ * 3. If homomorphism is desired, then we enforce nothing. Edge adjacency is already implicitly preserved.
+ * 4. If we have any LEFT-MATCH clauses, then we need to ensure that vertices that are only found in LEFT-MATCH clauses
+ * are allowed to have a MISSING value.
+ */
+public class IsomorphismLowerAssembly implements IExprAssembly<LowerSupplierNode> {
+    public enum MatchEvaluationKind {
+        TOTAL_ISOMORPHISM("isomorphism"), // = VERTEX_ISOMORPHISM
+        VERTEX_ISOMORPHISM("vertex-isomorphism"),
+        EDGE_ISOMORPHISM("edge-isomorphism"),
+        HOMOMORPHISM("homomorphism");
+
+        // The user specifies the options above through "SET `graphix.match-evaluation` '...';"
+        private final String metadataConfigOptionName;
+
+        MatchEvaluationKind(String metadataConfigOptionName) {
+            this.metadataConfigOptionName = metadataConfigOptionName;
+        }
+
+        @Override
+        public String toString() {
+            return metadataConfigOptionName;
+        }
+    }
+
+    private final List<VertexPatternExpr> danglingVertices;
+    private final List<VarIdentifier> optionalVertices;
+    private final EdgeDependencyGraph edgeDependencyGraph;
+    private final MetadataProvider metadataProvider;
+
+    public IsomorphismLowerAssembly(List<VertexPatternExpr> danglingVertices, List<VarIdentifier> optionalVertices,
+            EdgeDependencyGraph edgeDependencyGraph, MetadataProvider metadataProvider) {
+        this.danglingVertices = danglingVertices;
+        this.optionalVertices = optionalVertices;
+        this.edgeDependencyGraph = edgeDependencyGraph;
+        this.metadataProvider = metadataProvider;
+    }
+
+    public static MatchEvaluationKind getMatchEvaluationKind(MetadataProvider metadataProvider)
+            throws CompilationException {
+        final String metadataConfigKeyName = GraphixCompilationProvider.MATCH_EVALUATION_METADATA_CONFIG;
+
+        if (metadataProvider.getConfig().containsKey(metadataConfigKeyName)) {
+            String metadataConfigKeyValue = (String) metadataProvider.getConfig().get(metadataConfigKeyName);
+            if (metadataConfigKeyValue.equalsIgnoreCase(MatchEvaluationKind.TOTAL_ISOMORPHISM.toString())) {
+                return MatchEvaluationKind.TOTAL_ISOMORPHISM;
+
+            } else if (metadataConfigKeyValue.equalsIgnoreCase(MatchEvaluationKind.VERTEX_ISOMORPHISM.toString())) {
+                return MatchEvaluationKind.VERTEX_ISOMORPHISM;
+
+            } else if (metadataConfigKeyValue.equalsIgnoreCase(MatchEvaluationKind.EDGE_ISOMORPHISM.toString())) {
+                return MatchEvaluationKind.EDGE_ISOMORPHISM;
+
+            } else if (metadataConfigKeyValue.equalsIgnoreCase(MatchEvaluationKind.HOMOMORPHISM.toString())) {
+                return MatchEvaluationKind.HOMOMORPHISM;
+
+            } else {
+                throw new CompilationException(ErrorCode.ILLEGAL_SET_PARAMETER, metadataConfigKeyValue);
+            }
+
+        } else {
+            return MatchEvaluationKind.VERTEX_ISOMORPHISM;
+        }
+    }
+
+    public static List<Expression> generateIsomorphismConjuncts(List<Expression> variableList) {
+        List<Expression> isomorphismConjuncts = new ArrayList<>();
+
+        // Find all unique pairs from our list of variables.
+        for (int i = 0; i < variableList.size(); i++) {
+            for (int j = i + 1; j < variableList.size(); j++) {
+                OperatorExpr inequalityConjunct = new OperatorExpr();
+                inequalityConjunct.addOperator(OperatorType.NEQ);
+                inequalityConjunct.addOperand(variableList.get(i));
+                inequalityConjunct.addOperand(variableList.get(j));
+                isomorphismConjuncts.add(inequalityConjunct);
+            }
+        }
+
+        return isomorphismConjuncts;
+    }
+
+    public static void populateVariableMap(Set<ElementLabel> labels, VariableExpr variableExpr,
+            Map<ElementLabel, List<VariableExpr>> labelVariableMap) {
+        Function<VariableExpr, Boolean> mapMatchFinder = v -> {
+            final String variableName = SqlppVariableUtil.toUserDefinedName(variableExpr.getVar().getValue());
+            String inputVariableName = SqlppVariableUtil.toUserDefinedName(v.getVar().getValue());
+            return variableName.equals(inputVariableName);
+        };
+        for (ElementLabel label : labels) {
+            if (labelVariableMap.containsKey(label)) {
+                if (labelVariableMap.get(label).stream().noneMatch(mapMatchFinder::apply)) {
+                    labelVariableMap.get(label).add(variableExpr);
+                }
+
+            } else {
+                List<VariableExpr> variableList = new ArrayList<>();
+                variableList.add(variableExpr);
+                labelVariableMap.put(label, variableList);
+            }
+        }
+        if (labels.isEmpty()) {
+            if (labelVariableMap.containsKey(null)) {
+                if (labelVariableMap.get(null).stream().noneMatch(mapMatchFinder::apply)) {
+                    labelVariableMap.get(null).add(variableExpr);
+                }
+
+            } else {
+                List<VariableExpr> variableList = new ArrayList<>();
+                variableList.add(variableExpr);
+                labelVariableMap.put(null, variableList);
+            }
+        }
+    }
+
+    @Override
+    public LowerSupplierNode apply(LowerSupplierNode inputLowerNode) throws CompilationException {
+        Map<ElementLabel, List<VariableExpr>> vertexVariableMap = new HashMap<>();
+        Map<ElementLabel, List<VariableExpr>> edgeVariableMap = new HashMap<>();
+        Map<VariableExpr, Expression> qualifiedExprMap = new HashMap<>();
+
+        // Fetch the edge and vertex variables, qualified through our input projections.
+        Map<String, Expression> qualifiedProjectionMap = inputLowerNode.getProjectionList().stream()
+                .collect(Collectors.toMap(Projection::getName, Projection::getExpression));
+        for (VertexPatternExpr danglingVertex : danglingVertices) {
+            VariableExpr vertexVarExpr = danglingVertex.getVariableExpr();
+            String vertexVarName = SqlppVariableUtil.toUserDefinedName(vertexVarExpr.getVar().getValue());
+            populateVariableMap(danglingVertex.getLabels(), vertexVarExpr, vertexVariableMap);
+            qualifiedExprMap.put(vertexVarExpr, qualifiedProjectionMap.get(vertexVarName));
+        }
+        edgeDependencyGraph.forEach(p -> p.forEach(e -> {
+            // Handle our left and right vertices.
+            VariableExpr leftVertexVar = e.getLeftVertex().getVariableExpr();
+            VariableExpr rightVertexVar = e.getRightVertex().getVariableExpr();
+            populateVariableMap(e.getLeftVertex().getLabels(), leftVertexVar, vertexVariableMap);
+            populateVariableMap(e.getRightVertex().getLabels(), rightVertexVar, vertexVariableMap);
+            String leftVarName = SqlppVariableUtil.toUserDefinedName(leftVertexVar.getVar().getValue());
+            String rightVarName = SqlppVariableUtil.toUserDefinedName(rightVertexVar.getVar().getValue());
+            qualifiedExprMap.put(leftVertexVar, qualifiedProjectionMap.get(leftVarName));
+            qualifiedExprMap.put(rightVertexVar, qualifiedProjectionMap.get(rightVarName));
+
+            // If we have an edge (and not a sub-path), create a conjunct for this.
+            if (e.getEdgeDescriptor().getEdgeClass() == IGraphExpr.GraphExprKind.EDGE_PATTERN) {
+                VariableExpr edgeVar = e.getEdgeDescriptor().getVariableExpr();
+                populateVariableMap(e.getEdgeDescriptor().getEdgeLabels(), edgeVar, edgeVariableMap);
+                String edgeVarName = SqlppVariableUtil.toUserDefinedName(edgeVar.getVar().getValue());
+                qualifiedExprMap.put(edgeVar, qualifiedProjectionMap.get(edgeVarName));
+            }
+        }));
+
+        // Construct our isomorphism conjuncts.
+        List<Expression> isomorphismConjuncts = new ArrayList<>();
+        switch (getMatchEvaluationKind(metadataProvider)) {
+            case TOTAL_ISOMORPHISM:
+            case VERTEX_ISOMORPHISM:
+                vertexVariableMap.values().stream()
+                        .map(v -> v.stream().map(qualifiedExprMap::get).collect(Collectors.toList()))
+                        .map(IsomorphismLowerAssembly::generateIsomorphismConjuncts)
+                        .forEach(isomorphismConjuncts::addAll);
+                break;
+
+            case EDGE_ISOMORPHISM:
+                edgeVariableMap.values().stream()
+                        .map(e -> e.stream().map(qualifiedExprMap::get).collect(Collectors.toList()))
+                        .map(IsomorphismLowerAssembly::generateIsomorphismConjuncts)
+                        .forEach(isomorphismConjuncts::addAll);
+                break;
+        }
+
+        // Construct our IF_MISSING disjuncts.
+        List<Expression> ifMissingExprList = null;
+        if (!optionalVertices.isEmpty()) {
+            ifMissingExprList = optionalVertices.stream().map(v -> {
+                String qualifiedVarName = SqlppVariableUtil.toUserDefinedVariableName(v).getValue();
+                Expression qualifiedVar = qualifiedProjectionMap.get(qualifiedVarName);
+                return new CallExpr(new FunctionSignature(BuiltinFunctions.IS_MISSING), List.of(qualifiedVar));
+            }).collect(Collectors.toList());
+        }
+
+        // Attach our WHERE-EXPR to the tail node.
+        if (!isomorphismConjuncts.isEmpty() && ifMissingExprList == null) {
+            Expression whereExpr = buildConnectedClauses(isomorphismConjuncts, OperatorType.AND);
+            inputLowerNode.getWhereClauses().add(new WhereClause(whereExpr));
+
+        } else if (isomorphismConjuncts.isEmpty() && ifMissingExprList != null) {
+            Expression whereExpr = buildConnectedClauses(ifMissingExprList, OperatorType.OR);
+            inputLowerNode.getWhereClauses().add(new WhereClause(whereExpr));
+
+        } else if (!isomorphismConjuncts.isEmpty()) { // && ifMissingExprList != null
+            Expression isomorphismExpr = buildConnectedClauses(isomorphismConjuncts, OperatorType.AND);
+            Expression ifMissingExpr = buildConnectedClauses(ifMissingExprList, OperatorType.OR);
+            List<Expression> whereExprDisjuncts = List.of(isomorphismExpr, ifMissingExpr);
+            Expression whereExpr = buildConnectedClauses(whereExprDisjuncts, OperatorType.OR);
+            inputLowerNode.getWhereClauses().add(new WhereClause(whereExpr));
+        }
+        return inputLowerNode;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/NamedPathLowerAssembly.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/NamedPathLowerAssembly.java
new file mode 100644
index 0000000..54b00e9
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/lower/assembly/NamedPathLowerAssembly.java
@@ -0,0 +1,131 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.lower.assembly;
+
+import static org.apache.asterix.lang.common.expression.ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.assembly.IExprAssembly;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierNode;
+import org.apache.asterix.graphix.lang.rewrites.record.PathRecord;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.ListConstructor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+
+/**
+ * Introduce named paths into the given assembly node. If a sub-path is found within a {@link PathPatternExpr}, we need
+ * to merge the sub-path into the full-path. If the pattern only consists of a vertex, then a pseudo-path is formed with
+ * special "dangling-vertex" edge.
+ */
+public class NamedPathLowerAssembly implements IExprAssembly<LowerSupplierNode> {
+    private final List<PathPatternExpr> pathPatternExprList;
+
+    public NamedPathLowerAssembly(List<PathPatternExpr> pathPatternExprList) {
+        this.pathPatternExprList = pathPatternExprList;
+    }
+
+    @Override
+    public LowerSupplierNode apply(LowerSupplierNode inputLowerNode) throws CompilationException {
+        Map<String, Expression> qualifiedProjectionMap = inputLowerNode.getProjectionList().stream()
+                .collect(Collectors.toMap(Projection::getName, Projection::getExpression));
+        for (PathPatternExpr pathPatternExpr : pathPatternExprList) {
+            if (pathPatternExpr.getVariableExpr() == null) {
+                continue;
+            }
+            if (!pathPatternExpr.getEdgeExpressions().isEmpty()) {
+                List<Expression> pathExpressionParts = new ArrayList<>();
+                List<Expression> workingSimplePath = new ArrayList<>();
+
+                for (EdgePatternExpr edgePatternExpr : pathPatternExpr.getEdgeExpressions()) {
+                    EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+                    if (edgeDescriptor.getEdgeClass() == IGraphExpr.GraphExprKind.EDGE_PATTERN) {
+                        // "Raw" edges are first put into a list of path records.
+                        VariableExpr leftVertexVar = edgePatternExpr.getLeftVertex().getVariableExpr();
+                        VariableExpr rightVertexVar = edgePatternExpr.getRightVertex().getVariableExpr();
+                        VariableExpr edgeVar = edgeDescriptor.getVariableExpr();
+
+                        // Get the name of our path variables.
+                        String edgeVarName = SqlppVariableUtil.toUserDefinedName(edgeVar.getVar().getValue());
+                        String leftVarName = SqlppVariableUtil.toUserDefinedName(leftVertexVar.getVar().getValue());
+                        String rightVarName = SqlppVariableUtil.toUserDefinedName(rightVertexVar.getVar().getValue());
+
+                        // We must qualify each of our expressions.
+                        Expression leftExpr = qualifiedProjectionMap.get(leftVarName);
+                        Expression rightExpr = qualifiedProjectionMap.get(rightVarName);
+                        Expression edgeExpr = qualifiedProjectionMap.get(edgeVarName);
+                        workingSimplePath.add(new PathRecord(leftExpr, edgeExpr, rightExpr).getExpression());
+
+                    } else { // edgeDescriptor.getEdgeClass() == IGraphExpr.GraphExprKind.PATH_PATTERN
+                        // If we encounter a sub-path, ARRAY_CONCAT our existing path and sub-path.
+                        pathExpressionParts.add(new ListConstructor(ORDERED_LIST_CONSTRUCTOR, workingSimplePath));
+                        VariableExpr subPathVar = edgeDescriptor.getVariableExpr();
+                        String subPathVarName = SqlppVariableUtil.toUserDefinedName(subPathVar.getVar().getValue());
+                        pathExpressionParts.add(qualifiedProjectionMap.get(subPathVarName));
+                        workingSimplePath = new ArrayList<>();
+                    }
+                }
+
+                // If did not encounter a sub-path, build our simple path here.
+                if (!workingSimplePath.isEmpty()) {
+                    pathExpressionParts.add(new ListConstructor(ORDERED_LIST_CONSTRUCTOR, workingSimplePath));
+                }
+
+                String pathVariableName = pathPatternExpr.getVariableExpr().getVar().getValue();
+                if (pathExpressionParts.size() == 1) {
+                    // If we only have one expression, we do not need to ARRAY_CONCAT.
+                    inputLowerNode.getProjectionList().add(new Projection(Projection.Kind.NAMED_EXPR,
+                            pathExpressionParts.get(0), SqlppVariableUtil.toUserDefinedName(pathVariableName)));
+
+                } else {
+                    // ...otherwise, ARRAY_CONCAT (we do this to preserve the order of our path records).
+                    FunctionSignature functionSignature = new FunctionSignature(BuiltinFunctions.ARRAY_CONCAT);
+                    Projection projection = new Projection(Projection.Kind.NAMED_EXPR,
+                            new CallExpr(functionSignature, pathExpressionParts),
+                            SqlppVariableUtil.toUserDefinedName(pathVariableName));
+                    inputLowerNode.getProjectionList().add(projection);
+                }
+
+            } else {
+                // We only have one vertex (no edges). Attach a singleton list of a single-field record.
+                VariableExpr danglingVertexVar = pathPatternExpr.getVertexExpressions().get(0).getVariableExpr();
+                String danglingVarName = SqlppVariableUtil.toUserDefinedName(danglingVertexVar.getVar().getValue());
+                Expression danglingExpr = qualifiedProjectionMap.get(danglingVarName);
+                List<Expression> pathExpressions = List.of(new PathRecord(danglingExpr).getExpression());
+                inputLowerNode.getProjectionList().add(new Projection(Projection.Kind.NAMED_EXPR,
+                        new ListConstructor(ORDERED_LIST_CONSTRUCTOR, pathExpressions),
+                        SqlppVariableUtil.toUserDefinedName(pathPatternExpr.getVariableExpr().getVar().getValue())));
+            }
+        }
+        return inputLowerNode;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/GraphixASTPrintVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/GraphixASTPrintVisitor.java
new file mode 100644
index 0000000..6c6482e
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/GraphixASTPrintVisitor.java
@@ -0,0 +1,269 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.print;
+
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.GraphSelectBlock;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.visitor.IGraphixLangVisitor;
+import org.apache.asterix.graphix.lang.statement.CreateGraphStatement;
+import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+import org.apache.asterix.lang.sqlpp.visitor.SqlppAstPrintVisitor;
+
+public class GraphixASTPrintVisitor extends SqlppAstPrintVisitor implements IGraphixLangVisitor<Void, Integer> {
+    public GraphixASTPrintVisitor(PrintWriter out) {
+        super(out);
+    }
+
+    @Override
+    public Void visit(GraphConstructor graphConstructor, Integer step) throws CompilationException {
+        out.println(skip(step) + "GRAPH [");
+        for (GraphConstructor.VertexConstructor vertexConstructor : graphConstructor.getVertexElements()) {
+            vertexConstructor.accept(this, step + 1);
+        }
+        for (GraphConstructor.EdgeConstructor edgeConstructor : graphConstructor.getEdgeElements()) {
+            edgeConstructor.accept(this, step + 1);
+        }
+        out.println(skip(step) + "]");
+        return null;
+    }
+
+    @Override
+    public Void visit(GraphConstructor.VertexConstructor vertexConstructor, Integer step) throws CompilationException {
+        out.print(skip(step) + "VERTEX ");
+        out.println("(:" + vertexConstructor.getLabel() + ")");
+        out.println(skip(step) + "AS ");
+        vertexConstructor.getExpression().accept(this, step + 1);
+        return null;
+    }
+
+    @Override
+    public Void visit(GraphConstructor.EdgeConstructor edgeConstructor, Integer step) throws CompilationException {
+        out.print(skip(step) + "EDGE ");
+        out.print("(:" + edgeConstructor.getSourceLabel() + ")");
+        out.print("-[:" + edgeConstructor.getEdgeLabel() + "]->");
+        out.println("(:" + edgeConstructor.getDestinationLabel() + ")");
+        out.println(skip(step) + "AS ");
+        edgeConstructor.getExpression().accept(this, step + 1);
+        return null;
+    }
+
+    @Override
+    public Void visit(SelectBlock selectBlock, Integer step) throws CompilationException {
+        return (selectBlock instanceof GraphSelectBlock) ? this.visit((GraphSelectBlock) selectBlock, step)
+                : super.visit(selectBlock, step);
+    }
+
+    @Override
+    public Void visit(GraphSelectBlock graphSelectBlock, Integer step) throws CompilationException {
+        graphSelectBlock.getSelectClause().accept(this, step);
+        if (graphSelectBlock.hasFromClause()) {
+            graphSelectBlock.getFromClause().accept(this, step);
+
+        } else if (graphSelectBlock.hasFromGraphClause()) {
+            graphSelectBlock.getFromGraphClause().accept(this, step);
+        }
+        if (graphSelectBlock.hasLetWhereClauses()) {
+            for (AbstractClause letWhereClause : graphSelectBlock.getLetWhereList()) {
+                letWhereClause.accept(this, step);
+            }
+        }
+        if (graphSelectBlock.hasGroupbyClause()) {
+            graphSelectBlock.getGroupbyClause().accept(this, step);
+            if (graphSelectBlock.hasLetHavingClausesAfterGroupby()) {
+                for (AbstractClause letHavingClause : graphSelectBlock.getLetHavingListAfterGroupby()) {
+                    letHavingClause.accept(this, step);
+                }
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public Void visit(FromGraphClause fromGraphClause, Integer step) throws CompilationException {
+        out.println(skip(step) + "FROM [");
+        if (fromGraphClause.getGraphConstructor() != null) {
+            fromGraphClause.getGraphConstructor().accept(this, step + 1);
+
+        } else {
+            out.print(skip(step + 1) + "GRAPH ");
+            if (fromGraphClause.getDataverseName() != null) {
+                out.print(fromGraphClause.getDataverseName().toString());
+                out.print(".");
+            }
+            out.print(fromGraphClause.getGraphName());
+        }
+        out.println(skip(step) + "]");
+        for (MatchClause matchClause : fromGraphClause.getMatchClauses()) {
+            matchClause.accept(this, step);
+        }
+        for (AbstractBinaryCorrelateClause correlateClause : fromGraphClause.getCorrelateClauses()) {
+            correlateClause.accept(this, step);
+        }
+        return null;
+    }
+
+    @Override
+    public Void visit(MatchClause matchClause, Integer step) throws CompilationException {
+        out.print(skip(step));
+        switch (matchClause.getMatchType()) {
+            case LEADING:
+            case INNER:
+                out.println("MATCH [");
+                break;
+            case LEFTOUTER:
+                out.println("LEFT MATCH [");
+                break;
+        }
+        for (PathPatternExpr pathExpression : matchClause.getPathExpressions()) {
+            pathExpression.accept(this, step + 1);
+        }
+        out.println(skip(step) + "]");
+        return null;
+    }
+
+    @Override
+    public Void visit(PathPatternExpr pathPatternExpr, Integer step) throws CompilationException {
+        List<VertexPatternExpr> danglingVertices = pathPatternExpr.getVertexExpressions().stream().filter(v -> {
+            // Collect all vertices that are not attached to an edge.
+            for (EdgePatternExpr edgeExpression : pathPatternExpr.getEdgeExpressions()) {
+                VertexPatternExpr leftVertex = edgeExpression.getLeftVertex();
+                VertexPatternExpr rightVertex = edgeExpression.getRightVertex();
+                if (leftVertex == v || rightVertex == v) {
+                    return false;
+                }
+            }
+            return true;
+        }).collect(Collectors.toList());
+        int index = 0;
+        for (VertexPatternExpr vertexPatternExpr : danglingVertices) {
+            if (index > 0) {
+                out.print(skip(step) + ",");
+            }
+            vertexPatternExpr.accept(this, step);
+            out.println();
+            index++;
+        }
+        for (EdgePatternExpr edgeExpression : pathPatternExpr.getEdgeExpressions()) {
+            if (index > 0) {
+                out.print(skip(step) + ",");
+            }
+            edgeExpression.accept(this, step);
+            out.println();
+            index++;
+        }
+        if (pathPatternExpr.getVariableExpr() != null) {
+            out.print(skip(step) + "AS ");
+            pathPatternExpr.getVariableExpr().accept(this, 0);
+        }
+        return null;
+    }
+
+    @Override
+    public Void visit(EdgePatternExpr edgePatternExpr, Integer step) throws CompilationException {
+        out.print(skip(step));
+        edgePatternExpr.getLeftVertex().accept(this, 0);
+        switch (edgePatternExpr.getEdgeDescriptor().getEdgeType()) {
+            case LEFT_TO_RIGHT:
+            case UNDIRECTED:
+                out.print("-[");
+                break;
+            case RIGHT_TO_LEFT:
+                out.print("<-[");
+                break;
+        }
+        if (edgePatternExpr.getEdgeDescriptor().getVariableExpr() != null) {
+            out.print(edgePatternExpr.getEdgeDescriptor().getVariableExpr().getVar().getValue());
+        }
+        out.print(":(");
+        int index = 0;
+        for (ElementLabel label : edgePatternExpr.getEdgeDescriptor().getEdgeLabels()) {
+            if (index > 0) {
+                out.print("|");
+            }
+            out.print(label);
+            index++;
+        }
+        out.print("){");
+        out.print(edgePatternExpr.getEdgeDescriptor().getMinimumHops().toString());
+        out.print(",");
+        out.print(edgePatternExpr.getEdgeDescriptor().getMaximumHops().toString());
+        out.print("}");
+        switch (edgePatternExpr.getEdgeDescriptor().getEdgeType()) {
+            case LEFT_TO_RIGHT:
+                out.print("]->");
+                break;
+            case RIGHT_TO_LEFT:
+            case UNDIRECTED:
+                out.print("]-");
+                break;
+        }
+        edgePatternExpr.getRightVertex().accept(this, 0);
+        return null;
+    }
+
+    @Override
+    public Void visit(VertexPatternExpr vertexPatternExpr, Integer step) throws CompilationException {
+        out.print(skip(step) + "(");
+        if (vertexPatternExpr.getVariableExpr() != null) {
+            out.print(vertexPatternExpr.getVariableExpr().getVar().getValue());
+        }
+        out.print(":");
+        int index = 0;
+        for (ElementLabel label : vertexPatternExpr.getLabels()) {
+            if (index > 0) {
+                out.print("|");
+            }
+            out.print(label);
+            index++;
+        }
+        out.print(")");
+        return null;
+    }
+
+    // The following should not appear in queries (the former, pre-rewrite).
+    @Override
+    public Void visit(CreateGraphStatement createGraphStatement, Integer step) throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Void visit(GraphElementDecl graphElementDecl, Integer step) throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Void visit(GraphDropStatement graphDropStatement, Integer step) throws CompilationException {
+        return null;
+    }
+}
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/GraphixASTPrintVisitorFactory.java
similarity index 64%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/GraphixASTPrintVisitorFactory.java
index 9667fd6..ff00077 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/GraphixASTPrintVisitorFactory.java
@@ -16,7 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.asterix.graphix.lang.rewrites.print;
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+import java.io.PrintWriter;
+
+import org.apache.asterix.lang.common.base.IAstPrintVisitorFactory;
+import org.apache.asterix.lang.common.visitor.QueryPrintVisitor;
+
+public class GraphixASTPrintVisitorFactory implements IAstPrintVisitorFactory {
+    @Override
+    public QueryPrintVisitor createLangVisitor(PrintWriter writer) {
+        return new GraphixASTPrintVisitor(writer);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/SqlppASTPrintQueryVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/SqlppASTPrintQueryVisitor.java
new file mode 100644
index 0000000..4493937
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/print/SqlppASTPrintQueryVisitor.java
@@ -0,0 +1,681 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.print;
+
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.lang.common.base.Clause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.clause.GroupbyClause;
+import org.apache.asterix.lang.common.clause.LetClause;
+import org.apache.asterix.lang.common.clause.LimitClause;
+import org.apache.asterix.lang.common.clause.OrderbyClause;
+import org.apache.asterix.lang.common.clause.WhereClause;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
+import org.apache.asterix.lang.common.expression.IfExpr;
+import org.apache.asterix.lang.common.expression.IndexAccessor;
+import org.apache.asterix.lang.common.expression.ListConstructor;
+import org.apache.asterix.lang.common.expression.ListSliceExpression;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.OperatorExpr;
+import org.apache.asterix.lang.common.expression.QuantifiedExpression;
+import org.apache.asterix.lang.common.expression.RecordConstructor;
+import org.apache.asterix.lang.common.expression.UnaryExpr;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.statement.Query;
+import org.apache.asterix.lang.common.struct.OperatorType;
+import org.apache.asterix.lang.sqlpp.clause.FromClause;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.HavingClause;
+import org.apache.asterix.lang.sqlpp.clause.JoinClause;
+import org.apache.asterix.lang.sqlpp.clause.NestClause;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+import org.apache.asterix.lang.sqlpp.clause.SelectClause;
+import org.apache.asterix.lang.sqlpp.clause.SelectElement;
+import org.apache.asterix.lang.sqlpp.clause.SelectRegular;
+import org.apache.asterix.lang.sqlpp.clause.SelectSetOperation;
+import org.apache.asterix.lang.sqlpp.clause.UnnestClause;
+import org.apache.asterix.lang.sqlpp.expression.CaseExpression;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.expression.WindowExpression;
+import org.apache.asterix.lang.sqlpp.optype.SetOpType;
+import org.apache.asterix.lang.sqlpp.struct.SetOperationInput;
+import org.apache.asterix.lang.sqlpp.visitor.base.AbstractSqlppQueryExpressionVisitor;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+/**
+ * Visitor class to create a valid SQL++ query out of a **valid** AST. We make the following assumptions:
+ * 1. The entry point is a {@link Query}, which we will print to.
+ * 2. All {@link GroupbyClause} nodes only have one set of {@link GbyVariableExpressionPair} (i.e. the GROUP-BY
+ * rewrites should have fired).
+ * 3. No positional variables are included.
+ * 4. No {@link WindowExpression} nodes are included (this is on the TODO list).
+ */
+public class SqlppASTPrintQueryVisitor extends AbstractSqlppQueryExpressionVisitor<String, Void> {
+    private final PrintWriter printWriter;
+
+    public SqlppASTPrintQueryVisitor(PrintWriter printWriter) {
+        this.printWriter = printWriter;
+    }
+
+    @Override
+    public String visit(Query query, Void arg) throws CompilationException {
+        String queryBodyString = query.getBody().accept(this, arg) + ";";
+        queryBodyString = queryBodyString.trim().replaceAll("\\s+", " ");
+        printWriter.print(queryBodyString);
+        return null;
+    }
+
+    @Override
+    public String visit(SelectExpression selectStatement, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" ( ");
+        if (selectStatement.hasLetClauses()) {
+            sb.append(" LET ");
+            sb.append(selectStatement.getLetList().stream().map(this::visitAndSwallowException)
+                    .collect(Collectors.joining(", ")));
+        }
+        sb.append(selectStatement.getSelectSetOperation().accept(this, arg));
+        if (selectStatement.hasOrderby()) {
+            sb.append(selectStatement.getOrderbyClause().accept(this, arg));
+        }
+        if (selectStatement.hasLimit()) {
+            sb.append(selectStatement.getLimitClause().accept(this, arg));
+        }
+        sb.append(" ) ");
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(LetClause letClause, Void arg) throws CompilationException {
+        return String.format(" %s =  ( %s ) ", letClause.getVarExpr().accept(this, arg),
+                letClause.getBindingExpr().accept(this, arg));
+    }
+
+    @Override
+    public String visit(SelectSetOperation selectSetOperation, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(selectSetOperation.getLeftInput().accept(this, arg));
+        if (selectSetOperation.hasRightInputs()) {
+            sb.append(selectSetOperation.getRightInputs().stream().map(s -> {
+                // Ignore everything else but UNION-ALL.
+                if (s.getSetOpType() == SetOpType.UNION) {
+                    SetOperationInput rightInput = s.getSetOperationRightInput();
+                    if (!s.isSetSemantics()) {
+                        if (rightInput.selectBlock()) {
+                            return " UNION ALL " + visitAndSwallowException(rightInput.getSelectBlock());
+                        }
+                        if (rightInput.subquery()) {
+                            return " UNION ALL " + visitAndSwallowException(rightInput.getSubquery());
+                        }
+                    }
+                }
+                throw new NotImplementedException("Given SET operation is not implemented.");
+            }).collect(Collectors.joining()));
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(SelectBlock selectBlock, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(visitAndSwallowException(selectBlock.getSelectClause()));
+        if (selectBlock.hasFromClause()) {
+            sb.append(selectBlock.getFromClause().accept(this, arg));
+        }
+        if (selectBlock.hasLetWhereClauses()) {
+            List<LetClause> letClauses = selectBlock.getLetWhereList().stream()
+                    .filter(c -> c.getClauseType() == Clause.ClauseType.LET_CLAUSE).map(c -> (LetClause) c)
+                    .collect(Collectors.toList());
+            List<WhereClause> whereClauses = selectBlock.getLetWhereList().stream()
+                    .filter(c -> c.getClauseType() == Clause.ClauseType.WHERE_CLAUSE).map(c -> (WhereClause) c)
+                    .collect(Collectors.toList());
+            if (!letClauses.isEmpty()) {
+                sb.append(" LET ");
+                sb.append(letClauses.stream().map(this::visitAndSwallowException).collect(Collectors.joining(", ")));
+            }
+            if (!whereClauses.isEmpty()) {
+                sb.append(" WHERE ");
+                sb.append(
+                        whereClauses.stream().map(this::visitAndSwallowException).collect(Collectors.joining(" AND ")));
+            }
+        }
+        if (selectBlock.hasGroupbyClause()) {
+            sb.append(selectBlock.getGroupbyClause().accept(this, arg));
+        }
+        if (selectBlock.hasLetHavingClausesAfterGroupby()) {
+            List<LetClause> letClauses = selectBlock.getLetHavingListAfterGroupby().stream()
+                    .filter(c -> c.getClauseType() == Clause.ClauseType.LET_CLAUSE).map(c -> (LetClause) c)
+                    .collect(Collectors.toList());
+            List<HavingClause> havingClauses = selectBlock.getLetHavingListAfterGroupby().stream()
+                    .filter(c -> c.getClauseType() == Clause.ClauseType.HAVING_CLAUSE).map(c -> (HavingClause) c)
+                    .collect(Collectors.toList());
+            if (!letClauses.isEmpty()) {
+                sb.append(" LET ");
+                sb.append(letClauses.stream().map(this::visitAndSwallowException).collect(Collectors.joining(", ")));
+            }
+            if (!havingClauses.isEmpty()) {
+                sb.append(" HAVING ");
+                sb.append(havingClauses.stream().map(this::visitAndSwallowException).collect(Collectors.joining(", ")));
+            }
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(FromClause fromClause, Void arg) {
+        return String.format(" FROM %s ", fromClause.getFromTerms().stream().map(this::visitAndSwallowException)
+                .collect(Collectors.joining(", ")));
+    }
+
+    @Override
+    public String visit(FromTerm fromTerm, Void arg) throws CompilationException {
+        // Note: we do not include positional variables here.
+        StringBuilder sb = new StringBuilder();
+        sb.append(fromTerm.getLeftExpression().accept(this, arg));
+        if (fromTerm.getLeftVariable() != null) {
+            sb.append(" AS ");
+            sb.append(fromTerm.getLeftVariable().accept(this, arg));
+        }
+        sb.append(fromTerm.getCorrelateClauses().stream().map(this::visitAndSwallowException)
+                .collect(Collectors.joining()));
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(WhereClause whereClause, Void arg) throws CompilationException {
+        return whereClause.getWhereExpr().accept(this, arg);
+    }
+
+    @Override
+    public String visit(GroupbyClause groupbyClause, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" GROUP BY "); // Note: we should have rewritten grouping sets by now.
+        sb.append(groupbyClause.getGbyPairList().stream().flatMap(Collection::stream).map(p -> {
+            if (p.getVar() != null) {
+                return " ( " + visitAndSwallowException(p.getExpr()) + " AS " + visitAndSwallowException(p.getVar())
+                        + ")";
+
+            } else {
+                return " ( " + visitAndSwallowException(p.getExpr()) + " ) ";
+            }
+        }).collect(Collectors.joining(", ")));
+        if (groupbyClause.hasGroupVar()) {
+            sb.append(" GROUP AS ");
+            sb.append(groupbyClause.getGroupVar().accept(this, arg));
+            if (groupbyClause.hasGroupFieldList()) {
+                sb.append(" ( ");
+                sb.append(
+                        groupbyClause.getGroupFieldList().stream()
+                                .map(f -> visitAndSwallowException(f.first) + " AS "
+                                        + formatIdentifierForQuery(f.second.getValue()))
+                                .collect(Collectors.joining(", ")));
+                sb.append(" ) ");
+            }
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(HavingClause havingClause, Void arg) throws CompilationException {
+        return havingClause.getFilterExpression().accept(this, arg);
+    }
+
+    @Override
+    public String visit(SelectClause selectClause, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" SELECT ");
+        if (selectClause.distinct()) {
+            sb.append(" DISTINCT ");
+        }
+        if (selectClause.selectElement()) {
+            sb.append(" VALUE ");
+            sb.append(selectClause.getSelectElement().accept(this, arg));
+
+        } else {
+            sb.append(selectClause.getSelectRegular().accept(this, arg));
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(SelectElement selectElement, Void arg) throws CompilationException {
+        return selectElement.getExpression().accept(this, arg);
+    }
+
+    @Override
+    public String visit(SelectRegular selectRegular, Void arg) {
+        return selectRegular.getProjections().stream().map(this::visitAndSwallowException)
+                .collect(Collectors.joining(", "));
+    }
+
+    @Override
+    public String visit(Projection projection, Void arg) throws CompilationException {
+        switch (projection.getKind()) {
+            case NAMED_EXPR:
+                return projection.getExpression().accept(this, arg) + " AS `"
+                        + formatIdentifierForQuery(projection.getName()) + "`";
+            case STAR:
+                return "*";
+            case VAR_STAR:
+                return projection.getExpression().accept(this, arg) + ".*";
+            default:
+                throw new NotImplementedException("Illegal projection type encountered!");
+        }
+    }
+
+    @Override
+    public String visit(JoinClause joinClause, Void arg) throws CompilationException {
+        // Note: we do not include positional variables here.
+        StringBuilder sb = new StringBuilder();
+        switch (joinClause.getJoinType()) {
+            case INNER:
+                sb.append(" INNER JOIN ");
+                break;
+            case LEFTOUTER:
+                sb.append(" LEFT OUTER JOIN ");
+                break;
+            case RIGHTOUTER:
+                sb.append(" RIGHT OUTER JOIN ");
+                break;
+        }
+        sb.append(joinClause.getRightExpression().accept(this, arg));
+        if (joinClause.getRightVariable() != null) {
+            sb.append(" AS ");
+            sb.append(joinClause.getRightVariable().accept(this, arg));
+        }
+        sb.append(" ON ");
+        sb.append(joinClause.getConditionExpression().accept(this, arg));
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(NestClause nestClause, Void arg) {
+        throw new NotImplementedException("NEST clause not implemented!");
+    }
+
+    @Override
+    public String visit(UnnestClause unnestClause, Void arg) throws CompilationException {
+        // Note: we do not include positional variables here.
+        StringBuilder sb = new StringBuilder();
+        switch (unnestClause.getUnnestType()) {
+            case INNER:
+                sb.append(" UNNEST ");
+                break;
+            case LEFTOUTER:
+                sb.append(" LEFT OUTER UNNEST ");
+                break;
+        }
+        sb.append(unnestClause.getRightExpression().accept(this, arg));
+        if (unnestClause.getRightVariable() != null) {
+            sb.append(" AS ");
+            sb.append(unnestClause.getRightVariable().accept(this, arg));
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(OrderbyClause orderbyClause, Void arg) {
+        String orderByString = IntStream.range(0, orderbyClause.getOrderbyList().size()).mapToObj(i -> {
+            // Build the order-modifier as a string.
+            OrderbyClause.OrderModifier orderModifier = orderbyClause.getModifierList().get(i);
+            String orderModifierAsString = (orderModifier == null) ? "" : orderModifier.toString();
+
+            // Build our null-order-modifier as a string.
+            OrderbyClause.NullOrderModifier nullOrderModifier = orderbyClause.getNullModifierList().get(i);
+            String nullOrderModifierAsString = "";
+            if (nullOrderModifier == OrderbyClause.NullOrderModifier.FIRST) {
+                nullOrderModifierAsString = "NULLS FIRST";
+            } else if (nullOrderModifier == OrderbyClause.NullOrderModifier.LAST) {
+                nullOrderModifierAsString = "NULLS LAST";
+            }
+
+            // Finally, return the string expression.
+            Expression orderByExpr = orderbyClause.getOrderbyList().get(i);
+            return visitAndSwallowException(orderByExpr) + " " + orderModifierAsString + " " + nullOrderModifierAsString
+                    + " ";
+        }).collect(Collectors.joining(", "));
+        return String.format(" ORDER BY %s ", orderByString);
+    }
+
+    @Override
+    public String visit(LimitClause limitClause, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        if (limitClause.hasLimitExpr()) {
+            sb.append(" LIMIT ");
+            sb.append(limitClause.getLimitExpr().accept(this, arg));
+        }
+        if (limitClause.hasOffset()) {
+            sb.append(" OFFSET ");
+            sb.append(limitClause.getOffset().accept(this, arg));
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(CallExpr callExpr, Void arg) throws CompilationException {
+        FunctionIdentifier functionIdentifier = callExpr.getFunctionSignature().createFunctionIdentifier();
+        if (functionIdentifier.equals(BuiltinFunctions.DATASET)) {
+            // We need to undo the DATASET call here.
+            LiteralExpr dataverseNameExpr = (LiteralExpr) callExpr.getExprList().get(0);
+            LiteralExpr datasetNameExpr = (LiteralExpr) callExpr.getExprList().get(1);
+            String dataverseName = dataverseNameExpr.getValue().getStringValue();
+            String datasetName = datasetNameExpr.getValue().getStringValue();
+            return String.format("`%s`.`%s`", dataverseName, datasetName);
+
+        } else if (functionIdentifier.equals(BuiltinFunctions.IS_MISSING)) {
+            return String.format(" %s IS MISSING ", callExpr.getExprList().get(0).accept(this, arg));
+
+        } else if (functionIdentifier.equals(BuiltinFunctions.IS_NULL)) {
+            return String.format(" %s IS NULL ", callExpr.getExprList().get(0).accept(this, arg));
+
+        } else if (functionIdentifier.equals(BuiltinFunctions.IS_UNKNOWN)) {
+            return String.format(" %s IS UNKNOWN ", callExpr.getExprList().get(0).accept(this, arg));
+
+        } else {
+            String functionName = functionIdentifier.getName().toUpperCase().replaceAll("-", "_");
+            return String.format(" %s ( %s ) ", functionName, callExpr.getExprList().stream()
+                    .map(this::visitAndSwallowException).collect(Collectors.joining(", ")));
+        }
+    }
+
+    @Override
+    public String visit(LiteralExpr literalExpr, Void arg) {
+        switch (literalExpr.getValue().getLiteralType()) {
+            case STRING:
+                return "\"" + literalExpr.getValue().getStringValue() + "\"";
+
+            case INTEGER:
+            case FLOAT:
+            case DOUBLE:
+            case LONG:
+                return literalExpr.getValue().getStringValue();
+
+            case MISSING:
+            case NULL:
+            case TRUE:
+            case FALSE:
+                return literalExpr.getValue().getStringValue().toUpperCase();
+        }
+        return null;
+    }
+
+    @Override
+    public String visit(VariableExpr variableExpr, Void arg) {
+        return "`" + formatIdentifierForQuery(variableExpr.getVar().getValue()) + "`";
+    }
+
+    @Override
+    public String visit(ListConstructor listConstructor, Void arg) {
+        StringBuilder sb = new StringBuilder();
+        if (listConstructor.getType() == ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR) {
+            sb.append(" [ ");
+            sb.append(listConstructor.getExprList().stream().map(this::visitAndSwallowException)
+                    .collect(Collectors.joining(", ")));
+            sb.append(" ] ");
+
+        } else {
+            sb.append(" {{ ");
+            sb.append(listConstructor.getExprList().stream().map(this::visitAndSwallowException)
+                    .collect(Collectors.joining(", ")));
+            sb.append(" }} ");
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(RecordConstructor recordConstructor, Void arg) {
+        String recordConstructorString = recordConstructor.getFbList().stream()
+                .map(f -> formatIdentifierForQuery(visitAndSwallowException(f.getLeftExpr())) + " : "
+                        + visitAndSwallowException(f.getRightExpr()))
+                .collect(Collectors.joining(", "));
+        return String.format(" { %s } ", recordConstructorString);
+    }
+
+    @Override
+    public String visit(OperatorExpr operatorExpr, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(operatorExpr.getExprList().get(0).accept(this, arg));
+        for (int i = 0; i < operatorExpr.getOpList().size(); i++) {
+            OperatorType operatorType = operatorExpr.getOpList().get(i);
+            switch (operatorType) {
+                case OR:
+                    sb.append(" OR ");
+                    break;
+                case AND:
+                    sb.append(" AND ");
+                    break;
+                case LT:
+                    sb.append(" < ");
+                    break;
+                case GT:
+                    sb.append(" > ");
+                    break;
+                case LE:
+                    sb.append(" <= ");
+                    break;
+                case GE:
+                    sb.append(" >= ");
+                    break;
+                case EQ:
+                    sb.append(" = ");
+                    break;
+                case NEQ:
+                    sb.append(" != ");
+                    break;
+                case PLUS:
+                    sb.append(" + ");
+                    break;
+                case MINUS:
+                    sb.append(" - ");
+                    break;
+                case CONCAT:
+                    sb.append(" || ");
+                    break;
+                case MUL:
+                    sb.append(" * ");
+                    break;
+                case DIVIDE:
+                    sb.append(" / ");
+                    break;
+                case DIV:
+                    sb.append(" DIV ");
+                    break;
+                case MOD:
+                    sb.append(" MOD ");
+                    break;
+                case CARET:
+                    sb.append(" ^ ");
+                    break;
+                case LIKE:
+                    sb.append(" LIKE ");
+                    break;
+                case NOT_LIKE:
+                    sb.append(" NOT LIKE ");
+                    break;
+                case IN:
+                    sb.append(" IN ");
+                    break;
+                case NOT_IN:
+                    sb.append(" NOT IN ");
+                    break;
+                case BETWEEN:
+                    sb.append(" BETWEEN ");
+                    break;
+                case NOT_BETWEEN:
+                    sb.append(" NOT BETWEEN ");
+                    break;
+                case DISTINCT:
+                    sb.append(" DISTINCT ");
+                    break;
+                case NOT_DISTINCT:
+                    sb.append(" NOT DISTINCT ");
+                    break;
+                default:
+                    throw new IllegalStateException("Illegal operator encountered!");
+            }
+            sb.append(operatorExpr.getExprList().get(i + 1).accept(this, arg));
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(FieldAccessor fieldAccessor, Void arg) throws CompilationException {
+        return fieldAccessor.getExpr().accept(this, arg) + ".`"
+                + formatIdentifierForQuery(fieldAccessor.getIdent().getValue()) + "`";
+    }
+
+    @Override
+    public String visit(IndexAccessor indexAccessor, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(indexAccessor.getExpr().accept(this, arg));
+        sb.append(" [ ");
+        switch (indexAccessor.getIndexKind()) {
+            case ELEMENT:
+                sb.append(indexAccessor.getIndexExpr().accept(this, arg));
+                break;
+            case STAR:
+                sb.append(" * ");
+                break;
+            default:
+                throw new NotImplementedException("Cannot handle index accessor of ANY kind.");
+        }
+        sb.append(" ] ");
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(ListSliceExpression listSliceExpression, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(listSliceExpression.getStartIndexExpression().accept(this, arg));
+        sb.append(" : ");
+        if (listSliceExpression.hasEndExpression()) {
+            sb.append(listSliceExpression.getEndIndexExpression().accept(this, arg));
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(UnaryExpr unaryExpr, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        if (unaryExpr.getExprType() != null) {
+            switch (unaryExpr.getExprType()) {
+                case POSITIVE:
+                    sb.append("+");
+                case NEGATIVE:
+                    sb.append("-");
+                    break;
+                case EXISTS:
+                    sb.append("EXISTS");
+                    break;
+                case NOT_EXISTS:
+                    sb.append("NOT EXISTS");
+                    break;
+            }
+        }
+        sb.append(unaryExpr.getExpr().accept(this, arg));
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(IfExpr ifExpr, Void arg) {
+        throw new NotImplementedException("IfExpr are not available in SQL++!");
+    }
+
+    @Override
+    public String visit(QuantifiedExpression quantifiedExpression, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" ( ");
+        if (quantifiedExpression.getQuantifier() == QuantifiedExpression.Quantifier.SOME) {
+            sb.append(" SOME ");
+
+        } else if (quantifiedExpression.getQuantifier() == QuantifiedExpression.Quantifier.SOME_AND_EVERY) {
+            sb.append(" SOME AND EVERY ");
+
+        } else {
+            sb.append(" EVERY ");
+        }
+        sb.append(quantifiedExpression.getQuantifiedList().stream()
+                .map(q -> visitAndSwallowException(q.getVarExpr()) + " IN " + visitAndSwallowException(q.getExpr()))
+                .collect(Collectors.joining(", ")));
+        sb.append(" SATISFIES ");
+        sb.append(quantifiedExpression.getSatisfiesExpr().accept(this, arg));
+        sb.append(" END ) ");
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(CaseExpression caseExpression, Void arg) throws CompilationException {
+        StringBuilder sb = new StringBuilder();
+        sb.append(" CASE ");
+        for (int i = 0; i < caseExpression.getWhenExprs().size(); i++) {
+            Expression whenExpr = caseExpression.getWhenExprs().get(i);
+            Expression thenExpr = caseExpression.getThenExprs().get(i);
+            sb.append(" WHEN ");
+            sb.append(whenExpr.accept(this, arg));
+            sb.append(" THEN ");
+            sb.append(thenExpr.accept(this, arg));
+        }
+        if (caseExpression.getElseExpr() != null) {
+            sb.append(" ELSE ");
+            sb.append(caseExpression.getElseExpr().accept(this, arg));
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public String visit(WindowExpression windowExpression, Void arg) {
+        // TODO: Add support for WINDOW-EXPR here.
+        throw new NotImplementedException("WindowExpression not currently supported!");
+    }
+
+    // Little helper method to dispatch within streams.
+    private String visitAndSwallowException(ILangExpression e) {
+        try {
+            return e.accept(this, null);
+
+        } catch (CompilationException ex) {
+            throw new IllegalStateException("We should never reach here!");
+        }
+    }
+
+    private String formatIdentifierForQuery(String identifier) {
+        if (identifier.contains("$")) {
+            return identifier.replace("$", "");
+
+        } else if (identifier.contains("#GG")) { // This is a Graphix generated identifier.
+            return identifier.replace("#GG_", "GGV_");
+
+        } else if (identifier.contains("#")) { // This is a SQL++ generated identifier.
+            return identifier.replace("#", "SGV_");
+
+        } else {
+            return identifier;
+        }
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/EdgeRecord.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/EdgeRecord.java
new file mode 100644
index 0000000..81893e1
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/EdgeRecord.java
@@ -0,0 +1,150 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.record;
+
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildAccessorList;
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildSelectBlocksWithDecls;
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildSelectWithSelectBlockStream;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierContext;
+import org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.FieldBinding;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.RecordConstructor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+
+/**
+ * Intermediate lowered representation of a query edge (just the body), constructed with the following process:
+ * 1. For each label of the edge, perform a UNION-ALL of their respective normalized bodies.
+ * 2. Build a SELECT-BLOCK for each edge label, using the result of step 1. For each SELECT-CLAUSE, attach the edge
+ * label, the edge direction, access to the source key, and access to the destination key, in addition to the
+ * expression from step 1.
+ * 3. Now having a list of SELECT-BLOCKs, UNION-ALL each SELECT-BLOCK and build a single SELECT-EXPR. This is the
+ * lowered representation of our edge.
+ * If this is a sub-path, we will also keep track of the contained {@link VertexRecord} here.
+ */
+public class EdgeRecord implements IElementRecord {
+    // The details surrounding our edge will be included in the following field (alongside our body).
+    public static final String EDGE_DETAIL_NAME = "_GraphixEdgeDetail";
+
+    // We attach the following fields to the SELECT containing a declaration body.
+    public static final String DIRECTION_FIELD_NAME = "EdgeDirection";
+    public static final String SOURCE_KEY_FIELD_NAME = "SourceKey";
+    public static final String DEST_KEY_FIELD_NAME = "DestinationKey";
+
+    private final List<GraphElementIdentifier> elementIdentifiers;
+    private final List<VertexRecord> internalVertices;
+    private final EdgePatternExpr edgePatternExpr;
+    private final Expression edgeExpression;
+    private final VariableExpr edgeVar;
+
+    public EdgeRecord(EdgePatternExpr edgePatternExpr, GraphIdentifier graphIdentifier,
+            LowerSupplierContext lowerSupplierContext) {
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        this.elementIdentifiers = edgeDescriptor.generateIdentifiers(graphIdentifier);
+        this.edgeVar = new VariableExpr(edgeDescriptor.getVariableExpr().getVar());
+        this.edgePatternExpr = edgePatternExpr;
+
+        // Build the SELECT-EXPR associated with the given element identifiers.
+        ElementLookupTable<GraphElementIdentifier> elementLookupTable = lowerSupplierContext.getElementLookupTable();
+        List<GraphElementDecl> graphElementDeclList =
+                elementIdentifiers.stream().map(elementLookupTable::getElementDecl).collect(Collectors.toList());
+        List<SelectBlock> selectBlockList = buildSelectBlocksWithDecls(graphElementDeclList, edgeVar, d -> {
+            List<Projection> projectionList = new ArrayList<>();
+
+            // Build the label binding for the element detail projection.
+            List<FieldBinding> elementDetailBindings = new ArrayList<>();
+            StringLiteral labelLiteral = new StringLiteral(d.getIdentifier().getElementLabel().toString());
+            LiteralExpr labelFieldValue = new LiteralExpr(labelLiteral);
+            LiteralExpr labelFieldName = new LiteralExpr(new StringLiteral(ELEMENT_LABEL_FIELD_NAME));
+            elementDetailBindings.add(new FieldBinding(labelFieldName, labelFieldValue));
+            RecordConstructor elementDetailRecord = new RecordConstructor(elementDetailBindings);
+            projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, elementDetailRecord, ELEMENT_DETAIL_NAME));
+
+            // Build the direction binding for the edge detail projection.
+            List<FieldBinding> edgeDetailBindings = new ArrayList<>();
+            LiteralExpr directionFieldValue =
+                    new LiteralExpr(new StringLiteral(edgeDescriptor.getEdgeType().toString().toUpperCase()));
+            LiteralExpr directionFieldName = new LiteralExpr(new StringLiteral(DIRECTION_FIELD_NAME));
+            edgeDetailBindings.add(new FieldBinding(directionFieldName, directionFieldValue));
+
+            // Access our source key value, and append this expression.
+            List<FieldBinding> sourceKeyBindings =
+                    buildAccessorList(edgeVar, elementLookupTable.getEdgeSourceKeys(d.getIdentifier())).stream()
+                            .map(LowerRewritingUtil::buildFieldBindingFromFieldAccessor).collect(Collectors.toList());
+            RecordConstructor sourceKeyAccess = new RecordConstructor(sourceKeyBindings);
+            LiteralExpr sourceKeyName = new LiteralExpr(new StringLiteral(SOURCE_KEY_FIELD_NAME));
+            edgeDetailBindings.add(new FieldBinding(sourceKeyName, sourceKeyAccess));
+
+            // Access our destination key value, and append this expression.
+            List<FieldBinding> destKeyBindings =
+                    buildAccessorList(edgeVar, elementLookupTable.getEdgeDestKeys(d.getIdentifier())).stream()
+                            .map(LowerRewritingUtil::buildFieldBindingFromFieldAccessor).collect(Collectors.toList());
+            RecordConstructor destKeyAccess = new RecordConstructor(destKeyBindings);
+            LiteralExpr destKeyName = new LiteralExpr(new StringLiteral(DEST_KEY_FIELD_NAME));
+            edgeDetailBindings.add(new FieldBinding(destKeyName, destKeyAccess));
+            RecordConstructor edgeDetailRecord = new RecordConstructor(edgeDetailBindings);
+            projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, edgeDetailRecord, EDGE_DETAIL_NAME));
+
+            // Return our new assembled projections.
+            return projectionList;
+        });
+        this.edgeExpression = buildSelectWithSelectBlockStream(selectBlockList.stream());
+
+        // Build the VERTEX-RECORD(s) associated with the sub-path.
+        this.internalVertices = new ArrayList<>();
+        edgePatternExpr.getInternalVertices().stream()
+                .map(v -> new VertexRecord(v, graphIdentifier, lowerSupplierContext)).forEach(internalVertices::add);
+    }
+
+    @Override
+    public Expression getExpression() {
+        return edgeExpression;
+    }
+
+    public List<GraphElementIdentifier> getElementIdentifiers() {
+        return elementIdentifiers;
+    }
+
+    public VariableExpr getVarExpr() {
+        return edgeVar;
+    }
+
+    public EdgePatternExpr getEdgePatternExpr() {
+        return edgePatternExpr;
+    }
+
+    public List<VertexRecord> getInternalVertices() {
+        return internalVertices;
+    }
+}
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/IElementRecord.java
similarity index 62%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/IElementRecord.java
index 9667fd6..2a4d8c5 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/IElementRecord.java
@@ -16,7 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.asterix.graphix.lang.rewrites.record;
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+import org.apache.asterix.lang.common.base.Expression;
+
+public interface IElementRecord {
+    // The details surrounding our element will be included in the following field (alongside our body).
+    String ELEMENT_DETAIL_NAME = "_GraphixElementDetail";
+
+    // We attach the following fields to the SELECT containing a declaration body.
+    String ELEMENT_LABEL_FIELD_NAME = "Label";
+
+    Expression getExpression();
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/PathRecord.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/PathRecord.java
new file mode 100644
index 0000000..6f6e074
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/PathRecord.java
@@ -0,0 +1,69 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.record;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.FieldBinding;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.RecordConstructor;
+import org.apache.asterix.lang.common.literal.NullLiteral;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+
+/**
+ * Construct the record associated with an edge of a path. For vertices that do not belong to any edge, we build a
+ * pseudo-edge record composed of: dangling vertex, NULL, NULL. This pseudo-edge record is also constructed in Neo4J.
+ *
+ * @see org.apache.asterix.graphix.lang.rewrites.visitor.GraphixLoweringVisitor
+ */
+public class PathRecord implements IElementRecord {
+    private final Expression pathExpression;
+
+    // A path record is composed of the following fields.
+    public static final String EDGE_FIELD_NAME = "Edge";
+    public static final String LEFT_VERTEX_FIELD_NAME = "LeftVertex";
+    public static final String RIGHT_VERTEX_FIELD_NAME = "RightVertex";
+
+    public PathRecord(Expression leftVertexExpr, Expression edgeExpr, Expression rightVertexExpr) {
+        List<FieldBinding> bindings = new ArrayList<>();
+        bindings.add(new FieldBinding(new LiteralExpr(new StringLiteral(LEFT_VERTEX_FIELD_NAME)), leftVertexExpr));
+        bindings.add(new FieldBinding(new LiteralExpr(new StringLiteral(EDGE_FIELD_NAME)), edgeExpr));
+        bindings.add(new FieldBinding(new LiteralExpr(new StringLiteral(RIGHT_VERTEX_FIELD_NAME)), rightVertexExpr));
+        this.pathExpression = new RecordConstructor(bindings);
+    }
+
+    public PathRecord(Expression leftVertexExpr) {
+        Expression rightVertexExpr = new LiteralExpr(NullLiteral.INSTANCE);
+        Expression edgeExpr = new LiteralExpr(NullLiteral.INSTANCE);
+
+        // Build our path expression.
+        List<FieldBinding> bindings = new ArrayList<>();
+        bindings.add(new FieldBinding(new LiteralExpr(new StringLiteral(LEFT_VERTEX_FIELD_NAME)), leftVertexExpr));
+        bindings.add(new FieldBinding(new LiteralExpr(new StringLiteral(EDGE_FIELD_NAME)), edgeExpr));
+        bindings.add(new FieldBinding(new LiteralExpr(new StringLiteral(RIGHT_VERTEX_FIELD_NAME)), rightVertexExpr));
+        this.pathExpression = new RecordConstructor(bindings);
+    }
+
+    @Override
+    public Expression getExpression() {
+        return pathExpression;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/VertexRecord.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/VertexRecord.java
new file mode 100644
index 0000000..e8b613c
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/record/VertexRecord.java
@@ -0,0 +1,120 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.record;
+
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildAccessorList;
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildSelectBlocksWithDecls;
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildSelectWithSelectBlockStream;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierContext;
+import org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.FieldBinding;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.RecordConstructor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+
+/**
+ * Lowered representation of a query vertex, constructed with the following process:
+ * 1. For each label of the vertex, perform a UNION-ALL of their respective normalized bodies.
+ * 2. Build a SELECT-BLOCK for each vertex label, using the result of step 1. For each SELECT-CLAUSE, attach the vertex
+ * label and access to the primary key, in addition to the expression from step 1.
+ * 3. Now having a list of SELECT-BLOCKs, UNION-ALL each SELECT-BLOCK and build a single SELECT-EXPR. This is the
+ * lowered representation of our vertex.
+ */
+public class VertexRecord implements IElementRecord {
+    // The details surrounding our vertex will be included in the following field (alongside our body).
+    public static final String VERTEX_DETAIL_NAME = "_GraphixVertexDetail";
+
+    // We attach the following fields to the SELECT containing a declaration body.
+    public static final String PRIMARY_KEY_FIELD_NAME = "PrimaryKey";
+
+    private final List<GraphElementIdentifier> elementIdentifiers;
+    private final VertexPatternExpr vertexPatternExpr;
+    private final Expression vertexExpression;
+    private final VariableExpr vertexVar;
+
+    public VertexRecord(VertexPatternExpr vertexPatternExpr, GraphIdentifier graphIdentifier,
+            LowerSupplierContext lowerSupplierContext) {
+        this.elementIdentifiers = vertexPatternExpr.generateIdentifiers(graphIdentifier);
+        this.vertexVar = new VariableExpr(vertexPatternExpr.getVariableExpr().getVar());
+        this.vertexPatternExpr = vertexPatternExpr;
+
+        // Build the SELECT-EXPR associated with the given element identifiers.
+        ElementLookupTable<GraphElementIdentifier> elementLookupTable = lowerSupplierContext.getElementLookupTable();
+        List<GraphElementDecl> graphElementDeclList =
+                elementIdentifiers.stream().map(elementLookupTable::getElementDecl).collect(Collectors.toList());
+        List<SelectBlock> selectBlockList = buildSelectBlocksWithDecls(graphElementDeclList, vertexVar, d -> {
+            List<Projection> projectionList = new ArrayList<>();
+
+            // Build the label binding for the element detail projection.
+            List<FieldBinding> elementDetailBindings = new ArrayList<>();
+            StringLiteral labelLiteral = new StringLiteral(d.getIdentifier().getElementLabel().toString());
+            LiteralExpr labelFieldValue = new LiteralExpr(labelLiteral);
+            LiteralExpr labelFieldName = new LiteralExpr(new StringLiteral(ELEMENT_LABEL_FIELD_NAME));
+            elementDetailBindings.add(new FieldBinding(labelFieldName, labelFieldValue));
+            RecordConstructor elementDetailRecord = new RecordConstructor(elementDetailBindings);
+            projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, elementDetailRecord, ELEMENT_DETAIL_NAME));
+
+            // Build the vertex detail projection.
+            List<FieldBinding> vertexDetailBindings = new ArrayList<>();
+            List<FieldBinding> primaryKeyBindings =
+                    buildAccessorList(vertexVar, elementLookupTable.getVertexKey(d.getIdentifier())).stream()
+                            .map(LowerRewritingUtil::buildFieldBindingFromFieldAccessor).collect(Collectors.toList());
+            RecordConstructor primaryKeyAccess = new RecordConstructor(primaryKeyBindings);
+            LiteralExpr primaryKeyName = new LiteralExpr(new StringLiteral(PRIMARY_KEY_FIELD_NAME));
+            vertexDetailBindings.add(new FieldBinding(primaryKeyName, primaryKeyAccess));
+            RecordConstructor vertexDetailRecord = new RecordConstructor(vertexDetailBindings);
+            projectionList.add(new Projection(Projection.Kind.NAMED_EXPR, vertexDetailRecord, VERTEX_DETAIL_NAME));
+
+            // Return our newly assembled projections.
+            return projectionList;
+        });
+        this.vertexExpression = buildSelectWithSelectBlockStream(selectBlockList.stream());
+    }
+
+    @Override
+    public Expression getExpression() {
+        return vertexExpression;
+    }
+
+    public List<GraphElementIdentifier> getElementIdentifiers() {
+        return elementIdentifiers;
+    }
+
+    public VariableExpr getVarExpr() {
+        return vertexVar;
+    }
+
+    public VertexPatternExpr getVertexPatternExpr() {
+        return vertexPatternExpr;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/IGraphElementResolver.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/IGraphElementResolver.java
new file mode 100644
index 0000000..c6e7043
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/IGraphElementResolver.java
@@ -0,0 +1,37 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.resolve;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+
+/**
+ * @see org.apache.asterix.graphix.lang.rewrites.visitor.ElementResolutionVisitor
+ */
+public interface IGraphElementResolver {
+    /**
+     * @param fromGraphClause FROM-GRAPH-CLAUSE to resolve edge & vertex labels, and edge directions for.
+     */
+    void resolve(FromGraphClause fromGraphClause) throws CompilationException;
+
+    /**
+     * @return True if we cannot resolve any more elements. False otherwise.
+     */
+    boolean isAtFixedPoint();
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/InferenceBasedResolver.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/InferenceBasedResolver.java
new file mode 100644
index 0000000..9b513cb
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/InferenceBasedResolver.java
@@ -0,0 +1,201 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.resolve;
+
+import java.util.Set;
+import java.util.function.BiFunction;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.visitor.LabelConsistencyVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.QueryKnowledgeVisitor;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+
+/**
+ * Recursively attempt to resolve any element labels / edge directions in a FROM-GRAPH-CLAUSE.
+ */
+public class InferenceBasedResolver implements IGraphElementResolver {
+    public static final String METADATA_CONFIG_NAME = "inference-based";
+
+    private final QueryKnowledgeVisitor queryKnowledgeVisitor;
+    private final SchemaKnowledgeTable schemaKnowledgeTable;
+    private boolean isAtFixedPoint = false;
+
+    public InferenceBasedResolver(SchemaKnowledgeTable schemaKnowledgeTable) {
+        this.queryKnowledgeVisitor = new QueryKnowledgeVisitor();
+        this.schemaKnowledgeTable = schemaKnowledgeTable;
+    }
+
+    @Override
+    public void resolve(FromGraphClause fromGraphClause) throws CompilationException {
+        isAtFixedPoint = true;
+
+        // Update our query knowledge, then unify vertices across our FROM-GRAPH-CLAUSE.
+        queryKnowledgeVisitor.visit(fromGraphClause, null);
+        new LabelConsistencyVisitor(queryKnowledgeVisitor.getQueryKnowledgeTable()).visit(fromGraphClause, null);
+
+        // Perform our resolution.
+        for (MatchClause matchClause : fromGraphClause.getMatchClauses()) {
+            for (PathPatternExpr pathExpression : matchClause.getPathExpressions()) {
+                // We can only infer labels on edges. We ignore dangling vertices.
+                for (EdgePatternExpr edgeExpression : pathExpression.getEdgeExpressions()) {
+                    isAtFixedPoint &= resolveEdge(edgeExpression);
+                }
+            }
+        }
+    }
+
+    private boolean resolveEdge(EdgePatternExpr edgePatternExpr) {
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        if (edgeDescriptor.getEdgeClass() == IGraphExpr.GraphExprKind.PATH_PATTERN) {
+            VertexPatternExpr workingLeftVertex = edgePatternExpr.getLeftVertex();
+
+            // We have a sub-path. Recurse with the edges of this sub-path.
+            boolean intermediateResult = true;
+            for (int i = 0; i < edgeDescriptor.getMaximumHops(); i++) {
+                VertexPatternExpr rightVertex;
+                if (i == edgeDescriptor.getMaximumHops() - 1) {
+                    // This is the final vertex in our path.
+                    rightVertex = edgePatternExpr.getRightVertex();
+
+                } else {
+                    // We need to get an intermediate vertex.
+                    rightVertex = edgePatternExpr.getInternalVertices().get(i);
+                }
+
+                // Build our EDGE-PATTERN-EXPR and recurse.
+                EdgeDescriptor newDescriptor = new EdgeDescriptor(edgeDescriptor.getEdgeType(),
+                        IGraphExpr.GraphExprKind.EDGE_PATTERN, edgeDescriptor.getEdgeLabels(), null, null, null);
+                intermediateResult &= resolveEdge(new EdgePatternExpr(workingLeftVertex, rightVertex, newDescriptor));
+
+                // Update the labels of our edge and our internal vertex.
+                edgeDescriptor.getEdgeLabels().addAll(newDescriptor.getEdgeLabels());
+                if (i != edgeDescriptor.getMaximumHops() - 1) {
+                    for (ElementLabel label : rightVertex.getLabels()) {
+                        // Mark our labels as not inferred to prevent invalidation of what we just found.
+                        label.markInferred(false);
+                    }
+                }
+                workingLeftVertex = rightVertex;
+            }
+
+            return intermediateResult;
+        }
+
+        if (edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.UNDIRECTED) {
+            // We have an undirected edge. Recurse with a LEFT_TO_RIGHT edge...
+            edgeDescriptor.setEdgeType(EdgeDescriptor.EdgeType.LEFT_TO_RIGHT);
+            boolean isLeftToRightModified = !resolveEdge(edgePatternExpr);
+
+            // ...and a RIGHT_TO_LEFT edge.
+            edgeDescriptor.setEdgeType(EdgeDescriptor.EdgeType.RIGHT_TO_LEFT);
+            boolean isRightToLeftModified = !resolveEdge(edgePatternExpr);
+
+            // Determine the direction of our edge, if possible.
+            if (isLeftToRightModified && !isRightToLeftModified) {
+                edgeDescriptor.setEdgeType(EdgeDescriptor.EdgeType.LEFT_TO_RIGHT);
+
+            } else if (!isLeftToRightModified && isRightToLeftModified) {
+                edgeDescriptor.setEdgeType(EdgeDescriptor.EdgeType.RIGHT_TO_LEFT);
+
+            } else {
+                edgeDescriptor.setEdgeType(EdgeDescriptor.EdgeType.UNDIRECTED);
+            }
+            return !(isLeftToRightModified || isRightToLeftModified);
+        }
+
+        // We have a _directed_ *edge*. Determine our source and destination vertex.
+        VertexPatternExpr sourceVertexPattern, destinationVertexPattern;
+        if (edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.LEFT_TO_RIGHT) {
+            sourceVertexPattern = edgePatternExpr.getLeftVertex();
+            destinationVertexPattern = edgePatternExpr.getRightVertex();
+
+        } else { // edgeDescriptor.getEdgeType() == EdgeDescriptor.EdgeType.RIGHT_TO_LEFT
+            sourceVertexPattern = edgePatternExpr.getRightVertex();
+            destinationVertexPattern = edgePatternExpr.getLeftVertex();
+        }
+
+        // An unknown is valid iff the element is not contained within the label set and **every** label is inferred.
+        final BiFunction<Set<ElementLabel>, ElementLabel, Boolean> validUnknownPredicate =
+                (s, e) -> !s.contains(e) && s.stream().allMatch(ElementLabel::isInferred);
+        Set<ElementLabel> sourceLabels = sourceVertexPattern.getLabels();
+        Set<ElementLabel> destLabels = destinationVertexPattern.getLabels();
+        Set<ElementLabel> edgeLabels = edgeDescriptor.getEdgeLabels();
+
+        // Iterate through our knowledge table. Attempt to fill in unknowns.
+        boolean isUnknownFilled = false;
+        for (SchemaKnowledgeTable.KnowledgeRecord knowledgeRecord : schemaKnowledgeTable) {
+            ElementLabel recordSourceLabel = knowledgeRecord.getSourceVertexLabel();
+            ElementLabel recordDestLabel = knowledgeRecord.getDestVertexLabel();
+            ElementLabel recordEdgeLabel = knowledgeRecord.getEdgeLabel();
+            boolean isSourceValidUnknown = validUnknownPredicate.apply(sourceLabels, recordSourceLabel);
+            boolean isDestValidUnknown = validUnknownPredicate.apply(destLabels, recordDestLabel);
+            boolean isEdgeValidUnknown = validUnknownPredicate.apply(edgeLabels, recordEdgeLabel);
+            if (sourceLabels.contains(recordSourceLabel)) {
+                if (edgeLabels.contains(recordEdgeLabel) && isDestValidUnknown) {
+                    // Source is known, edge is known, dest is unknown.
+                    destLabels.add(recordDestLabel.asInferred());
+                    isUnknownFilled = true;
+
+                } else if (isEdgeValidUnknown && destLabels.contains(recordDestLabel)) {
+                    // Source is known, edge is unknown, dest is known.
+                    edgeLabels.add(recordEdgeLabel.asInferred());
+                    isUnknownFilled = true;
+
+                } else if (isEdgeValidUnknown && isDestValidUnknown) {
+                    // Source is known, edge is unknown, dest is unknown.
+                    destLabels.add(recordDestLabel.asInferred());
+                    edgeLabels.add(recordEdgeLabel.asInferred());
+                    isUnknownFilled = true;
+                }
+
+            } else if (edgeLabels.contains(recordEdgeLabel)) {
+                if (isSourceValidUnknown && destLabels.contains(recordDestLabel)) {
+                    // Source is unknown, edge is known, dest is known.
+                    sourceLabels.add(recordSourceLabel.asInferred());
+                    isUnknownFilled = true;
+
+                } else if (isSourceValidUnknown && isDestValidUnknown) {
+                    // Source is unknown, edge is known, dest is unknown.
+                    sourceLabels.add(recordSourceLabel.asInferred());
+                    destLabels.add(recordDestLabel.asInferred());
+                    isUnknownFilled = true;
+                }
+
+            } else if (destLabels.contains(recordDestLabel) && isSourceValidUnknown && isEdgeValidUnknown) {
+                // Source is unknown, edge is unknown, dest is known.
+                sourceLabels.add(recordSourceLabel.asInferred());
+                edgeLabels.add(recordEdgeLabel.asInferred());
+                isUnknownFilled = true;
+            }
+        }
+        return !isUnknownFilled;
+    }
+
+    @Override
+    public boolean isAtFixedPoint() {
+        return isAtFixedPoint;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/NoResolutionResolver.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/NoResolutionResolver.java
new file mode 100644
index 0000000..4625507
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/NoResolutionResolver.java
@@ -0,0 +1,45 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.resolve;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.rewrites.visitor.LabelConsistencyVisitor;
+import org.apache.asterix.graphix.lang.rewrites.visitor.QueryKnowledgeVisitor;
+
+/**
+ * No-resolution strategy. Do not attempt to infer any labels or edge directions (only perform label consistency).
+ */
+public class NoResolutionResolver implements IGraphElementResolver {
+    public static final String METADATA_CONFIG_NAME = "no-resolution";
+    public boolean isUnificationPerformed = false;
+
+    @Override
+    public void resolve(FromGraphClause fromGraphClause) throws CompilationException {
+        QueryKnowledgeVisitor queryKnowledgeVisitor = new QueryKnowledgeVisitor();
+        queryKnowledgeVisitor.visit(fromGraphClause, null);
+        new LabelConsistencyVisitor(queryKnowledgeVisitor.getQueryKnowledgeTable()).visit(fromGraphClause, null);
+        isUnificationPerformed = true;
+    }
+
+    @Override
+    public boolean isAtFixedPoint() {
+        return isUnificationPerformed;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/QueryKnowledgeTable.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/QueryKnowledgeTable.java
new file mode 100644
index 0000000..23b54e4
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/QueryKnowledgeTable.java
@@ -0,0 +1,46 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.resolve;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.lang.common.struct.Identifier;
+
+/**
+ * A knowledge base of our query graph, stored as a map of vertex variable IDs to a list of vertex labels.
+ *
+ * @see InferenceBasedResolver
+ */
+public class QueryKnowledgeTable extends HashMap<Identifier, List<ElementLabel>> {
+    private static final long serialVersionUID = 1L;
+
+    public void put(VertexPatternExpr vertexPatternExpr) {
+        Identifier vertexIdentifier = vertexPatternExpr.getVariableExpr().getVar();
+        if (!vertexPatternExpr.getLabels().isEmpty()) {
+            if (!super.containsKey(vertexIdentifier)) {
+                super.put(vertexIdentifier, new ArrayList<>());
+            }
+            super.get(vertexIdentifier).addAll(vertexPatternExpr.getLabels());
+        }
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/SchemaKnowledgeTable.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/SchemaKnowledgeTable.java
new file mode 100644
index 0000000..1b2984d
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/resolve/SchemaKnowledgeTable.java
@@ -0,0 +1,120 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.resolve;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Objects;
+import java.util.Set;
+
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.graphix.metadata.entity.schema.Vertex;
+
+/**
+ * A collection of ground truths, derived from the graph schema (either a {@link Graph} or {@link GraphConstructor}).
+ *
+ * @see InferenceBasedResolver
+ */
+public class SchemaKnowledgeTable implements Iterable<SchemaKnowledgeTable.KnowledgeRecord> {
+    private final Set<KnowledgeRecord> knowledgeRecordSet = new HashSet<>();
+    private final Set<ElementLabel> vertexLabelSet = new HashSet<>();
+    private final Set<ElementLabel> edgeLabelSet = new HashSet<>();
+
+    public SchemaKnowledgeTable(Graph graph) {
+        graph.getGraphSchema().getVertices().stream().map(Vertex::getLabel).forEach(vertexLabelSet::add);
+        graph.getGraphSchema().getEdges().forEach(e -> {
+            vertexLabelSet.add(e.getSourceLabel());
+            vertexLabelSet.add(e.getDestinationLabel());
+            edgeLabelSet.add(e.getLabel());
+            knowledgeRecordSet.add(new KnowledgeRecord(e.getSourceLabel(), e.getDestinationLabel(), e.getLabel()));
+        });
+    }
+
+    public SchemaKnowledgeTable(GraphConstructor graphConstructor) {
+        graphConstructor.getVertexElements().forEach(v -> vertexLabelSet.add(v.getLabel()));
+        graphConstructor.getEdgeElements().forEach(e -> {
+            vertexLabelSet.add(e.getSourceLabel());
+            vertexLabelSet.add(e.getDestinationLabel());
+            edgeLabelSet.add(e.getEdgeLabel());
+            knowledgeRecordSet.add(new KnowledgeRecord(e.getSourceLabel(), e.getDestinationLabel(), e.getEdgeLabel()));
+        });
+    }
+
+    public Set<ElementLabel> getVertexLabelSet() {
+        return vertexLabelSet;
+    }
+
+    public Set<ElementLabel> getEdgeLabelSet() {
+        return edgeLabelSet;
+    }
+
+    @Override
+    public Iterator<KnowledgeRecord> iterator() {
+        return knowledgeRecordSet.iterator();
+    }
+
+    public static class KnowledgeRecord {
+        private final ElementLabel sourceVertexLabel;
+        private final ElementLabel destVertexLabel;
+        private final ElementLabel edgeLabel;
+
+        public KnowledgeRecord(ElementLabel sourceVertexLabel, ElementLabel destVertexLabel, ElementLabel edgeLabel) {
+            this.sourceVertexLabel = Objects.requireNonNull(sourceVertexLabel);
+            this.destVertexLabel = Objects.requireNonNull(destVertexLabel);
+            this.edgeLabel = Objects.requireNonNull(edgeLabel);
+        }
+
+        public ElementLabel getSourceVertexLabel() {
+            return sourceVertexLabel;
+        }
+
+        public ElementLabel getDestVertexLabel() {
+            return destVertexLabel;
+        }
+
+        public ElementLabel getEdgeLabel() {
+            return edgeLabel;
+        }
+
+        @Override
+        public String toString() {
+            return String.format("(%s)-[%s]->(%s)", sourceVertexLabel, edgeLabel, destVertexLabel);
+        }
+
+        @Override
+        public boolean equals(Object object) {
+            if (this == object) {
+                return true;
+            }
+            if (!(object instanceof KnowledgeRecord)) {
+                return false;
+            }
+            KnowledgeRecord target = (KnowledgeRecord) object;
+            return sourceVertexLabel.equals(target.sourceVertexLabel) && destVertexLabel.equals(target.destVertexLabel)
+                    && edgeLabel.equals(target.edgeLabel);
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(sourceVertexLabel, destVertexLabel, edgeLabel);
+        }
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/ClauseRewritingUtil.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/ClauseRewritingUtil.java
new file mode 100644
index 0000000..506ee13
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/ClauseRewritingUtil.java
@@ -0,0 +1,64 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.util;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.Literal;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.OperatorExpr;
+import org.apache.asterix.lang.common.struct.OperatorType;
+
+public final class ClauseRewritingUtil {
+    public static Expression buildConnectedClauses(List<Expression> clauses, OperatorType connector) {
+        List<Expression> nonTrueClauses = clauses.stream().filter(e -> {
+            if (e.getKind() == Expression.Kind.LITERAL_EXPRESSION) {
+                LiteralExpr literalExpr = (LiteralExpr) e;
+                return literalExpr.getValue().getLiteralType() != Literal.Type.TRUE;
+            }
+            return true;
+        }).collect(Collectors.toList());
+        switch (nonTrueClauses.size()) {
+            case 0:
+                // We only have a TRUE clause. Return this.
+                return clauses.get(0);
+            case 1:
+                // We do not need to connect a single clause.
+                return nonTrueClauses.get(0);
+            default:
+                // Otherwise, connect all non-true clauses.
+                return new OperatorExpr(nonTrueClauses, Collections.nCopies(clauses.size() - 1, connector), false);
+        }
+    }
+
+    public static Expression appendConnectedClauses(Expression existingClause, List<Expression> clauses,
+            OperatorType connector) {
+        OperatorExpr resultantExpr = new OperatorExpr();
+        for (Expression isomorphismConjunct : clauses) {
+            resultantExpr.addOperand(isomorphismConjunct);
+            resultantExpr.addOperator(connector);
+        }
+        // We use the last connector from before to connect our existing clause.
+        resultantExpr.addOperand(existingClause);
+        return resultantExpr;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/EdgeRewritingUtil.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/EdgeRewritingUtil.java
new file mode 100644
index 0000000..e289119
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/EdgeRewritingUtil.java
@@ -0,0 +1,168 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.util;
+
+import static org.apache.asterix.graphix.lang.rewrites.util.ClauseRewritingUtil.buildConnectedClauses;
+import static org.apache.asterix.graphix.lang.rewrites.util.LowerRewritingUtil.buildAccessorList;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierNode;
+import org.apache.asterix.graphix.lang.rewrites.record.IElementRecord;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.OperatorExpr;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.common.literal.TrueLiteral;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.struct.OperatorType;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+
+public final class EdgeRewritingUtil {
+    public static Expression buildVertexEdgeJoin(List<GraphElementIdentifier> vertexIdentifiers,
+            List<GraphElementIdentifier> edgeIdentifiers,
+            Function<GraphElementIdentifier, List<Expression>> edgeLabelPredicateBuilder,
+            BiFunction<GraphElementIdentifier, GraphElementIdentifier, Boolean> elementRestrictionPredicate,
+            Function<GraphElementIdentifier, List<FieldAccessor>> vertexKeyBuilder,
+            Function<GraphElementIdentifier, List<List<FieldAccessor>>> edgeKeysBuilder) {
+        // Connect multiple vertex labels to multiple edge bodies of multiple labels.
+        Expression intermediateClause;
+        List<Expression> finalClauses = new ArrayList<>();
+        for (GraphElementIdentifier edgeIdentifier : edgeIdentifiers) {
+
+            // Connect multiple vertex labels to multiple edge bodies of a single label.
+            List<Expression> multipleVertexToMultipleEdgeClauses = new ArrayList<>();
+            List<List<FieldAccessor>> edgeKeyList = edgeKeysBuilder.apply(edgeIdentifier);
+            for (List<FieldAccessor> edgeKey : edgeKeyList) {
+
+                // Connect multiple vertex labels to a single edge body of a single label.
+                List<Expression> multipleVertexToSingleEdgeClauses = new ArrayList<>();
+                for (GraphElementIdentifier vertexIdentifier : vertexIdentifiers) {
+                    if (!elementRestrictionPredicate.apply(vertexIdentifier, edgeIdentifier)) {
+                        continue;
+                    }
+
+                    // Connect a single vertex label to a single edge body of a single label.
+                    List<Expression> singleVertexToSingleEdgeClauses = new ArrayList<>();
+                    List<FieldAccessor> vertexKey = vertexKeyBuilder.apply(vertexIdentifier);
+                    for (int i = 0; i < edgeKey.size(); i++) {
+                        OperatorExpr equalityExpr = new OperatorExpr(List.of(edgeKey.get(i), vertexKey.get(i)),
+                                Collections.singletonList(OperatorType.EQ), false);
+                        singleVertexToSingleEdgeClauses.add(equalityExpr);
+                    }
+                    singleVertexToSingleEdgeClauses.addAll(edgeLabelPredicateBuilder.apply(edgeIdentifier));
+
+                    intermediateClause = buildConnectedClauses(singleVertexToSingleEdgeClauses, OperatorType.AND);
+                    multipleVertexToSingleEdgeClauses.add(intermediateClause);
+                }
+                if (multipleVertexToSingleEdgeClauses.isEmpty()) {
+                    // If we have no vertices-to-edge clauses, then our intermediate clause is TRUE.
+                    multipleVertexToMultipleEdgeClauses.add(new LiteralExpr(TrueLiteral.INSTANCE));
+
+                } else {
+                    intermediateClause = buildConnectedClauses(multipleVertexToSingleEdgeClauses, OperatorType.OR);
+                    multipleVertexToMultipleEdgeClauses.add(intermediateClause);
+                }
+            }
+
+            intermediateClause = buildConnectedClauses(multipleVertexToMultipleEdgeClauses, OperatorType.OR);
+            finalClauses.add(intermediateClause);
+        }
+
+        return buildConnectedClauses(finalClauses, OperatorType.OR);
+    }
+
+    public static Expression buildInputAssemblyJoin(LowerSupplierNode inputNode, Expression startingAccessExpr,
+            Expression qualifiedVar, Expression existingJoin, Function<String, Boolean> joinFieldPredicate) {
+        boolean isAnyProjectionApplicable =
+                inputNode.getProjectionList().stream().map(Projection::getName).anyMatch(joinFieldPredicate::apply);
+
+        if (!isAnyProjectionApplicable && existingJoin == null) {
+            // We cannot join with any of the input projections. Perform a cross product.
+            return new LiteralExpr(TrueLiteral.INSTANCE);
+
+        } else if (!isAnyProjectionApplicable) {
+            // We cannot join with any of the input projections. Return the existing join.
+            return existingJoin;
+
+        } else {
+            // We can perform a join with one (or more) of our input projections.
+            List<Expression> joinsWithInput = new ArrayList<>();
+            if (existingJoin != null) {
+                joinsWithInput.add(existingJoin);
+            }
+
+            for (Projection inputProjection : inputNode.getProjectionList()) {
+                String projectedVarName = inputProjection.getName();
+                if (joinFieldPredicate.apply(projectedVarName)) {
+                    List<List<String>> projectedFieldName = List.of(List.of(projectedVarName));
+                    FieldAccessor inputAccessExpr = buildAccessorList(startingAccessExpr, projectedFieldName).get(0);
+                    List<OperatorType> joinOperator = Collections.singletonList(OperatorType.EQ);
+                    joinsWithInput.add(new OperatorExpr(List.of(qualifiedVar, inputAccessExpr), joinOperator, false));
+                }
+            }
+            return buildConnectedClauses(joinsWithInput, OperatorType.AND);
+        }
+    }
+
+    public static Function<GraphElementIdentifier, List<List<FieldAccessor>>> buildEdgeKeyBuilder(
+            Expression startingExpr, ElementLookupTable<GraphElementIdentifier> elementLookupTable,
+            Function<GraphElementIdentifier, List<List<String>>> keyFieldBuilder) {
+        return identifier -> {
+            List<List<FieldAccessor>> fieldAccessorList = new ArrayList<>();
+            for (int i = 0; i < elementLookupTable.getEdgeSourceKeys(identifier).size(); i++) {
+                List<List<String>> keyField = keyFieldBuilder.apply(identifier);
+                fieldAccessorList.add(buildAccessorList(startingExpr, keyField));
+            }
+            return fieldAccessorList;
+        };
+    }
+
+    public static Function<GraphElementIdentifier, List<Expression>> buildEdgeLabelPredicateBuilder(
+            Expression vertexExpr, Expression edgeExpr, Function<GraphElementIdentifier, ElementLabel> labelGetter) {
+        return identifier -> {
+            final Identifier elementDetailSuffix = new Identifier(IElementRecord.ELEMENT_DETAIL_NAME);
+            final Identifier elementLabelSuffix = new Identifier(IElementRecord.ELEMENT_LABEL_FIELD_NAME);
+
+            // Access the labels in our vertex and our edge.
+            LiteralExpr vertexValue = new LiteralExpr(new StringLiteral(labelGetter.apply(identifier).toString()));
+            LiteralExpr edgeValue = new LiteralExpr(new StringLiteral(identifier.getElementLabel().toString()));
+            FieldAccessor vertexDetailAccess = new FieldAccessor(vertexExpr, elementDetailSuffix);
+            FieldAccessor edgeDetailAccess = new FieldAccessor(edgeExpr, elementDetailSuffix);
+            FieldAccessor vertexLabelAccess = new FieldAccessor(vertexDetailAccess, elementLabelSuffix);
+            FieldAccessor edgeLabelAccess = new FieldAccessor(edgeDetailAccess, elementLabelSuffix);
+
+            // Ensure that our vertex label and our edge label match.
+            List<Expression> labelPredicates = new ArrayList<>();
+            List<Expression> vertexExprList = List.of(vertexValue, vertexLabelAccess);
+            List<Expression> edgeExprList = List.of(edgeValue, edgeLabelAccess);
+            labelPredicates.add(new OperatorExpr(vertexExprList, List.of(OperatorType.EQ), false));
+            labelPredicates.add(new OperatorExpr(edgeExprList, List.of(OperatorType.EQ), false));
+            return labelPredicates;
+        };
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/LowerRewritingUtil.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/LowerRewritingUtil.java
new file mode 100644
index 0000000..dd07c3e
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/util/LowerRewritingUtil.java
@@ -0,0 +1,155 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.util;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.clause.LetClause;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.FieldBinding;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.sqlpp.clause.FromClause;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+import org.apache.asterix.lang.sqlpp.clause.SelectClause;
+import org.apache.asterix.lang.sqlpp.clause.SelectElement;
+import org.apache.asterix.lang.sqlpp.clause.SelectRegular;
+import org.apache.asterix.lang.sqlpp.clause.SelectSetOperation;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.optype.SetOpType;
+import org.apache.asterix.lang.sqlpp.struct.SetOperationInput;
+import org.apache.asterix.lang.sqlpp.struct.SetOperationRight;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+
+public final class LowerRewritingUtil {
+    public static List<FieldAccessor> buildAccessorList(Expression startingExpr, List<List<String>> fieldNames) {
+        List<FieldAccessor> fieldAccessors = new ArrayList<>();
+        for (List<String> nestedField : fieldNames) {
+            FieldAccessor workingAccessor = new FieldAccessor(startingExpr, new Identifier(nestedField.get(0)));
+            for (String field : nestedField.subList(1, nestedField.size())) {
+                workingAccessor = new FieldAccessor(workingAccessor, new Identifier(field));
+            }
+            fieldAccessors.add(workingAccessor);
+        }
+        return fieldAccessors;
+    }
+
+    public static FieldBinding buildFieldBindingFromFieldAccessor(FieldAccessor fieldAccessor) {
+        LiteralExpr leftExpr = new LiteralExpr(new StringLiteral(fieldAccessor.getIdent().getValue()));
+        return new FieldBinding(leftExpr, fieldAccessor);
+    }
+
+    public static SetOperationInput buildSetOpInputWithFrom(FromTerm term, List<Projection> projections,
+            List<AbstractClause> letWhereClauseList) {
+        FromClause fromClause = new FromClause(Collections.singletonList(term));
+
+        // Build up each FROM-CLAUSE as its own SET-OP-INPUT.
+        SelectRegular selectRegular = new SelectRegular(projections);
+        SelectClause selectClause = new SelectClause(null, selectRegular, false);
+        SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, letWhereClauseList, null, null);
+        return new SetOperationInput(selectBlock, null);
+    }
+
+    public static SelectExpression buildSelectWithFromAndElement(FromTerm fromTerm,
+            List<AbstractClause> letWhereClauses, Expression element) {
+        FromClause fromClause = new FromClause(List.of(fromTerm));
+        SelectElement selectElement = new SelectElement(element);
+        SelectClause selectClause = new SelectClause(selectElement, null, false);
+        SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, letWhereClauses, null, null);
+        SetOperationInput setOperationInput = new SetOperationInput(selectBlock, null);
+        SelectSetOperation selectSetOperation = new SelectSetOperation(setOperationInput, null);
+        return new SelectExpression(null, selectSetOperation, null, null, true);
+    }
+
+    public static LetClause buildLetClauseWithFromList(List<FromTerm> fromTerms, List<AbstractClause> letWhereClauses,
+            List<Projection> projections, VariableExpr bindingLetVar) {
+        // Build up a LET-CLAUSE from our input FROM-TERM list. Use a SELECT-ELEMENT instead of a SELECT-REGULAR.
+        FromClause fromClause = new FromClause(fromTerms);
+        SelectRegular selectRegular = new SelectRegular(projections);
+        SelectClause selectClause = new SelectClause(null, selectRegular, false);
+        SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, letWhereClauses, null, null);
+        SetOperationInput setOperationInput = new SetOperationInput(selectBlock, null);
+        SelectSetOperation selectSetOperation = new SelectSetOperation(setOperationInput, null);
+        SelectExpression selectExpression = new SelectExpression(null, selectSetOperation, null, null, true);
+        return new LetClause(bindingLetVar, selectExpression);
+    }
+
+    public static List<SelectBlock> buildSelectBlocksWithDecls(List<GraphElementDecl> graphElementDecls,
+            VariableExpr startingVar, Function<GraphElementDecl, List<Projection>> detailSupplier) {
+        // Each declaration body will act as its own SELECT-BLOCK.
+        List<SelectBlock> selectBlockList = new ArrayList<>();
+        for (GraphElementDecl graphElementDecl : graphElementDecls) {
+            for (Expression normalizedBody : graphElementDecl.getNormalizedBodies()) {
+                FromTerm fromTerm = new FromTerm(normalizedBody, startingVar, null, null);
+                FromClause fromClause = new FromClause(Collections.singletonList(fromTerm));
+
+                // All details should be given to us as another set of projections.
+                Expression selectElementExpr = detailSupplier.apply(graphElementDecl).stream().sequential()
+                        .reduce(startingVar, (Expression inputExpr, Projection nextProjection) -> {
+                            FunctionSignature functionSignature = new FunctionSignature(BuiltinFunctions.RECORD_ADD);
+                            LiteralExpr fieldNameExpr = new LiteralExpr(new StringLiteral(nextProjection.getName()));
+                            Expression fieldValueExpr = nextProjection.getExpression();
+                            List<Expression> callArgumentList = List.of(inputExpr, fieldNameExpr, fieldValueExpr);
+                            return new CallExpr(functionSignature, callArgumentList);
+                        }, (a, b) -> b);
+                SelectElement selectElement = new SelectElement(selectElementExpr);
+
+                // Build up each FROM-CLAUSE as its own SELECT-BLOCK.
+                SelectClause selectClause = new SelectClause(selectElement, null, false);
+                SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, null, null, null);
+                selectBlockList.add(selectBlock);
+            }
+        }
+
+        return selectBlockList;
+    }
+
+    public static SelectExpression buildSelectWithSelectBlockStream(Stream<SelectBlock> selectBlockStream) {
+        // Build our parts, with each SELECT-BLOCK acting as its own SET-OPERATION-INPUT.
+        List<SetOperationInput> selectExprParts =
+                selectBlockStream.map(b -> new SetOperationInput(b, null)).collect(Collectors.toList());
+
+        // Next, build our SELECT-SET-OPERATION. The first part will act as our leading term.
+        SetOperationInput leadingPart = selectExprParts.get(0);
+        List<SetOperationRight> rightPart = new ArrayList<>();
+        if (selectExprParts.size() > 1) {
+            for (SetOperationInput trailingPart : selectExprParts.subList(1, selectExprParts.size())) {
+                rightPart.add(new SetOperationRight(SetOpType.UNION, false, trailingPart));
+            }
+        }
+        SelectSetOperation selectExprComposite = new SelectSetOperation(leadingPart, rightPart);
+
+        // Finally, build our SelectExpression.
+        return new SelectExpression(null, selectExprComposite, null, null, true);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/AbstractGraphixQueryVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/AbstractGraphixQueryVisitor.java
new file mode 100644
index 0000000..83d35c2
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/AbstractGraphixQueryVisitor.java
@@ -0,0 +1,168 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.GraphSelectBlock;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.statement.CreateGraphStatement;
+import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+import org.apache.asterix.lang.sqlpp.visitor.base.AbstractSqlppSimpleExpressionVisitor;
+
+public class AbstractGraphixQueryVisitor extends AbstractSqlppSimpleExpressionVisitor
+        implements IGraphixLangVisitor<Expression, ILangExpression> {
+    @Override
+    public Expression visit(GraphConstructor gc, ILangExpression arg) throws CompilationException {
+        // Visit all vertices before visiting any edges.
+        for (GraphConstructor.VertexConstructor vertexConstructor : gc.getVertexElements()) {
+            vertexConstructor.accept(this, arg);
+        }
+        for (GraphConstructor.EdgeConstructor edgeConstructor : gc.getEdgeElements()) {
+            edgeConstructor.accept(this, arg);
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(GraphConstructor.VertexConstructor ve, ILangExpression arg) throws CompilationException {
+        return this.visit(ve.getExpression(), arg);
+    }
+
+    @Override
+    public Expression visit(GraphConstructor.EdgeConstructor ee, ILangExpression arg) throws CompilationException {
+        return this.visit(ee.getExpression(), arg);
+    }
+
+    @Override
+    public Expression visit(SelectBlock sb, ILangExpression arg) throws CompilationException {
+        return (sb instanceof GraphSelectBlock) ? this.visit((GraphSelectBlock) sb, arg) : super.visit(sb, arg);
+    }
+
+    @Override
+    public Expression visit(GraphSelectBlock gsb, ILangExpression arg) throws CompilationException {
+        // Traverse in the same order as a regular SELECT-BLOCK: FROM, LET/WHERE, GROUP-BY, LET/HAVING, SELECT.
+        if (gsb.hasFromGraphClause()) {
+            gsb.getFromGraphClause().accept(this, arg);
+
+        } else if (gsb.hasFromClause()) {
+            gsb.getFromClause().accept(this, arg);
+        }
+        if (gsb.hasLetWhereClauses()) {
+            for (AbstractClause clause : gsb.getLetWhereList()) {
+                clause.accept(this, arg);
+            }
+        }
+        if (gsb.hasGroupbyClause()) {
+            gsb.getGroupbyClause().accept(this, arg);
+        }
+        if (gsb.hasLetHavingClausesAfterGroupby()) {
+            for (AbstractClause clause : gsb.getLetHavingListAfterGroupby()) {
+                clause.accept(this, arg);
+            }
+        }
+        gsb.getSelectClause().accept(this, arg);
+        return null;
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fgc, ILangExpression arg) throws CompilationException {
+        // Visit our graph constructor (if it exists), then all of our MATCH clauses, and finally our correlate clauses.
+        if (fgc.getGraphConstructor() != null) {
+            fgc.getGraphConstructor().accept(this, arg);
+        }
+        for (MatchClause matchClause : fgc.getMatchClauses()) {
+            matchClause.accept(this, arg);
+        }
+        for (AbstractBinaryCorrelateClause correlateClause : fgc.getCorrelateClauses()) {
+            correlateClause.accept(this, arg);
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(MatchClause mc, ILangExpression arg) throws CompilationException {
+        for (PathPatternExpr pathPatternExpr : mc.getPathExpressions()) {
+            pathPatternExpr.accept(this, arg);
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(PathPatternExpr ppe, ILangExpression arg) throws CompilationException {
+        // Visit our vertices first, then our edges.
+        for (VertexPatternExpr vertexExpression : ppe.getVertexExpressions()) {
+            vertexExpression.accept(this, arg);
+        }
+        for (EdgePatternExpr edgeExpression : ppe.getEdgeExpressions()) {
+            edgeExpression.accept(this, arg);
+        }
+        if (ppe.getVariableExpr() != null) {
+            ppe.getVariableExpr().accept(this, arg);
+        }
+        return ppe;
+    }
+
+    @Override
+    public Expression visit(EdgePatternExpr epe, ILangExpression arg) throws CompilationException {
+        // We do not visit any **terminal** vertices here. These should be handled by the containing PathPatternExpr.
+        EdgeDescriptor edgeDescriptor = epe.getEdgeDescriptor();
+        if (edgeDescriptor.getVariableExpr() != null) {
+            edgeDescriptor.getVariableExpr().accept(this, arg);
+        }
+        for (VertexPatternExpr internalVertex : epe.getInternalVertices()) {
+            internalVertex.accept(this, arg);
+        }
+        return epe;
+    }
+
+    @Override
+    public Expression visit(VertexPatternExpr vpe, ILangExpression arg) throws CompilationException {
+        if (vpe.getVariableExpr() != null) {
+            vpe.getVariableExpr().accept(this, arg);
+        }
+        return vpe;
+    }
+
+    @Override
+    public Expression visit(GraphElementDecl gel, ILangExpression arg) throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Expression visit(CreateGraphStatement cgs, ILangExpression arg) throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Expression visit(GraphDropStatement gds, ILangExpression arg) throws CompilationException {
+        return null;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementAnalysisVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementAnalysisVisitor.java
new file mode 100644
index 0000000..1c3882c
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementAnalysisVisitor.java
@@ -0,0 +1,203 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.optype.MatchType;
+import org.apache.asterix.graphix.lang.rewrites.common.EdgeDependencyGraph;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+
+/**
+ * Perform an analysis pass of our AST to generate three items: a) a list of edge orderings, b) a list of dangling
+ * vertices, and c) a list of optional variables (i.e. vertices) per FROM-GRAPH-CLAUSE.
+ * - To generate an {@link EdgeDependencyGraph}, we create an adjacency map of query edges whose adjacency between
+ * other query edges is defined as sharing some vertex. The adjacency list associated with each query edge is ordered
+ * by visitation, and will be used in {@link EdgeDependencyGraph#iterator()}- in short, this means that the order of
+ * the patterns in query may affect the resulting lowered AST.
+ * - For each LEFT-MATCH-CLAUSE, we build a new dependency subgraph. Every subsequent subgraph should possess a
+ * leading edge that contains a vertex found in the previous subgraph (if it exists).
+ * - To generate our list of optional vertices, we first collect all vertices found before the first LEFT-MATCH-CLAUSE.
+ * For the set of vertices found after this LEFT-MATCH-CLAUSE, we take the difference of this set and the previous set.
+ */
+public class ElementAnalysisVisitor extends AbstractGraphixQueryVisitor {
+    private static class AnalysisEnvironment {
+        // We must populate these maps (edge ID -> edge IDs).
+        private final List<Map<Identifier, List<Identifier>>> adjacencyMaps = new ArrayList<>();
+        private final Map<Identifier, EdgePatternExpr> edgePatternMap = new LinkedHashMap<>();
+
+        // Build a separate map to define dependencies (vertex ID -> edge IDs).
+        private final Map<Identifier, List<Identifier>> vertexEdgeMap = new LinkedHashMap<>();
+        private final List<VertexPatternExpr> danglingVertices = new ArrayList<>();
+
+        // To allow for LEFT-MATCH patterns, we must keep track of which vertices are not mandatory.
+        private final Set<VarIdentifier> visitedVertices = new HashSet<>();
+        private final Set<VarIdentifier> mandatoryVertices = new HashSet<>();
+        private final Set<VarIdentifier> optionalVertices = new HashSet<>();
+        private Map<Identifier, List<Identifier>> workingAdjacencyMap = new LinkedHashMap<>();
+    }
+
+    // We will return instances of the following back to our caller.
+    public static class FromGraphClauseContext {
+        private final EdgeDependencyGraph edgeDependencyGraph;
+        private final List<VertexPatternExpr> danglingVertices;
+        private final List<VarIdentifier> optionalVariables;
+
+        private FromGraphClauseContext(EdgeDependencyGraph edgeDependencyGraph,
+                List<VertexPatternExpr> danglingVertices, List<VarIdentifier> optionalVariables) {
+            this.edgeDependencyGraph = edgeDependencyGraph;
+            this.danglingVertices = danglingVertices;
+            this.optionalVariables = optionalVariables;
+        }
+
+        public EdgeDependencyGraph getEdgeDependencyGraph() {
+            return edgeDependencyGraph;
+        }
+
+        public List<VertexPatternExpr> getDanglingVertices() {
+            return danglingVertices;
+        }
+
+        public List<VarIdentifier> getOptionalVariables() {
+            return optionalVariables;
+        }
+    }
+
+    // We will build new environments on each visit of a FROM-GRAPH-CLAUSE.
+    private final Map<FromGraphClause, AnalysisEnvironment> analysisEnvironmentMap = new HashMap<>();
+    private AnalysisEnvironment workingEnvironment;
+
+    private void addEdgeDependency(VarIdentifier vertexID, VarIdentifier edgeID, List<Identifier> dependencyList) {
+        if (workingEnvironment.vertexEdgeMap.containsKey(vertexID)) {
+            dependencyList.addAll(workingEnvironment.vertexEdgeMap.get(vertexID));
+            workingEnvironment.vertexEdgeMap.get(vertexID).add(edgeID);
+
+        } else {
+            List<Identifier> vertexDependencies = new ArrayList<>();
+            vertexDependencies.add(edgeID);
+            workingEnvironment.vertexEdgeMap.put(vertexID, vertexDependencies);
+        }
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fromGraphClause, ILangExpression arg) throws CompilationException {
+        // Add to our a map a new analysis environment.
+        workingEnvironment = new AnalysisEnvironment();
+        analysisEnvironmentMap.put(fromGraphClause, workingEnvironment);
+        return super.visit(fromGraphClause, arg);
+    }
+
+    @Override
+    public Expression visit(MatchClause matchClause, ILangExpression arg) throws CompilationException {
+        // Reset to build a new graph.
+        if (matchClause.getMatchType() == MatchType.LEFTOUTER) {
+            workingEnvironment.adjacencyMaps.add(workingEnvironment.workingAdjacencyMap);
+            workingEnvironment.workingAdjacencyMap = new LinkedHashMap<>();
+            workingEnvironment.vertexEdgeMap.clear();
+        }
+        super.visit(matchClause, arg);
+
+        // Record which vertices are mandatory and which are optional.
+        if (matchClause.getMatchType() != MatchType.LEFTOUTER && workingEnvironment.optionalVertices.isEmpty()) {
+            workingEnvironment.mandatoryVertices.addAll(workingEnvironment.visitedVertices);
+
+        } else { // We have encountered a LEFT-OUTER-MATCH-CLAUSE.
+            workingEnvironment.visitedVertices.stream().filter(v -> !workingEnvironment.mandatoryVertices.contains(v))
+                    .forEach(workingEnvironment.optionalVertices::add);
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(PathPatternExpr pathExpression, ILangExpression arg) throws CompilationException {
+        // Visit our edges first, then our vertices. This allows us to determine our dangling vertices.
+        for (EdgePatternExpr edgeExpression : pathExpression.getEdgeExpressions()) {
+            edgeExpression.accept(this, arg);
+        }
+        for (VertexPatternExpr vertexExpression : pathExpression.getVertexExpressions()) {
+            vertexExpression.accept(this, arg);
+        }
+        return pathExpression;
+    }
+
+    @Override
+    public Expression visit(VertexPatternExpr vertexExpression, ILangExpression arg) throws CompilationException {
+        VarIdentifier vertexID = vertexExpression.getVariableExpr().getVar();
+        if (!workingEnvironment.vertexEdgeMap.containsKey(vertexID)) {
+            workingEnvironment.danglingVertices.add(vertexExpression);
+        }
+        workingEnvironment.visitedVertices.add(vertexID);
+        return vertexExpression;
+    }
+
+    @Override
+    public Expression visit(EdgePatternExpr edgeExpression, ILangExpression arg) throws CompilationException {
+        VarIdentifier leftVertexID = edgeExpression.getLeftVertex().getVariableExpr().getVar();
+        VarIdentifier rightVertexID = edgeExpression.getRightVertex().getVariableExpr().getVar();
+        VarIdentifier edgeID = edgeExpression.getEdgeDescriptor().getVariableExpr().getVar();
+        List<Identifier> edgeDependencies = new ArrayList<>();
+
+        addEdgeDependency(leftVertexID, edgeID, edgeDependencies);
+        addEdgeDependency(rightVertexID, edgeID, edgeDependencies);
+        workingEnvironment.workingAdjacencyMap.put(edgeID, edgeDependencies);
+        workingEnvironment.edgePatternMap.put(edgeID, edgeExpression);
+        for (Identifier dependencyEdgeID : edgeDependencies) {
+            // Populate our map in reverse as well.
+            workingEnvironment.workingAdjacencyMap.get(dependencyEdgeID).add(edgeID);
+        }
+
+        // We ignore any internal vertices here.
+        return edgeExpression;
+    }
+
+    public Map<FromGraphClause, FromGraphClauseContext> getFromGraphClauseContextMap() {
+        return analysisEnvironmentMap.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> {
+            AnalysisEnvironment analysisEnvironment = e.getValue();
+            if (!analysisEnvironment.workingAdjacencyMap.isEmpty()) {
+                // We have not finished building our edge dependency subgraph.
+                analysisEnvironment.adjacencyMaps.add(analysisEnvironment.workingAdjacencyMap);
+                analysisEnvironment.workingAdjacencyMap = new LinkedHashMap<>();
+                analysisEnvironment.vertexEdgeMap.clear();
+            }
+
+            // Construct our output.
+            EdgeDependencyGraph edgeDependencyGraph =
+                    new EdgeDependencyGraph(e.getValue().adjacencyMaps, e.getValue().edgePatternMap);
+            List<VertexPatternExpr> danglingVertices = e.getValue().danglingVertices;
+            List<VarIdentifier> optionalVariables = new ArrayList<>(e.getValue().optionalVertices);
+            return new FromGraphClauseContext(edgeDependencyGraph, danglingVertices, optionalVariables);
+        }));
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementLookupTableVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementLookupTableVisitor.java
new file mode 100644
index 0000000..c150b62
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementLookupTableVisitor.java
@@ -0,0 +1,164 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.parser.GraphElementBodyParser;
+import org.apache.asterix.graphix.lang.parser.GraphixParserFactory;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.graphix.metadata.entity.schema.Edge;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.graphix.metadata.entity.schema.Vertex;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.IWarningCollector;
+
+/**
+ * Populate the given graph element table, which will hold all referenced {@link GraphElementDecl}s. We assume that our
+ * graph elements are properly labeled at this point (i.e. {@link ElementResolutionVisitor} must run before this).
+ */
+public class ElementLookupTableVisitor extends AbstractGraphixQueryVisitor {
+    private final IWarningCollector warningCollector;
+    private final MetadataProvider metadataProvider;
+    private final GraphixParserFactory parserFactory;
+
+    private final Set<ElementLabel> referencedVertexLabels = new HashSet<>();
+    private final Set<ElementLabel> referencedEdgeLabels = new HashSet<>();
+    private final ElementLookupTable<GraphElementIdentifier> elementLookupTable;
+
+    public ElementLookupTableVisitor(ElementLookupTable<GraphElementIdentifier> elementLookupTable,
+            MetadataProvider metadataProvider, GraphixParserFactory parserFactory, IWarningCollector warningCollector) {
+        this.warningCollector = warningCollector;
+        this.parserFactory = parserFactory;
+        this.elementLookupTable = elementLookupTable;
+        this.metadataProvider = metadataProvider;
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fromGraphClause, ILangExpression arg) throws CompilationException {
+        for (MatchClause m : fromGraphClause.getMatchClauses()) {
+            m.accept(this, null);
+        }
+
+        if (fromGraphClause.getGraphConstructor() == null) {
+            // Our query refers to a named graph. Load this from our metadata.
+            DataverseName dataverseName = (fromGraphClause.getDataverseName() == null)
+                    ? metadataProvider.getDefaultDataverseName() : fromGraphClause.getDataverseName();
+            Identifier graphName = fromGraphClause.getGraphName();
+            Graph graphFromMetadata;
+            try {
+                graphFromMetadata = GraphixMetadataExtension.getGraph(metadataProvider.getMetadataTxnContext(),
+                        dataverseName, graphName.getValue());
+                if (graphFromMetadata == null) {
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, fromGraphClause.getSourceLocation(),
+                            "Graph " + graphName.getValue() + " does not exist.");
+                }
+
+            } catch (AlgebricksException e) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fromGraphClause.getSourceLocation(),
+                        "Graph " + graphName.getValue() + " does not exist.");
+            }
+
+            for (Vertex vertex : graphFromMetadata.getGraphSchema().getVertices()) {
+                if (referencedVertexLabels.contains(vertex.getLabel())) {
+                    GraphElementDecl vertexDecl = GraphElementBodyParser.parse(vertex, parserFactory, warningCollector);
+                    elementLookupTable.put(vertex.getIdentifier(), vertexDecl);
+                    elementLookupTable.putVertexKey(vertex.getIdentifier(), vertex.getPrimaryKeyFieldNames());
+                }
+            }
+            for (Edge edge : graphFromMetadata.getGraphSchema().getEdges()) {
+                if (referencedEdgeLabels.contains(edge.getLabel())) {
+                    GraphElementDecl edgeDecl = GraphElementBodyParser.parse(edge, parserFactory, warningCollector);
+                    elementLookupTable.put(edge.getIdentifier(), edgeDecl);
+                    edge.getDefinitions().forEach(d -> elementLookupTable.putEdgeKeys(edge.getIdentifier(),
+                            d.getSourceKeyFieldNames(), d.getDestinationKeyFieldNames()));
+                    elementLookupTable.putEdgeLabels(edge.getIdentifier(), edge.getSourceLabel(),
+                            edge.getDestinationLabel());
+                }
+            }
+
+        } else {
+            // We have been provided an anonymous graph. Load the referenced elements from our walk.
+            GraphConstructor graphConstructor = fromGraphClause.getGraphConstructor();
+            DataverseName defaultDataverse = metadataProvider.getDefaultDataverse().getDataverseName();
+            GraphIdentifier graphIdentifier = new GraphIdentifier(defaultDataverse, graphConstructor.getInstanceID());
+
+            for (GraphConstructor.VertexConstructor vertex : graphConstructor.getVertexElements()) {
+                if (referencedVertexLabels.contains(vertex.getLabel())) {
+                    GraphElementIdentifier identifier = new GraphElementIdentifier(graphIdentifier,
+                            GraphElementIdentifier.Kind.VERTEX, vertex.getLabel());
+                    elementLookupTable.put(identifier, new GraphElementDecl(identifier, vertex.getExpression()));
+                    elementLookupTable.putVertexKey(identifier, vertex.getPrimaryKeyFields());
+                }
+            }
+            for (GraphConstructor.EdgeConstructor edge : graphConstructor.getEdgeElements()) {
+                if (referencedEdgeLabels.contains(edge.getEdgeLabel())) {
+                    GraphElementIdentifier identifier = new GraphElementIdentifier(graphIdentifier,
+                            GraphElementIdentifier.Kind.EDGE, edge.getEdgeLabel());
+                    elementLookupTable.put(identifier, new GraphElementDecl(identifier, edge.getExpression()));
+                    elementLookupTable.putEdgeKeys(identifier, edge.getSourceKeyFields(),
+                            edge.getDestinationKeyFields());
+                    elementLookupTable.putEdgeLabels(identifier, edge.getSourceLabel(), edge.getDestinationLabel());
+                }
+            }
+        }
+        return null;
+    }
+
+    public Expression visit(EdgePatternExpr edgeExpression, ILangExpression arg) throws CompilationException {
+        EdgeDescriptor edgeDescriptor = edgeExpression.getEdgeDescriptor();
+        if (edgeDescriptor.getEdgeLabels().isEmpty()) {
+            throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, edgeExpression.getSourceLocation(),
+                    "EdgePatternExpr found without labels. Elements should have been resolved earlier.");
+        }
+        referencedEdgeLabels.addAll(edgeDescriptor.getEdgeLabels());
+        for (VertexPatternExpr internalVertex : edgeExpression.getInternalVertices()) {
+            internalVertex.accept(this, arg);
+        }
+        return edgeExpression;
+    }
+
+    public Expression visit(VertexPatternExpr vertexExpression, ILangExpression arg) throws CompilationException {
+        if (vertexExpression.getLabels().isEmpty()) {
+            throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, vertexExpression.getSourceLocation(),
+                    "VertexPatternExpr found without labels. Elements should have been resolved earlier.");
+        }
+        referencedVertexLabels.addAll(vertexExpression.getLabels());
+        return vertexExpression;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementResolutionVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementResolutionVisitor.java
new file mode 100644
index 0000000..4f3c6f9
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ElementResolutionVisitor.java
@@ -0,0 +1,181 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.algebra.compiler.provider.GraphixCompilationProvider;
+import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.resolve.IGraphElementResolver;
+import org.apache.asterix.graphix.lang.rewrites.resolve.InferenceBasedResolver;
+import org.apache.asterix.graphix.lang.rewrites.resolve.NoResolutionResolver;
+import org.apache.asterix.graphix.lang.rewrites.resolve.SchemaKnowledgeTable;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.IWarningCollector;
+import org.apache.hyracks.api.exceptions.Warning;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * Resolve graph element labels and edge directions in our AST. We assume that all graph elements have a variable.
+ *
+ * @see NoResolutionResolver
+ * @see InferenceBasedResolver
+ */
+public class ElementResolutionVisitor extends AbstractGraphixQueryVisitor {
+    private static final Logger LOGGER = LogManager.getLogger(ElementResolutionVisitor.class);
+
+    // If we exceed 500 iterations, something is probably wrong... log this.
+    private static final long DEFAULT_RESOLVER_ITERATION_MAX = 500;
+
+    private final MetadataProvider metadataProvider;
+    private final IWarningCollector warningCollector;
+
+    public ElementResolutionVisitor(MetadataProvider metadataProvider, IWarningCollector warningCollector) {
+        this.metadataProvider = metadataProvider;
+        this.warningCollector = warningCollector;
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fromGraphClause, ILangExpression arg) throws CompilationException {
+        // Establish our schema knowledge.
+        SchemaKnowledgeTable schemaKnowledgeTable;
+        if (fromGraphClause.getGraphConstructor() == null) {
+            DataverseName dataverseName = (fromGraphClause.getDataverseName() == null)
+                    ? metadataProvider.getDefaultDataverseName() : fromGraphClause.getDataverseName();
+            Identifier graphName = fromGraphClause.getGraphName();
+
+            // Fetch the graph from our metadata.
+            try {
+                Graph graphFromMetadata = GraphixMetadataExtension.getGraph(metadataProvider.getMetadataTxnContext(),
+                        dataverseName, graphName.getValue());
+                if (graphFromMetadata == null) {
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, fromGraphClause.getSourceLocation(),
+                            "Graph " + graphName.getValue() + " does not exist.");
+                }
+                schemaKnowledgeTable = new SchemaKnowledgeTable(graphFromMetadata);
+
+            } catch (AlgebricksException e) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fromGraphClause.getSourceLocation(),
+                        "Graph " + graphName.getValue() + " does not exist.");
+            }
+
+        } else {
+            schemaKnowledgeTable = new SchemaKnowledgeTable(fromGraphClause.getGraphConstructor());
+        }
+
+        // Determine our resolution strategy. By default, we will perform bare-bones resolution.
+        IGraphElementResolver graphElementResolver;
+        String resolverMetadataKeyName = GraphixCompilationProvider.RESOLVER_METADATA_CONFIG;
+        if (metadataProvider.getConfig().containsKey(resolverMetadataKeyName)) {
+            String resolverProperty = metadataProvider.getProperty(resolverMetadataKeyName);
+            if (resolverProperty.equalsIgnoreCase(NoResolutionResolver.METADATA_CONFIG_NAME)) {
+                graphElementResolver = new NoResolutionResolver();
+
+            } else if (resolverProperty.equalsIgnoreCase(InferenceBasedResolver.METADATA_CONFIG_NAME)) {
+                graphElementResolver = new InferenceBasedResolver(schemaKnowledgeTable);
+
+            } else {
+                throw new CompilationException(ErrorCode.ILLEGAL_SET_PARAMETER, resolverProperty);
+            }
+
+        } else {
+            graphElementResolver = new InferenceBasedResolver(schemaKnowledgeTable);
+        }
+
+        // Perform our resolution passes (repeat until we reach a fixed point or the iteration max).
+        String resolverIterationMaxMetadataKeyName = GraphixCompilationProvider.RESOLVER_ITERATION_MAX_METADATA_CONFIG;
+        long resolverIterationMax;
+        if (metadataProvider.getConfig().containsKey(resolverIterationMaxMetadataKeyName)) {
+            String resolverIterationMaxProperty = metadataProvider.getProperty(resolverIterationMaxMetadataKeyName);
+            try {
+                resolverIterationMax = Long.parseLong(resolverIterationMaxProperty);
+
+            } catch (NumberFormatException e) {
+                throw new CompilationException(ErrorCode.ILLEGAL_SET_PARAMETER, resolverIterationMaxProperty);
+            }
+
+        } else {
+            resolverIterationMax = DEFAULT_RESOLVER_ITERATION_MAX;
+        }
+        for (int i = 0; i < resolverIterationMax && !graphElementResolver.isAtFixedPoint(); i++) {
+            graphElementResolver.resolve(fromGraphClause);
+            if (i == resolverIterationMax - 1) {
+                LOGGER.warn("Number of iterations for element resolution has exceeded " + resolverIterationMax);
+            }
+        }
+
+        // Perform the final pass of our FROM-GRAPH-CLAUSE. Raise warnings if necessary.
+        new AbstractGraphixQueryVisitor() {
+            @Override
+            public Expression visit(VertexPatternExpr vertexPatternExpr, ILangExpression arg) {
+                Identifier vertexIdentifier = vertexPatternExpr.getVariableExpr().getVar();
+                if (vertexPatternExpr.getLabels().isEmpty()) {
+                    vertexPatternExpr.getLabels().addAll(schemaKnowledgeTable.getVertexLabelSet());
+                    if (schemaKnowledgeTable.getVertexLabelSet().size() > 1 && warningCollector.shouldWarn()) {
+                        warningCollector.warn(Warning.of(vertexPatternExpr.getSourceLocation(),
+                                ErrorCode.COMPILATION_ERROR, "Vertex label could not be resolved. Assuming that"
+                                        + " vertex " + vertexIdentifier + " has all schema labels."));
+                    }
+
+                } else if (vertexPatternExpr.getLabels().stream().allMatch(ElementLabel::isInferred)
+                        && vertexPatternExpr.getLabels().size() > 1) {
+                    warningCollector.warn(Warning.of(vertexPatternExpr.getSourceLocation(), ErrorCode.COMPILATION_ERROR,
+                            "More than one label has been resolved for vertex " + vertexIdentifier + "."));
+                }
+                return vertexPatternExpr;
+            }
+
+            @Override
+            public Expression visit(EdgePatternExpr edgePatternExpr, ILangExpression arg) throws CompilationException {
+                EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+                Identifier edgeIdentifier = edgeDescriptor.getVariableExpr().getVar();
+                if (edgeDescriptor.getEdgeLabels().isEmpty()) {
+                    edgeDescriptor.getEdgeLabels().addAll(schemaKnowledgeTable.getEdgeLabelSet());
+                    if (edgeDescriptor.getEdgeLabels().size() > 1 && warningCollector.shouldWarn()) {
+                        warningCollector.warn(Warning.of(edgePatternExpr.getSourceLocation(),
+                                ErrorCode.COMPILATION_ERROR, "Edge label for " + edgeIdentifier + " could not be"
+                                        + " resolved. Assuming that this edge has all schema labels."));
+                    }
+                } else if (edgeDescriptor.getEdgeLabels().stream().allMatch(ElementLabel::isInferred)
+                        && edgeDescriptor.getEdgeLabels().size() > 1) {
+                    warningCollector.warn(Warning.of(edgePatternExpr.getSourceLocation(), ErrorCode.COMPILATION_ERROR,
+                            "More than one label has been resolved for edge " + edgeIdentifier + "."));
+                }
+                for (VertexPatternExpr internalVertex : edgePatternExpr.getInternalVertices()) {
+                    internalVertex.accept(this, arg);
+                }
+                return edgePatternExpr;
+            }
+        }.visit(fromGraphClause, null);
+
+        return null;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GenerateVariableVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GenerateVariableVisitor.java
new file mode 100644
index 0000000..5a06aa4
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GenerateVariableVisitor.java
@@ -0,0 +1,67 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import java.util.function.Supplier;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.rewrites.visitor.GenerateColumnNameVisitor;
+
+/**
+ * Populate all unknown a) graph elements (vertices and edges), b) column names in SELECT-CLAUSEs, and c) GROUP-BY keys.
+ */
+public class GenerateVariableVisitor extends AbstractGraphixQueryVisitor {
+    private final GenerateColumnNameVisitor generateColumnNameVisitor;
+    private final Supplier<VarIdentifier> newVariableSupplier;
+
+    public GenerateVariableVisitor(GraphixRewritingContext graphixRewritingContext) {
+        generateColumnNameVisitor = new GenerateColumnNameVisitor(graphixRewritingContext.getLangRewritingContext());
+        newVariableSupplier = graphixRewritingContext::getNewVariable;
+    }
+
+    @Override
+    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws CompilationException {
+        selectExpression.accept(generateColumnNameVisitor, arg);
+        return super.visit(selectExpression, arg);
+    }
+
+    @Override
+    public Expression visit(VertexPatternExpr vertexExpression, ILangExpression arg) throws CompilationException {
+        if (vertexExpression.getVariableExpr() == null) {
+            vertexExpression.setVariableExpr(new VariableExpr(newVariableSupplier.get()));
+        }
+        return super.visit(vertexExpression, arg);
+    }
+
+    @Override
+    public Expression visit(EdgePatternExpr edgeExpression, ILangExpression arg) throws CompilationException {
+        EdgeDescriptor edgeDescriptor = edgeExpression.getEdgeDescriptor();
+        if (edgeDescriptor.getVariableExpr() == null) {
+            edgeDescriptor.setVariableExpr(new VariableExpr(newVariableSupplier.get()));
+        }
+        return super.visit(edgeExpression, arg);
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GraphixFunctionCallVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GraphixFunctionCallVisitor.java
new file mode 100644
index 0000000..488acf6
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GraphixFunctionCallVisitor.java
@@ -0,0 +1,79 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.graphix.function.FunctionRewriteMap;
+import org.apache.asterix.graphix.function.GraphixFunctionIdentifiers;
+import org.apache.asterix.graphix.function.GraphixFunctionResolver;
+import org.apache.asterix.graphix.function.rewrite.IFunctionRewrite;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.statement.FunctionDecl;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+/**
+ * Replace all Graphix-specific function calls with either a SQL++ AST or a Graphix AST (that will later be lowered).
+ *
+ * @see GraphixFunctionIdentifiers
+ * @see GraphixFunctionResolver
+ * @see FunctionRewriteMap
+ */
+public class GraphixFunctionCallVisitor extends AbstractGraphixQueryVisitor {
+    private final GraphixRewritingContext graphixRewritingContext;
+    private final GraphixFunctionResolver graphixFunctionResolver;
+
+    public GraphixFunctionCallVisitor(GraphixRewritingContext graphixRewritingContext) {
+        this.graphixRewritingContext = graphixRewritingContext;
+
+        // We want to make sure that user-defined functions take precedence over Graphix-defined functions.
+        Map<FunctionSignature, FunctionDecl> declaredFunctions = graphixRewritingContext.getDeclaredFunctions();
+        MetadataProvider metadataProvider = graphixRewritingContext.getMetadataProvider();
+        this.graphixFunctionResolver = new GraphixFunctionResolver(metadataProvider, declaredFunctions);
+    }
+
+    @Override
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
+        // Determine which Graphix function we need to resolve.
+        FunctionSignature oldFunctionSignature = callExpr.getFunctionSignature();
+        FunctionSignature functionSignature = graphixFunctionResolver.resolve(oldFunctionSignature);
+        if (functionSignature == null) {
+            return super.visit(callExpr, arg);
+        }
+
+        // Condition on our function ID, and perform the rewrite.
+        FunctionIdentifier functionIdentifier = functionSignature.createFunctionIdentifier();
+        IFunctionRewrite functionRewrite = FunctionRewriteMap.getFunctionRewrite(functionIdentifier);
+        List<Expression> argList = callExpr.getExprList();
+        Expression rewrittenCallArgExpr = functionRewrite.apply(graphixRewritingContext, argList);
+        if (rewrittenCallArgExpr == null) {
+            throw new CompilationException(ErrorCode.COMPILATION_ERROR, callExpr.getSourceLocation(),
+                    "Function " + functionIdentifier.getName() + " not implemented!");
+        }
+        return rewrittenCallArgExpr;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GraphixLoweringVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GraphixLoweringVisitor.java
new file mode 100644
index 0000000..d165bb8
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/GraphixLoweringVisitor.java
@@ -0,0 +1,254 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.algebra.compiler.provider.GraphixCompilationProvider;
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.GraphSelectBlock;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.GraphixRewritingContext;
+import org.apache.asterix.graphix.lang.rewrites.assembly.IExprAssembly;
+import org.apache.asterix.graphix.lang.rewrites.common.EdgeDependencyGraph;
+import org.apache.asterix.graphix.lang.rewrites.common.ElementLookupTable;
+import org.apache.asterix.graphix.lang.rewrites.lower.GraphixLowerSupplier;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierContext;
+import org.apache.asterix.graphix.lang.rewrites.lower.LowerSupplierNode;
+import org.apache.asterix.graphix.lang.rewrites.lower.assembly.ExpandEdgeLowerAssembly;
+import org.apache.asterix.graphix.lang.rewrites.visitor.ElementAnalysisVisitor.FromGraphClauseContext;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.Clause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.clause.LetClause;
+import org.apache.asterix.lang.common.expression.FieldAccessor;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+import org.apache.asterix.lang.sqlpp.clause.FromClause;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.JoinClause;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.clause.SelectRegular;
+import org.apache.asterix.lang.sqlpp.clause.UnnestClause;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.util.SqlppRewriteUtil;
+import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+
+/**
+ * Rewrite a graph AST to utilize non-graph AST nodes (i.e. replace the GRAPH-SELECT-BLOCK with a SELECT-BLOCK).
+ *
+ * @see org.apache.asterix.graphix.lang.rewrites.lower.GraphixLowerSupplier
+ */
+public class GraphixLoweringVisitor extends AbstractGraphixQueryVisitor {
+    private final Map<FromGraphClause, FromGraphClauseContext> fromGraphClauseContextMap;
+    private final ElementLookupTable<GraphElementIdentifier> elementLookupTable;
+    private final GraphixRewritingContext graphixRewritingContext;
+
+    // In addition to the parent GRAPH-SELECT-BLOCK, we must keep track of the parent SELECT-EXPR.
+    private SelectExpression selectExpression;
+
+    public GraphixLoweringVisitor(Map<FromGraphClause, FromGraphClauseContext> fromGraphClauseContextMap,
+            ElementLookupTable<GraphElementIdentifier> elementLookupTable,
+            GraphixRewritingContext graphixRewritingContext) {
+        this.fromGraphClauseContextMap = fromGraphClauseContextMap;
+        this.elementLookupTable = elementLookupTable;
+        this.graphixRewritingContext = graphixRewritingContext;
+    }
+
+    @Override
+    public Expression visit(GraphSelectBlock graphSelectBlock, ILangExpression arg) throws CompilationException {
+        boolean hadFromGraphClause = false;
+        if (graphSelectBlock.hasFromGraphClause()) {
+            // We will remove the FROM-GRAPH node and replace this with a FROM node on the child visit.
+            selectExpression = (SelectExpression) arg;
+            hadFromGraphClause = true;
+            graphSelectBlock.getFromGraphClause().accept(this, graphSelectBlock);
+        }
+        if (graphSelectBlock.hasLetWhereClauses()) {
+            for (AbstractClause clause : graphSelectBlock.getLetWhereList()) {
+                clause.accept(this, arg);
+            }
+        }
+        if (graphSelectBlock.hasGroupbyClause()) {
+            graphSelectBlock.getGroupbyClause().accept(this, arg);
+        }
+        if (graphSelectBlock.hasLetHavingClausesAfterGroupby()) {
+            for (AbstractClause clause : graphSelectBlock.getLetHavingListAfterGroupby()) {
+                clause.accept(this, arg);
+            }
+        }
+        if (hadFromGraphClause && graphSelectBlock.getSelectClause().selectRegular()) {
+            // A special case: if we have SELECT *, modify this to VAR.*.
+            if (graphSelectBlock.getSelectClause().getSelectRegular().getProjections().stream()
+                    .allMatch(p -> p.getKind() == Projection.Kind.STAR)) {
+                FromTerm fromTerm = graphSelectBlock.getFromClause().getFromTerms().get(0);
+                Projection projection = new Projection(Projection.Kind.VAR_STAR, fromTerm.getLeftVariable(), null);
+                SelectRegular selectRegular = new SelectRegular(List.of(projection));
+                graphSelectBlock.getSelectClause().setSelectRegular(selectRegular);
+            }
+        }
+        graphSelectBlock.getSelectClause().accept(this, arg);
+        return null;
+    }
+
+    @Override
+    public Expression visit(LetClause letClause, ILangExpression arg) throws CompilationException {
+        // We also need to visit the binding variable here (in case we need to remove the GRAPH-VARIABLE-EXPR).
+        letClause.setVarExpr((VariableExpr) letClause.getVarExpr().accept(this, arg));
+        return super.visit(letClause, arg);
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fromGraphClause, ILangExpression arg) throws CompilationException {
+        GraphSelectBlock parentGraphSelect = (GraphSelectBlock) arg;
+
+        // Build the context for our lowering strategy.
+        FromGraphClauseContext fromGraphClauseContext = fromGraphClauseContextMap.get(fromGraphClause);
+        MetadataProvider metadataProvider = graphixRewritingContext.getMetadataProvider();
+        DataverseName dataverseName = (fromGraphClause.getDataverseName() == null)
+                ? metadataProvider.getDefaultDataverseName() : fromGraphClause.getDataverseName();
+        String graphName = (fromGraphClause.getGraphName() != null) ? fromGraphClause.getGraphName().getValue()
+                : fromGraphClause.getGraphConstructor().getInstanceID();
+        List<PathPatternExpr> pathPatternExprList = fromGraphClause.getMatchClauses().stream()
+                .map(MatchClause::getPathExpressions).flatMap(Collection::stream).collect(Collectors.toList());
+        GraphIdentifier graphIdentifier = new GraphIdentifier(dataverseName, graphName);
+        LowerSupplierContext lowerSupplierContext = new LowerSupplierContext(graphixRewritingContext, graphIdentifier,
+                fromGraphClauseContext.getDanglingVertices(), fromGraphClauseContext.getOptionalVariables(),
+                pathPatternExprList, elementLookupTable);
+
+        // Determine our lowering strategy. By default, we will fully expand any variable-length edges.
+        String strategyMetadataKeyName = GraphixCompilationProvider.EDGE_STRATEGY_METADATA_CONFIG;
+        Function<EdgePatternExpr, IExprAssembly<LowerSupplierNode>> edgeHandlingStrategy;
+        if (metadataProvider.getConfig().containsKey(strategyMetadataKeyName)) {
+            String strategyProperty = metadataProvider.getProperty(strategyMetadataKeyName);
+            if (strategyProperty.equalsIgnoreCase(ExpandEdgeLowerAssembly.METADATA_CONFIG_NAME)) {
+                edgeHandlingStrategy = e -> new ExpandEdgeLowerAssembly(e, lowerSupplierContext);
+
+            } else {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fromGraphClause.getSourceLocation(),
+                        "Unknown edge handling strategy specified: " + strategyProperty);
+            }
+
+        } else {
+            edgeHandlingStrategy = e -> new ExpandEdgeLowerAssembly(e, lowerSupplierContext);
+        }
+
+        // Create a DAG of lowering nodes. We are interested in the tail of the generated DAG.
+        List<LowerSupplierNode> lowerSupplierNodeList = new ArrayList<>();
+        EdgeDependencyGraph edgeDependencyGraph = fromGraphClauseContext.getEdgeDependencyGraph();
+        new GraphixLowerSupplier(lowerSupplierContext, edgeDependencyGraph, edgeHandlingStrategy)
+                .invoke(lowerSupplierNodeList::add);
+        LowerSupplierNode tailLowerNode = lowerSupplierNodeList.get(lowerSupplierNodeList.size() - 1);
+
+        // Build our FROM-TERM, which will reference the tail lower node.
+        VariableExpr qualifyingVariable = tailLowerNode.getBindingVar();
+        FromTerm workingFromTerm = new FromTerm(qualifyingVariable, new VariableExpr(qualifyingVariable.getVar()), null,
+                fromGraphClause.getCorrelateClauses());
+        parentGraphSelect.setFromGraphClause(null);
+
+        // Introduce the variables from our assembly into our current SELECT-BLOCK.
+        List<AbstractClause> lowerNodeVariables = tailLowerNode.getProjectionList().stream().map(p -> {
+            FieldAccessor fieldAccessor = new FieldAccessor(qualifyingVariable, new Identifier(p.getName()));
+            String identifierName = SqlppVariableUtil.toInternalVariableName(p.getName());
+            VariableExpr variableExpr = new VariableExpr(new VarIdentifier(identifierName));
+            return new LetClause(variableExpr, fieldAccessor);
+        }).collect(Collectors.toList());
+        List<AbstractClause> newLetWhereList = new ArrayList<>();
+        newLetWhereList.addAll(lowerNodeVariables);
+        newLetWhereList.addAll(parentGraphSelect.getLetWhereList());
+        parentGraphSelect.getLetWhereList().clear();
+        parentGraphSelect.getLetWhereList().addAll(newLetWhereList);
+
+        // Qualify the graph element variables in our correlate clauses.
+        Supplier<AbstractGraphixQueryVisitor> qualifyingVisitorSupplier = () -> new AbstractGraphixQueryVisitor() {
+            private boolean isAtTopLevel = true;
+
+            @Override
+            public Expression visit(SelectExpression selectExpression, ILangExpression arg)
+                    throws CompilationException {
+                // Introduce our variables into the SELECT-EXPR inside a correlated clause.
+                List<LetClause> innerLowerNodeVariables = new ArrayList<>();
+                for (AbstractClause abstractClause : lowerNodeVariables) {
+                    innerLowerNodeVariables.add((LetClause) SqlppRewriteUtil.deepCopy(abstractClause));
+                }
+                List<LetClause> newLetClauseList = new ArrayList<>();
+                newLetClauseList.addAll(innerLowerNodeVariables);
+                newLetClauseList.addAll(selectExpression.getLetList());
+                selectExpression.getLetList().clear();
+                selectExpression.getLetList().addAll(newLetClauseList);
+
+                // Indicate that we should not qualify any of the variables in this SELECT.
+                boolean wasAtTopLevel = isAtTopLevel;
+                isAtTopLevel = false;
+                Expression resultOfVisit = super.visit(selectExpression, arg);
+                isAtTopLevel = wasAtTopLevel;
+                return resultOfVisit;
+            }
+
+            @Override
+            public Expression visit(VariableExpr variableExpr, ILangExpression arg) throws CompilationException {
+                String variableName = SqlppVariableUtil.toUserDefinedName(variableExpr.getVar().getValue());
+                if (isAtTopLevel
+                        && tailLowerNode.getProjectionList().stream().anyMatch(p -> p.getName().equals(variableName))) {
+                    return new FieldAccessor(qualifyingVariable, new Identifier(variableName));
+                }
+                return super.visit(variableExpr, arg);
+            }
+        };
+        for (AbstractBinaryCorrelateClause correlateClause : workingFromTerm.getCorrelateClauses()) {
+            AbstractGraphixQueryVisitor variableVisitor = qualifyingVisitorSupplier.get();
+            if (correlateClause.getClauseType() == Clause.ClauseType.JOIN_CLAUSE) {
+                // The expression bound to a JOIN clause cannot see the graph element variables of this FROM-GRAPH.
+                JoinClause joinClause = (JoinClause) correlateClause;
+                joinClause.setConditionExpression(joinClause.getConditionExpression().accept(variableVisitor, null));
+
+            } else if (correlateClause.getClauseType() == Clause.ClauseType.UNNEST_CLAUSE) {
+                UnnestClause unnestClause = (UnnestClause) correlateClause;
+                unnestClause.setRightExpression(unnestClause.getRightExpression().accept(variableVisitor, null));
+
+            } else { // (correlateClause.getClauseType() == Clause.ClauseType.NEST_CLAUSE) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, correlateClause.getSourceLocation(),
+                        "Nest clause has not been implemented.");
+            }
+        }
+
+        // Finalize our lowering: replace our FROM-GRAPH-CLAUSE with a FROM-CLAUSE and add our LET-CLAUSE list.
+        parentGraphSelect.setFromClause(new FromClause(Collections.singletonList(workingFromTerm)));
+        lowerSupplierNodeList.forEach(g -> selectExpression.getLetList().add(g.buildLetClause()));
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/IGraphixLangVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/IGraphixLangVisitor.java
index 2b41511..723d4a5 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/IGraphixLangVisitor.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/IGraphixLangVisitor.java
@@ -19,7 +19,13 @@
 package org.apache.asterix.graphix.lang.rewrites.visitor;
 
 import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.GraphSelectBlock;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
 import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
 import org.apache.asterix.graphix.lang.statement.CreateGraphStatement;
 import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
 import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
@@ -28,13 +34,25 @@
 public interface IGraphixLangVisitor<R, T> extends ILangVisitor<R, T> {
     R visit(GraphConstructor gc, T arg) throws CompilationException;
 
-    R visit(GraphConstructor.VertexElement ve, T arg) throws CompilationException;
+    R visit(GraphConstructor.VertexConstructor ve, T arg) throws CompilationException;
 
-    R visit(GraphConstructor.EdgeElement ee, T arg) throws CompilationException;
+    R visit(GraphConstructor.EdgeConstructor ee, T arg) throws CompilationException;
 
     R visit(CreateGraphStatement cgs, T arg) throws CompilationException;
 
     R visit(GraphElementDecl gel, T arg) throws CompilationException;
 
     R visit(GraphDropStatement gds, T arg) throws CompilationException;
+
+    R visit(GraphSelectBlock gsb, T arg) throws CompilationException;
+
+    R visit(FromGraphClause fgc, T arg) throws CompilationException;
+
+    R visit(MatchClause mc, T arg) throws CompilationException;
+
+    R visit(EdgePatternExpr epe, T arg) throws CompilationException;
+
+    R visit(PathPatternExpr ppe, T arg) throws CompilationException;
+
+    R visit(VertexPatternExpr vpe, T arg) throws CompilationException;
 }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/LabelConsistencyVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/LabelConsistencyVisitor.java
new file mode 100644
index 0000000..1b8bd4b
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/LabelConsistencyVisitor.java
@@ -0,0 +1,49 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.resolve.QueryKnowledgeTable;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.struct.Identifier;
+
+/**
+ * Unify the labels across vertices of the same variable name.
+ *
+ * @see org.apache.asterix.graphix.lang.rewrites.resolve.InferenceBasedResolver
+ */
+public class LabelConsistencyVisitor extends AbstractGraphixQueryVisitor {
+    private final QueryKnowledgeTable queryKnowledgeTable;
+
+    public LabelConsistencyVisitor(QueryKnowledgeTable queryKnowledgeTable) {
+        this.queryKnowledgeTable = queryKnowledgeTable;
+    }
+
+    @Override
+    public Expression visit(VertexPatternExpr vertexPatternExpr, ILangExpression arg) {
+        if (vertexPatternExpr.getLabels().isEmpty()) {
+            Identifier vertexIdentifier = vertexPatternExpr.getVariableExpr().getVar();
+            if (queryKnowledgeTable.containsKey(vertexIdentifier)) {
+                vertexPatternExpr.getLabels().addAll(queryKnowledgeTable.get(vertexIdentifier));
+            }
+        }
+        return vertexPatternExpr;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/PostRewriteCheckVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/PostRewriteCheckVisitor.java
new file mode 100644
index 0000000..c184cb5
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/PostRewriteCheckVisitor.java
@@ -0,0 +1,156 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.GraphSelectBlock;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.statement.CreateGraphStatement;
+import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.clause.LetClause;
+import org.apache.asterix.lang.sqlpp.clause.FromTerm;
+import org.apache.asterix.lang.sqlpp.clause.JoinClause;
+import org.apache.asterix.lang.sqlpp.clause.NestClause;
+import org.apache.asterix.lang.sqlpp.clause.UnnestClause;
+import org.apache.asterix.lang.sqlpp.expression.WindowExpression;
+import org.apache.asterix.lang.sqlpp.visitor.base.AbstractSqlppSimpleExpressionVisitor;
+
+/**
+ * Throw an error if a graph AST node (that isn't a special instance of {@link FromGraphClause}) is ever encountered.
+ */
+public class PostRewriteCheckVisitor extends AbstractSqlppSimpleExpressionVisitor
+        implements IGraphixLangVisitor<Expression, ILangExpression> {
+    @Override
+    public Expression visit(GraphConstructor gc, ILangExpression arg) throws CompilationException {
+        return throwException(gc);
+    }
+
+    @Override
+    public Expression visit(GraphConstructor.VertexConstructor ve, ILangExpression arg) throws CompilationException {
+        return throwException(ve);
+    }
+
+    @Override
+    public Expression visit(GraphConstructor.EdgeConstructor ee, ILangExpression arg) throws CompilationException {
+        return throwException(ee);
+    }
+
+    @Override
+    public Expression visit(CreateGraphStatement cgs, ILangExpression arg) throws CompilationException {
+        return throwException(cgs);
+    }
+
+    @Override
+    public Expression visit(GraphElementDecl gel, ILangExpression arg) throws CompilationException {
+        return throwException(gel);
+    }
+
+    @Override
+    public Expression visit(GraphDropStatement gds, ILangExpression arg) throws CompilationException {
+        return throwException(gds);
+    }
+
+    @Override
+    public Expression visit(GraphSelectBlock gsb, ILangExpression arg) throws CompilationException {
+        // The only Graph AST node that should survive is the GRAPH-SELECT-BLOCK, which should functionally act the same
+        // as its parent class SELECT-BLOCK.
+        if (!gsb.hasFromClause() || gsb.hasFromGraphClause()) {
+            return throwException(gsb);
+
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fgc, ILangExpression arg) throws CompilationException {
+        return throwException(fgc);
+    }
+
+    @Override
+    public Expression visit(MatchClause mc, ILangExpression arg) throws CompilationException {
+        return throwException(mc);
+    }
+
+    @Override
+    public Expression visit(EdgePatternExpr epe, ILangExpression arg) throws CompilationException {
+        return throwException(epe);
+    }
+
+    @Override
+    public Expression visit(PathPatternExpr ppe, ILangExpression arg) throws CompilationException {
+        return throwException(ppe);
+    }
+
+    @Override
+    public Expression visit(VertexPatternExpr vpe, ILangExpression arg) throws CompilationException {
+        return throwException(vpe);
+    }
+
+    // There are a few expressions that skip some sub-expressions that we need to visit...
+    @Override
+    public Expression visit(FromTerm ft, ILangExpression arg) throws CompilationException {
+        ft.getLeftVariable().accept(this, arg);
+        return super.visit(ft, arg);
+    }
+
+    @Override
+    public Expression visit(JoinClause jc, ILangExpression arg) throws CompilationException {
+        jc.getRightVariable().accept(this, arg);
+        return super.visit(jc, arg);
+    }
+
+    @Override
+    public Expression visit(NestClause nc, ILangExpression arg) throws CompilationException {
+        nc.getRightVariable().accept(this, arg);
+        return super.visit(nc, arg);
+    }
+
+    @Override
+    public Expression visit(UnnestClause uc, ILangExpression arg) throws CompilationException {
+        uc.getRightVariable().accept(this, arg);
+        return super.visit(uc, arg);
+    }
+
+    @Override
+    public Expression visit(LetClause lc, ILangExpression arg) throws CompilationException {
+        lc.getVarExpr().accept(this, arg);
+        return super.visit(lc, arg);
+    }
+
+    @Override
+    public Expression visit(WindowExpression we, ILangExpression arg) throws CompilationException {
+        we.getWindowVar().accept(this, arg);
+        return super.visit(we, arg);
+    }
+
+    private Expression throwException(ILangExpression e) throws CompilationException {
+        throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, e.getSourceLocation(),
+                e.getClass().getName() + " was encountered. Check has failed.");
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/PreRewriteCheckVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/PreRewriteCheckVisitor.java
new file mode 100644
index 0000000..0033fee
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/PreRewriteCheckVisitor.java
@@ -0,0 +1,239 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.graphix.metadata.entity.schema.Schema;
+import org.apache.asterix.graphix.metadata.entity.schema.Vertex;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+import org.apache.asterix.metadata.declared.MetadataProvider;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+
+/**
+ * A pre-rewrite pass to validate our user query. We validate the following:
+ * 1. An edge variable is not defined more than once. (e.g. (u)-[e]-(v), (w)-[e]-(y))
+ * 2. A vertex variable is not defined more than once with labels. (e.g. (u:User)-[e]-(v), (u:User)-[]-(:Review))
+ * 3. An edge label exists in the context of the edge's {@link FromGraphClause}.
+ * 4. A vertex label exists in the context of the vertex's {@link FromGraphClause}.
+ * 5. The minimum hops and maximum hops of a sub-path is not equal to zero.
+ * 6. The maximum hops of a sub-path is greater than or equal to the minimum hops of the same sub-path.
+ * 7. An anonymous graph passes the same validation that a named graph does.
+ */
+public class PreRewriteCheckVisitor extends AbstractGraphixQueryVisitor {
+    private final MetadataProvider metadataProvider;
+
+    // Build new environments on each FROM-GRAPH-CLAUSE visit.
+    private static class PreRewriteCheckEnvironment {
+        private final Set<ElementLabel> vertexLabels = new HashSet<>();
+        private final Set<ElementLabel> edgeLabels = new HashSet<>();
+        private final Set<Identifier> vertexVariablesWithLabels = new HashSet<>();
+        private final Set<Identifier> edgeVariables = new HashSet<>();
+    }
+
+    private final Map<ILangExpression, PreRewriteCheckEnvironment> environmentMap = new HashMap<>();
+
+    public PreRewriteCheckVisitor(LangRewritingContext langRewritingContext) {
+        this.metadataProvider = langRewritingContext.getMetadataProvider();
+    }
+
+    @Override
+    public Expression visit(GraphConstructor graphConstructor, ILangExpression arg) throws CompilationException {
+        DataverseName dataverseName = metadataProvider.getDefaultDataverseName();
+        GraphIdentifier graphIdentifier = new GraphIdentifier(dataverseName, graphConstructor.getInstanceID());
+        Schema.Builder schemaBuilder = new Schema.Builder(graphIdentifier);
+
+        // Perform the same validation we do for named graphs-- but don't build the schema object.
+        for (GraphConstructor.VertexConstructor vertex : graphConstructor.getVertexElements()) {
+            schemaBuilder.addVertex(vertex.getLabel(), vertex.getPrimaryKeyFields(), vertex.getDefinition());
+            if (schemaBuilder.getLastError() == Schema.Builder.Error.CONFLICTING_PRIMARY_KEY) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, vertex.getSourceLocation(),
+                        "Conflicting primary keys for vertices with label " + vertex.getLabel());
+
+            } else if (schemaBuilder.getLastError() != Schema.Builder.Error.NO_ERROR) {
+                throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, vertex.getSourceLocation(),
+                        "Constructor vertex was not returned, but the error is not a conflicting primary key!");
+            }
+        }
+        for (GraphConstructor.EdgeConstructor edge : graphConstructor.getEdgeElements()) {
+            schemaBuilder.addEdge(edge.getEdgeLabel(), edge.getDestinationLabel(), edge.getSourceLabel(),
+                    edge.getDestinationKeyFields(), edge.getSourceKeyFields(), edge.getDefinition());
+            switch (schemaBuilder.getLastError()) {
+                case NO_ERROR:
+                    continue;
+
+                case SOURCE_VERTEX_NOT_FOUND:
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, edge.getSourceLocation(),
+                            "Source vertex " + edge.getSourceLabel() + " not found in the edge " + edge.getEdgeLabel()
+                                    + ".");
+
+                case DESTINATION_VERTEX_NOT_FOUND:
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, edge.getSourceLocation(),
+                            "Destination vertex " + edge.getDestinationLabel() + " not found in the edge "
+                                    + edge.getEdgeLabel() + ".");
+
+                case CONFLICTING_SOURCE_KEY:
+                case CONFLICTING_DESTINATION_KEY:
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, edge.getSourceLocation(),
+                            "Conflicting edge with the same label found: " + edge.getEdgeLabel());
+
+                default:
+                    throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, edge.getSourceLocation(),
+                            "Edge constructor was not returned, and an unexpected error encountered");
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fromGraphClause, ILangExpression arg) throws CompilationException {
+        environmentMap.put(fromGraphClause, new PreRewriteCheckEnvironment());
+
+        // Establish the vertex and edge labels associated with this FROM-GRAPH-CLAUSE.
+        if (fromGraphClause.getGraphConstructor() == null) {
+            DataverseName dataverseName = (fromGraphClause.getDataverseName() == null)
+                    ? metadataProvider.getDefaultDataverseName() : fromGraphClause.getDataverseName();
+            Identifier graphName = fromGraphClause.getGraphName();
+
+            // Fetch the graph from our metadata.
+            try {
+                Graph graphFromMetadata = GraphixMetadataExtension.getGraph(metadataProvider.getMetadataTxnContext(),
+                        dataverseName, graphName.getValue());
+                if (graphFromMetadata == null) {
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, fromGraphClause.getSourceLocation(),
+                            "Graph " + graphName.getValue() + " does not exist.");
+
+                } else {
+                    graphFromMetadata.getGraphSchema().getVertices().stream().map(Vertex::getLabel)
+                            .forEach(environmentMap.get(fromGraphClause).vertexLabels::add);
+                    graphFromMetadata.getGraphSchema().getEdges().forEach(e -> {
+                        environmentMap.get(fromGraphClause).vertexLabels.add(e.getSourceLabel());
+                        environmentMap.get(fromGraphClause).vertexLabels.add(e.getDestinationLabel());
+                        environmentMap.get(fromGraphClause).edgeLabels.add(e.getLabel());
+                    });
+                }
+
+            } catch (AlgebricksException e) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fromGraphClause.getSourceLocation(),
+                        "Graph " + graphName.getValue() + " does not exist.");
+            }
+
+        } else {
+            fromGraphClause.getGraphConstructor().getVertexElements().stream()
+                    .map(GraphConstructor.VertexConstructor::getLabel)
+                    .forEach(environmentMap.get(fromGraphClause).vertexLabels::add);
+            fromGraphClause.getGraphConstructor().getEdgeElements().forEach(e -> {
+                environmentMap.get(fromGraphClause).vertexLabels.add(e.getSourceLabel());
+                environmentMap.get(fromGraphClause).vertexLabels.add(e.getDestinationLabel());
+                environmentMap.get(fromGraphClause).edgeLabels.add(e.getEdgeLabel());
+            });
+        }
+
+        // We need to pass our FROM-GRAPH-CLAUSE to our MATCH-CLAUSE.
+        if (fromGraphClause.getGraphConstructor() != null) {
+            fromGraphClause.getGraphConstructor().accept(this, arg);
+        }
+        for (MatchClause matchClause : fromGraphClause.getMatchClauses()) {
+            matchClause.accept(this, fromGraphClause);
+        }
+        for (AbstractBinaryCorrelateClause correlateClause : fromGraphClause.getCorrelateClauses()) {
+            correlateClause.accept(this, arg);
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(VertexPatternExpr vertexExpression, ILangExpression arg) throws CompilationException {
+        for (ElementLabel vertexLabel : vertexExpression.getLabels()) {
+            if (!environmentMap.get(arg).vertexLabels.contains(vertexLabel)) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, vertexExpression.getSourceLocation(),
+                        "Vertex label " + vertexLabel + " does not exist in the given graph schema.");
+            }
+        }
+        if (vertexExpression.getVariableExpr() != null && !vertexExpression.getLabels().isEmpty()) {
+            Identifier vertexIdentifier = vertexExpression.getVariableExpr().getVar();
+            if (environmentMap.get(arg).vertexVariablesWithLabels.contains(vertexIdentifier)) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, vertexExpression.getSourceLocation(),
+                        "Vertex " + vertexIdentifier + " defined with a label more than once. Labels can only be "
+                                + "bound to vertices once.");
+            }
+            environmentMap.get(arg).vertexVariablesWithLabels.add(vertexIdentifier);
+        }
+        return vertexExpression;
+    }
+
+    @Override
+    public Expression visit(EdgePatternExpr edgeExpression, ILangExpression arg) throws CompilationException {
+        EdgeDescriptor edgeDescriptor = edgeExpression.getEdgeDescriptor();
+        if (environmentMap.get(arg).edgeLabels.isEmpty()) {
+            throw new CompilationException(ErrorCode.COMPILATION_ERROR, edgeExpression.getSourceLocation(),
+                    "Query edge given, but no edge is defined in the schema.");
+        }
+
+        for (ElementLabel edgeLabel : edgeDescriptor.getEdgeLabels()) {
+            if (!environmentMap.get(arg).edgeLabels.contains(edgeLabel)) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, edgeExpression.getSourceLocation(),
+                        "Edge label " + edgeLabel + " does not exist in the given graph schema.");
+            }
+        }
+        if (edgeDescriptor.getVariableExpr() != null) {
+            Identifier edgeIdentifier = edgeDescriptor.getVariableExpr().getVar();
+            if (environmentMap.get(arg).edgeVariables.contains(edgeIdentifier)) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, edgeExpression.getSourceLocation(),
+                        "Edge " + edgeIdentifier + " defined more than once. Edges can only connect two vertices.");
+            }
+            environmentMap.get(arg).edgeVariables.add(edgeIdentifier);
+        }
+        if (edgeDescriptor.getEdgeClass() == IGraphExpr.GraphExprKind.PATH_PATTERN) {
+            Integer minimumHops = edgeDescriptor.getMinimumHops();
+            Integer maximumHops = edgeDescriptor.getMaximumHops();
+            if (maximumHops == 0 || (minimumHops != null && minimumHops == 0)) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, edgeExpression.getSourceLocation(),
+                        "Sub-path edges cannot have a hop length less than 1.");
+
+            } else if (minimumHops != null && (maximumHops < minimumHops)) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, edgeExpression.getSourceLocation(),
+                        "Sub-path edges cannot have a maximum hop length (" + maximumHops
+                                + ") less than the minimum hop length (" + minimumHops + ").");
+            }
+        }
+        return edgeExpression;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/QueryKnowledgeVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/QueryKnowledgeVisitor.java
new file mode 100644
index 0000000..d56419b
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/QueryKnowledgeVisitor.java
@@ -0,0 +1,41 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.rewrites.resolve.QueryKnowledgeTable;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+
+/**
+ * @see QueryKnowledgeTable
+ */
+public class QueryKnowledgeVisitor extends AbstractGraphixQueryVisitor {
+    private final QueryKnowledgeTable queryKnowledgeTable = new QueryKnowledgeTable();
+
+    @Override
+    public Expression visit(VertexPatternExpr vertexPatternExpr, ILangExpression arg) {
+        queryKnowledgeTable.put(vertexPatternExpr);
+        return vertexPatternExpr;
+    }
+
+    public QueryKnowledgeTable getQueryKnowledgeTable() {
+        return queryKnowledgeTable;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ScopingCheckVisitor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ScopingCheckVisitor.java
new file mode 100644
index 0000000..24b8625
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/rewrites/visitor/ScopingCheckVisitor.java
@@ -0,0 +1,241 @@
+/*
+ * 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.asterix.graphix.lang.rewrites.visitor;
+
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.Set;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.GraphSelectBlock;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
+import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.statement.CreateGraphStatement;
+import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
+import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.lang.common.base.AbstractClause;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.sqlpp.clause.AbstractBinaryCorrelateClause;
+import org.apache.asterix.lang.sqlpp.clause.Projection;
+import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+import org.apache.asterix.lang.sqlpp.clause.SelectClause;
+import org.apache.asterix.lang.sqlpp.clause.SelectRegular;
+import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
+import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
+import org.apache.asterix.lang.sqlpp.visitor.base.AbstractSqlppExpressionScopingVisitor;
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.commons.lang3.mutable.MutableObject;
+
+/**
+ * Ensure that any subtree whose immediate parent node includes a {@link FromGraphClause} follow Graphix-specific
+ * variable resolution rules (i.e. do not rely on context variables).
+ * - {@link PathPatternExpr} may introduce a variable. Uniqueness is enforced here.
+ * - {@link EdgePatternExpr} may introduce a variable. Uniqueness is enforced w/ {@link PreRewriteCheckVisitor}.
+ * - {@link VertexPatternExpr} may introduce a variable. Uniqueness is not required.
+ * - {@link org.apache.asterix.lang.sqlpp.clause.JoinClause} may introduce a variable (handled in parent).
+ * - {@link org.apache.asterix.lang.sqlpp.clause.NestClause} may introduce a variable (handled in parent).
+ * - {@link org.apache.asterix.lang.sqlpp.clause.UnnestClause} may introduce a variable (handled in parent).
+ * - {@link org.apache.asterix.lang.common.clause.GroupbyClause} may introduce a variable (handled in parent).
+ * - {@link org.apache.asterix.lang.common.clause.LetClause} may introduce a variable (handled in parent).
+ */
+public class ScopingCheckVisitor extends AbstractSqlppExpressionScopingVisitor
+        implements IGraphixLangVisitor<Expression, ILangExpression> {
+    private final Deque<Mutable<Boolean>> graphixVisitStack = new ArrayDeque<>();
+
+    public ScopingCheckVisitor(LangRewritingContext context) {
+        super(context);
+
+        // We start with an element of false in our stack.
+        graphixVisitStack.addLast(new MutableObject<>(false));
+    }
+
+    @Override
+    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws CompilationException {
+        graphixVisitStack.addLast(new MutableObject<>(false));
+        super.visit(selectExpression, arg);
+        graphixVisitStack.removeLast();
+        return selectExpression;
+    }
+
+    @Override
+    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
+        return (selectBlock instanceof GraphSelectBlock) ? this.visit((GraphSelectBlock) selectBlock, arg)
+                : super.visit(selectBlock, arg);
+    }
+
+    @Override
+    public Expression visit(GraphSelectBlock graphSelectBlock, ILangExpression arg) throws CompilationException {
+        graphixVisitStack.getLast().setValue(true);
+        if (graphSelectBlock.hasFromGraphClause()) {
+            graphSelectBlock.getFromGraphClause().accept(this, arg);
+
+        } else if (graphSelectBlock.hasFromClause()) {
+            graphSelectBlock.getFromClause().accept(this, arg);
+        }
+        if (graphSelectBlock.hasLetWhereClauses()) {
+            for (AbstractClause clause : graphSelectBlock.getLetWhereList()) {
+                clause.accept(this, arg);
+            }
+        }
+        if (graphSelectBlock.hasGroupbyClause()) {
+            graphSelectBlock.getGroupbyClause().accept(this, arg);
+        }
+        if (graphSelectBlock.hasLetHavingClausesAfterGroupby()) {
+            for (AbstractClause clause : graphSelectBlock.getLetHavingListAfterGroupby()) {
+                clause.accept(this, arg);
+            }
+        }
+        graphSelectBlock.getSelectClause().accept(this, arg);
+        return null;
+    }
+
+    @Override
+    public Expression visit(FromGraphClause fromGraphClause, ILangExpression arg) throws CompilationException {
+        // We are now working with a new scope.
+        scopeChecker.createNewScope();
+        for (MatchClause matchClause : fromGraphClause.getMatchClauses()) {
+            matchClause.accept(this, arg);
+        }
+        for (AbstractBinaryCorrelateClause correlateClause : fromGraphClause.getCorrelateClauses()) {
+            correlateClause.accept(this, arg);
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(MatchClause matchClause, ILangExpression arg) throws CompilationException {
+        for (PathPatternExpr pathPatternExpr : matchClause.getPathExpressions()) {
+            pathPatternExpr.accept(this, arg);
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(PathPatternExpr pathPatternExpr, ILangExpression arg) throws CompilationException {
+        // Visit our vertices first, then our edges.
+        for (VertexPatternExpr vertexExpression : pathPatternExpr.getVertexExpressions()) {
+            vertexExpression.accept(this, arg);
+        }
+        for (EdgePatternExpr edgeExpression : pathPatternExpr.getEdgeExpressions()) {
+            edgeExpression.accept(this, arg);
+        }
+
+        // Ensure that we don't have a duplicate alias here.
+        VariableExpr pathVariable = pathPatternExpr.getVariableExpr();
+        if (pathVariable != null) {
+            String pathVariableValue = pathVariable.getVar().getValue();
+            if (scopeChecker.getCurrentScope().findLocalSymbol(pathVariableValue) != null) {
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, pathVariable.getSourceLocation(),
+                        "Duplicate alias definitions: " + SqlppVariableUtil.toUserDefinedName(pathVariableValue));
+            }
+            scopeChecker.getCurrentScope().addNewVarSymbolToScope(pathVariable.getVar());
+        }
+        return pathPatternExpr;
+    }
+
+    @Override
+    public Expression visit(EdgePatternExpr edgePatternExpr, ILangExpression arg) throws CompilationException {
+        // We do not visit any **terminal** vertices here.
+        EdgeDescriptor edgeDescriptor = edgePatternExpr.getEdgeDescriptor();
+        if (edgeDescriptor.getVariableExpr() != null) {
+            scopeChecker.getCurrentScope().addNewVarSymbolToScope(edgeDescriptor.getVariableExpr().getVar());
+        }
+        return edgePatternExpr;
+    }
+
+    @Override
+    public Expression visit(VertexPatternExpr vertexPatternExpr, ILangExpression arg) throws CompilationException {
+        if (vertexPatternExpr.getVariableExpr() != null) {
+            scopeChecker.getCurrentScope().addNewVarSymbolToScope(vertexPatternExpr.getVariableExpr().getVar());
+        }
+        return vertexPatternExpr;
+    }
+
+    // We aren't going to inline our column aliases (yet), so add our select variables to our scope.
+    @Override
+    public Expression visit(SelectClause selectClause, ILangExpression arg) throws CompilationException {
+        super.visit(selectClause, arg);
+        if (selectClause.selectRegular()) {
+            SelectRegular selectRegular = selectClause.getSelectRegular();
+            for (Projection projection : selectRegular.getProjections()) {
+                String variableName = SqlppVariableUtil.toInternalVariableName(projection.getName());
+                scopeChecker.getCurrentScope().addSymbolToScope(new Identifier(variableName), Set.of());
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public Expression visit(VariableExpr varExpr, ILangExpression arg) throws CompilationException {
+        boolean hasVisitedGraphixNode = !graphixVisitStack.isEmpty() && graphixVisitStack.getLast().getValue();
+        String varSymbol = varExpr.getVar().getValue();
+
+        // We will only throw an unresolved error if we first encounter a Graphix AST node.
+        if (hasVisitedGraphixNode && scopeChecker.getCurrentScope().findSymbol(varSymbol) == null) {
+            throw new CompilationException(ErrorCode.UNDEFINED_IDENTIFIER, varExpr.getSourceLocation(),
+                    SqlppVariableUtil.toUserDefinedVariableName(varSymbol).getValue());
+        }
+        return varExpr;
+    }
+
+    // We leave the scoping of our GRAPH-CONSTRUCTOR bodies to our body rewriter.
+    @Override
+    public Expression visit(GraphConstructor graphConstructor, ILangExpression arg) throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Expression visit(GraphConstructor.VertexConstructor vertexConstructor, ILangExpression arg)
+            throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Expression visit(GraphConstructor.EdgeConstructor edgeConstructor, ILangExpression arg)
+            throws CompilationException {
+        return null;
+    }
+
+    // The following should not appear in queries.
+    @Override
+    public Expression visit(CreateGraphStatement createGraphStatement, ILangExpression arg)
+            throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Expression visit(GraphElementDecl graphElementDecl, ILangExpression arg) throws CompilationException {
+        return null;
+    }
+
+    @Override
+    public Expression visit(GraphDropStatement graphDropStatement, ILangExpression arg) throws CompilationException {
+        return null;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/CreateGraphStatement.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/CreateGraphStatement.java
index 866e2f2..730db34 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/CreateGraphStatement.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/CreateGraphStatement.java
@@ -19,6 +19,7 @@
 package org.apache.asterix.graphix.lang.statement;
 
 import java.util.List;
+import java.util.Objects;
 
 import org.apache.asterix.algebra.extension.ExtensionStatement;
 import org.apache.asterix.app.translator.QueryTranslator;
@@ -34,6 +35,13 @@
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
+/**
+ * Statement for storing a {@link GraphConstructor} instance in our metadata.
+ * - A CREATE GRAPH statement MUST always include a graph name.
+ * - We can specify "CREATE OR REPLACE" to perform an upsert of our graph.
+ * - We can specify "CREATE ... IF NOT EXISTS" to insert the graph if it doesn't exist, and not raise an error if the
+ * graph already exists.
+ */
 public class CreateGraphStatement extends ExtensionStatement {
     private final GraphConstructor graphConstructor;
     private final DataverseName dataverseName;
@@ -44,7 +52,7 @@
     public CreateGraphStatement(DataverseName dataverseName, String graphName, boolean replaceIfExists,
             boolean ifNotExists, GraphConstructor graphConstructor) {
         this.dataverseName = dataverseName;
-        this.graphName = graphName;
+        this.graphName = Objects.requireNonNull(graphName);
         this.replaceIfExists = replaceIfExists;
         this.ifNotExists = ifNotExists;
         this.graphConstructor = graphConstructor;
@@ -66,11 +74,11 @@
         return ifNotExists;
     }
 
-    public List<GraphConstructor.VertexElement> getVertexElements() {
+    public List<GraphConstructor.VertexConstructor> getVertexElements() {
         return graphConstructor.getVertexElements();
     }
 
-    public List<GraphConstructor.EdgeElement> getEdgeElements() {
+    public List<GraphConstructor.EdgeConstructor> getEdgeElements() {
         return graphConstructor.getEdgeElements();
     }
 
@@ -94,7 +102,7 @@
             IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId) throws Exception {
         metadataProvider.validateDatabaseObjectName(dataverseName, graphName, this.getSourceLocation());
         DataverseName activeDataverseName = statementExecutor.getActiveDataverseName(this.dataverseName);
-        GraphStatementHandlingUtil.acquireGraphWriteLocks(metadataProvider, activeDataverseName, graphName);
+        GraphStatementHandlingUtil.acquireGraphExtensionWriteLocks(metadataProvider, activeDataverseName, graphName);
         try {
             GraphStatementHandlingUtil.handleCreateGraph(this, metadataProvider, statementExecutor,
                     activeDataverseName);
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphDropStatement.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphDropStatement.java
index e9e8255..9aadb97 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphDropStatement.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphDropStatement.java
@@ -18,6 +18,8 @@
  */
 package org.apache.asterix.graphix.lang.statement;
 
+import java.util.Objects;
+
 import org.apache.asterix.algebra.extension.ExtensionStatement;
 import org.apache.asterix.app.translator.QueryTranslator;
 import org.apache.asterix.common.exceptions.CompilationException;
@@ -31,6 +33,13 @@
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
+/**
+ * Statement for removing a {@link org.apache.asterix.graphix.lang.expression.GraphConstructor} instance from our
+ * metadata.
+ * - A DROP GRAPH statement MUST always include a graph name.
+ * - We can specify "DROP ... IF EXISTS" to drop the graph if it exists, and not raise an error if the graph doesn't
+ * exist.
+ */
 public class GraphDropStatement extends ExtensionStatement {
     private final DataverseName dataverseName;
     private final String graphName;
@@ -38,7 +47,7 @@
 
     public GraphDropStatement(DataverseName dataverseName, String graphName, boolean ifExists) {
         this.dataverseName = dataverseName;
-        this.graphName = graphName;
+        this.graphName = Objects.requireNonNull(graphName);
         this.ifExists = ifExists;
     }
 
@@ -74,9 +83,8 @@
             IRequestParameters requestParameters, MetadataProvider metadataProvider, int resultSetId) throws Exception {
         metadataProvider.validateDatabaseObjectName(dataverseName, graphName, this.getSourceLocation());
         DataverseName activeDataverseName = statementExecutor.getActiveDataverseName(this.dataverseName);
-        GraphStatementHandlingUtil.acquireGraphWriteLocks(metadataProvider, activeDataverseName, graphName);
+        GraphStatementHandlingUtil.acquireGraphExtensionWriteLocks(metadataProvider, activeDataverseName, graphName);
         try {
-            // TODO (GLENN): Determine how to handle functions and views that depend on graphs.
             GraphStatementHandlingUtil.handleGraphDrop(this, metadataProvider, activeDataverseName);
 
         } catch (Exception e) {
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphElementDecl.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphElementDecl.java
index c5e87de..5146de1 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphElementDecl.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/statement/GraphElementDecl.java
@@ -35,6 +35,14 @@
 import org.apache.asterix.translator.IStatementExecutor;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 
+/**
+ * A declaration for a single graph element (vertex or edge), which cannot be explicitly specified by the user.
+ * - This is analogous to {@link org.apache.asterix.lang.common.statement.ViewDecl} for views and
+ * {@link org.apache.asterix.lang.common.statement.FunctionDecl} for functions, in that we use this class to store the
+ * directly parsed AST and a normalized AST for the bodies themselves.
+ * - Unlike views and functions, a single graph element may have more than one body. Graph element declarations start
+ * off with one body, and it is up to the caller to manage multiple bodies.
+ */
 public final class GraphElementDecl extends ExtensionStatement {
     private final GraphElementIdentifier identifier;
     private final List<Expression> bodies = new ArrayList<>();
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/struct/EdgeDescriptor.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/struct/EdgeDescriptor.java
new file mode 100644
index 0000000..2fbf258
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/struct/EdgeDescriptor.java
@@ -0,0 +1,121 @@
+/*
+ * 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.asterix.graphix.lang.struct;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+
+/**
+ * Descriptor for a query edge instance. A query edge has the following:
+ * 1. A set of edge labels.
+ * 2. A variable associated with the query edge.
+ * 3. An edge class. An edge can either be a pure edge, or a sub-path.
+ * 4. A minimum number of hops (allowed to be NULL, indicating a minimum of 1 hop).
+ * 5. A maximum number of hops (not allowed to be NULL).
+ * 6. An edge type, which denotes the direction (left to right, right to left, or undirected).
+ */
+public class EdgeDescriptor {
+    private final IGraphExpr.GraphExprKind edgeClass;
+    private final Set<ElementLabel> edgeLabels;
+    private final Integer minimumHops;
+    private final Integer maximumHops;
+
+    // We must be able to assign variables to our edges, as well as change the direction of UNDIRECTED edges.
+    private VariableExpr variableExpr;
+    private EdgeType edgeType;
+
+    public EdgeDescriptor(EdgeType edgeType, IGraphExpr.GraphExprKind edgeClass, Set<ElementLabel> edgeLabels,
+            VariableExpr variableExpr, Integer minimumHops, Integer maximumHops) {
+        this.edgeType = edgeType;
+        this.edgeLabels = edgeLabels;
+        this.minimumHops = minimumHops;
+        this.maximumHops = maximumHops;
+        this.edgeClass = edgeClass;
+        this.variableExpr = variableExpr;
+
+        // We enforce that an edge can take two forms: as a sub-path, and as a pure "edge".
+        switch (edgeClass) {
+            case GRAPH_CONSTRUCTOR:
+            case GRAPH_ELEMENT_BODY:
+            case VERTEX_PATTERN:
+                throw new IllegalArgumentException(
+                        "Illegal class of edge specified! An edge can only be a PATH or an EDGE.");
+        }
+    }
+
+    public EdgeType getEdgeType() {
+        return edgeType;
+    }
+
+    public void setEdgeType(EdgeType edgeType) {
+        this.edgeType = edgeType;
+    }
+
+    public Set<ElementLabel> getEdgeLabels() {
+        return edgeLabels;
+    }
+
+    public Integer getMinimumHops() {
+        return minimumHops;
+    }
+
+    public Integer getMaximumHops() {
+        return maximumHops;
+    }
+
+    public IGraphExpr.GraphExprKind getEdgeClass() {
+        return edgeClass;
+    }
+
+    public VariableExpr getVariableExpr() {
+        return variableExpr;
+    }
+
+    public void setVariableExpr(VariableExpr variableExpr) {
+        this.variableExpr = variableExpr;
+    }
+
+    public List<GraphElementIdentifier> generateIdentifiers(GraphIdentifier graphIdentifier) {
+        return edgeLabels.stream()
+                .map(e -> new GraphElementIdentifier(graphIdentifier, GraphElementIdentifier.Kind.EDGE, e))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public String toString() {
+        String labelsString = edgeLabels.stream().map(ElementLabel::toString).collect(Collectors.joining("|"));
+        String variableString = (variableExpr != null) ? variableExpr.getVar().toString() : "";
+        String subPathString = (edgeClass != IGraphExpr.GraphExprKind.PATH_PATTERN) ? ""
+                : "{" + ((minimumHops == null) ? "" : minimumHops) + "," + maximumHops + "}";
+        return String.format("%s-[%s:(%s)%s]-%s", (edgeType == EdgeType.LEFT_TO_RIGHT) ? "" : "<", variableString,
+                labelsString, subPathString, (edgeType == EdgeType.RIGHT_TO_LEFT) ? "" : ">");
+    }
+
+    public enum EdgeType {
+        LEFT_TO_RIGHT,
+        RIGHT_TO_LEFT,
+        UNDIRECTED
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/struct/ElementLabel.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/struct/ElementLabel.java
new file mode 100644
index 0000000..9add17a
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/struct/ElementLabel.java
@@ -0,0 +1,69 @@
+/*
+ * 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.asterix.graphix.lang.struct;
+
+import java.util.Objects;
+
+public class ElementLabel {
+    private final String labelName;
+    private boolean isInferred;
+
+    public ElementLabel(String labelName) {
+        this(labelName, false);
+    }
+
+    private ElementLabel(String labelName, boolean isInferred) {
+        this.labelName = Objects.requireNonNull(labelName);
+        this.isInferred = isInferred;
+    }
+
+    public ElementLabel asInferred() {
+        return new ElementLabel(labelName, true);
+    }
+
+    public void markInferred(boolean isInferred) {
+        this.isInferred = isInferred;
+    }
+
+    public boolean isInferred() {
+        return isInferred;
+    }
+
+    @Override
+    public String toString() {
+        return labelName;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(labelName);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o instanceof ElementLabel) {
+            ElementLabel that = (ElementLabel) o;
+            return this.labelName.equals(that.labelName);
+        }
+        return false;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/util/GraphStatementHandlingUtil.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/util/GraphStatementHandlingUtil.java
index 1d7d0da..9678ed8 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/util/GraphStatementHandlingUtil.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/lang/util/GraphStatementHandlingUtil.java
@@ -19,8 +19,11 @@
 package org.apache.asterix.graphix.lang.util;
 
 import java.rmi.RemoteException;
+import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
 
 import org.apache.asterix.common.api.IMetadataLockManager;
 import org.apache.asterix.common.exceptions.CompilationException;
@@ -30,14 +33,22 @@
 import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
 import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
 import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
 import org.apache.asterix.graphix.lang.expression.GraphConstructor;
 import org.apache.asterix.graphix.lang.rewrites.GraphixQueryRewriter;
+import org.apache.asterix.graphix.lang.rewrites.visitor.AbstractGraphixQueryVisitor;
 import org.apache.asterix.graphix.lang.statement.CreateGraphStatement;
 import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
 import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
-import org.apache.asterix.graphix.metadata.entities.Graph;
-import org.apache.asterix.graphix.metadata.entities.GraphDependencies;
+import org.apache.asterix.graphix.metadata.entity.dependency.DependencyIdentifier;
+import org.apache.asterix.graphix.metadata.entity.dependency.GraphRequirements;
+import org.apache.asterix.graphix.metadata.entity.dependency.IEntityRequirements;
+import org.apache.asterix.graphix.metadata.entity.schema.Edge;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.graphix.metadata.entity.schema.Schema;
+import org.apache.asterix.graphix.metadata.entity.schema.Vertex;
 import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.MetadataTransactionContext;
 import org.apache.asterix.metadata.declared.MetadataProvider;
@@ -46,8 +57,8 @@
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 
 public final class GraphStatementHandlingUtil {
-    public static void acquireGraphWriteLocks(MetadataProvider metadataProvider, DataverseName activeDataverseName,
-            String graphName) throws AlgebricksException {
+    public static void acquireGraphExtensionWriteLocks(MetadataProvider metadataProvider,
+            DataverseName activeDataverseName, String graphName) throws AlgebricksException {
         // Acquire a READ lock on our dataverse and a WRITE lock on our graph.
         IMetadataLockManager metadataLockManager = metadataProvider.getApplicationContext().getMetadataLockManager();
         metadataLockManager.acquireDataverseReadLock(metadataProvider.getLocks(), activeDataverseName);
@@ -55,14 +66,44 @@
                 GraphixMetadataExtension.GRAPHIX_METADATA_EXTENSION_ID.getName(), activeDataverseName, graphName);
     }
 
+    public static void throwIfDependentExists(MetadataTransactionContext mdTxnCtx,
+            DependencyIdentifier dependencyIdentifier) throws AlgebricksException {
+        for (IEntityRequirements requirements : GraphixMetadataExtension.getAllEntityRequirements(mdTxnCtx)) {
+            for (DependencyIdentifier dependency : requirements) {
+                if (dependency.equals(dependencyIdentifier)) {
+                    throw new CompilationException(ErrorCode.CANNOT_DROP_OBJECT_DEPENDENT_EXISTS,
+                            dependency.getDependencyKind(), dependency.getDisplayName(),
+                            requirements.getDependentKind(), requirements.getDisplayName());
+                }
+            }
+        }
+    }
+
+    public static void collectDependenciesOnGraph(Expression expression, DataverseName defaultDataverseName,
+            Set<DependencyIdentifier> graphDependencies) throws CompilationException {
+        expression.accept(new AbstractGraphixQueryVisitor() {
+            @Override
+            public Expression visit(FromGraphClause fromGraphClause, ILangExpression arg) {
+                if (fromGraphClause.getGraphName() != null) {
+                    String graphName = fromGraphClause.getGraphName().getValue();
+                    DataverseName dataverseName = (fromGraphClause.getDataverseName() == null) ? defaultDataverseName
+                            : fromGraphClause.getDataverseName();
+                    DependencyIdentifier.Kind graphKind = DependencyIdentifier.Kind.GRAPH;
+                    graphDependencies.add(new DependencyIdentifier(dataverseName, graphName, graphKind));
+                }
+                return null;
+            }
+        }, null);
+    }
+
     public static void handleCreateGraph(CreateGraphStatement cgs, MetadataProvider metadataProvider,
             IStatementExecutor statementExecutor, DataverseName activeDataverseName) throws Exception {
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
 
         // Ensure that our active dataverse exists.
-        Dataverse dv = MetadataManager.INSTANCE.getDataverse(mdTxnCtx, activeDataverseName);
-        if (dv == null) {
+        Dataverse dataverse = MetadataManager.INSTANCE.getDataverse(mdTxnCtx, activeDataverseName);
+        if (dataverse == null) {
             throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, cgs.getSourceLocation(), activeDataverseName);
         }
 
@@ -78,13 +119,23 @@
                         "Graph " + existingGraph.getGraphName() + " already exists.");
             }
         }
+        IEntityRequirements existingRequirements = null;
+        if (existingGraph != null) {
+            existingRequirements = GraphixMetadataExtension.getAllEntityRequirements(mdTxnCtx).stream()
+                    .filter(r -> r.getDataverseName().equals(activeDataverseName))
+                    .filter(r -> r.getEntityName().equals(cgs.getGraphName()))
+                    .filter(r -> r.getDependentKind().equals(IEntityRequirements.DependentKind.GRAPH)).findFirst()
+                    .orElseThrow(() -> new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE,
+                            cgs.getSourceLocation(), "Graph dependencies for " + cgs.getGraphName()
+                                    + " exist, but the graph itself does not."));
+        }
 
         // Build the graph schema.
         GraphIdentifier graphIdentifier = new GraphIdentifier(activeDataverseName, cgs.getGraphName());
-        Graph.Schema.Builder schemaBuilder = new Graph.Schema.Builder(graphIdentifier);
+        Schema.Builder schemaBuilder = new Schema.Builder(graphIdentifier);
         Map<GraphElementIdentifier, GraphElementDecl> graphElementDecls = new LinkedHashMap<>();
-        for (GraphConstructor.VertexElement vertex : cgs.getVertexElements()) {
-            Graph.Vertex schemaVertex =
+        for (GraphConstructor.VertexConstructor vertex : cgs.getVertexElements()) {
+            Vertex schemaVertex =
                     schemaBuilder.addVertex(vertex.getLabel(), vertex.getPrimaryKeyFields(), vertex.getDefinition());
             switch (schemaBuilder.getLastError()) {
                 case NO_ERROR:
@@ -105,21 +156,13 @@
 
                 default:
                     throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, vertex.getSourceLocation(),
-                            "Schema vertex was not returned, but the error is not a conflicting primary key!");
+                            "Constructor vertex was not returned, but the error is not a conflicting primary key!");
             }
         }
-        for (GraphConstructor.EdgeElement edge : cgs.getEdgeElements()) {
-            Graph.Edge schemaEdge;
-            if (edge.getDefinition() == null) {
-                schemaEdge = schemaBuilder.addEdge(edge.getEdgeLabel(), edge.getDestinationLabel(),
-                        edge.getSourceLabel(), edge.getDestinationKeyFields());
-
-            } else {
-                schemaEdge = schemaBuilder.addEdge(edge.getEdgeLabel(), edge.getDestinationLabel(),
-                        edge.getSourceLabel(), edge.getPrimaryKeyFields(), edge.getDestinationKeyFields(),
-                        edge.getSourceKeyFields(), edge.getDefinition());
-            }
-
+        for (GraphConstructor.EdgeConstructor edge : cgs.getEdgeElements()) {
+            Edge schemaEdge =
+                    schemaBuilder.addEdge(edge.getEdgeLabel(), edge.getDestinationLabel(), edge.getSourceLabel(),
+                            edge.getDestinationKeyFields(), edge.getSourceKeyFields(), edge.getDefinition());
             switch (schemaBuilder.getLastError()) {
                 case NO_ERROR:
                     if (edge.getDefinition() != null) {
@@ -145,47 +188,51 @@
                             "Destination vertex " + edge.getDestinationLabel() + " not found in the edge "
                                     + edge.getEdgeLabel() + ".");
 
-                case CONFLICTING_PRIMARY_KEY:
-                case CONFLICTING_SOURCE_VERTEX:
-                case CONFLICTING_DESTINATION_VERTEX:
+                case CONFLICTING_SOURCE_KEY:
+                case CONFLICTING_DESTINATION_KEY:
                     throw new CompilationException(ErrorCode.COMPILATION_ERROR, edge.getSourceLocation(),
                             "Conflicting edge with the same label found: " + edge.getEdgeLabel());
 
                 default:
                     throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, edge.getSourceLocation(),
-                            "Schema edge was not returned, and an unexpected error encountered");
+                            "Edge constructor was not returned, and an unexpected error encountered");
             }
         }
 
-        // Verify that each element definition is usable.
         GraphixQueryRewriter graphixQueryRewriter = ((GraphixQueryTranslator) statementExecutor).getQueryRewriter();
-        metadataProvider.setDefaultDataverse(dv);
+        metadataProvider.setDefaultDataverse(dataverse);
+        DataverseName dataverseName = (cgs.getDataverseName() != null) ? cgs.getDataverseName() : activeDataverseName;
+        GraphRequirements requirements = new GraphRequirements(dataverseName, cgs.getGraphName());
         for (GraphElementDecl graphElementDecl : graphElementDecls.values()) {
+            // Determine the graph dependencies using the raw body.
+            Set<DependencyIdentifier> graphDependencies = new HashSet<>();
+            for (Expression rawBody : graphElementDecl.getBodies()) {
+                collectDependenciesOnGraph(rawBody, activeDataverseName, graphDependencies);
+            }
+            requirements.loadGraphDependencies(graphDependencies);
+
+            // Verify that each element definition is usable.
             ((GraphixQueryTranslator) statementExecutor).setGraphElementNormalizedBody(metadataProvider,
                     graphElementDecl, graphixQueryRewriter);
-        }
 
-        // Build our dependencies (collected over all graph element bodies).
-        GraphDependencies graphDependencies = new GraphDependencies();
-        for (GraphElementDecl graphElementDecl : graphElementDecls.values()) {
-            if (graphElementDecl.getNormalizedBodies().size() != graphElementDecl.getBodies().size()) {
-                // We should have set the normalized body by calling {@code normalizeGraphElementAsQuery} beforehand.
-                throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE,
-                        graphElementDecl.getSourceLocation(), "Normalized body not found!");
-            }
+            // Determine the non-graph dependencies using the normalized body.
             for (Expression normalizedBody : graphElementDecl.getNormalizedBodies()) {
-                graphDependencies.collectDependencies(normalizedBody, graphixQueryRewriter);
+                requirements.loadNonGraphDependencies(normalizedBody, graphixQueryRewriter);
             }
         }
 
-        // Add / upsert our graph to our metadata.
-        Graph newGraph = new Graph(graphIdentifier, schemaBuilder.build(), graphDependencies);
+        // Add / upsert our graph + requirements to our metadata.
+        Graph newGraph = new Graph(graphIdentifier, schemaBuilder.build());
         if (existingGraph == null) {
             MetadataManager.INSTANCE.addEntity(mdTxnCtx, newGraph);
+            MetadataManager.INSTANCE.addEntity(mdTxnCtx, requirements);
 
         } else {
+            requirements.setPrimaryKeyValue(existingRequirements.getPrimaryKeyValue());
             MetadataManager.INSTANCE.upsertEntity(mdTxnCtx, newGraph);
+            MetadataManager.INSTANCE.upsertEntity(mdTxnCtx, requirements);
         }
+
         MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
     }
 
@@ -220,6 +267,20 @@
             }
         }
 
+        // Verify that no requirements exist on our graph.
+        DataverseName dataverseName = (gds.getDataverseName() == null) ? activeDataverseName : gds.getDataverseName();
+        DependencyIdentifier dependencyIdentifier =
+                new DependencyIdentifier(dataverseName, gds.getGraphName(), DependencyIdentifier.Kind.GRAPH);
+        throwIfDependentExists(mdTxnCtx, dependencyIdentifier);
+        Optional<IEntityRequirements> requirements = GraphixMetadataExtension.getAllEntityRequirements(mdTxnCtx)
+                .stream().filter(r -> r.getDataverseName().equals(dataverseName))
+                .filter(r -> r.getEntityName().equals(gds.getGraphName()))
+                .filter(r -> r.getDependentKind().equals(IEntityRequirements.DependentKind.GRAPH)).findFirst();
+        if (requirements.isPresent()) {
+            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, requirements.get());
+        }
+
+        // Finally, perform the deletion.
         MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, graph);
         MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
     }
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixIndexDetailProvider.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixIndexDetailProvider.java
new file mode 100644
index 0000000..942c0a8
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixIndexDetailProvider.java
@@ -0,0 +1,115 @@
+/*
+ * 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.asterix.graphix.metadata.bootstrap;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.asterix.common.metadata.MetadataIndexImmutableProperties;
+import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
+import org.apache.asterix.graphix.metadata.entity.dependency.IEntityRequirements;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.graphix.metadata.entitytupletranslators.DependencyTupleTranslator;
+import org.apache.asterix.graphix.metadata.entitytupletranslators.GraphTupleTranslator;
+import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.api.IMetadataEntityTupleTranslatorFactory;
+import org.apache.asterix.metadata.bootstrap.MetadataRecordTypes;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+
+/**
+ * Provide detail about two metadata extension indexes: Graph and GraphDependency.
+ */
+public class GraphixIndexDetailProvider {
+    public static IGraphixIndexDetail<Graph> getGraphIndexDetail() {
+        return graphIndexDetail;
+    }
+
+    public static IGraphixIndexDetail<IEntityRequirements> getGraphDependencyIndexDetail() {
+        return dependencyIndexDetail;
+    }
+
+    private static final IGraphixIndexDetail<Graph> graphIndexDetail = new IGraphixIndexDetail<>() {
+        private final ExtensionMetadataDatasetId datasetID = new ExtensionMetadataDatasetId(
+                GraphixMetadataExtension.GRAPHIX_METADATA_EXTENSION_ID, getDatasetName());
+
+        private final ExtensionMetadataDataset<Graph> metadataDataset;
+        { // Construct our metadata dataset here.
+            MetadataIndexImmutableProperties indexProperties = new MetadataIndexImmutableProperties(getDatasetName(),
+                    MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
+                    MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
+            IAType[] fieldTypes = new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING };
+            List<List<String>> fieldNames = Arrays.asList(List.of(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
+                    List.of(GraphixRecordDetailProvider.FIELD_NAME_GRAPH_NAME));
+            IRecordTypeDetail graphRecordDetail = GraphixRecordDetailProvider.getGraphRecordDetail();
+            metadataDataset = new ExtensionMetadataDataset<>(indexProperties, 3, fieldTypes, fieldNames, 0,
+                    graphRecordDetail.getRecordType(), true, new int[] { 0, 1 }, datasetID,
+                    (IMetadataEntityTupleTranslatorFactory<Graph>) GraphTupleTranslator::new);
+        }
+
+        @Override
+        public String getDatasetName() {
+            return "Graph";
+        }
+
+        @Override
+        public ExtensionMetadataDatasetId getExtensionDatasetID() {
+            return datasetID;
+        }
+
+        @Override
+        public ExtensionMetadataDataset<Graph> getExtensionDataset() {
+            return metadataDataset;
+        }
+    };
+
+    private static final IGraphixIndexDetail<IEntityRequirements> dependencyIndexDetail = new IGraphixIndexDetail<>() {
+        private final ExtensionMetadataDatasetId datasetID = new ExtensionMetadataDatasetId(
+                GraphixMetadataExtension.GRAPHIX_METADATA_EXTENSION_ID, getDatasetName());
+
+        private final ExtensionMetadataDataset<IEntityRequirements> metadataDataset;
+        { // Construct our metadata dataset here. Our primary key is autogenerated.
+            MetadataIndexImmutableProperties indexProperties = new MetadataIndexImmutableProperties(getDatasetName(),
+                    MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID + 1,
+                    MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID + 1);
+            IAType[] fieldTypes = new IAType[] { BuiltinType.ASTRING };
+            List<List<String>> fieldNames = List.of(List.of(GraphixRecordDetailProvider.FIELD_NAME_DEPENDENCY_ID));
+            IRecordTypeDetail dependencyRecordDetail = GraphixRecordDetailProvider.getGraphDependencyRecordDetail();
+            metadataDataset = new ExtensionMetadataDataset<>(indexProperties, 2, fieldTypes, fieldNames, 0,
+                    dependencyRecordDetail.getRecordType(), true, new int[] { 0 }, datasetID,
+                    (IMetadataEntityTupleTranslatorFactory<IEntityRequirements>) DependencyTupleTranslator::new);
+        }
+
+        @Override
+        public String getDatasetName() {
+            return "GraphDependency";
+        }
+
+        @Override
+        public ExtensionMetadataDatasetId getExtensionDatasetID() {
+            return datasetID;
+        }
+
+        @Override
+        public ExtensionMetadataDataset<IEntityRequirements> getExtensionDataset() {
+            return metadataDataset;
+        }
+    };
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixMetadataIndexes.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixMetadataIndexes.java
deleted file mode 100644
index c2e7770..0000000
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixMetadataIndexes.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.asterix.graphix.metadata.bootstrap;
-
-import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME;
-
-import java.util.Arrays;
-import java.util.Collections;
-
-import org.apache.asterix.common.metadata.MetadataIndexImmutableProperties;
-import org.apache.asterix.graphix.extension.GraphixMetadataExtension;
-import org.apache.asterix.graphix.metadata.entities.Graph;
-import org.apache.asterix.graphix.metadata.entitytupletranslators.GraphTupleTranslator;
-import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
-import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
-import org.apache.asterix.metadata.api.IMetadataEntityTupleTranslatorFactory;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-
-public class GraphixMetadataIndexes {
-    public static final String METADATA_DATASET_NAME_GRAPH = "Graph";
-
-    public static final ExtensionMetadataDatasetId GRAPH_METADATA_DATASET_EXTENSION_ID = new ExtensionMetadataDatasetId(
-            GraphixMetadataExtension.GRAPHIX_METADATA_EXTENSION_ID, METADATA_DATASET_NAME_GRAPH);
-
-    public static final MetadataIndexImmutableProperties PROPERTIES_GRAPH_METADATA_DATASET =
-            new MetadataIndexImmutableProperties(METADATA_DATASET_NAME_GRAPH,
-                    MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
-                    MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
-
-    public static final ExtensionMetadataDataset<Graph> GRAPH_DATASET = new ExtensionMetadataDataset<>(
-            PROPERTIES_GRAPH_METADATA_DATASET, 3, new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING },
-            Arrays.asList(Collections.singletonList(FIELD_NAME_DATAVERSE_NAME),
-                    Collections.singletonList(GraphixMetadataRecordTypes.FIELD_NAME_GRAPH_NAME)),
-            0, GraphixMetadataRecordTypes.GRAPH_RECORDTYPE, true, new int[] { 0, 1 },
-            GRAPH_METADATA_DATASET_EXTENSION_ID,
-            (IMetadataEntityTupleTranslatorFactory<Graph>) GraphTupleTranslator::new);
-}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixMetadataRecordTypes.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixMetadataRecordTypes.java
deleted file mode 100644
index 055056d..0000000
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixMetadataRecordTypes.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.asterix.graphix.metadata.bootstrap;
-
-import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME;
-import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DEPENDENCIES;
-import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_PRIMARY_KEY;
-
-import org.apache.asterix.metadata.bootstrap.MetadataRecordTypes;
-import org.apache.asterix.om.types.AOrderedListType;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-
-public final class GraphixMetadataRecordTypes {
-    public static final String RECORD_NAME_GRAPH = "GraphRecordType";
-    public static final String RECORD_NAME_VERTICES = "VerticesRecordType";
-    public static final String RECORD_NAME_EDGES = "EdgesRecordType";
-
-    public static final String FIELD_NAME_DEFINITIONS = "Definitions";
-    public static final String FIELD_NAME_DESTINATION_KEY = "DestinationKey";
-    public static final String FIELD_NAME_DESTINATION_LABEL = "DestinationLabel";
-    public static final String FIELD_NAME_EDGES = "Edges";
-    public static final String FIELD_NAME_GRAPH_NAME = "GraphName";
-    public static final String FIELD_NAME_LABEL = "Label";
-    public static final String FIELD_NAME_SOURCE_KEY = "SourceKey";
-    public static final String FIELD_NAME_SOURCE_LABEL = "SourceLabel";
-    public static final String FIELD_NAME_VERTICES = "Vertices";
-
-    public static final int GRAPH_VERTICES_ARECORD_LABEL_FIELD_INDEX = 0;
-    public static final int GRAPH_VERTICES_ARECORD_PRIMARY_KEY_FIELD_INDEX = 1;
-    public static final int GRAPH_VERTICES_ARECORD_DEFINITIONS_FIELD_INDEX = 2;
-    public static final ARecordType VERTICES_RECORDTYPE = MetadataRecordTypes.createRecordType(RECORD_NAME_VERTICES,
-            new String[] { FIELD_NAME_LABEL, FIELD_NAME_PRIMARY_KEY, FIELD_NAME_DEFINITIONS },
-            new IAType[] { BuiltinType.ASTRING,
-                    new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null),
-                    new AOrderedListType(BuiltinType.ASTRING, null) },
-            true);
-
-    public static final int GRAPH_EDGES_ARECORD_LABEL_FIELD_INDEX = 0;
-    public static final int GRAPH_EDGES_ARECORD_DEST_LABEL_FIELD_INDEX = 1;
-    public static final int GRAPH_EDGES_ARECORD_SOURCE_LABEL_FIELD_INDEX = 2;
-    public static final int GRAPH_EDGES_ARECORD_PRIMARY_KEY_FIELD_INDEX = 3;
-    public static final int GRAPH_EDGES_ARECORD_DEST_KEY_FIELD_INDEX = 4;
-    public static final int GRAPH_EDGES_ARECORD_SOURCE_KEY_FIELD_INDEX = 5;
-    public static final int GRAPH_EDGES_ARECORD_DEFINITIONS_FIELD_INDEX = 6;
-    public static final ARecordType EDGES_RECORDTYPE = MetadataRecordTypes.createRecordType(RECORD_NAME_EDGES,
-            new String[] { FIELD_NAME_LABEL, FIELD_NAME_DESTINATION_LABEL, FIELD_NAME_SOURCE_LABEL,
-                    FIELD_NAME_PRIMARY_KEY, FIELD_NAME_DESTINATION_KEY, FIELD_NAME_SOURCE_KEY, FIELD_NAME_DEFINITIONS },
-            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
-                    new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null),
-                    new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null),
-                    new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null),
-                    new AOrderedListType(BuiltinType.ASTRING, null) },
-            true);
-
-    public static final int GRAPH_ARECORD_DATAVERSENAME_FIELD_INDEX = 0;
-    public static final int GRAPH_ARECORD_GRAPHNAME_FIELD_INDEX = 1;
-    public static final int GRAPH_ARECORD_DEPENDENCIES_FIELD_INDEX = 2;
-    public static final int GRAPH_ARECORD_VERTICES_FIELD_INDEX = 3;
-    public static final int GRAPH_ARECORD_EDGES_FIELD_INDEX = 4;
-    public static final ARecordType GRAPH_RECORDTYPE = MetadataRecordTypes.createRecordType(RECORD_NAME_GRAPH,
-            new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_GRAPH_NAME, FIELD_NAME_DEPENDENCIES,
-                    FIELD_NAME_VERTICES, FIELD_NAME_EDGES },
-            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING,
-                    new AOrderedListType(new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null),
-                            null),
-                    new AOrderedListType(VERTICES_RECORDTYPE, null), new AOrderedListType(EDGES_RECORDTYPE, null) },
-            true);
-}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixRecordDetailProvider.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixRecordDetailProvider.java
new file mode 100644
index 0000000..0d99dc6
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/GraphixRecordDetailProvider.java
@@ -0,0 +1,344 @@
+/*
+ * 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.asterix.graphix.metadata.bootstrap;
+
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DEPENDENCIES;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_KIND;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_PRIMARY_KEY;
+
+import org.apache.asterix.metadata.bootstrap.MetadataRecordTypes;
+import org.apache.asterix.om.base.ARecord;
+import org.apache.asterix.om.base.IAObject;
+import org.apache.asterix.om.types.AOrderedListType;
+import org.apache.asterix.om.types.ARecordType;
+import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+
+/**
+ * Provide detail about our two metadata extension datasets (Graph and GraphDependency), as well as their associated
+ * record types (vertex definitions, edge definitions, vertex records, edge records, dependency records).
+ */
+public final class GraphixRecordDetailProvider {
+    public static final String FIELD_NAME_BODY = "Body";
+    public static final String FIELD_NAME_DEFINITIONS = "Definitions";
+    public static final String FIELD_NAME_DEPENDENCY_ID = "DependencyID";
+    public static final String FIELD_NAME_DESTINATION_KEY = "DestinationKey";
+    public static final String FIELD_NAME_DESTINATION_LABEL = "DestinationLabel";
+    public static final String FIELD_NAME_EDGES = "Edges";
+    public static final String FIELD_NAME_ENTITY_NAME = "EntityName";
+    public static final String FIELD_NAME_ENTITY_DETAIL = "EntityDetail";
+    public static final String FIELD_NAME_GRAPH_NAME = "GraphName";
+    public static final String FIELD_NAME_LABEL = "Label";
+    public static final String FIELD_NAME_SOURCE_KEY = "SourceKey";
+    public static final String FIELD_NAME_SOURCE_LABEL = "SourceLabel";
+    public static final String FIELD_NAME_VERTICES = "Vertices";
+
+    public static IRecordTypeDetail getVertexDefRecordDetail() {
+        return vertexDefRecordDetail;
+    }
+
+    public static IRecordTypeDetail getVertexRecordDetail() {
+        return vertexRecordDetail;
+    }
+
+    public static IRecordTypeDetail getEdgeDefRecordDetail() {
+        return edgeDefRecordDetail;
+    }
+
+    public static IRecordTypeDetail getEdgeRecordDetail() {
+        return edgeRecordDetail;
+    }
+
+    public static IRecordTypeDetail getGraphRecordDetail() {
+        return graphRecordDetail;
+    }
+
+    public static IRecordTypeDetail getDependencyRecordDetail() {
+        return dependencyRecordDetail;
+    }
+
+    public static IRecordTypeDetail getGraphDependencyRecordDetail() {
+        return graphDependencyRecordDetail;
+    }
+
+    private static abstract class AbstractRecordTypeDetail implements IRecordTypeDetail {
+        // We set this in our child.
+        protected ARecordType recordType;
+
+        @Override
+        public ARecordType getRecordType() {
+            return recordType;
+        }
+
+        @Override
+        public IAObject getObjectForField(ARecord record, String fieldName) {
+            return record.getValueByPos(getIndexForField(fieldName));
+        }
+
+        @Override
+        public IAType getTypeForField(String fieldName) {
+            return getRecordType().getFieldTypes()[getIndexForField(fieldName)];
+        }
+    }
+
+    // Record type for a definition inside a Vertex object attached to a Graph.
+    private static final IRecordTypeDetail vertexDefRecordDetail = new AbstractRecordTypeDetail() {
+        { // Construct our record type here.
+            String[] fieldNames = new String[] { FIELD_NAME_PRIMARY_KEY, FIELD_NAME_BODY };
+            IAType[] fieldTypes = new IAType[] {
+                    new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null), BuiltinType.ASTRING };
+            recordType = MetadataRecordTypes.createRecordType(getRecordTypeName(), fieldNames, fieldTypes, true);
+        }
+
+        @Override
+        public String getRecordTypeName() {
+            return "VertexDefinitionRecordType";
+        }
+
+        @Override
+        public int getIndexForField(String fieldName) {
+            switch (fieldName) {
+                case FIELD_NAME_PRIMARY_KEY:
+                    return 0;
+
+                case FIELD_NAME_BODY:
+                    return 1;
+
+                default:
+                    throw new IllegalArgumentException("Name " + fieldName + " not found for this record detail!");
+            }
+        }
+    };
+
+    // Record type for a Vertex object attached to a Graph.
+    private static final IRecordTypeDetail vertexRecordDetail = new AbstractRecordTypeDetail() {
+        { // Construct our record type here.
+            String[] fieldNames = new String[] { FIELD_NAME_LABEL, FIELD_NAME_DEFINITIONS };
+            IAType[] fieldTypes = new IAType[] { BuiltinType.ASTRING,
+                    new AOrderedListType(vertexDefRecordDetail.getRecordType(), null) };
+            recordType = MetadataRecordTypes.createRecordType(getRecordTypeName(), fieldNames, fieldTypes, true);
+        }
+
+        @Override
+        public String getRecordTypeName() {
+            return "VertexRecordType";
+        }
+
+        @Override
+        public int getIndexForField(String fieldName) {
+            switch (fieldName) {
+                case FIELD_NAME_LABEL:
+                    return 0;
+
+                case FIELD_NAME_DEFINITIONS:
+                    return 1;
+
+                default:
+                    throw new IllegalArgumentException("Name " + fieldName + " not found for this record detail!");
+            }
+        }
+    };
+
+    // Record type for a definition inside an Edge object attached to a Graph.
+    private static final IRecordTypeDetail edgeDefRecordDetail = new AbstractRecordTypeDetail() {
+        { // Construct our record type here.
+            String[] fieldNames = new String[] { FIELD_NAME_SOURCE_KEY, FIELD_NAME_DESTINATION_KEY, FIELD_NAME_BODY };
+            IAType[] fieldTypes = new IAType[] {
+                    new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null),
+                    new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null), BuiltinType.ASTRING };
+            recordType = MetadataRecordTypes.createRecordType(getRecordTypeName(), fieldNames, fieldTypes, true);
+        }
+
+        @Override
+        public String getRecordTypeName() {
+            return "EdgeDefinitionRecordType";
+        }
+
+        @Override
+        public int getIndexForField(String fieldName) {
+            switch (fieldName) {
+                case FIELD_NAME_SOURCE_KEY:
+                    return 0;
+
+                case FIELD_NAME_DESTINATION_KEY:
+                    return 1;
+
+                case FIELD_NAME_BODY:
+                    return 2;
+
+                default:
+                    throw new IllegalArgumentException("Name " + fieldName + " not found for this record detail!");
+            }
+        }
+    };
+
+    // Record type for an Edge object attached to a Graph.
+    private static final IRecordTypeDetail edgeRecordDetail = new AbstractRecordTypeDetail() {
+        { // Construct our record type here.
+            String[] fieldNames = new String[] { FIELD_NAME_LABEL, FIELD_NAME_DESTINATION_LABEL,
+                    FIELD_NAME_SOURCE_LABEL, FIELD_NAME_DEFINITIONS };
+            IAType[] fieldTypes = new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
+                    new AOrderedListType(edgeDefRecordDetail.getRecordType(), null) };
+            recordType = MetadataRecordTypes.createRecordType(getRecordTypeName(), fieldNames, fieldTypes, true);
+        }
+
+        @Override
+        public String getRecordTypeName() {
+            return "EdgeRecordType";
+        }
+
+        @Override
+        public int getIndexForField(String fieldName) {
+            switch (fieldName) {
+                case FIELD_NAME_LABEL:
+                    return 0;
+
+                case FIELD_NAME_DESTINATION_LABEL:
+                    return 1;
+
+                case FIELD_NAME_SOURCE_LABEL:
+                    return 2;
+
+                case FIELD_NAME_DEFINITIONS:
+                    return 3;
+
+                default:
+                    throw new IllegalArgumentException("Name " + fieldName + " not found for this record detail!");
+            }
+        }
+    };
+
+    // Record type for a graph.
+    private static final IRecordTypeDetail graphRecordDetail = new AbstractRecordTypeDetail() {
+        { // Construct our record type here.
+            String[] fieldNames = new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_GRAPH_NAME, FIELD_NAME_VERTICES,
+                    FIELD_NAME_EDGES };
+            IAType[] fieldTypes = new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING,
+                    new AOrderedListType(vertexRecordDetail.getRecordType(), null),
+                    new AOrderedListType(edgeRecordDetail.getRecordType(), null) };
+            recordType = MetadataRecordTypes.createRecordType(getRecordTypeName(), fieldNames, fieldTypes, true);
+        }
+
+        @Override
+        public String getRecordTypeName() {
+            return "GraphRecordType";
+        }
+
+        @Override
+        public int getIndexForField(String fieldName) {
+            switch (fieldName) {
+                case FIELD_NAME_DATAVERSE_NAME:
+                    return 0;
+
+                case FIELD_NAME_GRAPH_NAME:
+                    return 1;
+
+                case FIELD_NAME_VERTICES:
+                    return 2;
+
+                case FIELD_NAME_EDGES:
+                    return 3;
+
+                default:
+                    throw new IllegalArgumentException("Name " + fieldName + " not found for this record detail!");
+            }
+        }
+    };
+
+    // Record type for a dependency attached to a GraphDependency.
+    private static final IRecordTypeDetail dependencyRecordDetail = new AbstractRecordTypeDetail() {
+        { // Construct our record type here.
+            String[] fieldNames = new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_ENTITY_NAME, FIELD_NAME_KIND,
+                    FIELD_NAME_ENTITY_DETAIL };
+            IAType[] fieldTypes = new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
+                    AUnionType.createMissableType(BuiltinType.ASTRING) };
+            recordType = MetadataRecordTypes.createRecordType(getRecordTypeName(), fieldNames, fieldTypes, true);
+        }
+
+        @Override
+        public String getRecordTypeName() {
+            return "DependencyRecordType";
+        }
+
+        @Override
+        public int getIndexForField(String fieldName) {
+            switch (fieldName) {
+                case FIELD_NAME_DATAVERSE_NAME:
+                    return 0;
+
+                case FIELD_NAME_ENTITY_NAME:
+                    return 1;
+
+                case FIELD_NAME_KIND:
+                    return 2;
+
+                case FIELD_NAME_ENTITY_DETAIL:
+                    return 3;
+
+                default:
+                    throw new IllegalArgumentException("Name " + fieldName + " not found for this record detail!");
+            }
+        }
+    };
+
+    // Record type for a GraphDependency.
+    private static final IRecordTypeDetail graphDependencyRecordDetail = new AbstractRecordTypeDetail() {
+        { // Construct our record type here.
+            String[] fieldNames = new String[] { FIELD_NAME_DEPENDENCY_ID, FIELD_NAME_DATAVERSE_NAME,
+                    FIELD_NAME_ENTITY_NAME, FIELD_NAME_KIND, FIELD_NAME_DEPENDENCIES, FIELD_NAME_ENTITY_DETAIL };
+            IAType[] fieldTypes = new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
+                    BuiltinType.ASTRING, new AOrderedListType(dependencyRecordDetail.getRecordType(), null),
+                    AUnionType.createMissableType(BuiltinType.ASTRING) };
+            recordType = MetadataRecordTypes.createRecordType(getRecordTypeName(), fieldNames, fieldTypes, true);
+        }
+
+        @Override
+        public String getRecordTypeName() {
+            return "GraphDependencyRecordType";
+        }
+
+        @Override
+        public int getIndexForField(String fieldName) {
+            switch (fieldName) {
+                case FIELD_NAME_DEPENDENCY_ID:
+                    return 0;
+
+                case FIELD_NAME_DATAVERSE_NAME:
+                    return 1;
+
+                case FIELD_NAME_ENTITY_NAME:
+                    return 2;
+
+                case FIELD_NAME_KIND:
+                    return 3;
+
+                case FIELD_NAME_DEPENDENCIES:
+                    return 4;
+
+                case FIELD_NAME_ENTITY_DETAIL:
+                    return 5;
+
+                default:
+                    throw new IllegalArgumentException("Name " + fieldName + " not found for this record detail!");
+            }
+        }
+    };
+}
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/IGraphixIndexDetail.java
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/IGraphixIndexDetail.java
index 9667fd6..f418f77 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/IGraphixIndexDetail.java
@@ -16,7 +16,15 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.asterix.graphix.metadata.bootstrap;
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+
+public interface IGraphixIndexDetail<T> {
+    String getDatasetName();
+
+    ExtensionMetadataDatasetId getExtensionDatasetID();
+
+    ExtensionMetadataDataset<T> getExtensionDataset();
+}
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/IRecordTypeDetail.java
similarity index 61%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/IRecordTypeDetail.java
index 9667fd6..1a5fc01 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/bootstrap/IRecordTypeDetail.java
@@ -16,7 +16,21 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.asterix.graphix.metadata.bootstrap;
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+import org.apache.asterix.om.base.ARecord;
+import org.apache.asterix.om.base.IAObject;
+import org.apache.asterix.om.types.ARecordType;
+import org.apache.asterix.om.types.IAType;
+
+public interface IRecordTypeDetail {
+    String getRecordTypeName();
+
+    ARecordType getRecordType();
+
+    IAObject getObjectForField(ARecord record, String fieldName);
+
+    IAType getTypeForField(String fieldName);
+
+    int getIndexForField(String fieldName);
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entities/Graph.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entities/Graph.java
deleted file mode 100644
index 21afc2d..0000000
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entities/Graph.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * 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.asterix.graphix.metadata.entities;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import org.apache.asterix.common.metadata.DataverseName;
-import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
-import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
-import org.apache.asterix.graphix.metadata.bootstrap.GraphixMetadataIndexes;
-import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
-import org.apache.asterix.metadata.api.IExtensionMetadataEntity;
-
-/**
- * Metadata describing a graph view, composed of vertices and edges.
- */
-public class Graph implements IExtensionMetadataEntity {
-    private static final long serialVersionUID = 1L;
-
-    private final GraphIdentifier identifier;
-    private final GraphDependencies dependencies;
-    private final Schema graphSchema;
-
-    public Graph(GraphIdentifier identifier, Schema graphSchema, GraphDependencies dependencies) {
-        this.identifier = Objects.requireNonNull(identifier);
-        this.dependencies = dependencies;
-        this.graphSchema = graphSchema;
-    }
-
-    public DataverseName getDataverseName() {
-        return identifier.getDataverseName();
-    }
-
-    public String getGraphName() {
-        return identifier.getGraphName();
-    }
-
-    public GraphIdentifier getIdentifier() {
-        return identifier;
-    }
-
-    public Schema getGraphSchema() {
-        return graphSchema;
-    }
-
-    public GraphDependencies getDependencies() {
-        return dependencies;
-    }
-
-    @Override
-    public ExtensionMetadataDatasetId getDatasetId() {
-        return GraphixMetadataIndexes.GRAPH_METADATA_DATASET_EXTENSION_ID;
-    }
-
-    public static class Schema implements Serializable {
-        private static final long serialVersionUID = 1L;
-
-        // The element map is composed of the vertices and edges.
-        private final Map<GraphElementIdentifier, Element> elementMap = new HashMap<>();
-        private final List<Vertex> vertexList = new ArrayList<>();
-        private final List<Edge> edgeList = new ArrayList<>();
-
-        public List<Vertex> getVertices() {
-            return vertexList;
-        }
-
-        public List<Edge> getEdges() {
-            return edgeList;
-        }
-
-        public Element getElement(GraphElementIdentifier identifier) {
-            return elementMap.get(identifier);
-        }
-
-        private Schema() {
-        }
-
-        public static class Builder {
-            private final Map<String, Vertex> vertexLabelMap = new HashMap<>();
-            private final Map<String, Edge> edgeLabelMap = new HashMap<>();
-
-            // We aim to populate the schema object below.
-            private final Schema workingSchema = new Schema();
-            private final GraphIdentifier graphIdentifier;
-            private Error lastError = Error.NO_ERROR;
-
-            public Builder(GraphIdentifier graphIdentifier) {
-                this.graphIdentifier = graphIdentifier;
-            }
-
-            /**
-             * @return Null if the primary keys of an existing vertex conflict with the vertex to-be-added. The vertex
-             * to-be-added otherwise.
-             */
-            public Vertex addVertex(String labelName, List<List<String>> primaryKeyFieldNames, String definition) {
-                if (!vertexLabelMap.containsKey(labelName)) {
-                    GraphElementIdentifier identifier =
-                            new GraphElementIdentifier(graphIdentifier, GraphElementIdentifier.Kind.VERTEX, labelName);
-                    Vertex newVertex = new Vertex(identifier, primaryKeyFieldNames, definition);
-                    workingSchema.vertexList.add(newVertex);
-                    vertexLabelMap.put(labelName, newVertex);
-                    return newVertex;
-
-                } else {
-                    Vertex existingVertex = vertexLabelMap.get(labelName);
-                    if (!existingVertex.getPrimaryKeyFieldNames().equals(primaryKeyFieldNames)) {
-                        lastError = Error.CONFLICTING_PRIMARY_KEY;
-                        return null;
-                    }
-                    existingVertex.getDefinitions().add(definition);
-                    return existingVertex;
-                }
-            }
-
-            /**
-             * @return Null if there exists no vertex with the given source label or destination label, OR if the
-             * primary key / source vertex / destination vertex of an existing edge conflict with the edge to-be-added.
-             */
-            public Edge addEdge(String edgeLabelName, String destinationLabelName, String sourceLabelName,
-                    List<List<String>> destinationKeyFieldNames) {
-                if (!vertexLabelMap.containsKey(sourceLabelName)) {
-                    lastError = Error.SOURCE_VERTEX_NOT_FOUND;
-                    return null;
-                }
-
-                Vertex representativeSourceVertex = vertexLabelMap.get(sourceLabelName);
-                return addEdge(edgeLabelName, destinationLabelName, sourceLabelName,
-                        representativeSourceVertex.getPrimaryKeyFieldNames(), destinationKeyFieldNames,
-                        representativeSourceVertex.getPrimaryKeyFieldNames(), "");
-            }
-
-            /**
-             * @return Null if there exists no vertex with the given source label or destination label, OR if the
-             * primary key / source vertex / destination vertex of an existing edge conflict with the edge to-be-added.
-             */
-            public Edge addEdge(String edgeLabelName, String destinationLabelName, String sourceLabelName,
-                    List<List<String>> primaryKeyFieldNames, List<List<String>> destinationKeyFieldNames,
-                    List<List<String>> sourceKeyFieldNames, String definition) {
-                if (!vertexLabelMap.containsKey(sourceLabelName)) {
-                    lastError = Error.SOURCE_VERTEX_NOT_FOUND;
-                    return null;
-
-                } else if (!vertexLabelMap.containsKey(destinationLabelName)) {
-                    lastError = Error.DESTINATION_VERTEX_NOT_FOUND;
-                    return null;
-
-                } else if (edgeLabelMap.containsKey(edgeLabelName)) {
-                    Edge existingEdge = edgeLabelMap.get(edgeLabelName);
-                    if (!existingEdge.getPrimaryKeyFieldNames().equals(primaryKeyFieldNames)) {
-                        lastError = Error.CONFLICTING_PRIMARY_KEY;
-                        return null;
-
-                    } else if (!existingEdge.getSourceLabelName().equals(sourceLabelName)) {
-                        // This also covers any source-key conflicts.
-                        lastError = Error.CONFLICTING_SOURCE_VERTEX;
-                        return null;
-
-                    } else if (!existingEdge.getDestinationLabelName().equals(destinationLabelName)) {
-                        // This also covers any destination-key conflicts.
-                        lastError = Error.CONFLICTING_DESTINATION_VERTEX;
-                        return null;
-                    }
-                    existingEdge.getDefinitions().add(definition);
-                    return existingEdge;
-
-                } else {
-                    GraphElementIdentifier identifier = new GraphElementIdentifier(graphIdentifier,
-                            GraphElementIdentifier.Kind.EDGE, edgeLabelName);
-                    Edge newEdge = new Edge(identifier, primaryKeyFieldNames, destinationKeyFieldNames,
-                            sourceKeyFieldNames, vertexLabelMap.get(destinationLabelName),
-                            vertexLabelMap.get(sourceLabelName), definition);
-                    workingSchema.edgeList.add(newEdge);
-                    edgeLabelMap.put(edgeLabelName, newEdge);
-                    return newEdge;
-                }
-            }
-
-            public Schema build() {
-                // Build the element map, composed of our vertices and edges.
-                workingSchema.elementMap.clear();
-                workingSchema.getVertices().forEach(v -> workingSchema.elementMap.put(v.identifier, v));
-                workingSchema.getEdges().forEach(e -> workingSchema.elementMap.put(e.identifier, e));
-                return workingSchema;
-            }
-
-            public Error getLastError() {
-                return lastError;
-            }
-
-            public enum Error {
-                NO_ERROR,
-
-                CONFLICTING_PRIMARY_KEY,
-                CONFLICTING_SOURCE_VERTEX,
-                CONFLICTING_DESTINATION_VERTEX,
-
-                SOURCE_VERTEX_NOT_FOUND,
-                DESTINATION_VERTEX_NOT_FOUND
-            }
-        }
-    }
-
-    public static final class Vertex implements Element {
-        private static final long serialVersionUID = 1L;
-
-        private final GraphElementIdentifier identifier;
-        private final List<List<String>> primaryKeyFieldNames;
-        private final List<String> definitions;
-
-        private Vertex(GraphElementIdentifier identifier, List<List<String>> primaryKeyFieldNames, String definition) {
-            this.identifier = Objects.requireNonNull(identifier);
-            this.primaryKeyFieldNames = Objects.requireNonNull(primaryKeyFieldNames);
-            this.definitions = new ArrayList<>();
-            this.definitions.add(Objects.requireNonNull(definition));
-        }
-
-        public List<List<String>> getPrimaryKeyFieldNames() {
-            return primaryKeyFieldNames;
-        }
-
-        @Override
-        public GraphElementIdentifier getIdentifier() {
-            return identifier;
-        }
-
-        @Override
-        public String getLabelName() {
-            return identifier.getLabelName();
-        }
-
-        @Override
-        public List<String> getDefinitions() {
-            return definitions;
-        }
-
-        @Override
-        public String toString() {
-            return "(:" + getLabelName() + ") AS " + String.join(",\n", definitions);
-        }
-    }
-
-    public static final class Edge implements Element {
-        private static final long serialVersionUID = 1L;
-
-        private final List<List<String>> primaryKeyFieldNames;
-        private final List<List<String>> destinationKeyFieldNames;
-        private final List<List<String>> sourceKeyFieldNames;
-
-        private final GraphElementIdentifier identifier;
-        private final Vertex destinationVertex;
-        private final Vertex sourceVertex;
-        private final List<String> definitions;
-
-        private Edge(GraphElementIdentifier identifier, List<List<String>> primaryKeyFieldNames,
-                List<List<String>> destinationKeyFieldNames, List<List<String>> sourceKeyFieldNames,
-                Vertex destinationVertex, Vertex sourceVertex, String edgeDefinition) {
-            this.primaryKeyFieldNames = Objects.requireNonNull(primaryKeyFieldNames);
-            this.destinationKeyFieldNames = Objects.requireNonNull(destinationKeyFieldNames);
-            this.sourceKeyFieldNames = Objects.requireNonNull(sourceKeyFieldNames);
-            this.destinationVertex = Objects.requireNonNull(destinationVertex);
-            this.sourceVertex = Objects.requireNonNull(sourceVertex);
-            this.identifier = Objects.requireNonNull(identifier);
-            this.definitions = new ArrayList<>();
-            this.definitions.add(Objects.requireNonNull(edgeDefinition));
-        }
-
-        public String getDestinationLabelName() {
-            return destinationVertex.getLabelName();
-        }
-
-        public String getSourceLabelName() {
-            return sourceVertex.getLabelName();
-        }
-
-        public List<List<String>> getPrimaryKeyFieldNames() {
-            return primaryKeyFieldNames;
-        }
-
-        public List<List<String>> getDestinationKeyFieldNames() {
-            return destinationKeyFieldNames;
-        }
-
-        public List<List<String>> getSourceKeyFieldNames() {
-            return sourceKeyFieldNames;
-        }
-
-        public Vertex getDestinationVertex() {
-            return destinationVertex;
-        }
-
-        public Vertex getSourceVertex() {
-            return sourceVertex;
-        }
-
-        @Override
-        public GraphElementIdentifier getIdentifier() {
-            return identifier;
-        }
-
-        @Override
-        public String getLabelName() {
-            return identifier.getLabelName();
-        }
-
-        @Override
-        public List<String> getDefinitions() {
-            return definitions;
-        }
-
-        @Override
-        public String toString() {
-            String edgeBodyPattern = "[:" + getLabelName() + "]";
-            String sourceNodePattern = "(:" + getSourceLabelName() + ")";
-            String destinationNodePattern = "(:" + getDestinationLabelName() + ")";
-            String edgePattern = sourceNodePattern + "-" + edgeBodyPattern + "->" + destinationNodePattern;
-            return edgePattern + " AS " + String.join(",\n", getDefinitions());
-        }
-    }
-
-    public interface Element extends Serializable {
-        GraphElementIdentifier getIdentifier();
-
-        String getLabelName();
-
-        List<String> getDefinitions();
-    }
-}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entities/GraphDependencies.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entities/GraphDependencies.java
deleted file mode 100644
index 0e7aa5a..0000000
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entities/GraphDependencies.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.asterix.graphix.metadata.entities;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.asterix.common.exceptions.CompilationException;
-import org.apache.asterix.common.metadata.DataverseName;
-import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.IQueryRewriter;
-import org.apache.asterix.lang.common.util.ExpressionUtils;
-import org.apache.asterix.metadata.entities.DependencyKind;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.algebricks.common.utils.Triple;
-
-/**
- * Helper class to manage dependencies for a graph metadata entity.
- */
-public class GraphDependencies {
-    private final List<Triple<DataverseName, String, String>> datasetDependencies;
-    private final List<Triple<DataverseName, String, String>> synonymDependencies;
-    private final List<Triple<DataverseName, String, String>> functionDependencies;
-
-    public GraphDependencies(List<List<Triple<DataverseName, String, String>>> listRepresentation) {
-        datasetDependencies = listRepresentation.get(0);
-        synonymDependencies = listRepresentation.get(1);
-        functionDependencies = listRepresentation.get(2);
-    }
-
-    public GraphDependencies() {
-        datasetDependencies = new ArrayList<>();
-        synonymDependencies = new ArrayList<>();
-        functionDependencies = new ArrayList<>();
-    }
-
-    public List<List<Triple<DataverseName, String, String>>> getListRepresentation() {
-        return List.of(datasetDependencies, synonymDependencies, functionDependencies);
-    }
-
-    public Iterator<Pair<DependencyKind, Triple<DataverseName, String, String>>> getIterator() {
-        List<Pair<DependencyKind, Triple<DataverseName, String, String>>> resultant = new ArrayList<>();
-        for (Triple<DataverseName, String, String> datasetDependency : datasetDependencies) {
-            resultant.add(new Pair<>(DependencyKind.DATASET, datasetDependency));
-        }
-        for (Triple<DataverseName, String, String> synonymDependency : synonymDependencies) {
-            resultant.add(new Pair<>(DependencyKind.SYNONYM, synonymDependency));
-        }
-        for (Triple<DataverseName, String, String> functionDependency : functionDependencies) {
-            resultant.add(new Pair<>(DependencyKind.FUNCTION, functionDependency));
-        }
-        return resultant.listIterator();
-    }
-
-    public void collectDependencies(Expression expression, IQueryRewriter queryRewriter) throws CompilationException {
-        ExpressionUtils.collectDependencies(expression, queryRewriter, datasetDependencies, synonymDependencies,
-                functionDependencies);
-    }
-}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/DependencyIdentifier.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/DependencyIdentifier.java
new file mode 100644
index 0000000..7c63de8
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/DependencyIdentifier.java
@@ -0,0 +1,112 @@
+/*
+ * 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.asterix.graphix.metadata.entity.dependency;
+
+import java.util.Objects;
+
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.metadata.utils.DatasetUtil;
+import org.apache.asterix.metadata.utils.MetadataUtil;
+
+/**
+ * An identifier for a dependency related to a {@link org.apache.asterix.graphix.metadata.entity.schema.Graph} instance.
+ * A graph may depend on datasets, synonyms, functions, and other graphs. Similarly, functions and views may depend
+ * on graphs themselves.
+ */
+public class DependencyIdentifier {
+    private final DataverseName dataverseName;
+    private final String entityName;
+    private final String entityDetail;
+    private final Kind dependencyKind;
+
+    public DependencyIdentifier(DataverseName dataverseName, String entityName, Kind dependencyKind) {
+        this.dataverseName = Objects.requireNonNull(dataverseName);
+        this.entityName = Objects.requireNonNull(entityName);
+        this.entityDetail = null;
+        this.dependencyKind = Objects.requireNonNull(dependencyKind);
+    }
+
+    public DependencyIdentifier(DataverseName dataverseName, String entityName, String entityDetail,
+            Kind dependencyKind) {
+        this.dataverseName = Objects.requireNonNull(dataverseName);
+        this.entityName = Objects.requireNonNull(entityName);
+        this.entityDetail = Objects.requireNonNull(entityDetail);
+        this.dependencyKind = Objects.requireNonNull(dependencyKind);
+    }
+
+    public DataverseName getDataverseName() {
+        return dataverseName;
+    }
+
+    public String getEntityName() {
+        return entityName;
+    }
+
+    public String getEntityDetail() {
+        return entityDetail;
+    }
+
+    public Kind getDependencyKind() {
+        return dependencyKind;
+    }
+
+    public String getDisplayName() {
+        switch (dependencyKind) {
+            case DATASET:
+                return DatasetUtil.getFullyQualifiedDisplayName(dataverseName, entityName);
+
+            case SYNONYM:
+            case GRAPH:
+                return MetadataUtil.getFullyQualifiedDisplayName(dataverseName, entityName);
+
+            case FUNCTION:
+                return new FunctionSignature(dataverseName, entityName,
+                        Integer.parseInt(Objects.requireNonNull(entityDetail))).toString();
+        }
+        return null;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (!(object instanceof DependencyIdentifier)) {
+            return false;
+        }
+        DependencyIdentifier that = (DependencyIdentifier) object;
+        return that.getDataverseName().equals(this.getDataverseName())
+                && that.getDependencyKind().equals(this.getDependencyKind())
+                && that.getEntityName().equals(this.getEntityName())
+                && Objects.equals(that.getEntityDetail(), this.getEntityDetail());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(dataverseName, dependencyKind, entityName, entityDetail);
+    }
+
+    public enum Kind {
+        GRAPH,
+        DATASET,
+        SYNONYM,
+        FUNCTION
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/FunctionRequirements.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/FunctionRequirements.java
new file mode 100644
index 0000000..5e73325
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/FunctionRequirements.java
@@ -0,0 +1,89 @@
+/*
+ * 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.asterix.graphix.metadata.entity.dependency;
+
+import java.util.Iterator;
+import java.util.Objects;
+import java.util.Set;
+
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.om.base.AGeneratedUUID;
+import org.apache.asterix.om.base.AUUID;
+
+/**
+ * A collection of {@link org.apache.asterix.graphix.metadata.entity.schema.Graph} dependencies associated with a
+ * {@link org.apache.asterix.metadata.entities.Function} instance. This does **not** include non-graph dependencies
+ * for functions.
+ */
+public class FunctionRequirements implements IEntityRequirements {
+    private final Set<DependencyIdentifier> functionRequirements;
+    private final FunctionSignature functionSignature;
+
+    // Physically, our requirements are indexed by a UUID. Logically, we ignore this.
+    private final AUUID primaryKeyValue;
+
+    public FunctionRequirements(FunctionSignature functionSignature, Set<DependencyIdentifier> functionRequirements) {
+        this.functionRequirements = Objects.requireNonNull(functionRequirements);
+        this.functionSignature = Objects.requireNonNull(functionSignature);
+        this.primaryKeyValue = new AGeneratedUUID();
+    }
+
+    public FunctionRequirements(FunctionSignature functionSignature, Set<DependencyIdentifier> functionRequirements,
+            AUUID primaryKeyValue) {
+        this.functionRequirements = Objects.requireNonNull(functionRequirements);
+        this.functionSignature = Objects.requireNonNull(functionSignature);
+        this.primaryKeyValue = Objects.requireNonNull(primaryKeyValue);
+    }
+
+    public String getArityAsString() {
+        return String.valueOf(functionSignature.getArity());
+    }
+
+    @Override
+    public AUUID getPrimaryKeyValue() {
+        return primaryKeyValue;
+    }
+
+    @Override
+    public DataverseName getDataverseName() {
+        return functionSignature.getDataverseName();
+    }
+
+    @Override
+    public String getEntityName() {
+        // Note: this entity name is not unique! Use this in conjunction with the arity.
+        return functionSignature.getName();
+    }
+
+    @Override
+    public String getDisplayName() {
+        return functionSignature.toString(true);
+    }
+
+    @Override
+    public DependentKind getDependentKind() {
+        return DependentKind.FUNCTION;
+    }
+
+    @Override
+    public Iterator<DependencyIdentifier> iterator() {
+        return functionRequirements.iterator();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/GraphRequirements.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/GraphRequirements.java
new file mode 100644
index 0000000..98c669a
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/GraphRequirements.java
@@ -0,0 +1,124 @@
+/*
+ * 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.asterix.graphix.metadata.entity.dependency;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.IQueryRewriter;
+import org.apache.asterix.lang.common.util.ExpressionUtils;
+import org.apache.asterix.metadata.utils.MetadataUtil;
+import org.apache.asterix.om.base.AGeneratedUUID;
+import org.apache.asterix.om.base.AUUID;
+import org.apache.hyracks.algebricks.common.utils.Triple;
+
+/**
+ * A collection of dependencies (datasets, synonyms, functions, and graphs) associated with a
+ * {@link org.apache.asterix.graphix.metadata.entity.schema.Graph} instance.
+ */
+public class GraphRequirements implements IEntityRequirements {
+    // A graph potentially depends on datasets, synonyms, functions, and graphs.
+    private final Set<DependencyIdentifier> graphRequirements;
+    private final DataverseName dataverseName;
+    private final String graphName;
+
+    // Physically, our requirements are indexed by a UUID. Logically, we ignore this.
+    private AUUID primaryKeyValue;
+
+    public GraphRequirements(DataverseName dataverseName, String graphName, Set<DependencyIdentifier> graphRequirements,
+            AUUID primaryKeyValue) {
+        this.graphRequirements = Objects.requireNonNull(graphRequirements);
+        this.dataverseName = Objects.requireNonNull(dataverseName);
+        this.graphName = Objects.requireNonNull(graphName);
+        this.primaryKeyValue = Objects.requireNonNull(primaryKeyValue);
+    }
+
+    public GraphRequirements(DataverseName dataverseName, String graphName) {
+        this.graphRequirements = new HashSet<>();
+        this.dataverseName = Objects.requireNonNull(dataverseName);
+        this.graphName = Objects.requireNonNull(graphName);
+        this.primaryKeyValue = new AGeneratedUUID();
+    }
+
+    public void loadNonGraphDependencies(Expression body, IQueryRewriter queryRewriter) throws CompilationException {
+        // Collect our dependencies as triples.
+        List<Triple<DataverseName, String, String>> datasetDependencies = new ArrayList<>();
+        List<Triple<DataverseName, String, String>> synonymDependencies = new ArrayList<>();
+        List<Triple<DataverseName, String, String>> functionDependencies = new ArrayList<>();
+        ExpressionUtils.collectDependencies(body, queryRewriter, datasetDependencies, synonymDependencies,
+                functionDependencies);
+
+        // Transform and load into our requirements list.
+        datasetDependencies.stream()
+                .map(t -> new DependencyIdentifier(t.first, t.second, DependencyIdentifier.Kind.DATASET))
+                .forEach(graphRequirements::add);
+        synonymDependencies.stream()
+                .map(t -> new DependencyIdentifier(t.first, t.second, DependencyIdentifier.Kind.SYNONYM))
+                .forEach(graphRequirements::add);
+        functionDependencies.stream()
+                .map(t -> new DependencyIdentifier(t.first, t.second, t.third, DependencyIdentifier.Kind.FUNCTION))
+                .forEach(graphRequirements::add);
+    }
+
+    public void loadGraphDependencies(Collection<DependencyIdentifier> graphDependencies) {
+        graphRequirements.addAll(graphDependencies);
+    }
+
+    public void setPrimaryKeyValue(AUUID primaryKeyValue) {
+        this.primaryKeyValue = primaryKeyValue;
+    }
+
+    @Override
+    public AUUID getPrimaryKeyValue() {
+        return primaryKeyValue;
+    }
+
+    @Override
+    public DataverseName getDataverseName() {
+        return dataverseName;
+    }
+
+    @Override
+    public String getEntityName() {
+        return graphName;
+    }
+
+    @Override
+    public String getDisplayName() {
+        return MetadataUtil.getFullyQualifiedDisplayName(dataverseName, graphName);
+    }
+
+    @Override
+    public DependentKind getDependentKind() {
+        return DependentKind.GRAPH;
+    }
+
+    @Override
+    public Iterator<DependencyIdentifier> iterator() {
+        return graphRequirements.iterator();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/IEntityRequirements.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/IEntityRequirements.java
new file mode 100644
index 0000000..371d4e3
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/IEntityRequirements.java
@@ -0,0 +1,55 @@
+/*
+ * 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.asterix.graphix.metadata.entity.dependency;
+
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixIndexDetailProvider;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.api.IExtensionMetadataEntity;
+import org.apache.asterix.om.base.AUUID;
+
+/**
+ * Metadata for describing the pair [entity, list of dependencies for said entity]. This includes the following:
+ * 1. A primary key value associated with the pair (logically, this is ignored).
+ * 2. The dataverse name associated with the entity.
+ * 3. The name associated with the entity.
+ * 4. The kind associated with the entity (FUNCTION, GRAPH, or VIEW).
+ * 5. An iterator of the dependencies associated with the entity.
+ */
+public interface IEntityRequirements extends Iterable<DependencyIdentifier>, IExtensionMetadataEntity {
+    AUUID getPrimaryKeyValue();
+
+    DataverseName getDataverseName();
+
+    String getEntityName();
+
+    String getDisplayName();
+
+    DependentKind getDependentKind();
+
+    enum DependentKind {
+        FUNCTION,
+        GRAPH,
+        VIEW,
+    }
+
+    default ExtensionMetadataDatasetId getDatasetId() {
+        return GraphixIndexDetailProvider.getGraphDependencyIndexDetail().getExtensionDatasetID();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/ViewRequirements.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/ViewRequirements.java
new file mode 100644
index 0000000..2e529a6
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/dependency/ViewRequirements.java
@@ -0,0 +1,86 @@
+/*
+ * 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.asterix.graphix.metadata.entity.dependency;
+
+import java.util.Iterator;
+import java.util.Objects;
+import java.util.Set;
+
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.metadata.utils.DatasetUtil;
+import org.apache.asterix.om.base.AGeneratedUUID;
+import org.apache.asterix.om.base.AUUID;
+
+/**
+ * A collection of {@link org.apache.asterix.graphix.metadata.entity.schema.Graph} dependencies associated with a view
+ * instance. This does **not** include non-graph dependencies for views.
+ */
+public class ViewRequirements implements IEntityRequirements {
+    private final Set<DependencyIdentifier> viewRequirements;
+    private final DataverseName dataverseName;
+    private final String viewName;
+
+    // Physically, our requirements are indexed by a UUID. Logically, we ignore this.
+    private final AUUID primaryKeyValue;
+
+    public ViewRequirements(DataverseName dataverseName, String viewName, Set<DependencyIdentifier> viewRequirements) {
+        this.viewRequirements = Objects.requireNonNull(viewRequirements);
+        this.dataverseName = Objects.requireNonNull(dataverseName);
+        this.viewName = Objects.requireNonNull(viewName);
+        this.primaryKeyValue = new AGeneratedUUID();
+    }
+
+    public ViewRequirements(DataverseName dataverseName, String viewName, Set<DependencyIdentifier> viewRequirements,
+            AUUID primaryKeyValue) {
+        this.viewRequirements = Objects.requireNonNull(viewRequirements);
+        this.dataverseName = Objects.requireNonNull(dataverseName);
+        this.viewName = Objects.requireNonNull(viewName);
+        this.primaryKeyValue = Objects.requireNonNull(primaryKeyValue);
+    }
+
+    @Override
+    public AUUID getPrimaryKeyValue() {
+        return primaryKeyValue;
+    }
+
+    @Override
+    public DataverseName getDataverseName() {
+        return dataverseName;
+    }
+
+    @Override
+    public String getEntityName() {
+        return viewName;
+    }
+
+    @Override
+    public String getDisplayName() {
+        return DatasetUtil.getFullyQualifiedDisplayName(dataverseName, viewName);
+    }
+
+    @Override
+    public DependentKind getDependentKind() {
+        return DependentKind.VIEW;
+    }
+
+    @Override
+    public Iterator<DependencyIdentifier> iterator() {
+        return viewRequirements.iterator();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Edge.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Edge.java
new file mode 100644
index 0000000..2cd9036
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Edge.java
@@ -0,0 +1,123 @@
+/*
+ * 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.asterix.graphix.metadata.entity.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+
+/**
+ * Metadata representation of an edge. An edge consists of the following:
+ * 1. A {@link GraphElementIdentifier}, to uniquely identify the edge across other graph elements.
+ * 2. A source vertex ({@link Vertex}) reference.
+ * 3. A destination vertex ({@link Vertex}) reference.
+ * 4. A collection of edge definitions, which contains a source key, destination key, and a SQL++ string.
+ */
+public class Edge implements Element {
+    private static final long serialVersionUID = 1L;
+
+    private final GraphElementIdentifier identifier;
+    private final Vertex destinationVertex;
+    private final Vertex sourceVertex;
+    private final List<Definition> definitions;
+
+    /**
+     * Use {@link Schema.Builder} to build Edge instances instead of this constructor.
+     */
+    Edge(GraphElementIdentifier identifier, Vertex destinationVertex, Vertex sourceVertex, Definition edgeDefinition) {
+        this.destinationVertex = Objects.requireNonNull(destinationVertex);
+        this.sourceVertex = Objects.requireNonNull(sourceVertex);
+        this.identifier = Objects.requireNonNull(identifier);
+        this.definitions = new ArrayList<>();
+        this.definitions.add(Objects.requireNonNull(edgeDefinition));
+    }
+
+    public static class Definition {
+        private final List<List<String>> destinationKeyFieldNames;
+        private final List<List<String>> sourceKeyFieldNames;
+        private final String definition;
+
+        Definition(List<List<String>> destinationKeyFieldNames, List<List<String>> sourceKeyFieldNames,
+                String definition) {
+            this.destinationKeyFieldNames = Objects.requireNonNull(destinationKeyFieldNames);
+            this.sourceKeyFieldNames = Objects.requireNonNull(sourceKeyFieldNames);
+            this.definition = Objects.requireNonNull(definition);
+        }
+
+        public List<List<String>> getDestinationKeyFieldNames() {
+            return destinationKeyFieldNames;
+        }
+
+        public List<List<String>> getSourceKeyFieldNames() {
+            return sourceKeyFieldNames;
+        }
+
+        public String getDefinition() {
+            return definition;
+        }
+    }
+
+    public ElementLabel getDestinationLabel() {
+        return destinationVertex.getLabel();
+    }
+
+    public ElementLabel getSourceLabel() {
+        return sourceVertex.getLabel();
+    }
+
+    public Vertex getDestinationVertex() {
+        return destinationVertex;
+    }
+
+    public Vertex getSourceVertex() {
+        return sourceVertex;
+    }
+
+    public List<Definition> getDefinitions() {
+        return definitions;
+    }
+
+    @Override
+    public GraphElementIdentifier getIdentifier() {
+        return identifier;
+    }
+
+    @Override
+    public ElementLabel getLabel() {
+        return identifier.getElementLabel();
+    }
+
+    @Override
+    public List<String> getDefinitionBodies() {
+        return definitions.stream().map(Definition::getDefinition).collect(Collectors.toList());
+    }
+
+    @Override
+    public String toString() {
+        String edgeBodyPattern = "[:" + getLabel() + "]";
+        String sourceNodePattern = "(:" + getSourceLabel() + ")";
+        String destinationNodePattern = "(:" + getDestinationLabel() + ")";
+        String edgePattern = sourceNodePattern + "-" + edgeBodyPattern + "->" + destinationNodePattern;
+        return edgePattern + " AS " + String.join(",\n", getDefinitionBodies());
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Element.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Element.java
new file mode 100644
index 0000000..e0123bc
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Element.java
@@ -0,0 +1,39 @@
+/*
+ * 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.asterix.graphix.metadata.entity.schema;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+
+/**
+ * Metadata interface for a graph element (i.e. edge or vertex). An element has the following:
+ * 1. A {@link GraphElementIdentifier}, to uniquely identify the element across other graph elements.
+ * 2. A {@link ElementLabel} unique amongst the element classes (e.g. an edge label is unique amongst all graph edges).
+ * 3. A non-empty list of SQL++ strings, each of which represents a definition.
+ */
+public interface Element extends Serializable {
+    GraphElementIdentifier getIdentifier();
+
+    ElementLabel getLabel();
+
+    List<String> getDefinitionBodies();
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Graph.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Graph.java
new file mode 100644
index 0000000..e3b9f6f
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Graph.java
@@ -0,0 +1,63 @@
+/*
+ * 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.asterix.graphix.metadata.entity.schema;
+
+import java.util.Objects;
+
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixIndexDetailProvider;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.api.IExtensionMetadataEntity;
+
+/**
+ * Metadata describing a graph view, composed of a {@link Schema} instance and a {@link GraphIdentifier}.
+ */
+public class Graph implements IExtensionMetadataEntity {
+    private static final long serialVersionUID = 1L;
+
+    private final GraphIdentifier graphIdentifier;
+    private final Schema graphSchema;
+
+    public Graph(GraphIdentifier graphIdentifier, Schema graphSchema) {
+        this.graphSchema = Objects.requireNonNull(graphSchema);
+        this.graphIdentifier = graphIdentifier;
+    }
+
+    public DataverseName getDataverseName() {
+        return graphIdentifier.getDataverseName();
+    }
+
+    public String getGraphName() {
+        return graphIdentifier.getGraphName();
+    }
+
+    public GraphIdentifier getIdentifier() {
+        return graphIdentifier;
+    }
+
+    public Schema getGraphSchema() {
+        return graphSchema;
+    }
+
+    @Override
+    public ExtensionMetadataDatasetId getDatasetId() {
+        return GraphixIndexDetailProvider.getGraphIndexDetail().getExtensionDatasetID();
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Schema.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Schema.java
new file mode 100644
index 0000000..b4b965a
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Schema.java
@@ -0,0 +1,170 @@
+/*
+ * 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.asterix.graphix.metadata.entity.schema;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+
+/**
+ * Metadata representation of a graph schema. A graph schema consists of:
+ * 1. A list of {@link Vertex} instances.
+ * 2. A list of {@link Edge} instances, which link the aforementioned vertices.
+ */
+public class Schema implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    // The element map is composed of the vertices and edges.
+    private final List<Vertex> vertexList = new ArrayList<>();
+    private final List<Edge> edgeList = new ArrayList<>();
+
+    public List<Vertex> getVertices() {
+        return vertexList;
+    }
+
+    public List<Edge> getEdges() {
+        return edgeList;
+    }
+
+    /**
+     * Use the {@link Builder} class to create Schema instances.
+     */
+    private Schema() {
+    }
+
+    public static class Builder {
+        private final Map<ElementLabel, Vertex> vertexLabelMap = new HashMap<>();
+        private final Map<ElementLabel, List<Edge>> edgeLabelMap = new HashMap<>();
+
+        // We aim to populate the schema object below.
+        private final Schema workingSchema;
+        private final GraphIdentifier graphIdentifier;
+        private Error lastError = Error.NO_ERROR;
+
+        public Builder(GraphIdentifier graphIdentifier) {
+            this.graphIdentifier = graphIdentifier;
+            this.workingSchema = new Schema();
+        }
+
+        /**
+         * @return Null if the primary keys of an existing vertex conflict with the vertex to-be-added. The vertex
+         * to-be-added otherwise.
+         */
+        public Vertex addVertex(ElementLabel vertexLabel, List<List<String>> primaryKeyFieldNames, String definition) {
+            if (!vertexLabelMap.containsKey(vertexLabel)) {
+                GraphElementIdentifier identifier =
+                        new GraphElementIdentifier(graphIdentifier, GraphElementIdentifier.Kind.VERTEX, vertexLabel);
+                Vertex newVertex = new Vertex(identifier, new Vertex.Definition(primaryKeyFieldNames, definition));
+                workingSchema.vertexList.add(newVertex);
+                vertexLabelMap.put(vertexLabel, newVertex);
+                return newVertex;
+
+            } else {
+                Vertex existingVertex = vertexLabelMap.get(vertexLabel);
+                if (!existingVertex.getPrimaryKeyFieldNames().equals(primaryKeyFieldNames)) {
+                    lastError = Error.CONFLICTING_PRIMARY_KEY;
+                    return null;
+                }
+                existingVertex.getDefinitions().add(new Vertex.Definition(primaryKeyFieldNames, definition));
+                return existingVertex;
+            }
+        }
+
+        /**
+         * @return Null if there exists no vertex with the given source label or destination label, OR if the
+         * source vertex / destination vertex of an existing edge conflict with the edge to-be-added, OR if the source
+         * key / destination key of an existing edge conflict with the edge to-be-added. Otherwise, the edge
+         * to-be-added.
+         */
+        public Edge addEdge(ElementLabel edgeLabel, ElementLabel destinationLabel, ElementLabel sourceLabel,
+                List<List<String>> destinationKeyFieldNames, List<List<String>> sourceKeyFieldNames,
+                String definitionBody) {
+            if (!vertexLabelMap.containsKey(sourceLabel)) {
+                lastError = Error.SOURCE_VERTEX_NOT_FOUND;
+                return null;
+
+            } else if (!vertexLabelMap.containsKey(destinationLabel)) {
+                lastError = Error.DESTINATION_VERTEX_NOT_FOUND;
+                return null;
+            }
+
+            if (edgeLabelMap.containsKey(edgeLabel)) {
+                for (Edge existingEdge : edgeLabelMap.get(edgeLabel)) {
+                    ElementLabel existingSourceLabel = existingEdge.getSourceLabel();
+                    ElementLabel existingDestLabel = existingEdge.getDestinationLabel();
+                    if (existingSourceLabel.equals(sourceLabel) && existingDestLabel.equals(destinationLabel)) {
+                        Edge.Definition existingDefinition = existingEdge.getDefinitions().get(0);
+                        if (!existingDefinition.getSourceKeyFieldNames().equals(sourceKeyFieldNames)) {
+                            lastError = Error.CONFLICTING_SOURCE_KEY;
+                            return null;
+
+                        } else if (!existingDefinition.getDestinationKeyFieldNames().equals(destinationKeyFieldNames)) {
+                            lastError = Error.CONFLICTING_DESTINATION_KEY;
+                            return null;
+
+                        } else {
+                            Edge.Definition newEdgeDefinition =
+                                    new Edge.Definition(destinationKeyFieldNames, sourceKeyFieldNames, definitionBody);
+                            existingEdge.getDefinitions().add(newEdgeDefinition);
+                            return existingEdge;
+                        }
+                    }
+                }
+            }
+
+            // Update our schema.
+            GraphElementIdentifier identifier =
+                    new GraphElementIdentifier(graphIdentifier, GraphElementIdentifier.Kind.EDGE, edgeLabel);
+            Edge newEdge = new Edge(identifier, vertexLabelMap.get(destinationLabel), vertexLabelMap.get(sourceLabel),
+                    new Edge.Definition(destinationKeyFieldNames, sourceKeyFieldNames, definitionBody));
+            workingSchema.edgeList.add(newEdge);
+
+            // Update our edge label map.
+            ArrayList<Edge> edgeList = new ArrayList<>();
+            edgeList.add(newEdge);
+            edgeLabelMap.put(edgeLabel, edgeList);
+            return newEdge;
+        }
+
+        public Schema build() {
+            return workingSchema;
+        }
+
+        public Error getLastError() {
+            return lastError;
+        }
+
+        public enum Error {
+            NO_ERROR,
+
+            CONFLICTING_PRIMARY_KEY,
+            CONFLICTING_SOURCE_KEY,
+            CONFLICTING_DESTINATION_KEY,
+
+            SOURCE_VERTEX_NOT_FOUND,
+            DESTINATION_VERTEX_NOT_FOUND
+        }
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Vertex.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Vertex.java
new file mode 100644
index 0000000..e6950e3
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entity/schema/Vertex.java
@@ -0,0 +1,100 @@
+/*
+ * 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.asterix.graphix.metadata.entity.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+
+/**
+ * Metadata representation of a vertex. A vertex consists of the following:
+ * 1. A {@link GraphElementIdentifier}, to uniquely identify the vertex across other graph elements.
+ * 2. A collection of vertex definitions, each of which consists of a primary key and a SQL++ string.
+ */
+public class Vertex implements Element {
+    private static final long serialVersionUID = 1L;
+
+    private final GraphElementIdentifier identifier;
+    private final List<Definition> definitions;
+
+    /**
+     * Use {@link Schema.Builder} to build Vertex instances instead of this constructor.
+     */
+    Vertex(GraphElementIdentifier identifier, Definition definition) {
+        this.identifier = Objects.requireNonNull(identifier);
+        this.definitions = new ArrayList<>();
+        this.definitions.add(Objects.requireNonNull(definition));
+    }
+
+    public static class Definition {
+        private final List<List<String>> primaryKeyFieldNames;
+        private final String definition;
+
+        Definition(List<List<String>> primaryKeyFieldNames, String definition) {
+            this.primaryKeyFieldNames = primaryKeyFieldNames;
+            this.definition = definition;
+        }
+
+        public List<List<String>> getPrimaryKeyFieldNames() {
+            return primaryKeyFieldNames;
+        }
+
+        public String getDefinition() {
+            return definition;
+        }
+
+        @Override
+        public String toString() {
+            return definition;
+        }
+    }
+
+    // A primary key is the same across all vertex definitions.
+    public List<List<String>> getPrimaryKeyFieldNames() {
+        return definitions.get(0).getPrimaryKeyFieldNames();
+    }
+
+    public List<Definition> getDefinitions() {
+        return definitions;
+    }
+
+    @Override
+    public GraphElementIdentifier getIdentifier() {
+        return identifier;
+    }
+
+    @Override
+    public ElementLabel getLabel() {
+        return identifier.getElementLabel();
+    }
+
+    @Override
+    public List<String> getDefinitionBodies() {
+        return definitions.stream().map(Definition::getDefinition).collect(Collectors.toList());
+    }
+
+    @Override
+    public String toString() {
+        return "(:" + getLabel() + ") AS " + String.join(",\n", getDefinitionBodies());
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entitytupletranslators/DependencyTupleTranslator.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entitytupletranslators/DependencyTupleTranslator.java
new file mode 100644
index 0000000..77c1637
--- /dev/null
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entitytupletranslators/DependencyTupleTranslator.java
@@ -0,0 +1,293 @@
+/*
+ * 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.asterix.graphix.metadata.entitytupletranslators;
+
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_DEPENDENCY_ID;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_ENTITY_DETAIL;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_ENTITY_NAME;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DEPENDENCIES;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_KIND;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.asterix.builders.IARecordBuilder;
+import org.apache.asterix.builders.OrderedListBuilder;
+import org.apache.asterix.builders.RecordBuilder;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.common.metadata.DataverseName;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixIndexDetailProvider;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider;
+import org.apache.asterix.graphix.metadata.bootstrap.IRecordTypeDetail;
+import org.apache.asterix.graphix.metadata.entity.dependency.DependencyIdentifier;
+import org.apache.asterix.graphix.metadata.entity.dependency.FunctionRequirements;
+import org.apache.asterix.graphix.metadata.entity.dependency.GraphRequirements;
+import org.apache.asterix.graphix.metadata.entity.dependency.IEntityRequirements;
+import org.apache.asterix.graphix.metadata.entity.dependency.ViewRequirements;
+import org.apache.asterix.metadata.entitytupletranslators.AbstractTupleTranslator;
+import org.apache.asterix.om.base.AMutableUUID;
+import org.apache.asterix.om.base.AOrderedList;
+import org.apache.asterix.om.base.ARecord;
+import org.apache.asterix.om.base.AString;
+import org.apache.asterix.om.base.AUUID;
+import org.apache.asterix.om.base.IACursor;
+import org.apache.asterix.om.base.IAObject;
+import org.apache.asterix.om.types.AOrderedListType;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.ErrorCode;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
+
+public class DependencyTupleTranslator extends AbstractTupleTranslator<IEntityRequirements> {
+    // Payload field containing serialized GraphDependency record.
+    private static final int GRAPH_DEPENDENCY_PAYLOAD_TUPLE_FIELD_INDEX = 1;
+
+    // We are interested in the detail of the following records.
+    private static final IRecordTypeDetail DEP_RECORD_DETAIL = GraphixRecordDetailProvider.getDependencyRecordDetail();
+    private static final IRecordTypeDetail GRA_RECORD_DETAIL =
+            GraphixRecordDetailProvider.getGraphDependencyRecordDetail();
+
+    // For constructing our dependency lists.
+    protected OrderedListBuilder listBuilder;
+    protected IARecordBuilder depRecordBuilder;
+    protected AOrderedListType stringList;
+
+    public DependencyTupleTranslator(boolean getTuple) {
+        super(getTuple, GraphixIndexDetailProvider.getGraphDependencyIndexDetail().getExtensionDataset(),
+                GRAPH_DEPENDENCY_PAYLOAD_TUPLE_FIELD_INDEX);
+
+        if (getTuple) {
+            listBuilder = new OrderedListBuilder();
+            depRecordBuilder = new RecordBuilder();
+
+            // Avoid having to create the string list types multiple times.
+            stringList = new AOrderedListType(BuiltinType.ASTRING, null);
+        }
+    }
+
+    @Override
+    protected IEntityRequirements createMetadataEntityFromARecord(ARecord requirements) throws AlgebricksException {
+        // Read in our primary key value.
+        IAObject primaryKeyValueObj = GRA_RECORD_DETAIL.getObjectForField(requirements, FIELD_NAME_DEPENDENCY_ID);
+        String primaryKeyValueString = ((AString) primaryKeyValueObj).getStringValue();
+        AMutableUUID primaryKeyValue = new AMutableUUID();
+        try {
+            primaryKeyValue.parseUUIDString(primaryKeyValueString.toCharArray(), 0, AUUID.UUID_CHARS);
+
+        } catch (HyracksDataException e) {
+            throw new AlgebricksException(ErrorCode.ILLEGAL_STATE, "Could not extract UUID bytes from ARecord.");
+        }
+
+        // Read in the dataverse name.
+        IAObject dataverseNameObj = GRA_RECORD_DETAIL.getObjectForField(requirements, FIELD_NAME_DATAVERSE_NAME);
+        DataverseName dataverseName =
+                DataverseName.createFromCanonicalForm(((AString) dataverseNameObj).getStringValue());
+
+        // Read in the entity name.
+        IAObject entityNameObj = GRA_RECORD_DETAIL.getObjectForField(requirements, FIELD_NAME_ENTITY_NAME);
+        String entityName = ((AString) entityNameObj).getStringValue();
+
+        // Read in the GraphDependency kind.
+        IEntityRequirements.DependentKind entityKind;
+        IAObject entityKindObj = GRA_RECORD_DETAIL.getObjectForField(requirements, FIELD_NAME_KIND);
+        String entityKindString = ((AString) entityKindObj).getStringValue();
+        if (entityKindString.equals(IEntityRequirements.DependentKind.FUNCTION.toString())) {
+            entityKind = IEntityRequirements.DependentKind.FUNCTION;
+
+        } else if (entityKindString.equals(IEntityRequirements.DependentKind.GRAPH.toString())) {
+            entityKind = IEntityRequirements.DependentKind.GRAPH;
+
+        } else { // entityKindString.equals(IEntityRequirements.DependentKind.VIEW.toString())
+            entityKind = IEntityRequirements.DependentKind.VIEW;
+        }
+
+        // If we have a function, then we must read in the entity detail.
+        String entityDetail = null;
+        if (entityKind == IEntityRequirements.DependentKind.FUNCTION) {
+            IAObject entityDetailObj = GRA_RECORD_DETAIL.getObjectForField(requirements, FIELD_NAME_ENTITY_DETAIL);
+            entityDetail = ((AString) entityDetailObj).getStringValue();
+        }
+
+        // Read in the dependencies.
+        Set<DependencyIdentifier> dependencyIdentifiers = new HashSet<>();
+        IAObject dependenciesObj = GRA_RECORD_DETAIL.getObjectForField(requirements, FIELD_NAME_DEPENDENCIES);
+        IACursor dependenciesCursor = ((AOrderedList) dependenciesObj).getCursor();
+        while (dependenciesCursor.next()) {
+            ARecord dependency = (ARecord) dependenciesCursor.get();
+
+            // Read in the dataverse name.
+            IAObject depDataverseNameObj = DEP_RECORD_DETAIL.getObjectForField(dependency, FIELD_NAME_DATAVERSE_NAME);
+            DataverseName depDataverseName =
+                    DataverseName.createFromCanonicalForm(((AString) depDataverseNameObj).getStringValue());
+
+            // Read in the entity name.
+            IAObject depEntityNameObj = DEP_RECORD_DETAIL.getObjectForField(dependency, FIELD_NAME_ENTITY_NAME);
+            String depEntityName = ((AString) depEntityNameObj).getStringValue();
+
+            // Read in the entity kind, and add the new dependency identifier.
+            DependencyIdentifier.Kind depEntityKind;
+            IAObject depEntityKindObj = DEP_RECORD_DETAIL.getObjectForField(dependency, FIELD_NAME_KIND);
+            String depEntityKindString = ((AString) depEntityKindObj).getStringValue();
+            if (depEntityKindString.equals(DependencyIdentifier.Kind.GRAPH.toString())) {
+                depEntityKind = DependencyIdentifier.Kind.GRAPH;
+
+            } else if (depEntityKindString.equals(DependencyIdentifier.Kind.DATASET.toString())) {
+                depEntityKind = DependencyIdentifier.Kind.DATASET;
+
+            } else if (depEntityKindString.equals(DependencyIdentifier.Kind.SYNONYM.toString())) {
+                depEntityKind = DependencyIdentifier.Kind.SYNONYM;
+
+            } else { // depEntityKindString.equals(DependencyIdentifier.Kind.FUNCTION.toString())
+                depEntityKind = DependencyIdentifier.Kind.FUNCTION;
+            }
+
+            // If we have a function, then we must read in the entity detail.
+            String depEntityDetail = null;
+            if (depEntityKind == DependencyIdentifier.Kind.FUNCTION) {
+                IAObject depEntityDetailObj = DEP_RECORD_DETAIL.getObjectForField(dependency, FIELD_NAME_ENTITY_DETAIL);
+                depEntityDetail = ((AString) depEntityDetailObj).getStringValue();
+            }
+
+            DependencyIdentifier depIdentifier = (depEntityKind != DependencyIdentifier.Kind.FUNCTION)
+                    ? new DependencyIdentifier(depDataverseName, depEntityName, depEntityKind)
+                    : new DependencyIdentifier(depDataverseName, depEntityName, depEntityDetail, depEntityKind);
+            dependencyIdentifiers.add(depIdentifier);
+        }
+
+        // Return the entity requirements, based on the type.
+        switch (entityKind) {
+            case FUNCTION:
+                int functionArity = Integer.parseInt(entityDetail);
+                FunctionSignature functionSignature = new FunctionSignature(dataverseName, entityName, functionArity);
+                return new FunctionRequirements(functionSignature, dependencyIdentifiers, primaryKeyValue);
+
+            case GRAPH:
+                return new GraphRequirements(dataverseName, entityName, dependencyIdentifiers, primaryKeyValue);
+
+            case VIEW:
+                return new ViewRequirements(dataverseName, entityName, dependencyIdentifiers, primaryKeyValue);
+        }
+        return null;
+    }
+
+    @Override
+    public ITupleReference getTupleFromMetadataEntity(IEntityRequirements requirements) throws HyracksDataException {
+        // TODO (GLENN): There is currently a bug where a metadata dataset index cannot have a UUID primary key field.
+        String primaryKeyValue;
+        try {
+            StringBuilder sb = new StringBuilder();
+            requirements.getPrimaryKeyValue().appendLiteralOnly(sb);
+            primaryKeyValue = sb.toString();
+
+        } catch (IOException e) {
+            throw new HyracksDataException(ErrorCode.ILLEGAL_STATE, "Could not extract UUID bytes from AUUID.");
+        }
+
+        // Write our primary key, which is an autogenerated UUID (we serialize this as a string for our tuple).
+        tupleBuilder.reset();
+        aString.setValue(primaryKeyValue);
+        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
+        tupleBuilder.addFieldEndOffset();
+
+        // Write the payload in the third field of the tuple.
+        recordBuilder.reset(GRA_RECORD_DETAIL.getRecordType());
+
+        // Write our primary key.
+        fieldValue.reset();
+        aString.setValue(primaryKeyValue);
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(GRA_RECORD_DETAIL.getIndexForField(FIELD_NAME_DEPENDENCY_ID), fieldValue);
+
+        // Write the dataverse name.
+        fieldValue.reset();
+        aString.setValue(requirements.getDataverseName().getCanonicalForm());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(GRA_RECORD_DETAIL.getIndexForField(FIELD_NAME_DATAVERSE_NAME), fieldValue);
+
+        // Write the entity name.
+        fieldValue.reset();
+        aString.setValue(requirements.getEntityName());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(GRA_RECORD_DETAIL.getIndexForField(FIELD_NAME_ENTITY_NAME), fieldValue);
+
+        // Write the entity kind.
+        fieldValue.reset();
+        aString.setValue(requirements.getDependentKind().toString());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(GRA_RECORD_DETAIL.getIndexForField(FIELD_NAME_KIND), fieldValue);
+
+        // Write our dependencies list.
+        listBuilder.reset((AOrderedListType) GRA_RECORD_DETAIL.getTypeForField(FIELD_NAME_DEPENDENCIES));
+        for (DependencyIdentifier dependency : requirements) {
+            depRecordBuilder.reset(DEP_RECORD_DETAIL.getRecordType());
+
+            // Write the dependency dataverse.
+            fieldValue.reset();
+            aString.setValue(dependency.getDataverseName().getCanonicalForm());
+            stringSerde.serialize(aString, fieldValue.getDataOutput());
+            depRecordBuilder.addField(DEP_RECORD_DETAIL.getIndexForField(FIELD_NAME_DATAVERSE_NAME), fieldValue);
+
+            // Write the dependency entity name.
+            fieldValue.reset();
+            aString.setValue(dependency.getEntityName());
+            stringSerde.serialize(aString, fieldValue.getDataOutput());
+            depRecordBuilder.addField(DEP_RECORD_DETAIL.getIndexForField(FIELD_NAME_ENTITY_NAME), fieldValue);
+
+            // Write the dependency kind.
+            fieldValue.reset();
+            aString.setValue(dependency.getDependencyKind().toString());
+            stringSerde.serialize(aString, fieldValue.getDataOutput());
+            depRecordBuilder.addField(DEP_RECORD_DETAIL.getIndexForField(FIELD_NAME_KIND), fieldValue);
+
+            // Write the dependency entity detail, if it exists.
+            if (dependency.getDependencyKind() == DependencyIdentifier.Kind.FUNCTION) {
+                fieldValue.reset();
+                aString.setValue(dependency.getEntityDetail());
+                stringSerde.serialize(aString, fieldValue.getDataOutput());
+                depRecordBuilder.addField(DEP_RECORD_DETAIL.getIndexForField(FIELD_NAME_ENTITY_DETAIL), fieldValue);
+            }
+
+            // Write the dependencies record.
+            fieldValue.reset();
+            depRecordBuilder.write(fieldValue.getDataOutput(), true);
+            listBuilder.addItem(fieldValue);
+        }
+        fieldValue.reset();
+        listBuilder.write(fieldValue.getDataOutput(), true);
+        recordBuilder.addField(GRA_RECORD_DETAIL.getIndexForField(FIELD_NAME_DEPENDENCIES), fieldValue);
+
+        // Write the entity detail, if it exists.
+        if (requirements.getDependentKind() == IEntityRequirements.DependentKind.FUNCTION) {
+            FunctionRequirements functionRequirements = (FunctionRequirements) requirements;
+            fieldValue.reset();
+            aString.setValue(functionRequirements.getArityAsString());
+            stringSerde.serialize(aString, fieldValue.getDataOutput());
+            recordBuilder.addField(GRA_RECORD_DETAIL.getIndexForField(FIELD_NAME_ENTITY_DETAIL), fieldValue);
+        }
+
+        // Finally, write our record.
+        recordBuilder.write(tupleBuilder.getDataOutput(), true);
+        tupleBuilder.addFieldEndOffset();
+        tuple.reset(tupleBuilder.getFieldEndOffsets(), tupleBuilder.getByteArray());
+        return tuple;
+    }
+}
diff --git a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entitytupletranslators/GraphTupleTranslator.java b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entitytupletranslators/GraphTupleTranslator.java
index 9c83184..8702cd5 100644
--- a/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entitytupletranslators/GraphTupleTranslator.java
+++ b/asterix-graphix/src/main/java/org/apache/asterix/graphix/metadata/entitytupletranslators/GraphTupleTranslator.java
@@ -16,9 +16,21 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.asterix.graphix.metadata.entitytupletranslators;
 
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_BODY;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_DEFINITIONS;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_DESTINATION_KEY;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_DESTINATION_LABEL;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_EDGES;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_GRAPH_NAME;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_LABEL;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_SOURCE_KEY;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_SOURCE_LABEL;
+import static org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider.FIELD_NAME_VERTICES;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME;
+import static org.apache.asterix.metadata.bootstrap.MetadataRecordTypes.FIELD_NAME_PRIMARY_KEY;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -29,19 +41,23 @@
 import org.apache.asterix.common.exceptions.ErrorCode;
 import org.apache.asterix.common.metadata.DataverseName;
 import org.apache.asterix.graphix.common.metadata.GraphIdentifier;
-import org.apache.asterix.graphix.metadata.bootstrap.GraphixMetadataIndexes;
-import org.apache.asterix.graphix.metadata.bootstrap.GraphixMetadataRecordTypes;
-import org.apache.asterix.graphix.metadata.entities.Graph;
-import org.apache.asterix.graphix.metadata.entities.GraphDependencies;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixIndexDetailProvider;
+import org.apache.asterix.graphix.metadata.bootstrap.GraphixRecordDetailProvider;
+import org.apache.asterix.graphix.metadata.bootstrap.IRecordTypeDetail;
+import org.apache.asterix.graphix.metadata.entity.schema.Edge;
+import org.apache.asterix.graphix.metadata.entity.schema.Graph;
+import org.apache.asterix.graphix.metadata.entity.schema.Schema;
+import org.apache.asterix.graphix.metadata.entity.schema.Vertex;
 import org.apache.asterix.metadata.entitytupletranslators.AbstractTupleTranslator;
 import org.apache.asterix.om.base.AOrderedList;
 import org.apache.asterix.om.base.ARecord;
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.base.IACursor;
+import org.apache.asterix.om.base.IAObject;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.utils.Triple;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
@@ -50,181 +66,177 @@
     // Payload field containing serialized Graph.
     private static final int GRAPH_PAYLOAD_TUPLE_FIELD_INDEX = 2;
 
-    // For constructing our dependency, edge, and vertex lists.
+    // We are interested in the detail of the following records.
+    private static final IRecordTypeDetail EDEF_RECORD_DETAIL = GraphixRecordDetailProvider.getEdgeDefRecordDetail();
+    private static final IRecordTypeDetail EDGE_RECORD_DETAIL = GraphixRecordDetailProvider.getEdgeRecordDetail();
+    private static final IRecordTypeDetail VDEF_RECORD_DETAIL = GraphixRecordDetailProvider.getVertexDefRecordDetail();
+    private static final IRecordTypeDetail VERTEX_RECORD_DETAIL = GraphixRecordDetailProvider.getVertexRecordDetail();
+    private static final IRecordTypeDetail GRAPH_RECORD_DETAIL = GraphixRecordDetailProvider.getGraphRecordDetail();
+
+    // For constructing our edge and vertex lists.
     protected OrderedListBuilder listBuilder;
+    protected OrderedListBuilder defListBuilder;
     protected OrderedListBuilder innerListBuilder;
     protected OrderedListBuilder nameListBuilder;
-    protected IARecordBuilder subRecordBuilder;
+    protected IARecordBuilder elemRecordBuilder;
+    protected IARecordBuilder defRecordBuilder;
     protected AOrderedListType stringListList;
     protected AOrderedListType stringList;
 
     public GraphTupleTranslator(boolean getTuple) {
-        super(getTuple, GraphixMetadataIndexes.GRAPH_DATASET, GRAPH_PAYLOAD_TUPLE_FIELD_INDEX);
+        super(getTuple, GraphixIndexDetailProvider.getGraphIndexDetail().getExtensionDataset(),
+                GRAPH_PAYLOAD_TUPLE_FIELD_INDEX);
+
         if (getTuple) {
             listBuilder = new OrderedListBuilder();
+            defListBuilder = new OrderedListBuilder();
             innerListBuilder = new OrderedListBuilder();
             nameListBuilder = new OrderedListBuilder();
-            subRecordBuilder = new RecordBuilder();
+            elemRecordBuilder = new RecordBuilder();
+            defRecordBuilder = new RecordBuilder();
+
+            // Avoid having to create the string list types multiple times.
             stringListList = new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null);
             stringList = new AOrderedListType(BuiltinType.ASTRING, null);
         }
     }
 
     @Override
-    protected Graph createMetadataEntityFromARecord(ARecord graphRecord) throws AlgebricksException {
+    protected Graph createMetadataEntityFromARecord(ARecord graph) throws AlgebricksException {
         // Read in the dataverse name.
-        DataverseName dataverseName = DataverseName.createFromCanonicalForm(((AString) graphRecord
-                .getValueByPos(GraphixMetadataRecordTypes.GRAPH_ARECORD_DATAVERSENAME_FIELD_INDEX)).getStringValue());
+        IAObject dataverseNameObj = GRAPH_RECORD_DETAIL.getObjectForField(graph, FIELD_NAME_DATAVERSE_NAME);
+        DataverseName dataverseName =
+                DataverseName.createFromCanonicalForm(((AString) dataverseNameObj).getStringValue());
 
         // Read in the graph name.
-        String graphName =
-                ((AString) graphRecord.getValueByPos(GraphixMetadataRecordTypes.GRAPH_ARECORD_GRAPHNAME_FIELD_INDEX))
-                        .getStringValue();
-
-        // Read in the dependencies.
-        IACursor dependenciesCursor = ((AOrderedList) graphRecord
-                .getValueByPos(GraphixMetadataRecordTypes.GRAPH_ARECORD_DEPENDENCIES_FIELD_INDEX)).getCursor();
-        List<List<Triple<DataverseName, String, String>>> graphDependencies = new ArrayList<>();
-        while (dependenciesCursor.next()) {
-            List<Triple<DataverseName, String, String>> dependencyList = new ArrayList<>();
-            IACursor qualifiedDependencyCursor = ((AOrderedList) dependenciesCursor.get()).getCursor();
-            while (qualifiedDependencyCursor.next()) {
-                Triple<DataverseName, String, String> dependency =
-                        getDependency((AOrderedList) qualifiedDependencyCursor.get());
-                dependencyList.add(dependency);
-            }
-            graphDependencies.add(dependencyList);
-        }
+        IAObject graphNameObj = GRAPH_RECORD_DETAIL.getObjectForField(graph, FIELD_NAME_GRAPH_NAME);
+        String graphName = ((AString) graphNameObj).getStringValue();
 
         // Read in the vertex and edge lists.
         GraphIdentifier graphIdentifier = new GraphIdentifier(dataverseName, graphName);
-        Graph.Schema graphSchema = readGraphSchema(graphRecord, graphIdentifier);
-        return new Graph(graphIdentifier, graphSchema, new GraphDependencies(graphDependencies));
+        Schema graphSchema = readGraphSchema(graph, graphIdentifier);
+        return new Graph(graphIdentifier, graphSchema);
     }
 
-    private Graph.Schema readGraphSchema(ARecord graphRecord, GraphIdentifier graphIdentifier) throws AsterixException {
-        Graph.Schema.Builder schemaBuilder = new Graph.Schema.Builder(graphIdentifier);
+    private Schema readGraphSchema(ARecord graph, GraphIdentifier graphIdentifier) throws AsterixException {
+        Schema.Builder schemaBuilder = new Schema.Builder(graphIdentifier);
 
         // Read in the vertex list.
-        IACursor verticesCursor = ((AOrderedList) graphRecord
-                .getValueByPos(GraphixMetadataRecordTypes.GRAPH_ARECORD_VERTICES_FIELD_INDEX)).getCursor();
+        IAObject verticesObj = GRAPH_RECORD_DETAIL.getObjectForField(graph, FIELD_NAME_VERTICES);
+        IACursor verticesCursor = ((AOrderedList) verticesObj).getCursor();
         while (verticesCursor.next()) {
             ARecord vertex = (ARecord) verticesCursor.get();
 
             // Read in the label name.
-            String labelName = ((AString) vertex
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_VERTICES_ARECORD_LABEL_FIELD_INDEX))
-                            .getStringValue();
+            IAObject labelNameObj = VERTEX_RECORD_DETAIL.getObjectForField(vertex, FIELD_NAME_LABEL);
+            ElementLabel vertexLabel = new ElementLabel(((AString) labelNameObj).getStringValue());
 
-            // Read in the primary key fields.
-            List<List<String>> primaryKeyFields = new ArrayList<>();
-            IACursor primaryKeyCursor = ((AOrderedList) vertex
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_VERTICES_ARECORD_PRIMARY_KEY_FIELD_INDEX))
-                            .getCursor();
-            while (primaryKeyCursor.next()) {
-                IACursor nameCursor = ((AOrderedList) primaryKeyCursor.get()).getCursor();
-                primaryKeyFields.add(readNameList(nameCursor));
-            }
-
-            // Read in the vertex definition(s). Validate each definition.
-            IACursor definitionsCursor = ((AOrderedList) vertex
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_VERTICES_ARECORD_DEFINITIONS_FIELD_INDEX))
-                            .getCursor();
+            // Read in our vertex definitions.
+            IAObject definitionsObj = VERTEX_RECORD_DETAIL.getObjectForField(vertex, FIELD_NAME_DEFINITIONS);
+            IACursor definitionsCursor = ((AOrderedList) definitionsObj).getCursor();
             while (definitionsCursor.next()) {
-                String definition = ((AString) definitionsCursor.get()).getStringValue();
-                schemaBuilder.addVertex(labelName, primaryKeyFields, definition);
+                ARecord definition = (ARecord) definitionsCursor.get();
+
+                // Read in the primary key fields.
+                List<List<String>> primaryKeyFields = new ArrayList<>();
+                IAObject primaryKeyObj = VDEF_RECORD_DETAIL.getObjectForField(definition, FIELD_NAME_PRIMARY_KEY);
+                IACursor primaryKeyCursor = ((AOrderedList) primaryKeyObj).getCursor();
+                while (primaryKeyCursor.next()) {
+                    IACursor nameCursor = ((AOrderedList) primaryKeyCursor.get()).getCursor();
+                    primaryKeyFields.add(readNameList(nameCursor));
+                }
+
+                // Read in the definition body.
+                IAObject bodyObj = VDEF_RECORD_DETAIL.getObjectForField(definition, FIELD_NAME_BODY);
+                String definitionBody = ((AString) bodyObj).getStringValue();
+
+                // Read in the vertex definition, and perform validation of the metadata record.
+                schemaBuilder.addVertex(vertexLabel, primaryKeyFields, definitionBody);
                 switch (schemaBuilder.getLastError()) {
                     case NO_ERROR:
                         break;
 
                     case CONFLICTING_PRIMARY_KEY:
                         throw new AsterixException(ErrorCode.METADATA_ERROR,
-                                "Conflicting primary keys for vertices with label " + labelName);
+                                "Conflicting primary keys for vertices with label " + vertexLabel);
 
                     default:
                         throw new AsterixException(ErrorCode.METADATA_ERROR,
-                                "Schema vertex was not returned, but the error is not a conflicting primary key!");
+                                "Constructor vertex was not returned, but the error is not a conflicting primary key!");
                 }
             }
         }
 
         // Read in the edge list.
-        IACursor edgesCursor =
-                ((AOrderedList) graphRecord.getValueByPos(GraphixMetadataRecordTypes.GRAPH_ARECORD_EDGES_FIELD_INDEX))
-                        .getCursor();
+        IAObject edgesObj = GRAPH_RECORD_DETAIL.getObjectForField(graph, FIELD_NAME_EDGES);
+        IACursor edgesCursor = ((AOrderedList) edgesObj).getCursor();
         while (edgesCursor.next()) {
             ARecord edge = (ARecord) edgesCursor.get();
 
             // Read in the label name.
-            String labelName =
-                    ((AString) edge.getValueByPos(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_LABEL_FIELD_INDEX))
-                            .getStringValue();
+            IAObject labelNameObj = EDGE_RECORD_DETAIL.getObjectForField(edge, FIELD_NAME_LABEL);
+            ElementLabel edgeLabel = new ElementLabel(((AString) labelNameObj).getStringValue());
 
             // Read in the destination label name.
-            String destinationLabelName = ((AString) edge
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_DEST_LABEL_FIELD_INDEX))
-                            .getStringValue();
+            IAObject destinationLabelNameObj = EDGE_RECORD_DETAIL.getObjectForField(edge, FIELD_NAME_DESTINATION_LABEL);
+            ElementLabel destinationLabel = new ElementLabel(((AString) destinationLabelNameObj).getStringValue());
 
             // Read in the source label name.
-            String sourceLabelName = ((AString) edge
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_SOURCE_LABEL_FIELD_INDEX))
-                            .getStringValue();
+            IAObject sourceLabelNameObj = EDGE_RECORD_DETAIL.getObjectForField(edge, FIELD_NAME_SOURCE_LABEL);
+            ElementLabel sourceLabel = new ElementLabel(((AString) sourceLabelNameObj).getStringValue());
 
-            // Read in the primary key fields.
-            List<List<String>> primaryKeyFields = new ArrayList<>();
-            IACursor primaryKeyCursor = ((AOrderedList) edge
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_PRIMARY_KEY_FIELD_INDEX)).getCursor();
-            while (primaryKeyCursor.next()) {
-                IACursor nameCursor = ((AOrderedList) primaryKeyCursor.get()).getCursor();
-                primaryKeyFields.add(readNameList(nameCursor));
-            }
-
-            // Read in the destination key fields.
-            List<List<String>> destinationKeyFields = new ArrayList<>();
-            IACursor destinationKeyCursor = ((AOrderedList) edge
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_DEST_KEY_FIELD_INDEX)).getCursor();
-            while (destinationKeyCursor.next()) {
-                IACursor nameCursor = ((AOrderedList) destinationKeyCursor.get()).getCursor();
-                destinationKeyFields.add(readNameList(nameCursor));
-            }
-
-            // Read in the source key fields.
-            List<List<String>> sourceKeyFields = new ArrayList<>();
-            IACursor sourceKeyCursor = ((AOrderedList) edge
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_SOURCE_KEY_FIELD_INDEX)).getCursor();
-            while (sourceKeyCursor.next()) {
-                IACursor nameCursor = ((AOrderedList) sourceKeyCursor.get()).getCursor();
-                sourceKeyFields.add(readNameList(nameCursor));
-            }
-
-            // Read in the edge definition(s). Validate each definition.
-            IACursor definitionsCursor = ((AOrderedList) edge
-                    .getValueByPos(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_DEFINITIONS_FIELD_INDEX)).getCursor();
+            // Read in our edge definitions.
+            IAObject definitionsObj = EDGE_RECORD_DETAIL.getObjectForField(edge, FIELD_NAME_DEFINITIONS);
+            IACursor definitionsCursor = ((AOrderedList) definitionsObj).getCursor();
             while (definitionsCursor.next()) {
-                String definition = ((AString) definitionsCursor.get()).getStringValue();
-                schemaBuilder.addEdge(labelName, destinationLabelName, sourceLabelName, primaryKeyFields,
-                        destinationKeyFields, sourceKeyFields, definition);
+                ARecord definition = (ARecord) definitionsCursor.get();
+
+                // Read in the source key fields.
+                List<List<String>> sourceKeyFields = new ArrayList<>();
+                IAObject sourceKeyObj = EDEF_RECORD_DETAIL.getObjectForField(definition, FIELD_NAME_SOURCE_KEY);
+                IACursor sourceKeyCursor = ((AOrderedList) sourceKeyObj).getCursor();
+                while (sourceKeyCursor.next()) {
+                    IACursor nameCursor = ((AOrderedList) sourceKeyCursor.get()).getCursor();
+                    sourceKeyFields.add(readNameList(nameCursor));
+                }
+
+                // Read in the destination key fields (this is common to all edge definition records).
+                List<List<String>> destinationKeyFields = new ArrayList<>();
+                IAObject destinationKeyObj =
+                        EDEF_RECORD_DETAIL.getObjectForField(definition, FIELD_NAME_DESTINATION_KEY);
+                IACursor destinationKeyCursor = ((AOrderedList) destinationKeyObj).getCursor();
+                while (destinationKeyCursor.next()) {
+                    IACursor nameCursor = ((AOrderedList) destinationKeyCursor.get()).getCursor();
+                    destinationKeyFields.add(readNameList(nameCursor));
+                }
+
+                // Read in the definition body.
+                IAObject bodyObj = EDEF_RECORD_DETAIL.getObjectForField(definition, FIELD_NAME_BODY);
+                String definitionBody = ((AString) bodyObj).getStringValue();
+
+                // Finally, read in the edge definition and perform validation of the metadata record.
+                schemaBuilder.addEdge(edgeLabel, destinationLabel, sourceLabel, destinationKeyFields, sourceKeyFields,
+                        definitionBody);
                 switch (schemaBuilder.getLastError()) {
                     case NO_ERROR:
                         break;
 
                     case SOURCE_VERTEX_NOT_FOUND:
                         throw new AsterixException(ErrorCode.METADATA_ERROR,
-                                "Source vertex " + sourceLabelName + " not found in the edge " + labelName + ".");
+                                "Source vertex " + sourceLabel + " not found in the edge " + edgeLabel + ".");
 
                     case DESTINATION_VERTEX_NOT_FOUND:
-                        throw new AsterixException(ErrorCode.METADATA_ERROR, "Destination vertex "
-                                + destinationLabelName + " not found in the edge " + labelName + ".");
-
-                    case CONFLICTING_PRIMARY_KEY:
-                    case CONFLICTING_SOURCE_VERTEX:
-                    case CONFLICTING_DESTINATION_VERTEX:
                         throw new AsterixException(ErrorCode.METADATA_ERROR,
-                                "Conflicting edge with the same label found: " + labelName);
+                                "Destination vertex " + destinationLabel + " not found in the edge " + edgeLabel + ".");
+
+                    case CONFLICTING_SOURCE_KEY:
+                    case CONFLICTING_DESTINATION_KEY:
+                        throw new AsterixException(ErrorCode.METADATA_ERROR,
+                                "Conflicting edge with the same label found: " + edgeLabel);
 
                     default:
                         throw new AsterixException(ErrorCode.METADATA_ERROR,
-                                "Schema edge was not returned, and an unexpected error encountered");
+                                "Edge constructor was not returned, and an unexpected error encountered");
                 }
             }
         }
@@ -254,63 +266,40 @@
         tupleBuilder.addFieldEndOffset();
 
         // Write the payload in the third field of the tuple.
-        recordBuilder.reset(GraphixMetadataRecordTypes.GRAPH_RECORDTYPE);
+        recordBuilder.reset(GRAPH_RECORD_DETAIL.getRecordType());
 
         // Write the dataverse name.
         fieldValue.reset();
         aString.setValue(dataverseCanonicalName);
         stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_ARECORD_DATAVERSENAME_FIELD_INDEX, fieldValue);
+        recordBuilder.addField(GRAPH_RECORD_DETAIL.getIndexForField(FIELD_NAME_DATAVERSE_NAME), fieldValue);
 
         // Write the graph name.
         fieldValue.reset();
         aString.setValue(graph.getGraphName());
         stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_ARECORD_GRAPHNAME_FIELD_INDEX, fieldValue);
-
-        // Write our dependencies.
-        ArrayBackedValueStorage itemValue = new ArrayBackedValueStorage();
-        listBuilder.reset((AOrderedListType) GraphixMetadataRecordTypes.GRAPH_RECORDTYPE
-                .getFieldTypes()[GraphixMetadataRecordTypes.GRAPH_ARECORD_DEPENDENCIES_FIELD_INDEX]);
-        for (List<Triple<DataverseName, String, String>> dependencies : graph.getDependencies()
-                .getListRepresentation()) {
-            List<String> subNames = new ArrayList<>();
-            innerListBuilder.reset(stringListList);
-            for (Triple<DataverseName, String, String> dependency : dependencies) {
-                subNames.clear();
-                getDependencySubNames(dependency, subNames);
-                writeNameList(subNames, itemValue);
-                innerListBuilder.addItem(itemValue);
-            }
-            itemValue.reset();
-            innerListBuilder.write(itemValue.getDataOutput(), true);
-            listBuilder.addItem(itemValue);
-        }
-        fieldValue.reset();
-        listBuilder.write(fieldValue.getDataOutput(), true);
-        recordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_ARECORD_DEPENDENCIES_FIELD_INDEX, fieldValue);
+        recordBuilder.addField(GRAPH_RECORD_DETAIL.getIndexForField(FIELD_NAME_GRAPH_NAME), fieldValue);
 
         // Write our vertex set.
-        listBuilder.reset((AOrderedListType) GraphixMetadataRecordTypes.GRAPH_RECORDTYPE
-                .getFieldTypes()[GraphixMetadataRecordTypes.GRAPH_ARECORD_VERTICES_FIELD_INDEX]);
-        for (Graph.Vertex vertex : graph.getGraphSchema().getVertices()) {
+        ArrayBackedValueStorage itemValue = new ArrayBackedValueStorage();
+        listBuilder.reset((AOrderedListType) GRAPH_RECORD_DETAIL.getTypeForField(FIELD_NAME_VERTICES));
+        for (Vertex vertex : graph.getGraphSchema().getVertices()) {
             writeVertexRecord(vertex, itemValue);
             listBuilder.addItem(itemValue);
         }
         fieldValue.reset();
         listBuilder.write(fieldValue.getDataOutput(), true);
-        recordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_ARECORD_VERTICES_FIELD_INDEX, fieldValue);
+        recordBuilder.addField(GRAPH_RECORD_DETAIL.getIndexForField(FIELD_NAME_VERTICES), fieldValue);
 
         // Write our edge set.
-        listBuilder.reset((AOrderedListType) GraphixMetadataRecordTypes.GRAPH_RECORDTYPE
-                .getFieldTypes()[GraphixMetadataRecordTypes.GRAPH_ARECORD_EDGES_FIELD_INDEX]);
-        for (Graph.Edge edge : graph.getGraphSchema().getEdges()) {
+        listBuilder.reset((AOrderedListType) GRAPH_RECORD_DETAIL.getTypeForField(FIELD_NAME_EDGES));
+        for (Edge edge : graph.getGraphSchema().getEdges()) {
             writeEdgeRecord(edge, itemValue);
             listBuilder.addItem(itemValue);
         }
         fieldValue.reset();
         listBuilder.write(fieldValue.getDataOutput(), true);
-        recordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_ARECORD_EDGES_FIELD_INDEX, fieldValue);
+        recordBuilder.addField(GRAPH_RECORD_DETAIL.getIndexForField(FIELD_NAME_EDGES), fieldValue);
 
         // Finally, write our record.
         recordBuilder.write(tupleBuilder.getDataOutput(), true);
@@ -319,108 +308,110 @@
         return tuple;
     }
 
-    private void writeVertexRecord(Graph.Vertex vertex, ArrayBackedValueStorage itemValue) throws HyracksDataException {
-        subRecordBuilder.reset(GraphixMetadataRecordTypes.VERTICES_RECORDTYPE);
+    private void writeVertexRecord(Vertex vertex, ArrayBackedValueStorage itemValue) throws HyracksDataException {
+        elemRecordBuilder.reset(VERTEX_RECORD_DETAIL.getRecordType());
 
         // Write the label name.
         fieldValue.reset();
-        aString.setValue(vertex.getLabelName());
+        aString.setValue(vertex.getLabel().toString());
         stringSerde.serialize(aString, fieldValue.getDataOutput());
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_VERTICES_ARECORD_LABEL_FIELD_INDEX, fieldValue);
-
-        // Write the primary key fields.
-        fieldValue.reset();
-        innerListBuilder.reset(stringListList);
-        for (List<String> keyField : vertex.getPrimaryKeyFieldNames()) {
-            writeNameList(keyField, itemValue);
-            innerListBuilder.addItem(itemValue);
-        }
-        innerListBuilder.write(fieldValue.getDataOutput(), true);
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_VERTICES_ARECORD_PRIMARY_KEY_FIELD_INDEX,
-                fieldValue);
+        elemRecordBuilder.addField(VERTEX_RECORD_DETAIL.getIndexForField(FIELD_NAME_LABEL), fieldValue);
 
         // Write the vertex definition(s).
-        fieldValue.reset();
-        innerListBuilder.reset(stringList);
-        for (String definition : vertex.getDefinitions()) {
-            itemValue.reset();
-            aString.setValue(definition);
-            stringSerde.serialize(aString, itemValue.getDataOutput());
-            innerListBuilder.addItem(itemValue);
+        defListBuilder.reset((AOrderedListType) VERTEX_RECORD_DETAIL.getTypeForField(FIELD_NAME_DEFINITIONS));
+        for (Vertex.Definition definition : vertex.getDefinitions()) {
+            defRecordBuilder.reset(VDEF_RECORD_DETAIL.getRecordType());
+
+            // Write the primary key fields.
+            fieldValue.reset();
+            innerListBuilder.reset(new AOrderedListType(new AOrderedListType(BuiltinType.ASTRING, null), null));
+            for (List<String> keyField : definition.getPrimaryKeyFieldNames()) {
+                writeNameList(keyField, itemValue);
+                innerListBuilder.addItem(itemValue);
+            }
+            innerListBuilder.write(fieldValue.getDataOutput(), true);
+            defRecordBuilder.addField(VDEF_RECORD_DETAIL.getIndexForField(FIELD_NAME_PRIMARY_KEY), fieldValue);
+
+            // Write the definition body.
+            fieldValue.reset();
+            aString.setValue(definition.getDefinition());
+            stringSerde.serialize(aString, fieldValue.getDataOutput());
+            defRecordBuilder.addField(VDEF_RECORD_DETAIL.getIndexForField(FIELD_NAME_BODY), fieldValue);
+
+            fieldValue.reset();
+            defRecordBuilder.write(fieldValue.getDataOutput(), true);
+            defListBuilder.addItem(fieldValue);
         }
-        innerListBuilder.write(fieldValue.getDataOutput(), true);
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_VERTICES_ARECORD_DEFINITIONS_FIELD_INDEX,
-                fieldValue);
+        fieldValue.reset();
+        defListBuilder.write(fieldValue.getDataOutput(), true);
+        elemRecordBuilder.addField(VERTEX_RECORD_DETAIL.getIndexForField(FIELD_NAME_DEFINITIONS), fieldValue);
 
         itemValue.reset();
-        subRecordBuilder.write(itemValue.getDataOutput(), true);
+        elemRecordBuilder.write(itemValue.getDataOutput(), true);
     }
 
-    private void writeEdgeRecord(Graph.Edge edge, ArrayBackedValueStorage itemValue) throws HyracksDataException {
-        subRecordBuilder.reset(GraphixMetadataRecordTypes.EDGES_RECORDTYPE);
+    private void writeEdgeRecord(Edge edge, ArrayBackedValueStorage itemValue) throws HyracksDataException {
+        elemRecordBuilder.reset(EDGE_RECORD_DETAIL.getRecordType());
 
         // Write the label name.
         fieldValue.reset();
-        aString.setValue(edge.getLabelName());
+        aString.setValue(edge.getLabel().toString());
         stringSerde.serialize(aString, fieldValue.getDataOutput());
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_LABEL_FIELD_INDEX, fieldValue);
+        elemRecordBuilder.addField(EDGE_RECORD_DETAIL.getIndexForField(FIELD_NAME_LABEL), fieldValue);
 
         // Write the destination label name.
         fieldValue.reset();
-        aString.setValue(edge.getDestinationLabelName());
+        aString.setValue(edge.getDestinationLabel().toString());
         stringSerde.serialize(aString, fieldValue.getDataOutput());
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_DEST_LABEL_FIELD_INDEX, fieldValue);
+        elemRecordBuilder.addField(EDGE_RECORD_DETAIL.getIndexForField(FIELD_NAME_DESTINATION_LABEL), fieldValue);
 
         // Write the source label name.
         fieldValue.reset();
-        aString.setValue(edge.getSourceLabelName());
+        aString.setValue(edge.getSourceLabel().toString());
         stringSerde.serialize(aString, fieldValue.getDataOutput());
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_SOURCE_LABEL_FIELD_INDEX, fieldValue);
-
-        // Write the primary key fields.
-        fieldValue.reset();
-        innerListBuilder.reset(stringListList);
-        for (List<String> keyField : edge.getPrimaryKeyFieldNames()) {
-            writeNameList(keyField, itemValue);
-            innerListBuilder.addItem(itemValue);
-        }
-        innerListBuilder.write(fieldValue.getDataOutput(), true);
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_PRIMARY_KEY_FIELD_INDEX, fieldValue);
-
-        // Write the destination key fields.
-        fieldValue.reset();
-        innerListBuilder.reset(stringListList);
-        for (List<String> keyField : edge.getDestinationKeyFieldNames()) {
-            writeNameList(keyField, itemValue);
-            innerListBuilder.addItem(itemValue);
-        }
-        innerListBuilder.write(fieldValue.getDataOutput(), true);
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_DEST_KEY_FIELD_INDEX, fieldValue);
-
-        // Write the source key fields.
-        fieldValue.reset();
-        innerListBuilder.reset(stringListList);
-        for (List<String> keyField : edge.getSourceKeyFieldNames()) {
-            writeNameList(keyField, itemValue);
-            innerListBuilder.addItem(itemValue);
-        }
-        innerListBuilder.write(fieldValue.getDataOutput(), true);
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_SOURCE_KEY_FIELD_INDEX, fieldValue);
+        elemRecordBuilder.addField(EDGE_RECORD_DETAIL.getIndexForField(FIELD_NAME_SOURCE_LABEL), fieldValue);
 
         // Write the edge definition(s).
-        fieldValue.reset();
-        innerListBuilder.reset(stringList);
-        for (String definition : edge.getDefinitions()) {
-            itemValue.reset();
-            aString.setValue(definition);
-            stringSerde.serialize(aString, itemValue.getDataOutput());
-            innerListBuilder.addItem(itemValue);
+        defListBuilder.reset((AOrderedListType) EDGE_RECORD_DETAIL.getTypeForField(FIELD_NAME_DEFINITIONS));
+        for (Edge.Definition definition : edge.getDefinitions()) {
+            defRecordBuilder.reset(EDEF_RECORD_DETAIL.getRecordType());
+
+            // Write the source key fields.
+            fieldValue.reset();
+            innerListBuilder.reset(stringListList);
+            for (List<String> keyField : definition.getSourceKeyFieldNames()) {
+                writeNameList(keyField, itemValue);
+                innerListBuilder.addItem(itemValue);
+            }
+            innerListBuilder.write(fieldValue.getDataOutput(), true);
+            defRecordBuilder.addField(EDEF_RECORD_DETAIL.getIndexForField(FIELD_NAME_SOURCE_KEY), fieldValue);
+
+            // Write the destination key fields.
+            fieldValue.reset();
+            innerListBuilder.reset(stringListList);
+            for (List<String> keyField : definition.getDestinationKeyFieldNames()) {
+                writeNameList(keyField, itemValue);
+                innerListBuilder.addItem(itemValue);
+            }
+            innerListBuilder.write(fieldValue.getDataOutput(), true);
+            defRecordBuilder.addField(EDEF_RECORD_DETAIL.getIndexForField(FIELD_NAME_DESTINATION_KEY), fieldValue);
+
+            // Write the definition body.
+            fieldValue.reset();
+            aString.setValue(definition.getDefinition());
+            stringSerde.serialize(aString, fieldValue.getDataOutput());
+            defRecordBuilder.addField(EDEF_RECORD_DETAIL.getIndexForField(FIELD_NAME_BODY), fieldValue);
+
+            fieldValue.reset();
+            defRecordBuilder.write(fieldValue.getDataOutput(), true);
+            defListBuilder.addItem(fieldValue);
         }
-        innerListBuilder.write(fieldValue.getDataOutput(), true);
-        subRecordBuilder.addField(GraphixMetadataRecordTypes.GRAPH_EDGES_ARECORD_DEFINITIONS_FIELD_INDEX, fieldValue);
+        fieldValue.reset();
+        defListBuilder.write(fieldValue.getDataOutput(), true);
+        elemRecordBuilder.addField(EDGE_RECORD_DETAIL.getIndexForField(FIELD_NAME_DEFINITIONS), fieldValue);
 
         itemValue.reset();
-        subRecordBuilder.write(itemValue.getDataOutput(), true);
+        elemRecordBuilder.write(itemValue.getDataOutput(), true);
     }
 
     private void writeNameList(List<String> name, ArrayBackedValueStorage itemValue) throws HyracksDataException {
diff --git a/asterix-graphix/src/main/resources/lang-extension/lang.txt b/asterix-graphix/src/main/resources/lang-extension/lang.txt
index 6d215f0..12643bf 100644
--- a/asterix-graphix/src/main/resources/lang-extension/lang.txt
+++ b/asterix-graphix/src/main/resources/lang-extension/lang.txt
@@ -17,11 +17,24 @@
 // under the License.
 //
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.asterix.graphix.common.metadata.GraphElementIdentifier;
+import org.apache.asterix.graphix.lang.clause.FromGraphClause;
+import org.apache.asterix.graphix.lang.clause.GraphSelectBlock;
+import org.apache.asterix.graphix.lang.clause.MatchClause;
+import org.apache.asterix.graphix.lang.expression.EdgePatternExpr;
 import org.apache.asterix.graphix.lang.expression.GraphConstructor;
+import org.apache.asterix.graphix.lang.expression.IGraphExpr;
+import org.apache.asterix.graphix.lang.expression.PathPatternExpr;
+import org.apache.asterix.graphix.lang.expression.VertexPatternExpr;
+import org.apache.asterix.graphix.lang.optype.MatchType;
 import org.apache.asterix.graphix.lang.statement.CreateGraphStatement;
 import org.apache.asterix.graphix.lang.statement.GraphDropStatement;
 import org.apache.asterix.graphix.lang.statement.GraphElementDecl;
+import org.apache.asterix.graphix.lang.struct.EdgeDescriptor;
+import org.apache.asterix.graphix.lang.struct.ElementLabel;
 import org.apache.asterix.lang.sqlpp.parser.ParseException;
 import org.apache.asterix.lang.sqlpp.parser.SqlppParseException;
 import org.apache.asterix.lang.sqlpp.parser.Token;
@@ -45,6 +58,102 @@
     });
 }
 
+@override
+SelectBlock SelectBlock() throws ParseException:
+{
+  SelectClause selectClause = null;
+  FromClause fromClause = null;
+  FromGraphClause fromGraphClause = null;
+  List<LetClause> fromLetClauses = null;
+  WhereClause whereClause = null;
+  GroupbyClause groupbyClause = null;
+  List<LetClause> gbyLetClauses = null;
+  HavingClause havingClause = null;
+  SourceLocation startSrcLoc = null;
+
+  List<AbstractClause> fromLetWhereClauses = new ArrayList<AbstractClause>();
+  List<AbstractClause> gbyLetHavingClauses = new ArrayList<AbstractClause>();
+}
+{
+  (
+    (
+      selectClause = SelectClause() { startSrcLoc = selectClause.getSourceLocation(); }
+      (
+        (
+          ( LOOKAHEAD(2)
+            fromGraphClause = FromGraphClause()
+            | fromClause = FromClause()
+          )
+          ( fromLetClauses = LetClause() )?
+          ( whereClause = WhereClause() )?
+          ( groupbyClause = GroupbyClause()
+            ( gbyLetClauses = LetClause() )?
+            ( havingClause = HavingClause() )? )?
+        )
+        |
+        ( fromLetClauses = LetClause()
+          {
+            // LET without FROM -> create dummy FROM clause: FROM {{missing}} AS #0
+            SourceLocation sourceLoc = getSourceLocation(token);
+            LiteralExpr missingExpr = new LiteralExpr(MissingLiteral.INSTANCE);
+            missingExpr.setSourceLocation(sourceLoc);
+            List<Expression> list = new ArrayList<Expression>(1);
+            list.add(missingExpr);
+            ListConstructor listExpr = new ListConstructor(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR, list);
+            listExpr.setSourceLocation(sourceLoc);
+            List<FromTerm> fromTerms = new ArrayList<FromTerm>(1);
+            VariableExpr fromVar = new VariableExpr(new VarIdentifier("#0"));
+            fromVar.setSourceLocation(sourceLoc);
+            fromTerms.add(new FromTerm(listExpr, fromVar, null, new ArrayList<AbstractBinaryCorrelateClause>()));
+            fromClause = new FromClause(fromTerms);
+          }
+          ( whereClause = WhereClause() )?
+        )
+      )?
+    )
+    |
+    (
+      ( LOOKAHEAD(2)
+        fromGraphClause = FromGraphClause() { startSrcLoc = fromGraphClause.getSourceLocation(); }
+        | fromClause = FromClause() { startSrcLoc = fromClause.getSourceLocation(); }
+     )
+     ( fromLetClauses = LetClause() )?
+     ( whereClause = WhereClause() )?
+     ( groupbyClause = GroupbyClause()
+       ( gbyLetClauses = LetClause() )?
+       ( havingClause = HavingClause() )? )?
+     selectClause = SelectClause()
+    )
+  )
+  {
+    if (fromLetClauses != null) {
+      fromLetWhereClauses.addAll(fromLetClauses);
+    }
+    if (whereClause != null) {
+      fromLetWhereClauses.add(whereClause);
+    }
+    if (gbyLetClauses != null) {
+      gbyLetHavingClauses.addAll(gbyLetClauses);
+    }
+    if (havingClause != null) {
+      gbyLetHavingClauses.add(havingClause);
+    }
+
+    if (fromClause != null) {
+      SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, fromLetWhereClauses,
+        groupbyClause, gbyLetHavingClauses);
+      selectBlock.setSourceLocation(startSrcLoc);
+      return selectBlock;
+
+    } else {
+      GraphSelectBlock selectBlock = new GraphSelectBlock(selectClause, fromGraphClause,
+        fromLetWhereClauses, groupbyClause, gbyLetHavingClauses);
+      selectBlock.setSourceLocation(startSrcLoc);
+      return selectBlock;
+    }
+  }
+}
+
 @merge
 Statement CreateStatement() throws ParseException:
 {
@@ -176,36 +285,36 @@
 @new
 GraphConstructor GraphConstructor(Token startStmtToken) throws ParseException:
 {
-  List<GraphConstructor.VertexElement> vertexElements = new ArrayList<GraphConstructor.VertexElement>();
-  List<GraphConstructor.EdgeElement> edgeElements = new ArrayList<GraphConstructor.EdgeElement>();
-  GraphConstructor.VertexElement vertexElement = null;
-  GraphConstructor.EdgeElement edgeElement = null;
+  List<GraphConstructor.VertexConstructor> vertexConstructors = new ArrayList<GraphConstructor.VertexConstructor>();
+  List<GraphConstructor.EdgeConstructor> edgeConstructors = new ArrayList<GraphConstructor.EdgeConstructor>();
+  GraphConstructor.VertexConstructor vertexConstructor = null;
+  GraphConstructor.EdgeConstructor edgeConstructor = null;
 }
 {
-  vertexElement = GraphVertexSpecification(startStmtToken) { vertexElements.add(vertexElement); }
+  vertexConstructor = GraphVertexSpecification(startStmtToken) { vertexConstructors.add(vertexConstructor); }
   ( <COMMA>
     (
-      ( vertexElement = GraphVertexSpecification(token) { vertexElements.add(vertexElement); } )
-      | ( edgeElement = GraphEdgeSpecification(token) { edgeElements.add(edgeElement); } )
+      ( vertexConstructor = GraphVertexSpecification(token) { vertexConstructors.add(vertexConstructor); } )
+      | ( edgeConstructor = GraphEdgeSpecification(token) { edgeConstructors.add(edgeConstructor); } )
     )
   )*
   {
-    GraphConstructor graphConstructor = new GraphConstructor(vertexElements, edgeElements);
+    GraphConstructor graphConstructor = new GraphConstructor(vertexConstructors, edgeConstructors);
     return addSourceLocation(graphConstructor, startStmtToken);
   }
 }
 
 @new
-GraphConstructor.VertexElement GraphVertexSpecification(Token startStmtToken) throws ParseException:
+GraphConstructor.VertexConstructor GraphVertexSpecification(Token startStmtToken) throws ParseException:
 {
   Pair<List<Integer>, List<List<String>>> primaryKeyFields;
   Token beginPos = null, endPos = null;
   Expression vertexDefinitionExpr;
-  String vertexName;
+  ElementLabel vertexLabel;
 }
 {
   <VERTEX>
-  vertexName = GraphVertexDefinitionPattern()
+  vertexLabel = GraphVertexDefinitionPattern()
   <PRIMARY> <KEY> <LEFTPAREN> primaryKeyFields = KeyFields() <RIGHTPAREN>
   <AS>
   {
@@ -213,91 +322,74 @@
     createNewScope();
   }
   (
-    vertexDefinitionExpr = ViewBody()
-    | <LEFTPAREN> vertexDefinitionExpr = ViewBody() <RIGHTPAREN>
+    vertexDefinitionExpr = ViewBody() { endPos = token; }
+    | <LEFTPAREN> { beginPos = token; } vertexDefinitionExpr = ViewBody() { endPos = token; } <RIGHTPAREN>
   )
   {
-    endPos = token;
     String vDef = extractFragment(beginPos.beginLine, beginPos.beginColumn + 1, endPos.endLine, endPos.endColumn + 1);
     removeCurrentScope();
-    GraphConstructor.VertexElement vertexElement = new GraphConstructor.VertexElement(vertexName,
+    GraphConstructor.VertexConstructor vertexConstructor = new GraphConstructor.VertexConstructor(vertexLabel,
       primaryKeyFields.second, primaryKeyFields.first, vertexDefinitionExpr, vDef);
-    return addSourceLocation(vertexElement, startStmtToken);
+    return addSourceLocation(vertexConstructor, startStmtToken);
   }
 }
 
 @new
-String GraphVertexDefinitionPattern() throws ParseException:
+ElementLabel GraphVertexDefinitionPattern() throws ParseException:
 {
   String vertexName;
 }
 {
   <LEFTPAREN> <COLON> vertexName = Identifier() <RIGHTPAREN>
   {
-    return vertexName;
+    return new ElementLabel(vertexName);
   }
 }
 
 @new
-GraphConstructor.EdgeElement GraphEdgeSpecification(Token startStmtToken) throws ParseException:
+GraphConstructor.EdgeConstructor GraphEdgeSpecification(Token startStmtToken) throws ParseException:
 {
-  Pair<Triple<String, String, String>, Boolean> edgeDefinitionPattern;
+  Pair<Triple<ElementLabel, ElementLabel, ElementLabel>, Boolean> edgeDefinitionPattern;
   Pair<List<Integer>, List<List<String>>> keyFields;
   Token beginPos = null, endPos = null;
   Expression edgeDefinitionExpr = null;
 
   List<Integer> destinationKeySourceIndicators = null;
   List<Integer> sourceKeySourceIndicators = null;
-  List<Integer> primaryKeySourceIndicators = null;
   List<List<String>> destinationKeyFields = null;
   List<List<String>> sourceKeyFields = null;
-  List<List<String>> primaryKeyFields = null;
 }
 {
   <EDGE>
   edgeDefinitionPattern = GraphEdgeDefinitionPattern()
   (
+    <SOURCE> <KEY> <LEFTPAREN> keyFields = KeyFields() <RIGHTPAREN>
+    {
+      sourceKeyFields = keyFields.second;
+      sourceKeySourceIndicators = keyFields.first;
+    }
+    <DESTINATION> <KEY> <LEFTPAREN> keyFields = KeyFields() <RIGHTPAREN>
+    {
+      destinationKeyFields = keyFields.second;
+      destinationKeySourceIndicators = keyFields.first;
+    }
+    <AS>
+    {
+      beginPos = token;
+      createNewScope();
+    }
     (
-      <PRIMARY> <KEY> <LEFTPAREN> keyFields = KeyFields() <RIGHTPAREN>
-      {
-        primaryKeyFields = keyFields.second;
-        primaryKeySourceIndicators = keyFields.first;
-      }
-      <SOURCE> <KEY> <LEFTPAREN> keyFields = KeyFields() <RIGHTPAREN>
-      {
-        sourceKeyFields = keyFields.second;
-        sourceKeySourceIndicators = keyFields.first;
-      }
-      <DESTINATION> <KEY> <LEFTPAREN> keyFields = KeyFields() <RIGHTPAREN>
-      {
-        destinationKeyFields = keyFields.second;
-        destinationKeySourceIndicators = keyFields.first;
-      }
-      <AS>
-      {
-        beginPos = token;
-        createNewScope();
-      }
-      (
-        edgeDefinitionExpr = ViewBody()
-        | <LEFTPAREN> edgeDefinitionExpr = ViewBody() <RIGHTPAREN>
-      )
-    )
-    |
-    (
-      <DESTINATION> <KEY> <LEFTPAREN> keyFields = KeyFields() <RIGHTPAREN>
-      {
-        destinationKeyFields = keyFields.second;
-        destinationKeySourceIndicators = keyFields.first;
-      }
+      edgeDefinitionExpr = SelectExpression(true) { endPos = token; }
+      | <LEFTPAREN> { beginPos = token; } edgeDefinitionExpr = SelectExpression(true) { endPos = token; } <RIGHTPAREN>
     )
   )
   {
-    String destinationLabel, edgeLabel, sourceLabel;
+    ElementLabel destinationLabel, edgeLabel, sourceLabel;
     if (edgeDefinitionPattern.second) { // isDirectedLeft
       sourceLabel = edgeDefinitionPattern.first.third;
       edgeLabel = edgeDefinitionPattern.first.second;
       destinationLabel = edgeDefinitionPattern.first.first;
+
     } else {
       sourceLabel = edgeDefinitionPattern.first.first;
       edgeLabel = edgeDefinitionPattern.first.second;
@@ -306,32 +398,285 @@
 
     String eDef = null;
     if (edgeDefinitionExpr != null) {
-      endPos = token;
       eDef = extractFragment(beginPos.beginLine, beginPos.beginColumn + 1, endPos.endLine, endPos.endColumn + 1);
       removeCurrentScope();
     }
 
-    GraphConstructor.EdgeElement edgeElement = new GraphConstructor.EdgeElement(edgeLabel, destinationLabel,
-        sourceLabel, primaryKeyFields, primaryKeySourceIndicators, destinationKeyFields, destinationKeySourceIndicators,
-        sourceKeyFields, sourceKeySourceIndicators, edgeDefinitionExpr, eDef);
-    return addSourceLocation(edgeElement, startStmtToken);
+    GraphConstructor.EdgeConstructor edgeConstructor = new GraphConstructor.EdgeConstructor(edgeLabel, destinationLabel,
+        sourceLabel, destinationKeyFields, destinationKeySourceIndicators, sourceKeyFields, sourceKeySourceIndicators,
+        edgeDefinitionExpr, eDef);
+    return addSourceLocation(edgeConstructor, startStmtToken);
   }
 }
 
 @new
-Pair<Triple<String, String, String>, Boolean> GraphEdgeDefinitionPattern() throws ParseException:
+Pair<Triple<ElementLabel, ElementLabel, ElementLabel>, Boolean> GraphEdgeDefinitionPattern() throws ParseException:
 {
-  String leftVertexName, edgeName, rightVertexName;
+  ElementLabel leftVertexLabel, rightVertexLabel;
   boolean isDirectedLeft;
+  String edgeName;
 }
 {
-  leftVertexName = GraphVertexDefinitionPattern()
+  leftVertexLabel = GraphVertexDefinitionPattern()
   ( <MINUS> <LEFTBRACKET> <COLON> edgeName = Identifier() <RIGHTBRACKET> <MINUS> <GT> { isDirectedLeft = false; }
   | <LT> <MINUS> <LEFTBRACKET> <COLON> edgeName = Identifier() <RIGHTBRACKET> <MINUS> { isDirectedLeft = true; } )
-  rightVertexName = GraphVertexDefinitionPattern()
+  rightVertexLabel = GraphVertexDefinitionPattern()
   {
-    Triple<String, String, String> t = new Triple<String, String, String>(leftVertexName, edgeName, rightVertexName);
-    return new Pair<Triple<String, String, String>, Boolean>(t, isDirectedLeft);
+    Triple<ElementLabel, ElementLabel, ElementLabel> t = new Triple<ElementLabel, ElementLabel, ElementLabel>(
+      leftVertexLabel, new ElementLabel(edgeName), rightVertexLabel);
+    return new Pair<Triple<ElementLabel, ElementLabel, ElementLabel>, Boolean>(t, isDirectedLeft);
+  }
+}
+
+@new
+FromGraphClause FromGraphClause() throws ParseException:
+{
+  Token startToken = null;
+  GraphConstructor graphConstructor = null;
+  Pair<DataverseName, Identifier> nameComponents = null;
+  AbstractBinaryCorrelateClause correlateClause = null;
+
+  List<MatchClause> matchClauses = new ArrayList<MatchClause>();
+  List<PathPatternExpr> pathPatternExpressions = null;
+  List<AbstractBinaryCorrelateClause> correlateClauses = new ArrayList<AbstractBinaryCorrelateClause>();
+}
+{
+  <FROM> <GRAPH> { startToken = token; }
+  (
+    graphConstructor = GraphConstructor(token)
+    | nameComponents = QualifiedName()
+  )
+  <MATCH> pathPatternExpressions = PathPatternExpressions()
+  { matchClauses.add(new MatchClause(pathPatternExpressions, MatchType.LEADING)); }
+  ( LOOKAHEAD(3) // We want to avoid getting confused with the correlated clauses below.
+    (
+      <LEFT> ( <OUTER> )? <MATCH> pathPatternExpressions = PathPatternExpressions()
+      { matchClauses.add(new MatchClause(pathPatternExpressions, MatchType.LEFTOUTER)); }
+      |
+      ( <INNER> )? <MATCH> pathPatternExpressions = PathPatternExpressions()
+      { matchClauses.add(new MatchClause(pathPatternExpressions, MatchType.INNER)); }
+    )
+  )*
+  (
+    (
+      correlateClause = JoinOrUnnestClause(JoinType.INNER, UnnestType.INNER)
+      | ( <INNER> correlateClause = JoinOrUnnestClause(JoinType.INNER, UnnestType.INNER) )
+      | ( <LEFT> ( <OUTER> )? correlateClause = JoinOrUnnestClause(JoinType.LEFTOUTER, UnnestType.LEFTOUTER) )
+      | ( <RIGHT> ( <OUTER> )? correlateClause = JoinClause(JoinType.RIGHTOUTER) )
+      | ( <CROSS> correlateClause = CrossJoinClause() )
+    )
+    {
+      correlateClauses.add(correlateClause);
+    }
+  )*
+  {
+    FromGraphClause fromGraphClause;
+    if (graphConstructor == null) {
+      fromGraphClause = new FromGraphClause(nameComponents.first, nameComponents.second,
+        matchClauses, correlateClauses);
+
+    } else {
+      fromGraphClause = new FromGraphClause(graphConstructor, matchClauses, correlateClauses);
+    }
+    return addSourceLocation(fromGraphClause, startToken);
+  }
+}
+
+@new
+List<PathPatternExpr> PathPatternExpressions() throws ParseException:
+{
+  List<PathPatternExpr> pathPatternExpressions = new ArrayList<PathPatternExpr>();
+  PathPatternExpr pathPattern = null;
+  VariableExpr variableExpr = null;
+}
+{
+  pathPattern = PathPatternExpression() { pathPatternExpressions.add(pathPattern); }
+  (
+    ( <AS> )? variableExpr = Variable()
+    {
+      int index = pathPatternExpressions.size() - 1;
+      pathPatternExpressions.get(index).setVariableExpr(variableExpr);
+    }
+  )?
+  ( LOOKAHEAD(2)
+    <COMMA> pathPattern = PathPatternExpression() { pathPatternExpressions.add(pathPattern); }
+    (
+      ( <AS> )? variableExpr = Variable()
+      {
+        int index = pathPatternExpressions.size() - 1;
+        pathPatternExpressions.get(index).setVariableExpr(variableExpr);
+      }
+    )?
+  )*
+  {
+    return pathPatternExpressions;
+  }
+}
+
+@new
+PathPatternExpr PathPatternExpression() throws ParseException:
+{
+  List<VertexPatternExpr> orderedVertexExpressions = new ArrayList<VertexPatternExpr>();
+  List<EdgePatternExpr> orderedEdgeExpressions = new ArrayList<EdgePatternExpr>();
+
+  Token startToken = null, edgeStartToken = null;
+  VertexPatternExpr vertexExpr = null;
+  EdgeDescriptor edgeDescriptor = null;
+}
+{
+  vertexExpr = VertexPatternExpression()
+  {
+    startToken = token;
+    orderedVertexExpressions.add(vertexExpr);
+  }
+  (
+    edgeDescriptor = EdgeDescriptor() { edgeStartToken = token; }
+    vertexExpr = VertexPatternExpression()
+    {
+      VertexPatternExpr leftVertex = orderedVertexExpressions.get(orderedVertexExpressions.size() - 1);
+      EdgePatternExpr edgePattern = new EdgePatternExpr(leftVertex, vertexExpr, edgeDescriptor);
+      orderedEdgeExpressions.add(addSourceLocation(edgePattern, edgeStartToken));
+      orderedVertexExpressions.add(vertexExpr);
+    }
+  )*
+  {
+    PathPatternExpr pathPattern = new PathPatternExpr(orderedVertexExpressions, orderedEdgeExpressions, null);
+    return addSourceLocation(pathPattern, startToken);
+  }
+}
+
+@new
+VertexPatternExpr VertexPatternExpression() throws ParseException:
+{
+  Set<ElementLabel> vertexLabels = new HashSet<ElementLabel>();
+  VariableExpr variableExpr = null;
+  Token startToken = null;
+  String vertexLabelName;
+}
+{
+  <LEFTPAREN> { startToken = token; }
+  (
+    variableExpr = Variable()
+  )?
+  (
+    <COLON> vertexLabelName = Identifier() { vertexLabels.add(new ElementLabel(vertexLabelName)); }
+    ( <BAR> vertexLabelName = Identifier() { vertexLabels.add(new ElementLabel(vertexLabelName)); } )*
+  )?
+  <RIGHTPAREN>
+  {
+    VertexPatternExpr vertexExpression = new VertexPatternExpr(variableExpr, vertexLabels);
+    return addSourceLocation(vertexExpression, startToken);
+  }
+}
+
+@new
+EdgeDescriptor EdgeDescriptor() throws ParseException:
+{
+  Pair<Set<ElementLabel>, Pair<Integer, Integer>> edgeDetail = null;
+  Token startToken = null;
+  VariableExpr edgeVariable = null;
+
+  // We default to undirected edges.
+  EdgeDescriptor.EdgeType edgeType = EdgeDescriptor.EdgeType.UNDIRECTED;
+}
+{
+  (
+    <MINUS> { startToken = token; }
+    (
+      <LEFTBRACKET>
+      (
+        edgeVariable = Variable()
+      )?
+      ( <COLON> edgeDetail = EdgeDetail() )?
+      <RIGHTBRACKET> <MINUS>
+    )?
+    ( <GT> { edgeType = EdgeDescriptor.EdgeType.LEFT_TO_RIGHT; } )?
+    |
+    <LT> {
+      startToken = token;
+      edgeType = EdgeDescriptor.EdgeType.RIGHT_TO_LEFT;
+    }
+    <MINUS>
+    (
+      <LEFTBRACKET>
+      (
+        edgeVariable = Variable()
+      )?
+      ( <COLON> edgeDetail = EdgeDetail() )?
+      <RIGHTBRACKET> <MINUS>
+    )?
+  )
+  {
+    // Edges (by default) are of class EDGE_PATTERN and are not sub-paths.
+    IGraphExpr.GraphExprKind edgeClass = IGraphExpr.GraphExprKind.EDGE_PATTERN;
+    Integer hopCountMin = 1;
+    Integer hopCountMax = 1;
+
+    Set<ElementLabel> labels = new HashSet<ElementLabel>();
+    if (edgeDetail != null) {
+      labels = edgeDetail.first;
+
+      // We have explicitly specified "{" and "}". Use sub-path semantics.
+      if (edgeDetail.second != null) {
+        edgeClass = IGraphExpr.GraphExprKind.PATH_PATTERN;
+        hopCountMin = edgeDetail.second.first;
+        hopCountMax = edgeDetail.second.second;
+      }
+    }
+
+    return new EdgeDescriptor(edgeType, edgeClass, labels, edgeVariable, hopCountMin, hopCountMax);
+  }
+}
+
+@new
+Pair<Set<ElementLabel>, Pair<Integer, Integer>> EdgeDetail() throws ParseException:
+{
+  Set<ElementLabel> edgeLabels = new HashSet<ElementLabel>();
+  Pair<Integer, Integer> repetitionQuantifier = null;
+  String labelName = null;
+}
+{
+  (
+    // Note: we want to forbid LABEL_1|LABEL_2{...}.
+    LOOKAHEAD(2, <BAR>)
+    (
+      labelName = Identifier() { edgeLabels.add(new ElementLabel(labelName)); }
+      <BAR> labelName = Identifier() { edgeLabels.add(new ElementLabel(labelName)); }
+      ( <BAR> labelName = Identifier() { edgeLabels.add(new ElementLabel(labelName)); } )*
+    )
+    |
+    (
+      labelName = Identifier() { edgeLabels.add(new ElementLabel(labelName)); }
+      |
+      <LEFTPAREN>
+      labelName = Identifier() { edgeLabels.add(new ElementLabel(labelName)); }
+      ( <BAR> labelName = Identifier() { edgeLabels.add(new ElementLabel(labelName)); } )*
+      <RIGHTPAREN>
+    )
+    ( repetitionQuantifier = EdgeRepetitionQuantifier() )?
+    |
+    ( repetitionQuantifier = EdgeRepetitionQuantifier() )
+  )
+  {
+    return new Pair<Set<ElementLabel>, Pair<Integer, Integer>> (edgeLabels, repetitionQuantifier);
+  }
+}
+
+@new
+Pair<Integer, Integer> EdgeRepetitionQuantifier() throws ParseException:
+{
+  Integer hopCountMin = null;
+  Integer hopCountMax = null;
+}
+{
+  <LEFTBRACE>
+  ( // Note: we forbid unbounded edge repetition.
+    ( <INTEGER_LITERAL> { hopCountMin = Integer.valueOf(token.image); } )?
+    <COMMA> <INTEGER_LITERAL> { hopCountMax = Integer.valueOf(token.image); }
+  )
+  <RIGHTBRACE>
+  {
+    return new Pair<Integer, Integer>(hopCountMin, hopCountMax);
   }
 }
 
@@ -344,6 +689,7 @@
   | <GRAPH: "graph">
   | <SOURCE: "source">
   | <VERTEX: "vertex">
+  | <MATCH: "match">
 }
 
 @new_at_the_end
diff --git a/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixExecutionTest.java b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixExecutionTest.java
index 0820e29..9c83ed5 100644
--- a/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixExecutionTest.java
+++ b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixExecutionTest.java
@@ -26,7 +26,7 @@
 import org.apache.asterix.test.runtime.ExecutionTestUtil;
 import org.apache.asterix.testframework.context.TestCaseContext;
 import org.apache.asterix.testframework.xml.TestGroup;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.hyracks.util.file.FileUtil;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -36,10 +36,9 @@
 
 @RunWith(Parameterized.class)
 public class GraphixExecutionTest {
-    protected static final String PATH_ACTUAL = "target/rttest" + File.separator;
-    protected static final String PATH_BASE =
-            StringUtils.join(new String[] { "src", "test", "resources", "runtimets" }, File.separator);
-    protected static final String TEST_CONFIG_FILE_NAME = "src/main/resources/cc.conf";
+    protected static final String PATH_ACTUAL = FileUtil.joinPath("target", "rttest");
+    protected static final String PATH_BASE = FileUtil.joinPath("src", "test", "resources", "runtimets");
+    protected static final String FILE_TEST_CONFIG = FileUtil.joinPath("src", "main", "resources", "cc.conf");
     private static final String TEST_SUITE_FILE = "testsuite.xml";
     private static final String ONLY_SUITE_FILE = "only.xml";
 
@@ -57,7 +56,7 @@
     public static void setUp() throws Exception {
         //noinspection ResultOfMethodCallIgnored
         new File(PATH_ACTUAL).mkdirs();
-        ExecutionTestUtil.setUp(true, TEST_CONFIG_FILE_NAME, integrationUtil, false, null);
+        ExecutionTestUtil.setUp(true, FILE_TEST_CONFIG, integrationUtil, false, null);
     }
 
     @AfterClass
@@ -66,7 +65,7 @@
         integrationUtil.removeTestStorageFiles();
     }
 
-    @Parameters(name = "ExecutionTest {index}: {0}")
+    @Parameters(name = "GraphixExecutionTest {index}: {0}")
     public static Collection<Object[]> tests() throws Exception {
         Collection<Object[]> test_cases = buildTestsInXml(ONLY_SUITE_FILE);
         if (test_cases.size() == 0) {
diff --git a/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixIntegrationUtil.java b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixIntegrationUtil.java
index e3ea8e9..0bafd46 100644
--- a/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixIntegrationUtil.java
+++ b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixIntegrationUtil.java
@@ -16,12 +16,14 @@
 
 import org.apache.asterix.api.common.AsterixHyracksIntegrationUtil;
 import org.apache.hyracks.test.support.TestUtils;
+import org.apache.hyracks.util.file.FileUtil;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 @RunWith(Parameterized.class)
 public class GraphixIntegrationUtil extends AsterixHyracksIntegrationUtil {
-    private static final String DEFAULT_CONF_FILE = "asterixdb/asterix-opt/asterix-graphix/src/main/resources/cc.conf";
+    private static final String FILE_DEFAULT_CONF =
+            FileUtil.joinPath("asterixdb", "asterix-opt", "asterix-graphix", "src", "main", "resources", "cc.conf");
 
     public static void main(String[] args) {
         TestUtils.redirectLoggingToConsole();
@@ -29,7 +31,7 @@
         try {
             boolean cleanupOnStart = Boolean.getBoolean("cleanup.start");
             boolean cleanupOnShutdown = Boolean.getBoolean("cleanup.shutdown");
-            String confFile = System.getProperty("external.lib", DEFAULT_CONF_FILE);
+            String confFile = System.getProperty("conf.path", FILE_DEFAULT_CONF);
             graphixIntegrationUtil.run(cleanupOnStart, cleanupOnShutdown, confFile);
         } catch (Exception e) {
             e.printStackTrace();
diff --git a/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixMetadataTest.java b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixMetadataTest.java
index bf2c756..31d8a8e 100644
--- a/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixMetadataTest.java
+++ b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/GraphixMetadataTest.java
@@ -22,7 +22,7 @@
 
 import org.apache.asterix.test.common.TestExecutor;
 import org.apache.asterix.testframework.context.TestCaseContext;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.hyracks.util.file.FileUtil;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -32,10 +32,9 @@
 
 @RunWith(Parameterized.class)
 public class GraphixMetadataTest {
-    private static final String PATH_ACTUAL = "target" + File.separator + "mdtest" + File.separator;
-    private static final String PATH_BASE =
-            StringUtils.join(new String[] { "src", "test", "resources", "metadata" + File.separator }, File.separator);
-    private static final String TEST_CONFIG_FILE_NAME = "src/main/resources/cc.conf";
+    private static final String PATH_ACTUAL = FileUtil.joinPath("target", "mdtest");
+    private static final String PATH_BASE = FileUtil.joinPath("src", "test", "resources", "metadatats");
+    private static final String FILE_TEST_CONFIG = FileUtil.joinPath("src", "main", "resources", "cc.conf");
 
     private static final TestExecutor testExecutor = new TestExecutor();
     private static final GraphixIntegrationUtil integrationUtil = new GraphixIntegrationUtil();
@@ -50,7 +49,7 @@
     public static void setUp() throws Exception {
         //noinspection ResultOfMethodCallIgnored
         new File(PATH_ACTUAL).mkdirs();
-        integrationUtil.init(true, TEST_CONFIG_FILE_NAME);
+        integrationUtil.init(true, FILE_TEST_CONFIG);
     }
 
     @AfterClass
diff --git a/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/SqlppExecutionTest.java b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/SqlppExecutionTest.java
new file mode 100644
index 0000000..d9e8ead
--- /dev/null
+++ b/asterix-graphix/src/test/java/org/apache/asterix/graphix/test/SqlppExecutionTest.java
@@ -0,0 +1,96 @@
+/*
+ * 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.asterix.graphix.test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.asterix.test.common.TestExecutor;
+import org.apache.asterix.test.runtime.ExecutionTestUtil;
+import org.apache.asterix.testframework.context.TestCaseContext;
+import org.apache.asterix.testframework.xml.TestGroup;
+import org.apache.hyracks.util.file.FileUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class SqlppExecutionTest {
+    protected static final String PATH_ACTUAL = FileUtil.joinPath("target", "srttest");
+    protected static final String PATH_BASE = FileUtil.joinPath("src", "test", "resources", "runtimets");
+    private static final String TEST_SUITE_FILE = "testsuite_sqlpp.xml";
+    private static final String ONLY_SUITE_FILE = "only_sqlpp.xml";
+
+    // We should be in the "asterix-app" directory.
+    protected static final String FILE_TEST_CONFIG =
+            FileUtil.joinPath("..", "asterix-opt", "asterix-graphix", "src", "main", "resources", "cc.conf");
+
+    private static final GraphixIntegrationUtil integrationUtil = new GraphixIntegrationUtil();
+    private static final TestExecutor testExecutor = new TestExecutor();
+
+    protected static TestGroup FailedGroup;
+    protected TestCaseContext tcCtx;
+
+    public SqlppExecutionTest(TestCaseContext tcCtx) {
+        this.tcCtx = tcCtx;
+    }
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        //noinspection ResultOfMethodCallIgnored
+        new File(PATH_ACTUAL).mkdirs();
+        ExecutionTestUtil.setUp(true, FILE_TEST_CONFIG, integrationUtil, false, null);
+    }
+
+    @AfterClass
+    public static void tearDown() throws Exception {
+        ExecutionTestUtil.tearDown(true, integrationUtil, true);
+        integrationUtil.removeTestStorageFiles();
+    }
+
+    @Parameters(name = "SqlppExecutionTest {index}: {0}")
+    public static Collection<Object[]> tests() throws Exception {
+        // TODO (GLENN): Find out the SQLPP tests we can run here.
+        // Collection<Object[]> test_cases = buildTestsInXml(ONLY_SUITE_FILE);
+        // if (test_cases.size() == 0) {
+        //    test_cases = buildTestsInXml(TEST_SUITE_FILE);
+        // }
+        // return test_cases;
+        return Collections.emptyList();
+    }
+
+    protected static Collection<Object[]> buildTestsInXml(String xmlfile) throws Exception {
+        Collection<Object[]> testArgs = new ArrayList<>();
+        TestCaseContext.Builder b = new TestCaseContext.Builder();
+        for (TestCaseContext ctx : b.build(new File(PATH_BASE), xmlfile)) {
+            testArgs.add(new Object[] { ctx });
+        }
+        return testArgs;
+    }
+
+    @Test
+    public void test() throws Exception {
+        testExecutor.executeTest(PATH_ACTUAL, tcCtx, null, false, FailedGroup);
+    }
+}
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm
deleted file mode 100644
index 31c330c..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.1.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Dependencies": [ [ [ "Yelp_A", "Reviews" ], [ "Yelp_B", "Users" ], [ "Yelp_B", "Friends" ] ], [ [ "Yelp_B", "Yelpers" ] ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "User", "PrimaryKey": [ [ "user_id" ] ], "Definitions": [ "Yelp_B.Yelpers" ] }, { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "PrimaryKey": [ [ "user_id" ], [ "friend" ] ], "DestinationKey": [ [ "friend" ] ], "SourceKey": [ [ "user_id" ] ], "Definitions": [ "( FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend )", "Yelp_B.Friends" ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ] ], [  ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm
deleted file mode 100644
index a749b72..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.2.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ] ], [  ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm
deleted file mode 100644
index 80af6cb..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.3.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Dependencies": [ [ [ "Yelp_A", "Reviews" ], [ "Yelp_B", "Users" ], [ "Yelp_B", "Friends" ] ], [ [ "Yelp_B", "Yelpers" ] ], [ [ "Yelp_A", "RelevantBusinesses", "0" ] ] ], "Vertices": [ { "Label": "User", "PrimaryKey": [ [ "user_id" ] ], "Definitions": [ "Yelp_B.Yelpers" ] }, { "Label": "Review", "PrimaryKey": [ [ "review_id" ] ], "Definitions": [ "( FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R )" ] }, { "Label": "Business", "PrimaryKey": [ [ "business_id" ] ], "Definitions": [ "( FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B )" ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "PrimaryKey": [ [ "user_id" ], [ "friend" ] ], "DestinationKey": [ [ "friend" ] ], "SourceKey": [ [ "user_id" ] ], "Definitions": [ "( FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend )", "Yelp_B.Friends" ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "PrimaryKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "SourceKey": [ [ "review_id" ] ], "Definitions": [ "" ] } ] }
diff --git a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm b/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm
deleted file mode 100644
index c1a0ea2..0000000
--- a/asterix-graphix/src/test/resources/metadata/results/graphix/yelp-example/yelp-example.4.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "count": 0 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.1.ddl.sqlpp
similarity index 78%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.1.ddl.sqlpp
index 0f4761d..db8589e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.1.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.1.ddl.sqlpp
@@ -40,9 +40,9 @@
 CREATE DATASET    Users (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 CREATE FUNCTION   RelevantBusinesses()
-                  { FROM Businesses B
-                    WHERE B.stars > 3.5
-                    SELECT B.* };
+                  { FROM    Businesses B
+                    WHERE   B.stars > 3.5
+                    SELECT  B.* };
 
 USE               Yelp_B;
 CREATE TYPE       GenericType
@@ -75,21 +75,26 @@
                   AS ( FROM    Yelp_A.RelevantBusinesses() B
                        SELECT  VALUE B ),
 EDGE              (:User)-[:FRIENDS_WITH]->(:User)
-                  PRIMARY KEY (user_id, friend)
                   SOURCE KEY (user_id)
                   DESTINATION KEY (friend)
                   AS ( FROM    Yelp_B.Users U
                        UNNEST  U.friends F
                        SELECT  U.user_id, F AS friend ),
 EDGE              (:User)-[:FRIENDS_WITH]->(:User)
-                          PRIMARY KEY (user_id, friend)
-                          SOURCE KEY (user_id)
-                          DESTINATION KEY (friend)
-                          AS Yelp_B.Friends,
+                  SOURCE KEY (user_id)
+                  DESTINATION KEY (friend)
+                  AS ( FROM    Yelp_B.Friends F
+                       SELECT  F.* ),
 EDGE              (:Review)-[:MADE_BY]->(:User)
-                  DESTINATION KEY (user_id),
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (user_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  R.review_id, R.user_id ),
 EDGE              (:Review)-[:ABOUT]->(:Business)
-                  DESTINATION KEY (business_id);
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (business_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  R.review_id, R.business_id );
 
 CREATE GRAPH      YelpGraph_2 IF NOT EXISTS AS
 VERTEX            (:Review)
@@ -101,7 +106,10 @@
                   AS ( FROM    Yelp_A.RelevantBusinesses() B
                        SELECT  VALUE B ),
 EDGE              (:Review)-[:ABOUT]->(:Business)
-                  DESTINATION KEY (business_id);
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (business_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  VALUE R );
 CREATE GRAPH      YelpGraph_2 IF NOT EXISTS AS
 VERTEX            (:Review)
                   PRIMARY KEY (review_id)
@@ -112,4 +120,7 @@
                   AS ( FROM    Yelp_A.RelevantBusinesses() B
                        SELECT  VALUE B ),
 EDGE              (:Review)-[:ABOUT]->(:Business)
-                  DESTINATION KEY (business_id);
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (business_id)
+                  AS ( FROM    Yelp_A.Reviews R
+                       SELECT  VALUE R );
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.2.query.sqlpp
similarity index 64%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.2.query.sqlpp
index b8151af..ca71c1e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.2.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.2.query.sqlpp
@@ -17,6 +17,14 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+FROM      `Metadata`.`Graph` G,
+          `Metadata`.`GraphDependency` GD,
+          GD.Dependencies D
+WHERE     G.DataverseName = GD.DataverseName AND
+          G.GraphName = GD.EntityName AND
+          GD.Kind = "GRAPH"
+SELECT    G.DataverseName, G.GraphName, G.Vertices, G.Edges,
+          D.DataverseName AS DependentDataverse,
+          D.EntityName AS DependentName,
+          D.Kind AS DependentKind
+ORDER BY  G.DataverseName, G.GraphName, D;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.3.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.3.ddl.sqlpp
similarity index 100%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.3.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.3.ddl.sqlpp
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.4.query.sqlpp
similarity index 64%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.4.query.sqlpp
index b8151af..ca71c1e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.4.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.4.query.sqlpp
@@ -17,6 +17,14 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+FROM      `Metadata`.`Graph` G,
+          `Metadata`.`GraphDependency` GD,
+          GD.Dependencies D
+WHERE     G.DataverseName = GD.DataverseName AND
+          G.GraphName = GD.EntityName AND
+          GD.Kind = "GRAPH"
+SELECT    G.DataverseName, G.GraphName, G.Vertices, G.Edges,
+          D.DataverseName AS DependentDataverse,
+          D.EntityName AS DependentName,
+          D.Kind AS DependentKind
+ORDER BY  G.DataverseName, G.GraphName, D;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.5.ddl.sqlpp
similarity index 74%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.5.ddl.sqlpp
index 586a718..0835454 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.5.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.5.ddl.sqlpp
@@ -30,18 +30,23 @@
                           AS ( FROM    Yelp_A.RelevantBusinesses() B
                                SELECT  VALUE B ),
 EDGE                      (:User)-[:FRIENDS_WITH]->(:User)
-                          PRIMARY KEY (user_id, friend)
                           SOURCE KEY (user_id)
                           DESTINATION KEY (friend)
                           AS ( FROM    Yelp_B.Users U
                                UNNEST  U.friends F
                                SELECT  U.user_id, F AS friend ),
 EDGE                      (:User)-[:FRIENDS_WITH]->(:User)
-                                  PRIMARY KEY (user_id, friend)
-                                  SOURCE KEY (user_id)
-                                  DESTINATION KEY (friend)
-                                  AS Yelp_B.Friends,
+                          SOURCE KEY (user_id)
+                          DESTINATION KEY (friend)
+                          AS ( FROM    Yelp_B.Friends F
+                               SELECT  F.* ),
 EDGE                      (:Review)-[:MADE_BY]->(:User)
-                          DESTINATION KEY (user_id),
+                          SOURCE KEY (review_id)
+                          DESTINATION KEY (user_id)
+                          AS ( FROM    Yelp_A.Reviews R
+                               SELECT  VALUE R ),
 EDGE                      (:Review)-[:ABOUT]->(:Business)
-                          DESTINATION KEY (business_id);
+                          SOURCE KEY (review_id)
+                          DESTINATION KEY (business_id)
+                          AS ( FROM    Yelp_A.Reviews R
+                               SELECT  VALUE R );
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.6.query.sqlpp
similarity index 64%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.6.query.sqlpp
index b8151af..ca71c1e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.6.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.6.query.sqlpp
@@ -17,6 +17,14 @@
  * under the License.
  */
 
-FROM      `Metadata`.`Graph` G
-SELECT    G.DataverseName, G.GraphName, G.Dependencies, G.Vertices, G.Edges
-ORDER BY  G.DataverseName, G.GraphName;
+FROM      `Metadata`.`Graph` G,
+          `Metadata`.`GraphDependency` GD,
+          GD.Dependencies D
+WHERE     G.DataverseName = GD.DataverseName AND
+          G.GraphName = GD.EntityName AND
+          GD.Kind = "GRAPH"
+SELECT    G.DataverseName, G.GraphName, G.Vertices, G.Edges,
+          D.DataverseName AS DependentDataverse,
+          D.EntityName AS DependentName,
+          D.Kind AS DependentKind
+ORDER BY  G.DataverseName, G.GraphName, D;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.7.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.7.ddl.sqlpp
similarity index 100%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.7.ddl.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.7.ddl.sqlpp
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.8.query.sqlpp
similarity index 68%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.8.query.sqlpp
index 9667fd6..c238c7c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/create-drop-graph/create-drop-graph.8.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+SELECT VALUE {
+    "graphCount": (
+        FROM    `Metadata`.`Graph` G
+        WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
+        SELECT  VALUE COUNT(*)
+    )[0],
+    "dependencyCount": (
+        FROM    `Metadata`.`GraphDependency` GD
+        WHERE   GD.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
+        SELECT  VALUE COUNT(*)
+    )[0]
+};
diff --git a/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.1.ddl.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.1.ddl.sqlpp
new file mode 100644
index 0000000..127319a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.1.ddl.sqlpp
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+
+CREATE GRAPH      YelpGraph AS
+VERTEX            (:User)
+                  PRIMARY KEY (user_id)
+                  AS Users,
+VERTEX            (:Review)
+                  PRIMARY KEY (review_id)
+                  AS Reviews,
+EDGE              (:User)<-[:MADE_BY]-(:Review)
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (user_id)
+                  AS ( FROM    Yelp.Reviews R
+                       SELECT  R.review_id, R.user_id );
+
+// Create a function, view, and another graph that depend on the graph above.
+CREATE FUNCTION   YelpGraphFunction ()
+                  { FROM GRAPH  YelpGraph
+                    MATCH       (u)-[]->(r)
+                    SELECT      u, r
+                    LIMIT       1 };
+CREATE VIEW       YelpGraphView AS
+                  FROM GRAPH  YelpGraph
+                  MATCH       (u:User)<-[:MADE_BY]-(:Review)
+                  SELECT      u.user_id
+                  LIMIT       1;
+CREATE GRAPH      YelpGraphGraph AS
+VERTEX            (:UsersWithReviews)
+                  PRIMARY KEY (user_id)
+                  AS ( FROM GRAPH  YelpGraph
+                       MATCH       (u:User)<-[:MADE_BY]-(:Review)
+                       SELECT      u ),
+EDGE              (:UsersWithReviews)-[:FRIENDS_WITH]->(:UsersWithReviews)
+                  SOURCE KEY (user_id)
+                  DESTINATION KEY (best_friend)
+                  AS ( FROM GRAPH  YelpGraph
+                       MATCH       (u:User)<-[:MADE_BY]-(Review)
+                       SELECT      u.user_id, u.best_friend );
diff --git a/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.2.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.2.query.sqlpp
new file mode 100644
index 0000000..cef0add
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.2.query.sqlpp
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+SELECT    VALUE {
+    "graph": (
+        FROM      `Metadata`.`Graph` G,
+                  `Metadata`.`GraphDependency` GD,
+                  GD.Dependencies D
+        WHERE     G.DataverseName = GD.DataverseName AND
+                  G.GraphName = GD.EntityName AND
+                  GD.DataverseName = "Yelp" AND
+                  GD.Kind = "GRAPH"
+        SELECT    G.DataverseName, G.GraphName,
+                  D.DataverseName AS DependentDataverse,
+                  D.EntityName AS DependentName,
+                  D.Kind AS DependentKind
+        ORDER BY  G.DataverseName, G.GraphName, D
+    ),
+    "function": (
+        FROM      `Metadata`.`Function` F,
+                  `Metadata`.`GraphDependency` GD,
+                  GD.Dependencies D
+        WHERE     F.DataverseName = GD.DataverseName AND
+                  F.Name = GD.EntityName AND
+                  F.Arity = GD.EntityDetail AND
+                  GD.DataverseName = "Yelp" AND
+                  GD.Kind = "FUNCTION"
+        SELECT    F.DataverseName, F.Name, F.Arity,
+                  D.DataverseName AS DependentDataverse,
+                  D.EntityName AS DependentName,
+                  D.Kind AS DependentKind
+        ORDER BY  F.DataverseName, F.Name, D
+    ),
+    "view": (
+        FROM      `Metadata`.`Dataset` DD,
+                  `Metadata`.`GraphDependency` GD,
+                  GD.Dependencies D
+        WHERE     DD.DataverseName = GD.DataverseName AND
+                  DD.DatasetName = GD.EntityName AND
+                  DD.DatasetType = "VIEW" AND
+                  GD.DataverseName = "Yelp" AND
+                  GD.Kind = "VIEW"
+        SELECT    DD.DataverseName, DD.DatasetName,
+                  D.DataverseName AS DependentDataverse,
+                  D.EntityName AS DependentName,
+                  D.Kind AS DependentKind
+        ORDER BY  DD.DataverseName, DD.DatasetName, D
+    )
+};
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.3.ddl.sqlpp
similarity index 86%
rename from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
rename to asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.3.ddl.sqlpp
index 9667fd6..df554f4 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.3.ddl.sqlpp
@@ -17,6 +17,4 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE Yelp;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.4.query.sqlpp
similarity index 86%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.4.query.sqlpp
index 9667fd6..bbb0b64 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/metadatats/queries/graphix/on-graph-dependency/on-graph-dependency.4.query.sqlpp
@@ -17,6 +17,6 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+FROM    `Metadata`.`GraphDependency` GD
+WHERE   GD.DataverseName = "Yelp"
+SELECT  VALUE COUNT(*);
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.2.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.2.adm
new file mode 100644
index 0000000..2e8cfe1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.2.adm
@@ -0,0 +1,7 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Friends", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Users", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_1", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                       UNNEST  U.friends F\n                       SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                       SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.user_id" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  R.review_id, R.business_id" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Yelpers", "DependentKind": "SYNONYM" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.4.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.4.adm
new file mode 100644
index 0000000..2f07e94
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.4.adm
@@ -0,0 +1,2 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                       SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                       SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.6.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.6.adm
new file mode 100644
index 0000000..f761b45
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.6.adm
@@ -0,0 +1,5 @@
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "RelevantBusinesses", "DependentKind": "FUNCTION" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_A", "DependentName": "Reviews", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Friends", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Users", "DependentKind": "DATASET" }
+{ "DataverseName": "Yelp", "GraphName": "YelpGraph_2", "Vertices": [ { "Label": "User", "Definitions": [ { "PrimaryKey": [ [ "user_id" ] ], "Body": "Yelp_B.Yelpers" } ] }, { "Label": "Review", "Definitions": [ { "PrimaryKey": [ [ "review_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "Business", "Definitions": [ { "PrimaryKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.RelevantBusinesses() B\n                               SELECT  VALUE B" } ] } ], "Edges": [ { "Label": "FRIENDS_WITH", "DestinationLabel": "User", "SourceLabel": "User", "Definitions": [ { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Users U\n                               UNNEST  U.friends F\n                               SELECT  U.user_id, F AS friend" }, { "SourceKey": [ [ "user_id" ] ], "DestinationKey": [ [ "friend" ] ], "Body": "FROM    Yelp_B.Friends F\n                               SELECT  F.*" } ] }, { "Label": "MADE_BY", "DestinationLabel": "User", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "user_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] }, { "Label": "ABOUT", "DestinationLabel": "Business", "SourceLabel": "Review", "Definitions": [ { "SourceKey": [ [ "review_id" ] ], "DestinationKey": [ [ "business_id" ] ], "Body": "FROM    Yelp_A.Reviews R\n                               SELECT  VALUE R" } ] } ], "DependentDataverse": "Yelp_B", "DependentName": "Yelpers", "DependentKind": "SYNONYM" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.8.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.8.adm
new file mode 100644
index 0000000..fa28578
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/create-drop-graph/create-drop-graph.8.adm
@@ -0,0 +1 @@
+{ "graphCount": 0, "dependencyCount": 0 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.2.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.2.adm
new file mode 100644
index 0000000..b5547c5
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.2.adm
@@ -0,0 +1 @@
+{ "graph": [ { "DataverseName": "Yelp", "GraphName": "YelpGraph", "DependentDataverse": "Yelp", "DependentName": "Reviews", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraph", "DependentDataverse": "Yelp", "DependentName": "Users", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraphGraph", "DependentDataverse": "Yelp", "DependentName": "Reviews", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraphGraph", "DependentDataverse": "Yelp", "DependentName": "Users", "DependentKind": "DATASET" }, { "DataverseName": "Yelp", "GraphName": "YelpGraphGraph", "DependentDataverse": "Yelp", "DependentName": "YelpGraph", "DependentKind": "GRAPH" } ], "function": [ { "DataverseName": "Yelp", "Name": "YelpGraphFunction", "Arity": "0", "DependentDataverse": "Yelp", "DependentName": "YelpGraph", "DependentKind": "GRAPH" } ], "view": [ { "DataverseName": "Yelp", "DatasetName": "YelpGraphView", "DependentDataverse": "Yelp", "DependentName": "YelpGraph", "DependentKind": "GRAPH" } ] }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.4.adm b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.4.adm
new file mode 100644
index 0000000..c227083
--- /dev/null
+++ b/asterix-graphix/src/test/resources/metadatats/results/graphix/on-graph-dependency/on-graph-dependency.4.adm
@@ -0,0 +1 @@
+0
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/testsuite.xml b/asterix-graphix/src/test/resources/metadatats/testsuite.xml
similarity index 72%
rename from asterix-graphix/src/test/resources/metadata/testsuite.xml
rename to asterix-graphix/src/test/resources/metadatats/testsuite.xml
index 2f45b91..9861530 100644
--- a/asterix-graphix/src/test/resources/metadata/testsuite.xml
+++ b/asterix-graphix/src/test/resources/metadatats/testsuite.xml
@@ -18,10 +18,17 @@
             ResultOffsetPath="results"
             QueryOffsetPath="queries"
             QueryFileExtension=".sqlpp">
-  <test-group name="yelp-example">
+  <test-group name="create-drop-graph">
     <test-case FilePath="graphix">
-      <compilation-unit name="yelp-example">
-        <output-dir compare="Text">yelp-example</output-dir>
+      <compilation-unit name="create-drop-graph">
+        <output-dir compare="Text">create-drop-graph</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="on-graph-dependency">
+    <test-case FilePath="graphix">
+      <compilation-unit name="on-graph-dependency">
+        <output-dir compare="Text">on-graph-dependency</output-dir>
       </compilation-unit>
     </test-case>
   </test-group>
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.1.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.1.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.1.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.1.ddl.sqlpp
index ff47a77..d74de05 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.1.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.1.ddl.sqlpp
@@ -37,6 +37,9 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP DATASET      GenericDataset;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.10.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.10.ddl.sqlpp
similarity index 85%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.10.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.10.ddl.sqlpp
index fe00035..26b75b2 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.10.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.10.ddl.sqlpp
@@ -39,7 +39,10 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 USE               TestDataverse2;
 CREATE TYPE       GenericType
@@ -56,7 +59,10 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 USE               TestDataverse1;
 CREATE GRAPH      TestGraph IF NOT EXISTS AS
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.11.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.11.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.11.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.11.ddl.sqlpp
index ff0f01e..77706fa 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.11.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.11.ddl.sqlpp
@@ -37,7 +37,10 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP GRAPH        GraphThatDoesntExist1 IF EXISTS;
 DROP GRAPH        GraphThatDoesntExist2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.12.ddl.sqlpp
similarity index 80%
copy from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.12.ddl.sqlpp
index 5191339..2ec83fd 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.12.ddl.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-// Verify that a subquery as an element definition is a valid query.
+// Verify that we cannot drop a graph that a view is dependent on.
 
 DROP DATAVERSE    TestDataverse IF EXISTS;
 CREATE DATAVERSE  TestDataverse;
@@ -25,7 +25,6 @@
 
 CREATE TYPE       GenericType
 AS                { _id: uuid };
-
 CREATE DATASET    GenericDataset (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 
@@ -37,9 +36,14 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
-                  AS ( FROM GenericDataset G,
-                            GenericDataset G2
-                       SELECT V );
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+CREATE VIEW       TestView AS
+                  FROM GRAPH  TestGraph
+                  MATCH       (n)
+                  SELECT      n;
+
+DROP GRAPH        TestGraph;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.13.ddl.sqlpp
similarity index 78%
copy from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.13.ddl.sqlpp
index 5191339..a38fd4b 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.13.ddl.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-// Verify that a subquery as an element definition is a valid query.
+// Verify that we cannot drop a graph that a function is dependent on.
 
 DROP DATAVERSE    TestDataverse IF EXISTS;
 CREATE DATAVERSE  TestDataverse;
@@ -25,7 +25,6 @@
 
 CREATE TYPE       GenericType
 AS                { _id: uuid };
-
 CREATE DATASET    GenericDataset (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 
@@ -37,9 +36,15 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
-                  AS ( FROM GenericDataset G,
-                            GenericDataset G2
-                       SELECT V );
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+CREATE FUNCTION   TestFunction() {
+                      FROM GRAPH  TestGraph
+                      MATCH       (n)
+                      SELECT      n
+                  };
+
+DROP GRAPH        TestGraph;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.14.ddl.sqlpp
similarity index 64%
copy from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.14.ddl.sqlpp
index 5191339..ac9b1f6 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.14.ddl.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-// Verify that a subquery as an element definition is a valid query.
+// Verify that we cannot drop a graph that another graph is dependent on.
 
 DROP DATAVERSE    TestDataverse IF EXISTS;
 CREATE DATAVERSE  TestDataverse;
@@ -25,7 +25,6 @@
 
 CREATE TYPE       GenericType
 AS                { _id: uuid };
-
 CREATE DATASET    GenericDataset (GenericType)
 PRIMARY KEY       _id AUTOGENERATED;
 
@@ -37,9 +36,24 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
-                  AS ( FROM GenericDataset G,
-                            GenericDataset G2
-                       SELECT V );
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+CREATE GRAPH      TestGraph2 AS
+VERTEX            (:Vertex1)
+                  PRIMARY KEY (_id)
+                  AS GenericDataset,
+VERTEX            (:Vertex2)
+                  PRIMARY KEY (_id)
+                  AS ( FROM GRAPH  TestGraph
+                       MATCH       (n)
+                       SELECT      n ),
+EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
+
+DROP GRAPH        TestGraph;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.2.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.2.ddl.sqlpp
similarity index 97%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.2.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.2.ddl.sqlpp
index 09693af..c51981c 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.2.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.2.ddl.sqlpp
@@ -39,7 +39,6 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (a, b)
                   SOURCE KEY (a)
                   DESTINATION KEY (b)
                   AS ( FROM TestFunction() T
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.3.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.3.ddl.sqlpp
similarity index 97%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.3.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.3.ddl.sqlpp
index a812ea1..533adfd 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.3.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.3.ddl.sqlpp
@@ -39,7 +39,6 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (a, b)
                   SOURCE KEY (a)
                   DESTINATION KEY (b)
                   AS ( FROM TestView T
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.4.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.4.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.4.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.4.ddl.sqlpp
index 0cdec73..2360211 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.4.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.4.ddl.sqlpp
@@ -39,6 +39,9 @@
                   PRIMARY KEY (_id)
                   AS DatasetSynonym,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP SYNONYM      DatasetSynonym;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.5.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.5.ddl.sqlpp
similarity index 90%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.5.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.5.ddl.sqlpp
index 844389f..bcd6df1 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.5.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.5.ddl.sqlpp
@@ -49,6 +49,9 @@
                   PRIMARY KEY (_id)
                   AS TestDataverse2.GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
 
 DROP DATAVERSE    TestDataverse2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.6.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.6.ddl.sqlpp
similarity index 88%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.6.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.6.ddl.sqlpp
index f6173aa..2f29d61 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.6.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.6.ddl.sqlpp
@@ -37,4 +37,7 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.7.ddl.sqlpp
similarity index 96%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.7.ddl.sqlpp
index 5191339..3dce9df 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.7.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.7.ddl.sqlpp
@@ -37,7 +37,6 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex2)
-                  PRIMARY KEY (_id, _foreign_id)
                   SOURCE KEY (_id)
                   DESTINATION KEY (_foreign_id)
                   AS ( FROM GenericDataset G,
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.8.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.8.ddl.sqlpp
similarity index 100%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.8.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.8.ddl.sqlpp
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.9.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.9.ddl.sqlpp
similarity index 87%
rename from asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.9.ddl.sqlpp
rename to asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.9.ddl.sqlpp
index 7c5269e..204900f 100644
--- a/asterix-graphix/src/test/resources/runtimets/queries/graphix/error-handling/error-handling.9.ddl.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/create-drop-error/create-drop-error.9.ddl.sqlpp
@@ -37,4 +37,7 @@
                   PRIMARY KEY (_id)
                   AS GenericDataset,
 EDGE              (:Vertex1)-[:EDGE_1]->(:Vertex3)
-                  DESTINATION KEY (_foreign_id);
+                  SOURCE KEY (_id)
+                  DESTINATION KEY (_foreign_id)
+                  AS ( FROM   GenericDataset GD
+                       SELECT GD._id, GD._foreign_id );
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.1.ddl.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.1.ddl.sqlpp
new file mode 100644
index 0000000..492a7aa
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.1.ddl.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+
+CREATE GRAPH      YelpGraph AS
+VERTEX            (:User)
+                  PRIMARY KEY (user_id)
+                  AS Users,
+VERTEX            (:Review)
+                  PRIMARY KEY (review_id)
+                  AS Reviews,
+EDGE              (:User)-[:FRIENDS_WITH]->(:User)
+                  SOURCE KEY (user_id)
+                  DESTINATION KEY (friend)
+                  AS ( FROM    Users U
+                       UNNEST  U.friends F
+                       SELECT  U.user_id AS user_id,
+                               F AS friend ),
+EDGE              (:Review)-[:MADE_BY]->(:User)
+                  SOURCE KEY (review_id)
+                  DESTINATION KEY (user_id)
+                  AS ( FROM    Reviews R
+                       SELECT  R.review_id, R.user_id );
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.2.update.sqlpp
similarity index 62%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.2.update.sqlpp
index 9667fd6..fa0d18d 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.2.update.sqlpp
@@ -17,6 +17,20 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "friends": [2, 3], "best_friend": 2 },
+  { "user_id": 2, "friends": [1] },
+  { "user_id": 3, "friends": [1], "best_friend": 1 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.3.query.sqlpp
similarity index 84%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.3.query.sqlpp
index 9667fd6..2e67ca8 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.3.query.sqlpp
@@ -17,6 +17,8 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// There is one dangling vertex, and zero edges.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u:User)
+SELECT      u.user_id
+ORDER BY    u.user_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.4.query.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.4.query.sqlpp
index 9667fd6..fc8e61c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.4.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// There are two dangling vertices of the same label, and zero edges.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u1:User), (u2:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id
+ORDER BY    u1_user_id,
+            u2_user_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.5.query.sqlpp
similarity index 77%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.5.query.sqlpp
index 9667fd6..b37cb34 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.5.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// There are two dangling vertices of different labels, and zero edges.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u:User), (r:Review)
+SELECT      u.user_id,
+            r.review_id
+ORDER BY    u.user_id,
+            r.review_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.6.query.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.6.query.sqlpp
index 9667fd6..f41dcdf 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/dangling-vertices/dangling-vertices.6.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// There are two dangling vertices, but each vertex is logically connected to an edge.
+FROM GRAPH  Yelp.YelpGraph
+MATCH       (u:User)<-[:MADE_BY]-(r:Review), (u), (r)
+SELECT      u.user_id,
+            r.review_id
+ORDER BY    u.user_id,
+            r.review_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.1.ddl.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.1.ddl.sqlpp
index 9667fd6..ad55e77 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.1.ddl.sqlpp
@@ -17,6 +17,13 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.2.update.sqlpp
similarity index 68%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.2.update.sqlpp
index 9667fd6..5780dc6 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.2.update.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 },
+  { "user_id": 5 },
+  { "user_id": 6 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 4, "friend": 5 },
+  { "user_id": 5, "friend": 6 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.3.query.sqlpp
new file mode 100644
index 0000000..ee62ea8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.3.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// One directed edge definition of exactly two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{2,2}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.4.query.sqlpp
new file mode 100644
index 0000000..bfef02f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.4.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// One directed edge definition of exactly three hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{3,3}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.5.query.sqlpp
new file mode 100644
index 0000000..e12bf13
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.5.query.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+// Two directed edge definitions of exactly two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw1:FRIENDS_WITH{2,2}]-(u1:User),
+            (u3:User)<-[fw2:FRIENDS_WITH{2,2}]-(u2)
+UNNEST      fw1 AS fw1EdgeRecord
+UNNEST      fw2 AS fw2EdgeRecord
+LET         fw1_left_vertex = VERTEX_KEY(fw1EdgeRecord.LeftVertex),
+            fw2_left_vertex = VERTEX_KEY(fw2EdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw1_left_vertex,
+            u2.user_id AS u2_user_id,
+            fw2_left_vertex,
+            u3.user_id AS u3_user_id,
+            HOP_COUNT(fw1) AS fw1_hops,
+            HOP_COUNT(fw2) AS fw2_hops
+ORDER BY    u1, fw1_left_vertex, u2, fw2_left_vertex, u3;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.6.query.sqlpp
new file mode 100644
index 0000000..ec08830
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.6.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// One directed edge definition of exactly one hop (this should be expanded as well).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{1,1}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.7.update.sqlpp
similarity index 85%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.7.update.sqlpp
index 9667fd6..44e6529 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.7.update.sqlpp
@@ -17,6 +17,9 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+// We insert a backwards-edge here as well.
+INSERT INTO       Friends [
+  { "user_id": 2, "friend": 1 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.8.query.sqlpp
new file mode 100644
index 0000000..fcedada
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/fixed-sub-path/fixed-sub-path.8.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// One undirected edge definition of exactly two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)-[fw:FRIENDS_WITH{2,2}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.1.ddl.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.1.ddl.sqlpp
index 9667fd6..1932ddc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.1.ddl.sqlpp
@@ -17,6 +17,13 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.2.update.sqlpp
similarity index 74%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.2.update.sqlpp
index 9667fd6..864e842 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.2.update.sqlpp
@@ -17,6 +17,17 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 2, "friend": 1 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.3.query.sqlpp
similarity index 76%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.3.query.sqlpp
index 9667fd6..ea3090e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.3.query.sqlpp
@@ -17,6 +17,11 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// (u) should never be equal to (v).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u), (v)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id
+ORDER BY    u, v;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.4.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.4.query.sqlpp
index 9667fd6..b3ee92f 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.4.query.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// (u), (v), and (w) should never be equal.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u), (v), (w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id
+ORDER BY    u, v, w;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.5.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.5.query.sqlpp
index 9667fd6..974fd77 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.5.query.sqlpp
@@ -17,6 +17,17 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// (u), (v), and (w) should never be equal.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM Yelp.Friends F
+                        SELECT F.user_id, F.friend )
+MATCH       (u)->(v)->(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id
+ORDER BY    u, v, w;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.6.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.6.query.sqlpp
index 9667fd6..e3f1e7c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.6.query.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// There should be results where (u) = (v).
+SET  `graphix.match-evaluation` "homomorphism";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u), (v)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id
+ORDER BY    u, v;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.7.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.7.query.sqlpp
new file mode 100644
index 0000000..0e2cbc9
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graph-isomorphism/graph-isomorphism.7.query.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+// There should be results where (u) = (w) (i.e. only edge adjacency should be preserved).
+SET  `graphix.match-evaluation` "homomorphism";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM Yelp.Friends F
+                        SELECT F.user_id, F.friend )
+MATCH       (u)->(v), (v)->(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id
+ORDER BY    u, v, w;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.1.ddl.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.1.ddl.sqlpp
index 9667fd6..b5525dc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.1.ddl.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
+
+CREATE TYPE       ReviewsType
+AS                { review_id: string };
+CREATE DATASET    Reviews (ReviewsType)
+PRIMARY KEY       review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.2.update.sqlpp
similarity index 62%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.2.update.sqlpp
index 9667fd6..b36158c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.2.update.sqlpp
@@ -17,6 +17,26 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 },
+  { "user_id": 5 },
+  { "user_id": 6 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 2 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 4, "friend": 5 },
+  { "user_id": 5, "friend": 6 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.3.query.sqlpp
new file mode 100644
index 0000000..35463a2
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.3.query.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+// Test each simple vertex function (label, key, properties, and detail).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:User)<-[:MADE_BY]-(:Review)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id,
+                                R.user_id )
+MATCH       (n)
+SELECT      VERTEX_KEY(n) AS vertexKey,
+            LABEL(n) AS vertexLabel,
+            VERTEX_PROPERTIES(n) AS vertexProperties,
+            VERTEX_DETAIL(n) AS vertexDetail
+ORDER BY    n;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.4.query.sqlpp
new file mode 100644
index 0000000..975b3f8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.4.query.sqlpp
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+// Test each simple edge function (direction, label, keys, detail, properties).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend ),
+            EDGE   (:User)<-[:MADE_BY]-(:Review)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id,
+                                R.user_id )
+MATCH       (n1)-[e]-(n2)
+SELECT      DIRECTION(e) AS direction,
+            SOURCE_KEY(e) AS sourceKeyValue,
+            DEST_KEY(e) AS destKeyValue,
+            SOURCE_VERTEX(e, n1, n2) AS sourceVertex,
+            DEST_VERTEX(e, n1, n2) AS destVertex,
+            EDGE_DETAIL(e) AS edgeDetail,
+            EDGE_PROPERTIES(e) AS edgeProperties,
+            LABEL(e) AS edgeLabel,
+            LABEL(n1) AS n1Label,
+            LABEL(n2) AS n2Label
+ORDER BY    n1, e, n2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.5.query.sqlpp
new file mode 100644
index 0000000..3595efb
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/graphix-functions/graphix-functions.5.query.sqlpp
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+// Test each path function (edges, hop-count, labels, vertices).
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM      Yelp.Users U
+                        SELECT    VALUE U
+                        ORDER BY  U.user_id
+                        LIMIT     2 ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM      Yelp.Reviews R
+                        SELECT    VALUE R
+                        ORDER BY  R.review_id
+                        LIMIT     2 ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend ),
+            EDGE   (:User)<-[:MADE_BY]-(:Review)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id,
+                                R.user_id )
+MATCH       (n1)-[e:{1,1}]-(n2)-(n3) AS p
+SELECT      EDGES(p) AS pEdges,
+            EDGES(e) AS eEdges,
+            HOP_COUNT(p) AS pHopCount,
+            LABELS(p) AS pLabels,
+            LABELS(e) AS eLabels,
+            VERTICES(p) AS pVertices,
+            VERTICES(e) AS eVertices
+ORDER BY    n1, e, n2, n3;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.1.ddl.sqlpp
index 9667fd6..96ec87c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.2.update.sqlpp
new file mode 100644
index 0000000..0b7d8c5
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.2.update.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 4, "friend": 2 },
+  { "user_id": 3, "friend": 2 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.3.query.sqlpp
new file mode 100644
index 0000000..700fe8f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.3.query.sqlpp
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve both e and n, using the edge direction.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)-[e]->(n)
+SELECT      DISTINCT LABEL(e) AS e_label,
+                     LABEL(n) AS n_label;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.4.query.sqlpp
new file mode 100644
index 0000000..5533ede
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.4.query.sqlpp
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve all elements (e, n, f, m), using the edge direction of the last edge in our pattern.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (m)-[f]->(n)-[e]->(u:User)
+SELECT      DISTINCT LABEL(e) AS e_label,
+                     LABEL(n) AS n_label,
+                     LABEL(f) AS f_label,
+                     LABEL(m) AS m_label;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.5.query.sqlpp
new file mode 100644
index 0000000..df7e676
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.5.query.sqlpp
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve all elements (e, n, f, last direction), using the edge direction of the first pattern.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)-[e]->(n),
+            (n)-[f]-(r:Review)
+SELECT      DISTINCT LABEL(e) AS e_label,
+                     LABEL(n) AS n_label,
+                     LABEL(f) AS f_label,
+                     DIRECTION(f) AS f_direction;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.6.query.sqlpp
new file mode 100644
index 0000000..3d6e9a9
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/inference-resolution/inference-resolution.6.query.sqlpp
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+-- param max-warnings:string=1
+
+// We should be able to resolve all elements (e, n, f, last direction), using the edge direction of the first pattern.
+SET         `graphix.resolver` "inference-based";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id, F.friend ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)-[e:{2,2}]->(n) // (u:User)-[]->()-[]->(n)
+UNNEST      e AS edgeRecord
+LET         ee = edgeRecord.`Edge`
+SELECT      DISTINCT LABEL(ee) AS e_label,
+                     LABEL(n) AS n_label,
+                     LEN(e) AS e_length;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.1.ddl.sqlpp
index 9667fd6..96ec87c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.2.update.sqlpp
new file mode 100644
index 0000000..e85ca82
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.2.update.sqlpp
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 3 },
+  { "user_id": 2, "group_id": 3 },
+  { "user_id": 3, "group_id": 3 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1, "group_id": 3 },
+  { "review_id": "B", "user_id": 2, "group_id": 3 },
+  { "review_id": "C", "user_id": 1, "group_id": 3 }
+];
+INSERT INTO       Friends [
+  { "user_id": 2, "friend": 3, "group_id": 3 },
+  { "user_id": 2, "friend": null, "group_id": 3 }
+];
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 4 },
+  { "user_id": 2, "group_id": 4 },
+  { "user_id": 3, "group_id": 4 }
+];
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "group_id": 4 },
+  { "user_id": 2, "friend": 3, "group_id": 4 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 2, "group_id": 4 }
+];
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 5 },
+  { "user_id": 2, "group_id": 5 },
+  { "user_id": 3, "group_id": 5 },
+  { "user_id": 4, "group_id": 5 },
+  { "user_id": 5, "group_id": 5 }
+];
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "group_id": 5 },
+  { "user_id": 3, "friend": 1, "group_id": 5 },
+  { "user_id": 4, "friend": 1, "group_id": 5 },
+  { "user_id": 1, "friend": 4, "group_id": 5 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 3, "group_id": 5 },
+  { "review_id": "B", "user_id": 4, "group_id": 5 },
+  { "review_id": "C", "user_id": 5, "group_id": 5 }
+];
+
+INSERT INTO       Users [
+  { "user_id": 1, "group_id": 6 },
+  { "user_id": 2, "group_id": 6 },
+  { "user_id": 3, "group_id": 6 },
+  { "user_id": 4, "group_id": 6 },
+  { "user_id": 5, "group_id": 6 }
+];
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "group_id": 6 },
+  { "user_id": 1, "friend": 3, "group_id": 6 },
+  { "user_id": 3, "friend": 4, "group_id": 6 },
+  { "user_id": 3, "friend": 5, "group_id": 6 }
+];
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 2, "group_id": 6 },
+  { "review_id": "B", "user_id": 3, "group_id": 6 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.3.query.sqlpp
new file mode 100644
index 0000000..69e3592
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.3.query.sqlpp
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+-- LEFT-MATCH query, with source of the LEFT-MATCH edge acting as connecting vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 3
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 3
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 3
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 3
+                        SELECT  F.user_id, F.friend )
+MATCH       (u1:User)<-[mb:MADE_BY]-(r:Review)
+LEFT MATCH  (u2:User)<-[fw:FRIENDS_WITH]-(u1)
+SELECT      u1.user_id AS u1_user_id,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend,
+            u2.user_id AS u2_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id
+ORDER BY    u1_user_id, u2_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.4.query.sqlpp
new file mode 100644
index 0000000..f4fe1cc
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.4.query.sqlpp
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+-- LEFT-MATCH query, with destination of the LEFT-MATCH edge acting as connecting vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 4
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 4
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 4
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 4
+                        SELECT  F.user_id, F.friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH]-(u1:User)
+LEFT MATCH  (u1)<-[mb:MADE_BY]-(r:Review)
+SELECT      u1.user_id AS u1_user_id,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend,
+            u2.user_id AS u2_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id
+ORDER BY    u1_user_id, u2_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.5.query.sqlpp
new file mode 100644
index 0000000..3f00813
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.5.query.sqlpp
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+-- LEFT-MATCH query, with destination of the second LEFT-MATCH edge acting as connecting vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 5
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 5
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 5
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 5
+                        SELECT  F.user_id, F.friend )
+MATCH       (u2:User)<-[fw1:FRIENDS_WITH]-(u1:User)
+LEFT MATCH  (u3:User)<-[mb:MADE_BY]-(r:Review),
+            (u1)<-[fw2:FRIENDS_WITH]-(u3)
+SELECT      u1.user_id AS u1_user_id,
+            fw1.user_id AS fw1_user_id,
+            fw1.friend AS fw1_friend,
+            u2.user_id AS u2_user_id,
+            u3.user_id AS u3_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id,
+            fw2.user_id AS fw2_user_id,
+            fw2.friend AS fw2_friend
+ORDER BY    u1_user_id, u2_user_id, u3_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.6.query.sqlpp
new file mode 100644
index 0000000..810e5fe
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/left-match/left-match.6.query.sqlpp
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+-- Double LEFT-MATCH query.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        WHERE   U.group_id = 6
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 6
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        WHERE   R.group_id = 6
+                        SELECT  R.review_id, R.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.group_id = 6
+                        SELECT  F.user_id, F.friend )
+MATCH       (u2:User)<-[fw1:FRIENDS_WITH]-(u1:User)
+LEFT MATCH  (u2)<-[mb:MADE_BY]-(r:Review)
+LEFT MATCH  (u2)-[fw2:FRIENDS_WITH]->(u3:User)
+SELECT      u1.user_id AS u1_user_id,
+            fw1.user_id AS fw1_user_id,
+            fw1.friend AS fw1_friend,
+            u2.user_id AS u2_user_id,
+            mb.user_id AS mb_user_id,
+            mb.review_id AS mb_review_id,
+            r.review_id AS r_review_id,
+            fw2.user_id AS fw2_user_id,
+            fw2.friend AS fw2_friend,
+            u3.user_id AS u3_user_id
+ORDER BY    u1_user_id, u2_user_id, u3_user_id, r_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.1.ddl.sqlpp
index 9667fd6..96ec87c 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.2.update.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.2.update.sqlpp
index 9667fd6..24fdd88 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.2.update.sqlpp
@@ -17,6 +17,26 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 4, "friend": 2 },
+  { "user_id": 3, "friend": 2 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.3.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.3.query.sqlpp
index 9667fd6..6b394d6 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.3.query.sqlpp
@@ -17,6 +17,13 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+-- param max-warnings:string=1
+
+// We should be able to determine that (u) is of label User.
+SET         `graphix.resolver` "no-resolution";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u)
+SELECT      u.user_id
+ORDER BY    u.user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.4.query.sqlpp
similarity index 63%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.4.query.sqlpp
index 9667fd6..e78aa4b 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.4.query.sqlpp
@@ -17,6 +17,18 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+-- param max-warnings:string=3
+
+// The (n) vertex should assume all defined vertex labels.
+SET         `graphix.resolver` "no-resolution";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews
+MATCH       (n)
+SELECT      n.user_id,
+            n.review_id
+ORDER BY    n.user_id,
+            n.review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.5.query.sqlpp
new file mode 100644
index 0000000..1d4b4c2
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/minimal-resolution/minimal-resolution.5.query.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+-- param max-warnings:string=3
+
+// The (n) and (m) vertices should assume all defined vertex labels, and (e) should assume all edge labels.
+SET         `graphix.resolver` "no-resolution";
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Users U
+                        SELECT  U.user_id ),
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (m)-[e]-(n)
+SELECT      m.user_id AS left_user_id,
+            m.review_id AS left_review_id,
+            n.user_id AS right_user_id,
+            n.review_id AS right_review_id,
+            e.user_id AS e_user_id,
+            e.review_id AS e_review_id
+ORDER BY    left_user_id,
+            left_review_id,
+            right_user_id,
+            right_review_id,
+            e_user_id,
+            e_review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.1.ddl.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.1.ddl.sqlpp
index 9667fd6..91a6fd9 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.1.ddl.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    TestDataverse IF EXISTS;
+CREATE DATAVERSE  TestDataverse;
+USE               TestDataverse;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+
+CREATE DATASET    GenericDataset (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.10.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.10.query.sqlpp
index 9667fd6..bb550a0 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.10.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// Verify that scoping errors are recognized (in SELECT-CLAUSE).
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+SELECT      v1, v2, invalidVariable;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.11.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.11.query.sqlpp
new file mode 100644
index 0000000..7ecaf84
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.11.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+// Verify that scoping errors are recognized (in LET-CLAUSE).
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+LET         myValue = invalidVariable
+SELECT      v1, v2, myValue;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.12.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.12.query.sqlpp
new file mode 100644
index 0000000..a1db50d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.12.query.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+// Verify that scoping errors are recognized (in JOIN-CLAUSE).
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+JOIN        ( FROM GenericDataset GD
+              SELECT GD._id ) GD
+ON          GD._id = v1._id AND invalidVariable = 3
+SELECT      v1, v2, GD;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.2.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.2.query.sqlpp
index 9667fd6..95a4bb5 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.2.query.sqlpp
@@ -17,6 +17,16 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// Verify that a vertex cannot be defined with a label more than once.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v:Vertex1)-[]-(),
+            (v:Vertex1)-[]-()
+SELECT      v;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.3.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.3.query.sqlpp
index 9667fd6..3f397af 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.3.query.sqlpp
@@ -17,6 +17,16 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// Verify that an edge cannot be defined more than once.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1)-[e]-(v3),
+            (v2)-[e]-(v4)
+SELECT      v1, v2, v3, v4, e;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.4.query.sqlpp
new file mode 100644
index 0000000..3ca72bb
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.4.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+// Verify that the vertex label used in a query exists in the graph schema.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:NonExistentLabel)-[e1]-(v3),
+            (v2)-[e2]-(v4)
+SELECT      v1, v2, v3, v4, e1, e2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.5.query.sqlpp
new file mode 100644
index 0000000..d3207d1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.5.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+// Verify that the edge label used in a query exists in the graph schema.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[e1:NON_EXISTENT_EDGE]-(v3),
+            (v2)-[e2]-(v4)
+SELECT      v1, v2, v3, v4, e1, e2;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.6.query.sqlpp
similarity index 75%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.6.query.sqlpp
index 9667fd6..5b5cdf7 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.6.query.sqlpp
@@ -17,6 +17,10 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// Verify that a schema constructor exists when a query edge exists.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset
+MATCH       (v1:Vertex1)-[]-(v3)
+SELECT      v1, v3;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.7.query.sqlpp
similarity index 61%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.7.query.sqlpp
index 9667fd6..abb140e 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.7.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// Verify that the maximum number hops for an edge is not zero.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1{,0}]-(v2:Vertex1)
+SELECT      v1, v2;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.8.query.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.8.query.sqlpp
index 9667fd6..bb6f2b0 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.8.query.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// Verify that the maximum number of hops is never less than the minimum.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1{4,2}]-(v2:Vertex1)
+SELECT      v1, v2;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.9.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.9.query.sqlpp
new file mode 100644
index 0000000..ea9aeb8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/on-query-error/on-query-error.9.query.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+// Verify that our graph schema is valid for anonymous graphs.
+USE         TestDataverse;
+FROM GRAPH  VERTEX  (:Vertex1)
+                    PRIMARY KEY (_id)
+                    AS GenericDataset,
+            VERTEX  (:Vertex1)
+                    PRIMARY KEY (_other_id)
+                    AS GenericDataset,
+            EDGE    (:Vertex1)-[:EDGE_1]->(:Vertex1)
+                    SOURCE KEY (_id)
+                    DESTINATION KEY (_to_id)
+                    AS ( FROM    GenericDataset GD
+                         SELECT  GD._id, GD._to_id )
+MATCH       (v1:Vertex1)-[:EDGE_1]-(v2:Vertex1)
+SELECT      v1, v2;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.1.ddl.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.1.ddl.sqlpp
index 9667fd6..4dca0dc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.1.ddl.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
+
+CREATE TYPE       ReviewsType
+AS                { review_id: string };
+CREATE DATASET    Reviews (ReviewsType)
+PRIMARY KEY       review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.2.update.sqlpp
new file mode 100644
index 0000000..96a4ef6
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.2.update.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "best_friend": 2 },
+  { "user_id": 2, "best_friend": 3 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "friend_group": "A" },
+  { "user_id": 2, "friend": 3, "friend_group": "A" },
+  { "user_id": 3, "friend": 4, "friend_group": "B" }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 1 },
+  { "review_id": "D", "user_id": 2 },
+  { "review_id": "E", "user_id": 3 },
+  { "review_id": "F", "user_id": 4 }
+];
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.3.query.sqlpp
similarity index 72%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.3.query.sqlpp
index 9667fd6..e110262 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.3.query.sqlpp
@@ -17,6 +17,12 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+// Single vertex path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users
+MATCH       (u) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id, VERTEX_KEY(edgeRecord.LeftVertex);
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.4.query.sqlpp
new file mode 100644
index 0000000..a96f62a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.4.query.sqlpp
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+// Single edge path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-[:MADE_BY]-(r:Review) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id,
+            r.review_d,
+            VERTEX_KEY(edgeRecord.LeftVertex),
+            SOURCE_KEY(edgeRecord.`Edge`);
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.5.query.sqlpp
new file mode 100644
index 0000000..13078e0
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.5.query.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+// Two bidirectional edges path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1]-(v)-[e2]-(w) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id,
+            v.user_id,
+            w.user_id,
+            VERTEX_KEY(edgeRecord.LeftVertex),
+            SOURCE_KEY(edgeRecord.`Edge`);
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.6.query.sqlpp
new file mode 100644
index 0000000..ffef1a7
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/path-variable/path-variable.6.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// An undirected variable-hop sub-path located within a path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1:{1,2}]-(v) AS p
+UNNEST      p AS edgeRecord
+SELECT      PATH_HOP_COUNT(p) AS pathLength,
+            edgeRecord
+ORDER BY    u.user_id,
+            v.user_id,
+            VERTEX_KEY(edgeRecord.LeftVertex),
+            SOURCE_KEY(edgeRecord.`Edge`);
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.1.ddl.sqlpp
similarity index 60%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.1.ddl.sqlpp
index 9667fd6..4dca0dc 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.1.ddl.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
+
+CREATE TYPE       ReviewsType
+AS                { review_id: string };
+CREATE DATASET    Reviews (ReviewsType)
+PRIMARY KEY       review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.2.update.sqlpp
new file mode 100644
index 0000000..d42899e
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.2.update.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 1, "friend": 3 }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 1 },
+  { "review_id": "D", "user_id": 2 },
+  { "review_id": "E", "user_id": 3 },
+  { "review_id": "F", "user_id": 4 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.3.query.sqlpp
new file mode 100644
index 0000000..8122ce1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.3.query.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+// Subquery expressing anti-join of patterns.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+WHERE       NOT EXISTS ( FROM GRAPH   VERTEX (:User)
+                                      PRIMARY KEY (user_id)
+                                      AS ( FROM    Yelp.Users U
+                                           WHERE   U.user_id = 1
+                                           SELECT  VALUE U )
+                          MATCH       (innerU:User)
+                          WHERE       innerU = u
+                          SELECT      VALUE 1 )
+SELECT      u.user_id
+ORDER BY    u.user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.4.query.sqlpp
new file mode 100644
index 0000000..e103b44
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.4.query.sqlpp
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+// Subquery expressing anti-join of patterns, using aliases.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+LET         myUser = u,
+            myReview = r
+WHERE       NOT EXISTS ( FROM GRAPH   VERTEX (:User)
+                                      PRIMARY KEY (user_id)
+                                      AS ( FROM    Yelp.Users U
+                                           WHERE   U.user_id = 1
+                                           SELECT  VALUE U )
+                          MATCH       (innerU:User)
+                          LET         myInnerUser = innerU
+                          WHERE       myInnerUser = myUser
+                          SELECT      VALUE 1 )
+SELECT      myUser.user_id, myReview.review_id
+ORDER BY    u.user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.5.query.sqlpp
new file mode 100644
index 0000000..40e57c3
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.5.query.sqlpp
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+// Subquery + GROUP BY expressing (bounded) shortest-path.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  VALUE F )
+MATCH       (u1)-[:{1,3}]->(u2) AS p
+GROUP BY    u1, u2
+GROUP AS    g
+LET         shortestPath = ( FROM      g AS gi
+                             SELECT    VALUE ( FROM    PATH_VERTICES(gi.p) pv
+                                               SELECT  VALUE pv.user_id )
+                             ORDER BY  PATH_HOP_COUNT(gi.p) ASC
+                             LIMIT     1 )
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id,
+            shortestPath[0] AS shortestPath;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.6.query.sqlpp
new file mode 100644
index 0000000..1404a75
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.6.query.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+// Subquery + GROUP BY expressing (bounded) shortest-path, using aliases.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  VALUE F )
+MATCH       (u1)-[:{1,3}]->(u2) AS p
+LET         pathHopCount = PATH_HOP_COUNT(p),
+            pathVertices = PATH_VERTICES(p),
+            myUser1 = u1,
+            myUser2 = u2
+GROUP BY    myUser1, myUser2
+GROUP AS    g
+SELECT      myUser1.user_id AS u1_user_id,
+            myUser2.user_id AS u2_user_id,
+            ( FROM      g AS gi
+              SELECT    VALUE ( FROM    gi.pathVertices AS pv
+                                SELECT  VALUE pv.user_id )
+              ORDER BY  gi.pathHopCount ASC
+              LIMIT     1 )[0] AS shortestPath;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.7.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.7.query.sqlpp
new file mode 100644
index 0000000..13c5e00
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.7.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// Scope should be respected when a variable is re-declared in a non-graph query.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+WHERE       EXISTS ( FROM    Yelp.Users u
+                     WHERE   u.user_id = 1
+                     SELECT  VALUE 1 )
+SELECT      u.user_id, r.review_id
+ORDER BY    u.user_id, r.review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.8.query.sqlpp
new file mode 100644
index 0000000..0c97f2c
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/scope-checking/scope-checking.8.query.sqlpp
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+// Scope should be respected when a variable is re-declared in another graph query.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-(r)
+WHERE       EXISTS ( FROM GRAPH  VERTEX (:User)
+                                 PRIMARY KEY (user_id)
+                                 AS Yelp.Users
+                     MATCH       (u:User)
+                     WHERE       u.user_id = 1
+                     SELECT      VALUE 1 )
+SELECT      u.user_id, r.review_id
+ORDER BY    u.user_id, r.review_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.1.ddl.sqlpp
index 9667fd6..271a6a8 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.2.update.sqlpp
new file mode 100644
index 0000000..21365f1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.2.update.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "friends": [2, 3], "best_friend": 2 },
+  { "user_id": 2, "friends": [1] },
+  { "user_id": 3, "friends": [1], "best_friend": 1 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 4, "friend": 1 },
+  { "user_id": 4, "friend": 2 },
+  { "user_id": 5, "friend": null }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 2 },
+  { "review_id": "D", "user_id": 3 },
+  { "review_id": "E", "user_id": 4 },
+  { "review_id": "F", "user_id": 5 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.3.query.sqlpp
new file mode 100644
index 0000000..e69655d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.3.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// One edge definition, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Users U
+                        UNNEST  U.friends F
+                        SELECT  U.user_id AS user_id,
+                                F AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH]-(u1:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id,
+            u1.friends AS friends,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend
+ORDER BY    u1, u2, fw;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.4.query.sqlpp
new file mode 100644
index 0000000..9e57a33
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.4.query.sqlpp
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+// Two edge definitions, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Users U
+                        UNNEST  U.friends F
+                        SELECT  U.user_id AS user_id,
+                                F AS friend ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH]-(u1:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id,
+            fw.user_id AS fw_user_id,
+            fw.friend AS fw_friend
+ORDER BY    u1_user_id,
+            u2_user_id,
+            fw_user_id,
+            fw_friend;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.5.query.sqlpp
new file mode 100644
index 0000000..ff0d317
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.5.query.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+// Two edge definitions, one vertex definition on the source and two vertex definitions on the destination.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.user_id NOT IN (
+                            FROM    Yelp.Users U
+                            SELECT  VALUE U.user_id
+                        )
+                        SELECT  DISTINCT F.user_id ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Users U
+                        UNNEST  U.friends F
+                        SELECT  U.user_id AS user_id,
+                                F AS friend ),
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[:FRIENDS_WITH]-(u1:User)
+SELECT      u1.user_id AS u1_user_id,
+            u2.user_id AS u2_user_id
+ORDER BY    u1_user_id,
+            u2_user_id;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.6.query.sqlpp
new file mode 100644
index 0000000..298b5c8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-1-edge/simple-1-edge.6.query.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+// One edge definition, single vertex definition on both sides, with a dangling vertex.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS ( FROM   Yelp.Reviews R
+                        SELECT R.user_id AS review_user_id, R.review_id ),
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.user_id, R.review_id )
+MATCH       (u:User)<-[:MADE_BY]-(r:Review), (n)
+SELECT      u.user_id AS u_user_id,
+            r.review_id AS r_review_id,
+            r.user_id AS r_user_id,
+            n.user_id AS n_user_id,
+            n.review_id AS n_review_id
+ORDER BY    u_user_id,
+            r_review_id,
+            r_user_id,
+            n_user_id,
+            n_review_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.1.ddl.sqlpp
index 9667fd6..271a6a8 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.1.ddl.sqlpp
@@ -17,6 +17,15 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       GenericType
+AS                { _id: uuid };
+CREATE DATASET    Friends (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Reviews (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
+CREATE DATASET    Users (GenericType)
+PRIMARY KEY       _id AUTOGENERATED;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.2.update.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.2.update.sqlpp
new file mode 100644
index 0000000..61788ee
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.2.update.sqlpp
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1, "best_friend": 2 },
+  { "user_id": 2, "best_friend": 3 },
+  { "user_id": 3 },
+  { "user_id": 4 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2, "friend_group": "A" },
+  { "user_id": 2, "friend": 3, "friend_group": "A" },
+  { "user_id": 3, "friend": 4, "friend_group": "B" }
+];
+
+INSERT INTO       Reviews [
+  { "review_id": "A", "user_id": 1 },
+  { "review_id": "B", "user_id": 1 },
+  { "review_id": "C", "user_id": 1 },
+  { "review_id": "D", "user_id": 2 },
+  { "review_id": "E", "user_id": 2 },
+  { "review_id": "F", "user_id": 3 }
+];
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.3.query.sqlpp
new file mode 100644
index 0000000..dd474cc
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.3.query.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+// Two query edges, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-[mb1:MADE_BY]-(r1:Review),
+            (u)<-[mb2:MADE_BY]-(r2:Review)
+SELECT      u.user_id AS u_user_id,
+            r1.review_id AS r1_review_id,
+            r2.review_id AS r2_review_id,
+            mb1.user_id AS mb1_user_id,
+            mb2.user_id AS mb2_user_id,
+            mb1.review_id AS mb1_review_id,
+            mb2.review_id AS mb2_review_id
+ORDER BY    u_user_id,
+            r1_review_id,
+            r2_review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.4.query.sqlpp
new file mode 100644
index 0000000..e0655b2
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.4.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+// Three query edges, single vertex definition on both sides.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            VERTEX (:Review)
+                   PRIMARY KEY (review_id)
+                   AS Yelp.Reviews,
+            EDGE   (:Review)-[:MADE_BY]->(:User)
+                   SOURCE KEY (review_id)
+                   DESTINATION KEY (user_id)
+                   AS ( FROM    Yelp.Reviews R
+                        SELECT  R.review_id, R.user_id )
+MATCH       (u:User)<-[mb1:MADE_BY]-(r1:Review),
+            (u)<-[mb2:MADE_BY]-(r2:Review),
+            (u)<-[mb3:MADE_BY]-(r3:Review)
+SELECT      u.user_id AS u_user_id,
+            r1.review_id AS r1_review_id,
+            r2.review_id AS r2_review_id,
+            r3.review_id AS r3_review_id,
+            mb1.user_id AS mb1_user_id,
+            mb2.user_id AS mb2_user_id,
+            mb3.user_id AS mb3_user_id,
+            mb1.review_id AS mb1_review_id,
+            mb2.review_id AS mb2_review_id,
+            mb3.review_id AS mb3_review_id
+ORDER BY    u_user_id,
+            r1_review_id,
+            r2_review_id,
+            r3_review_id;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.5.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.5.query.sqlpp
new file mode 100644
index 0000000..7d12415
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.5.query.sqlpp
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+// Two bidirectional query edges, single vertex definition for all vertices.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1]-(v)-[e2]-(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id,
+            e1.user_id AS e1_user_id,
+            e1.friend AS e1_friend,
+            e2.user_id AS e2_user_id,
+            e2.friend AS e2_friend
+ORDER BY    u_user_id,
+            v_user_id,
+            w_user_id,
+            e1_user_id,
+            e1_friend,
+            e2_user_id,
+            e2_friend;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.6.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.6.query.sqlpp
new file mode 100644
index 0000000..db9f1d1
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.6.query.sqlpp
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+// Two directed query edges, single vertex definition for all vertices.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        WHERE   F.friend_group = "A"
+                        SELECT  F.user_id, F.friend )
+MATCH       (u)-[e1]->(v)-[e2]->(w)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id,
+            e1.user_id AS e1_user_id,
+            e1.friend AS e1_friend,
+            e2.user_id AS e2_user_id,
+            e2.friend AS e2_friend
+ORDER BY    u_user_id,
+            v_user_id,
+            w_user_id,
+            e1_user_id,
+            e1_friend,
+            e2_user_id,
+            e2_friend;
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.7.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.7.query.sqlpp
new file mode 100644
index 0000000..56a0672
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/simple-n-edge/simple-n-edge.7.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// Three bidirectional query edges, single vertex definition for all vertices.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.* )
+MATCH       (u)-(v)-(w)-(y)
+SELECT      u.user_id AS u_user_id,
+            v.user_id AS v_user_id,
+            w.user_id AS w_user_id,
+            y.user_id AS y_user_id
+ORDER BY    u_user_id,
+            v_user_id,
+            w_user_id,
+            y_user_id;
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.1.ddl.sqlpp
similarity index 67%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.1.ddl.sqlpp
index 9667fd6..00df90a 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.1.ddl.sqlpp
@@ -17,6 +17,16 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+DROP DATAVERSE    Yelp IF EXISTS;
+CREATE DATAVERSE  Yelp;
+USE               Yelp;
+
+CREATE TYPE       UsersType
+AS                { user_id: bigint };
+CREATE DATASET    Users (UsersType)
+PRIMARY KEY       user_id;
+
+CREATE TYPE       FriendsType
+AS                { user_id: bigint, friend: bigint };
+CREATE DATASET    Friends (FriendsType)
+PRIMARY KEY       user_id, friend;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.2.update.sqlpp
similarity index 68%
copy from asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
copy to asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.2.update.sqlpp
index 9667fd6..5780dc6 100644
--- a/asterix-graphix/src/test/resources/metadata/queries/graphix/yelp-example/yelp-example.8.query.sqlpp
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.2.update.sqlpp
@@ -17,6 +17,21 @@
  * under the License.
  */
 
-FROM    `Metadata`.`Graph` G
-WHERE   G.DataverseName IN [ "Yelp", "Yelp_A", "Yelp_B" ]
-SELECT  VALUE { "count": COUNT(*) };
+USE               Yelp;
+
+INSERT INTO       Users [
+  { "user_id": 1 },
+  { "user_id": 2 },
+  { "user_id": 3 },
+  { "user_id": 4 },
+  { "user_id": 5 },
+  { "user_id": 6 }
+];
+
+INSERT INTO       Friends [
+  { "user_id": 1, "friend": 2 },
+  { "user_id": 2, "friend": 3 },
+  { "user_id": 3, "friend": 4 },
+  { "user_id": 4, "friend": 5 },
+  { "user_id": 5, "friend": 6 }
+];
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.3.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.3.query.sqlpp
new file mode 100644
index 0000000..c5c1d8d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.3.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+// One directed edge definition of one to three hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)<-[fw:FRIENDS_WITH{1,3}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_count
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.4.query.sqlpp b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.4.query.sqlpp
new file mode 100644
index 0000000..83a78b4
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/queries/graphix/variable-sub-path/variable-sub-path.4.query.sqlpp
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+// One undirected edge definition of one to two hops.
+FROM GRAPH  VERTEX (:User)
+                   PRIMARY KEY (user_id)
+                   AS Yelp.Users,
+            EDGE   (:User)-[:FRIENDS_WITH]->(:User)
+                   SOURCE KEY (user_id)
+                   DESTINATION KEY (friend)
+                   AS ( FROM    Yelp.Friends F
+                        SELECT  F.user_id AS user_id,
+                                F.friend AS friend )
+MATCH       (u2:User)-[fw:FRIENDS_WITH{1,2}]-(u1:User)
+UNNEST      fw AS fwEdgeRecord
+LET         fw_left_vertex = VERTEX_KEY(fwEdgeRecord.LeftVertex)
+SELECT      u1.user_id AS u1_user_id,
+            fw_left_vertex,
+            DIRECTION(fwEdgeRecord.`Edge`) AS dir,
+            u2.user_id AS u2_user_id,
+            HOP_COUNT(fw) AS fw_hops
+ORDER BY    u1, fw_left_vertex, u2;
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.3.adm
new file mode 100644
index 0000000..bf58f6a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.3.adm
@@ -0,0 +1,4 @@
+{ "user_id": 1 }
+{ "user_id": 2 }
+{ "user_id": 3 }
+{ "user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.4.adm
new file mode 100644
index 0000000..b3d4d9f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.4.adm
@@ -0,0 +1,12 @@
+{ "u1_user_id": 1, "u2_user_id": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3 }
+{ "u1_user_id": 1, "u2_user_id": 4 }
+{ "u1_user_id": 2, "u2_user_id": 1 }
+{ "u1_user_id": 2, "u2_user_id": 3 }
+{ "u1_user_id": 2, "u2_user_id": 4 }
+{ "u1_user_id": 3, "u2_user_id": 1 }
+{ "u1_user_id": 3, "u2_user_id": 2 }
+{ "u1_user_id": 3, "u2_user_id": 4 }
+{ "u1_user_id": 4, "u2_user_id": 1 }
+{ "u1_user_id": 4, "u2_user_id": 2 }
+{ "u1_user_id": 4, "u2_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.5.adm
new file mode 100644
index 0000000..d547241
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.5.adm
@@ -0,0 +1,24 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 1, "review_id": "C" }
+{ "user_id": 1, "review_id": "D" }
+{ "user_id": 1, "review_id": "E" }
+{ "user_id": 1, "review_id": "F" }
+{ "user_id": 2, "review_id": "A" }
+{ "user_id": 2, "review_id": "B" }
+{ "user_id": 2, "review_id": "C" }
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 2, "review_id": "E" }
+{ "user_id": 2, "review_id": "F" }
+{ "user_id": 3, "review_id": "A" }
+{ "user_id": 3, "review_id": "B" }
+{ "user_id": 3, "review_id": "C" }
+{ "user_id": 3, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 3, "review_id": "F" }
+{ "user_id": 4, "review_id": "A" }
+{ "user_id": 4, "review_id": "B" }
+{ "user_id": 4, "review_id": "C" }
+{ "user_id": 4, "review_id": "D" }
+{ "user_id": 4, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.6.adm
new file mode 100644
index 0000000..295b176
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/dangling-vertices/dangling-vertices.6.adm
@@ -0,0 +1,5 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 2, "review_id": "C" }
+{ "user_id": 3, "review_id": "D" }
+{ "user_id": 4, "review_id": "E" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.3.adm
new file mode 100644
index 0000000..45a5043
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.3.adm
@@ -0,0 +1,8 @@
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.4.adm
new file mode 100644
index 0000000..d7b0151
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.4.adm
@@ -0,0 +1,9 @@
+{ "fw_hops": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 4 }
+{ "fw_hops": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_hops": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 5 }
+{ "fw_hops": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_hops": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 6 }
+{ "fw_hops": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_hops": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.5.adm
new file mode 100644
index 0000000..eb23c4f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.5.adm
@@ -0,0 +1,8 @@
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 2 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 4 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 2 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 4 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 1, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 3, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 5 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 6 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 3 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 6 }, "u3_user_id": 6 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 4 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 5 }, "u3_user_id": 6 }
+{ "fw1_hops": 2, "fw2_hops": 2, "u1_user_id": 2, "fw1_left_vertex": { "user_id": 4 }, "u2_user_id": 4, "fw2_left_vertex": { "user_id": 6 }, "u3_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.6.adm
new file mode 100644
index 0000000..6b486c7
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.6.adm
@@ -0,0 +1,5 @@
+{ "fw_hops": 1, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 2 }
+{ "fw_hops": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.8.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.8.adm
new file mode 100644
index 0000000..8d03172
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/fixed-sub-path/fixed-sub-path.8.adm
@@ -0,0 +1,20 @@
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 1 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 1 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.3.adm
new file mode 100644
index 0000000..b9a3cc8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.3.adm
@@ -0,0 +1,12 @@
+{ "u_user_id": 1, "v_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 3 }
+{ "u_user_id": 1, "v_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 2 }
+{ "u_user_id": 3, "v_user_id": 4 }
+{ "u_user_id": 4, "v_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.4.adm
new file mode 100644
index 0000000..c3ad22c
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.4.adm
@@ -0,0 +1,24 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3 }
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 4 }
+{ "u_user_id": 1, "v_user_id": 3, "w_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 3, "w_user_id": 4 }
+{ "u_user_id": 1, "v_user_id": 4, "w_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 4, "w_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 1, "w_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 1, "w_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 3, "w_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 3, "w_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 4, "w_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 4, "w_user_id": 3 }
+{ "u_user_id": 3, "v_user_id": 1, "w_user_id": 2 }
+{ "u_user_id": 3, "v_user_id": 1, "w_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 2, "w_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 2, "w_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 4, "w_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 4, "w_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 1, "w_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 1, "w_user_id": 3 }
+{ "u_user_id": 4, "v_user_id": 2, "w_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 2, "w_user_id": 3 }
+{ "u_user_id": 4, "v_user_id": 3, "w_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 3, "w_user_id": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.5.adm
new file mode 100644
index 0000000..df6db5f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.5.adm
@@ -0,0 +1 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.6.adm
new file mode 100644
index 0000000..0534569
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.6.adm
@@ -0,0 +1,16 @@
+{ "u_user_id": 1, "v_user_id": 1 }
+{ "u_user_id": 1, "v_user_id": 2 }
+{ "u_user_id": 1, "v_user_id": 3 }
+{ "u_user_id": 1, "v_user_id": 4 }
+{ "u_user_id": 2, "v_user_id": 1 }
+{ "u_user_id": 2, "v_user_id": 2 }
+{ "u_user_id": 2, "v_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 4 }
+{ "u_user_id": 3, "v_user_id": 1 }
+{ "u_user_id": 3, "v_user_id": 2 }
+{ "u_user_id": 3, "v_user_id": 3 }
+{ "u_user_id": 3, "v_user_id": 4 }
+{ "u_user_id": 4, "v_user_id": 1 }
+{ "u_user_id": 4, "v_user_id": 2 }
+{ "u_user_id": 4, "v_user_id": 3 }
+{ "u_user_id": 4, "v_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.7.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.7.adm
new file mode 100644
index 0000000..5ba7e67
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graph-isomorphism/graph-isomorphism.7.adm
@@ -0,0 +1,3 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 1 }
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3 }
+{ "u_user_id": 2, "v_user_id": 1, "w_user_id": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.3.adm
new file mode 100644
index 0000000..d746e73
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.3.adm
@@ -0,0 +1,8 @@
+{ "vertexProperties": { "review_id": "A", "user_id": 1 }, "vertexDetail": { "Label": "Review", "PrimaryKey": { "review_id": "A" } }, "vertexKey": { "review_id": "A" }, "vertexLabel": "Review" }
+{ "vertexProperties": { "review_id": "B", "user_id": 2 }, "vertexDetail": { "Label": "Review", "PrimaryKey": { "review_id": "B" } }, "vertexKey": { "review_id": "B" }, "vertexLabel": "Review" }
+{ "vertexProperties": { "user_id": 1 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 1 } }, "vertexKey": { "user_id": 1 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 2 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 2 } }, "vertexKey": { "user_id": 2 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 3 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 3 } }, "vertexKey": { "user_id": 3 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 4 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 4 } }, "vertexKey": { "user_id": 4 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 5 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 5 } }, "vertexKey": { "user_id": 5 }, "vertexLabel": "User" }
+{ "vertexProperties": { "user_id": 6 }, "vertexDetail": { "Label": "User", "PrimaryKey": { "user_id": 6 } }, "vertexKey": { "user_id": 6 }, "vertexLabel": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.4.adm
new file mode 100644
index 0000000..a4b2231
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.4.adm
@@ -0,0 +1,14 @@
+{ "sourceVertex": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, "destVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } }, "edgeProperties": { "review_id": "A", "user_id": 1 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "review_id": "A" }, "destKeyValue": { "user_id": 1 }, "edgeLabel": "MADE_BY", "n1Label": "Review", "n2Label": "User" }
+{ "sourceVertex": { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } }, "edgeProperties": { "review_id": "B", "user_id": 2 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "review_id": "B" }, "destKeyValue": { "user_id": 2 }, "edgeLabel": "MADE_BY", "n1Label": "Review", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } }, "edgeProperties": { "user_id": 1, "friend": 2 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 1 }, "destKeyValue": { "friend": 2 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, "destVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } }, "edgeProperties": { "review_id": "A", "user_id": 1 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "review_id": "A" }, "destKeyValue": { "user_id": 1 }, "edgeLabel": "MADE_BY", "n1Label": "User", "n2Label": "Review" }
+{ "sourceVertex": { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } }, "edgeProperties": { "user_id": 1, "friend": 2 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 1 }, "destKeyValue": { "friend": 2 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "destVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } }, "edgeProperties": { "user_id": 2, "friend": 3 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 2 }, "destKeyValue": { "friend": 3 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, "destVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "edgeDetail": { "Label": "MADE_BY", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } }, "edgeProperties": { "review_id": "B", "user_id": 2 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "review_id": "B" }, "destKeyValue": { "user_id": 2 }, "edgeLabel": "MADE_BY", "n1Label": "User", "n2Label": "Review" }
+{ "sourceVertex": { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "destVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } }, "edgeProperties": { "user_id": 2, "friend": 3 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 2 }, "destKeyValue": { "friend": 3 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "destVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 3 }, "DestinationKey": { "friend": 4 } }, "edgeProperties": { "user_id": 3, "friend": 4 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 3 }, "destKeyValue": { "friend": 4 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "destVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 3 }, "DestinationKey": { "friend": 4 } }, "edgeProperties": { "user_id": 3, "friend": 4 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 3 }, "destKeyValue": { "friend": 4 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "destVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 4 }, "DestinationKey": { "friend": 5 } }, "edgeProperties": { "user_id": 4, "friend": 5 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 4 }, "destKeyValue": { "friend": 5 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "destVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 4 }, "DestinationKey": { "friend": 5 } }, "edgeProperties": { "user_id": 4, "friend": 5 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 4 }, "destKeyValue": { "friend": 5 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "destVertex": { "user_id": 6, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 6 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 5 }, "DestinationKey": { "friend": 6 } }, "edgeProperties": { "user_id": 5, "friend": 6 }, "direction": "LEFT_TO_RIGHT", "sourceKeyValue": { "user_id": 5 }, "destKeyValue": { "friend": 6 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
+{ "sourceVertex": { "user_id": 5, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 5 } } }, "destVertex": { "user_id": 6, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 6 } } }, "edgeDetail": { "Label": "FRIENDS_WITH", "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 5 }, "DestinationKey": { "friend": 6 } }, "edgeProperties": { "user_id": 5, "friend": 6 }, "direction": "RIGHT_TO_LEFT", "sourceKeyValue": { "user_id": 5 }, "destKeyValue": { "friend": 6 }, "edgeLabel": "FRIENDS_WITH", "n1Label": "User", "n2Label": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.5.adm
new file mode 100644
index 0000000..6fab046
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/graphix-functions/graphix-functions.5.adm
@@ -0,0 +1,4 @@
+{ "pEdges": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } }, { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "eEdges": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "MADE_BY", "Review", "User" ], "pVertices": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } ] }
+{ "pEdges": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } } }, { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "eEdges": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "MADE_BY", "Review", "User" ], "pVertices": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ] }
+{ "pEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 2 } } } ], "eEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "FRIENDS_WITH", "User" ], "pVertices": [ { "review_id": "B", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ] }
+{ "pEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } } ], "eEdges": [ { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } } ], "pHopCount": 2, "pLabels": [ "FRIENDS_WITH", "MADE_BY", "Review", "User" ], "eLabels": [ "FRIENDS_WITH", "User" ], "pVertices": [ { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } }, { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ], "eVertices": [ { "user_id": 1, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, { "user_id": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } ] }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.3.adm
new file mode 100644
index 0000000..aea519f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.3.adm
@@ -0,0 +1 @@
+{ "e_label": "FRIENDS_WITH", "n_label": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.4.adm
new file mode 100644
index 0000000..20fd92b
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.4.adm
@@ -0,0 +1,2 @@
+{ "e_label": "FRIENDS_WITH", "n_label": "User", "f_label": "FRIENDS_WITH", "m_label": "User" }
+{ "e_label": "FRIENDS_WITH", "n_label": "User", "f_label": "MADE_BY", "m_label": "Review" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.5.adm
new file mode 100644
index 0000000..771db0f
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.5.adm
@@ -0,0 +1 @@
+{ "e_label": "FRIENDS_WITH", "n_label": "User", "f_label": "MADE_BY", "f_direction": "RIGHT_TO_LEFT" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.6.adm
new file mode 100644
index 0000000..5a87275
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/inference-resolution/inference-resolution.6.adm
@@ -0,0 +1 @@
+{ "e_length": 2, "e_label": "FRIENDS_WITH", "n_label": "User" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.3.adm
new file mode 100644
index 0000000..6e6daf8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.3.adm
@@ -0,0 +1,3 @@
+{ "u1_user_id": 1, "mb_user_id": 1, "mb_review_id": "A", "r_review_id": "A" }
+{ "u1_user_id": 1, "mb_user_id": 1, "mb_review_id": "C", "r_review_id": "C" }
+{ "u1_user_id": 2, "fw_user_id": 2, "fw_friend": 3, "u2_user_id": 3, "mb_user_id": 2, "mb_review_id": "B", "r_review_id": "B" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.4.adm
new file mode 100644
index 0000000..9a221cf
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.4.adm
@@ -0,0 +1,2 @@
+{ "u1_user_id": 1, "fw_user_id": 1, "fw_friend": 2, "u2_user_id": 2 }
+{ "u1_user_id": 2, "fw_user_id": 2, "fw_friend": 3, "u2_user_id": 3, "mb_user_id": 2, "mb_review_id": "A", "r_review_id": "A" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.5.adm
new file mode 100644
index 0000000..5c82883
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.5.adm
@@ -0,0 +1,5 @@
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 2, "u2_user_id": 2, "u3_user_id": 3, "mb_user_id": 3, "mb_review_id": "A", "r_review_id": "A", "fw2_user_id": 3, "fw2_friend": 1 }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 2, "u2_user_id": 2, "u3_user_id": 4, "mb_user_id": 4, "mb_review_id": "B", "r_review_id": "B", "fw2_user_id": 4, "fw2_friend": 1 }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 4, "u2_user_id": 4, "u3_user_id": 3, "mb_user_id": 3, "mb_review_id": "A", "r_review_id": "A", "fw2_user_id": 3, "fw2_friend": 1 }
+{ "u1_user_id": 3, "fw1_user_id": 3, "fw1_friend": 1, "u2_user_id": 1 }
+{ "u1_user_id": 4, "fw1_user_id": 4, "fw1_friend": 1, "u2_user_id": 1 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.6.adm
new file mode 100644
index 0000000..f3ea80e
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/left-match/left-match.6.adm
@@ -0,0 +1,5 @@
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 2, "u2_user_id": 2, "mb_user_id": 2, "mb_review_id": "A", "r_review_id": "A" }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 3, "u2_user_id": 3, "mb_user_id": 3, "mb_review_id": "B", "r_review_id": "B", "fw2_user_id": 3, "fw2_friend": 4, "u3_user_id": 4 }
+{ "u1_user_id": 1, "fw1_user_id": 1, "fw1_friend": 3, "u2_user_id": 3, "mb_user_id": 3, "mb_review_id": "B", "r_review_id": "B", "fw2_user_id": 3, "fw2_friend": 5, "u3_user_id": 5 }
+{ "u1_user_id": 3, "fw1_user_id": 3, "fw1_friend": 4, "u2_user_id": 4 }
+{ "u1_user_id": 3, "fw1_user_id": 3, "fw1_friend": 5, "u2_user_id": 5 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.3.adm
new file mode 100644
index 0000000..bf58f6a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.3.adm
@@ -0,0 +1,4 @@
+{ "user_id": 1 }
+{ "user_id": 2 }
+{ "user_id": 3 }
+{ "user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.4.adm
new file mode 100644
index 0000000..9fd8681
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.4.adm
@@ -0,0 +1,10 @@
+{ "user_id": 1 }
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 2 }
+{ "user_id": 2, "review_id": "C" }
+{ "user_id": 3 }
+{ "user_id": 3, "review_id": "D" }
+{ "user_id": 4 }
+{ "user_id": 4, "review_id": "E" }
+{ "user_id": 5, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.5.adm
new file mode 100644
index 0000000..843d7f9
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.5.adm
@@ -0,0 +1,10 @@
+{ "left_review_id": "A", "right_user_id": 1, "e_user_id": 1, "e_review_id": "A" }
+{ "left_review_id": "B", "right_user_id": 1, "e_user_id": 1, "e_review_id": "B" }
+{ "left_review_id": "C", "right_user_id": 2, "e_user_id": 2, "e_review_id": "C" }
+{ "left_review_id": "D", "right_user_id": 3, "e_user_id": 3, "e_review_id": "D" }
+{ "left_review_id": "E", "right_user_id": 4, "e_user_id": 4, "e_review_id": "E" }
+{ "left_user_id": 1, "right_review_id": "A", "e_user_id": 1, "e_review_id": "A" }
+{ "left_user_id": 1, "right_review_id": "B", "e_user_id": 1, "e_review_id": "B" }
+{ "left_user_id": 2, "right_review_id": "C", "e_user_id": 2, "e_review_id": "C" }
+{ "left_user_id": 3, "right_review_id": "D", "e_user_id": 3, "e_review_id": "D" }
+{ "left_user_id": 4, "right_review_id": "E", "e_user_id": 4, "e_review_id": "E" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.6.adm
new file mode 100644
index 0000000..b451053
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/minimal-resolution/minimal-resolution.6.adm
@@ -0,0 +1,8 @@
+{ "source_user_id": 1, "dest_user_id": 2, "e_user_id": 1, "e_friend": 2 }
+{ "source_user_id": 3, "dest_user_id": 2, "e_user_id": 3, "e_friend": 2 }
+{ "source_user_id": 4, "dest_user_id": 2, "e_user_id": 4, "e_friend": 2 }
+{ "source_review_id": "A", "dest_user_id": 1, "e_user_id": 1, "e_review_id": "A" }
+{ "source_review_id": "B", "dest_user_id": 1, "e_user_id": 1, "e_review_id": "B" }
+{ "source_review_id": "C", "dest_user_id": 2, "e_user_id": 2, "e_review_id": "C" }
+{ "source_review_id": "D", "dest_user_id": 3, "e_user_id": 3, "e_review_id": "D" }
+{ "source_review_id": "E", "dest_user_id": 4, "e_user_id": 4, "e_review_id": "E" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.3.adm
new file mode 100644
index 0000000..dc47f05
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.3.adm
@@ -0,0 +1,4 @@
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 0, "edgeRecord": { "Edge": null, "RightVertex": null, "LeftVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.4.adm
new file mode 100644
index 0000000..be295c8
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.4.adm
@@ -0,0 +1,6 @@
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "A" }, "DestinationKey": { "user_id": 1 } } }, "RightVertex": { "review_id": "A", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "A" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "review_id": "B", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "B" }, "DestinationKey": { "user_id": 1 } } }, "RightVertex": { "review_id": "B", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "B" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "review_id": "C", "user_id": 1, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "C" }, "DestinationKey": { "user_id": 1 } } }, "RightVertex": { "review_id": "C", "user_id": 1, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "C" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "review_id": "D", "user_id": 2, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "D" }, "DestinationKey": { "user_id": 2 } } }, "RightVertex": { "review_id": "D", "user_id": 2, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "D" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "review_id": "E", "user_id": 3, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "E" }, "DestinationKey": { "user_id": 3 } } }, "RightVertex": { "review_id": "E", "user_id": 3, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "E" } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 4, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 4 } } }, "Edge": { "review_id": "F", "user_id": 4, "_GraphixElementDetail": { "Label": "MADE_BY" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "review_id": "F" }, "DestinationKey": { "user_id": 4 } } }, "RightVertex": { "review_id": "F", "user_id": 4, "_GraphixElementDetail": { "Label": "Review" }, "_GraphixVertexDetail": { "PrimaryKey": { "review_id": "F" } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.5.adm
new file mode 100644
index 0000000..94e906a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.5.adm
@@ -0,0 +1,4 @@
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.6.adm
new file mode 100644
index 0000000..ba46ed7
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/path-variable/path-variable.6.adm
@@ -0,0 +1,8 @@
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "LEFT_TO_RIGHT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } }, "Edge": { "user_id": 1, "friend": 2, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 1 }, "DestinationKey": { "friend": 2 } } }, "RightVertex": { "user_id": 1, "best_friend": 2, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 1 } } } } }
+{ "pathLength": 2, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
+{ "pathLength": 1, "edgeRecord": { "LeftVertex": { "user_id": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 3 } } }, "Edge": { "user_id": 2, "friend": 3, "_GraphixElementDetail": { "Label": "FRIENDS_WITH" }, "_GraphixEdgeDetail": { "EdgeDirection": "RIGHT_TO_LEFT", "SourceKey": { "user_id": 2 }, "DestinationKey": { "friend": 3 } } }, "RightVertex": { "user_id": 2, "best_friend": 3, "_GraphixElementDetail": { "Label": "User" }, "_GraphixVertexDetail": { "PrimaryKey": { "user_id": 2 } } } } }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.3.adm
new file mode 100644
index 0000000..5744f8b
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.3.adm
@@ -0,0 +1,3 @@
+{ "user_id": 2 }
+{ "user_id": 3 }
+{ "user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.4.adm
new file mode 100644
index 0000000..f55b204
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.4.adm
@@ -0,0 +1,3 @@
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.5.adm
new file mode 100644
index 0000000..802c33a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.5.adm
@@ -0,0 +1,6 @@
+{ "shortestPath": [ 1, 2 ], "u1_user_id": 1, "u2_user_id": 2 }
+{ "shortestPath": [ 1, 3 ], "u1_user_id": 1, "u2_user_id": 3 }
+{ "shortestPath": [ 1, 3, 4 ], "u1_user_id": 1, "u2_user_id": 4 }
+{ "shortestPath": [ 2, 3 ], "u1_user_id": 2, "u2_user_id": 3 }
+{ "shortestPath": [ 2, 3, 4 ], "u1_user_id": 2, "u2_user_id": 4 }
+{ "shortestPath": [ 3, 4 ], "u1_user_id": 3, "u2_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.6.adm
new file mode 100644
index 0000000..802c33a
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.6.adm
@@ -0,0 +1,6 @@
+{ "shortestPath": [ 1, 2 ], "u1_user_id": 1, "u2_user_id": 2 }
+{ "shortestPath": [ 1, 3 ], "u1_user_id": 1, "u2_user_id": 3 }
+{ "shortestPath": [ 1, 3, 4 ], "u1_user_id": 1, "u2_user_id": 4 }
+{ "shortestPath": [ 2, 3 ], "u1_user_id": 2, "u2_user_id": 3 }
+{ "shortestPath": [ 2, 3, 4 ], "u1_user_id": 2, "u2_user_id": 4 }
+{ "shortestPath": [ 3, 4 ], "u1_user_id": 3, "u2_user_id": 4 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.7.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.7.adm
new file mode 100644
index 0000000..9b24dd0
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.7.adm
@@ -0,0 +1,6 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 1, "review_id": "C" }
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.8.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.8.adm
new file mode 100644
index 0000000..9b24dd0
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/scope-checking/scope-checking.8.adm
@@ -0,0 +1,6 @@
+{ "user_id": 1, "review_id": "A" }
+{ "user_id": 1, "review_id": "B" }
+{ "user_id": 1, "review_id": "C" }
+{ "user_id": 2, "review_id": "D" }
+{ "user_id": 3, "review_id": "E" }
+{ "user_id": 4, "review_id": "F" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.3.adm
new file mode 100644
index 0000000..710a380
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.3.adm
@@ -0,0 +1,4 @@
+{ "u1_user_id": 1, "u2_user_id": 2, "friends": [ 2, 3 ], "fw_user_id": 1, "fw_friend": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3, "friends": [ 2, 3 ], "fw_user_id": 1, "fw_friend": 3 }
+{ "u1_user_id": 2, "u2_user_id": 1, "friends": [ 1 ], "fw_user_id": 2, "fw_friend": 1 }
+{ "u1_user_id": 3, "u2_user_id": 1, "friends": [ 1 ], "fw_user_id": 3, "fw_friend": 1 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.4.adm
new file mode 100644
index 0000000..d340a90
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.4.adm
@@ -0,0 +1,6 @@
+{ "u1_user_id": 1, "u2_user_id": 2, "fw_user_id": 1, "fw_friend": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3, "fw_user_id": 1, "fw_friend": 3 }
+{ "u1_user_id": 2, "u2_user_id": 1, "fw_user_id": 2, "fw_friend": 1 }
+{ "u1_user_id": 3, "u2_user_id": 1, "fw_user_id": 3, "fw_friend": 1 }
+{ "u1_user_id": 4, "u2_user_id": 1, "fw_user_id": 4, "fw_friend": 1 }
+{ "u1_user_id": 4, "u2_user_id": 2, "fw_user_id": 4, "fw_friend": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.5.adm
new file mode 100644
index 0000000..190ae9b
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.5.adm
@@ -0,0 +1,6 @@
+{ "u1_user_id": 1, "u2_user_id": 2 }
+{ "u1_user_id": 1, "u2_user_id": 3 }
+{ "u1_user_id": 2, "u2_user_id": 1 }
+{ "u1_user_id": 3, "u2_user_id": 1 }
+{ "u1_user_id": 4, "u2_user_id": 1 }
+{ "u1_user_id": 4, "u2_user_id": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.6.adm
new file mode 100644
index 0000000..48e9814
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-1-edge/simple-1-edge.6.adm
@@ -0,0 +1,40 @@
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "B" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "C" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "D" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "E" }
+{ "u_user_id": 1, "r_review_id": "A", "n_review_id": "F" }
+{ "u_user_id": 1, "r_review_id": "A", "n_user_id": 2 }
+{ "u_user_id": 1, "r_review_id": "A", "n_user_id": 3 }
+{ "u_user_id": 1, "r_review_id": "A", "n_user_id": 4 }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "A" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "C" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "D" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "E" }
+{ "u_user_id": 1, "r_review_id": "B", "n_review_id": "F" }
+{ "u_user_id": 1, "r_review_id": "B", "n_user_id": 2 }
+{ "u_user_id": 1, "r_review_id": "B", "n_user_id": 3 }
+{ "u_user_id": 1, "r_review_id": "B", "n_user_id": 4 }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "A" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "B" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "D" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "E" }
+{ "u_user_id": 2, "r_review_id": "C", "n_review_id": "F" }
+{ "u_user_id": 2, "r_review_id": "C", "n_user_id": 1 }
+{ "u_user_id": 2, "r_review_id": "C", "n_user_id": 3 }
+{ "u_user_id": 2, "r_review_id": "C", "n_user_id": 4 }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "A" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "B" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "C" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "E" }
+{ "u_user_id": 3, "r_review_id": "D", "n_review_id": "F" }
+{ "u_user_id": 3, "r_review_id": "D", "n_user_id": 1 }
+{ "u_user_id": 3, "r_review_id": "D", "n_user_id": 2 }
+{ "u_user_id": 3, "r_review_id": "D", "n_user_id": 4 }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "A" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "B" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "C" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "D" }
+{ "u_user_id": 4, "r_review_id": "E", "n_review_id": "F" }
+{ "u_user_id": 4, "r_review_id": "E", "n_user_id": 1 }
+{ "u_user_id": 4, "r_review_id": "E", "n_user_id": 2 }
+{ "u_user_id": 4, "r_review_id": "E", "n_user_id": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.3.adm
new file mode 100644
index 0000000..8066712
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.3.adm
@@ -0,0 +1,8 @@
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "B" }
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "A" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "A" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "B" }
+{ "u_user_id": 2, "r1_review_id": "D", "r2_review_id": "E", "mb1_user_id": 2, "mb2_user_id": 2, "mb1_review_id": "D", "mb2_review_id": "E" }
+{ "u_user_id": 2, "r1_review_id": "E", "r2_review_id": "D", "mb1_user_id": 2, "mb2_user_id": 2, "mb1_review_id": "E", "mb2_review_id": "D" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.4.adm
new file mode 100644
index 0000000..5dc5f34
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.4.adm
@@ -0,0 +1,6 @@
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "B", "r3_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "B", "mb3_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "A", "r2_review_id": "C", "r3_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "A", "mb2_review_id": "C", "mb3_review_id": "B" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "A", "r3_review_id": "C", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "A", "mb3_review_id": "C" }
+{ "u_user_id": 1, "r1_review_id": "B", "r2_review_id": "C", "r3_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "B", "mb2_review_id": "C", "mb3_review_id": "A" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "A", "r3_review_id": "B", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "A", "mb3_review_id": "B" }
+{ "u_user_id": 1, "r1_review_id": "C", "r2_review_id": "B", "r3_review_id": "A", "mb1_user_id": 1, "mb2_user_id": 1, "mb3_user_id": 1, "mb1_review_id": "C", "mb2_review_id": "B", "mb3_review_id": "A" }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.5.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.5.adm
new file mode 100644
index 0000000..e007129
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.5.adm
@@ -0,0 +1,2 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3, "e1_user_id": 1, "e1_friend": 2, "e2_user_id": 2, "e2_friend": 3 }
+{ "u_user_id": 3, "v_user_id": 2, "w_user_id": 1, "e1_user_id": 2, "e1_friend": 3, "e2_user_id": 1, "e2_friend": 2 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.6.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.6.adm
new file mode 100644
index 0000000..a3464bc
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.6.adm
@@ -0,0 +1 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3, "e1_user_id": 1, "e1_friend": 2, "e2_user_id": 2, "e2_friend": 3 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.7.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.7.adm
new file mode 100644
index 0000000..f672b8d
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/simple-n-edge/simple-n-edge.7.adm
@@ -0,0 +1,2 @@
+{ "u_user_id": 1, "v_user_id": 2, "w_user_id": 3, "y_user_id": 4 }
+{ "u_user_id": 4, "v_user_id": 3, "w_user_id": 2, "y_user_id": 1 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.3.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.3.adm
new file mode 100644
index 0000000..5f0bdb6
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.3.adm
@@ -0,0 +1,22 @@
+{ "fw_count": 1, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 2 }
+{ "fw_count": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 3 }
+{ "fw_count": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "u2_user_id": 4 }
+{ "fw_count": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_count": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_count": 3, "u1_user_id": 1, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_count": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 3 }
+{ "fw_count": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 4 }
+{ "fw_count": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "u2_user_id": 5 }
+{ "fw_count": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_count": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_count": 3, "u1_user_id": 2, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_count": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 4 }
+{ "fw_count": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 5 }
+{ "fw_count": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "u2_user_id": 6 }
+{ "fw_count": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_count": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_count": 3, "u1_user_id": 3, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
+{ "fw_count": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 5 }
+{ "fw_count": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "u2_user_id": 6 }
+{ "fw_count": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
+{ "fw_count": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 6 }, "u2_user_id": 6 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.4.adm b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.4.adm
new file mode 100644
index 0000000..581cb48
--- /dev/null
+++ b/asterix-graphix/src/test/resources/runtimets/results/graphix/variable-sub-path/variable-sub-path.4.adm
@@ -0,0 +1,26 @@
+{ "fw_hops": 1, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 2 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 1, "fw_left_vertex": { "user_id": 3 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 1 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 1 }
+{ "fw_hops": 1, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 3 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 2, "fw_left_vertex": { "user_id": 4 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 1 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 1 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 1 }
+{ "fw_hops": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 2 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 2 }
+{ "fw_hops": 1, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 4 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 3, "fw_left_vertex": { "user_id": 5 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 2 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 2 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 3 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 2 }
+{ "fw_hops": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 3 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 5 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 5 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 4, "fw_left_vertex": { "user_id": 6 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 3 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 3 }
+{ "fw_hops": 2, "u1_user_id": 5, "fw_left_vertex": { "user_id": 4 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 3 }
+{ "fw_hops": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 4 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 4 }
+{ "fw_hops": 1, "u1_user_id": 5, "fw_left_vertex": { "user_id": 6 }, "dir": "RIGHT_TO_LEFT", "u2_user_id": 6 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 4 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 4 }
+{ "fw_hops": 2, "u1_user_id": 6, "fw_left_vertex": { "user_id": 5 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 4 }
+{ "fw_hops": 1, "u1_user_id": 6, "fw_left_vertex": { "user_id": 5 }, "dir": "LEFT_TO_RIGHT", "u2_user_id": 5 }
\ No newline at end of file
diff --git a/asterix-graphix/src/test/resources/runtimets/testsuite.xml b/asterix-graphix/src/test/resources/runtimets/testsuite.xml
index ea6db85..0ca8de6 100644
--- a/asterix-graphix/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-graphix/src/test/resources/runtimets/testsuite.xml
@@ -20,21 +20,129 @@
             ResultOffsetPath="results"
             QueryOffsetPath="queries"
             QueryFileExtension=".sqlpp">
-  <test-group name="error-handling">
+  <test-group name="create-drop-error">
     <test-case FilePath="graphix">
-      <compilation-unit name="error-handling">
-        <output-dir compare="Text">error-handling</output-dir>
-        <expected-error>Cannot drop dataset (or view) TestDataverse.GenericDataset being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop function TestDataverse.TestFunction() being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop dataset (or view) TestDataverse.TestView being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop synonym TestDataverse.DatasetSynonym being used by graph TestGraph</expected-error>
-        <expected-error>Cannot drop dataverse: dataset (or view) TestDataverse2.GenericDataset being used by graph TestGraph</expected-error>
+      <compilation-unit name="create-drop-error">
+        <output-dir compare="Text">create-drop-error</output-dir>
+        <expected-error>Cannot drop DATASET TestDataverse.GenericDataset being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop FUNCTION TestDataverse.TestFunction() being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop DATASET TestDataverse.TestView being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop SYNONYM TestDataverse.DatasetSynonym being used by GRAPH TestDataverse.TestGraph</expected-error>
+        <expected-error>Cannot drop dataverse: DATASET TestDataverse2.GenericDataset being used by GRAPH TestDataverse.TestGraph</expected-error>
         <expected-error>Bad definition for a graph element(.)*Cannot find dataset DatasetThatDoesNotExist in dataverse TestDataverse nor an alias with name DatasetThatDoesNotExist</expected-error>
         <expected-error>Bad definition for a graph element(.)*Cannot resolve ambiguous alias reference for identifier V</expected-error>
         <expected-error>Conflicting primary keys for vertices with label Vertex1</expected-error>
-        <expected-error>Destination vertex Vertex3 not found in the edge EDGE_1.</expected-error>
-        <expected-error>Graph TestGraph already exists.</expected-error>
-        <expected-error>Graph GraphThatDoesntExist2 does not exist.</expected-error>
+        <expected-error>Destination vertex Vertex3 not found in the edge EDGE_1</expected-error>
+        <expected-error>Graph TestGraph already exists</expected-error>
+        <expected-error>Graph GraphThatDoesntExist2 does not exist</expected-error>
+        <expected-error>Cannot drop GRAPH TestDataverse.TestGraph being used by VIEW TestDataverse.TestView</expected-error>
+        <expected-error>Cannot drop GRAPH TestDataverse.TestGraph being used by FUNCTION TestDataverse.TestFunction</expected-error>
+        <expected-error>Cannot drop GRAPH TestDataverse.TestGraph being used by GRAPH TestDataverse.TestGraph2</expected-error>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="dangling-vertices">
+    <test-case FilePath="graphix">
+      <compilation-unit name="dangling-vertices">
+        <output-dir compare="Text">dangling-vertices</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="fixed-sub-path">
+    <test-case FilePath="graphix">
+      <compilation-unit name="fixed-sub-path">
+        <output-dir compare="Text">fixed-sub-path</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="graph-isomorphism">
+    <test-case FilePath="graphix">
+      <compilation-unit name="graph-isomorphism">
+        <output-dir compare="Text">graph-isomorphism</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="graphix-functions">
+    <test-case FilePath="graphix">
+      <compilation-unit name="graphix-functions">
+        <output-dir compare="Text">graphix-functions</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="inference-resolution">
+    <test-case FilePath="graphix">
+      <compilation-unit name="inference-resolution">
+        <output-dir compare="Text">inference-resolution</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="left-match">
+    <test-case FilePath="graphix">
+      <compilation-unit name="left-match">
+        <output-dir compare="Text">left-match</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="minimal-resolution">
+    <test-case FilePath="graphix" check-warnings="true">
+      <compilation-unit name="minimal-resolution">
+        <output-dir compare="Text">minimal-resolution</output-dir>
+        <expected-warn>Vertex label could not be resolved. Assuming that vertex $n has all schema labels.</expected-warn>
+        <expected-warn>Vertex label could not be resolved. Assuming that vertex $m has all schema labels.</expected-warn>
+        <expected-warn>Vertex label could not be resolved. Assuming that vertex $n has all schema labels.</expected-warn>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="on-query-error">
+    <test-case FilePath="graphix">
+      <compilation-unit name="on-query-error">
+        <output-dir compare="Text">on-query-error</output-dir>
+        <expected-error>Vertex $v defined with a label more than once. Labels can only be bound to vertices once.</expected-error>
+        <expected-error>Edge $e defined more than once. Edges can only connect two vertices.</expected-error>
+        <expected-error>Vertex label NonExistentLabel does not exist in the given graph schema.</expected-error>
+        <expected-error>Edge label NON_EXISTENT_EDGE does not exist in the given graph schema.</expected-error>
+        <expected-error>Query edge given, but no edge is defined in the schema.</expected-error>
+        <expected-error>Sub-path edges cannot have a hop length less than 1.</expected-error>
+        <expected-error>Sub-path edges cannot have a maximum hop length (2) less than the minimum hop length (4).</expected-error>
+        <expected-error>Conflicting primary keys for vertices with label Vertex1</expected-error>
+        <expected-error>Cannot resolve alias reference for undefined identifier invalidVariable</expected-error>
+        <expected-error>Cannot resolve alias reference for undefined identifier invalidVariable</expected-error>
+        <expected-error>Cannot resolve alias reference for undefined identifier invalidVariable</expected-error>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="path-variable">
+    <test-case FilePath="graphix">
+      <compilation-unit name="path-variable">
+        <output-dir compare="Text">path-variable</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="scope-checking">
+    <test-case FilePath="graphix">
+      <compilation-unit name="scope-checking">
+        <output-dir compare="Text">scope-checking</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="simple-1-edge">
+    <test-case FilePath="graphix">
+      <compilation-unit name="simple-1-edge">
+        <output-dir compare="Text">simple-1-edge</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="simple-n-edge">
+    <test-case FilePath="graphix">
+      <compilation-unit name="simple-n-edge">
+        <output-dir compare="Text">simple-n-edge</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="variable-sub-path">
+    <test-case FilePath="graphix">
+      <compilation-unit name="variable-sub-path">
+        <output-dir compare="Text">variable-sub-path</output-dir>
       </compilation-unit>
     </test-case>
   </test-group>
