test_class.file: cypher2sql/src/test/java/org/cytosm/cypher2sql/lowering/typeck/VarDependenciesTest.java
test_class.identifier: VarDependenciesTest
test_class.superclass: extends BaseVarTests
test_case.body: @Test
      public void testReachableVariablesMatchMatchWithMatchReturn() {
          String cypher = "" +
                  "MATCH (a)--(b)\n" +     // match0
                  "MATCH (b)\n" +          // match1
                  "WITH (a)\n" +           // with2
                  "MATCH (b)\n" +          // match3
                  "RETURN a.firstName";    // ret
          Statement st = PassAvailables.parseCypher(cypher);
          SingleQuery sq = (SingleQuery) st.query.part;
          VarDependencies dependencies = new VarDependencies(st);
          Iterator<Clause> iter = sq.clauses.iterator();
          AvailableVariables match0 = dependencies.getReachableVars(this.genClauseForASTNode(this.getPatternPart(iter.next()).next()));
          AvailableVariables match1 = dependencies.getReachableVars(this.genClauseForASTNode(this.getPatternPart(iter.next()).next()));
          AvailableVariables with2 = dependencies.getReachableVars(this.genClauseForASTNode(iter.next()));
          AvailableVariables match3 = dependencies.getReachableVars(this.genClauseForASTNode(this.getPatternPart(iter.next()).next()));
          AvailableVariables ret = dependencies.getReachableVars(this.genClauseForASTNode(iter.next()));
  
          Assert.assertTrue(match0.isEmpty());
          Assert.assertTrue(match1.get("a").isPresent());
          Assert.assertTrue(match1.get("b").isPresent());
          Assert.assertTrue(with2.get("a").isPresent());
          Assert.assertTrue(with2.get("b").isPresent());
          Assert.assertTrue(match3.get("a").isPresent());
          Assert.assertFalse(match3.get("b").isPresent());
          Assert.assertTrue(ret.get("a").isPresent());
          Assert.assertTrue(ret.get("b").isPresent());
      }
test_case.class_method_signature: VarDependenciesTest.testReachableVariablesMatchMatchWithMatchReturn()
test_case.full_signature: @Test public void testReachableVariablesMatchMatchWithMatchReturn()
test_case.identifier: testReachableVariablesMatchMatchWithMatchReturn
test_case.invocations: parseCypher iterator getReachableVars genClauseForASTNode next getPatternPart next getReachableVars genClauseForASTNode next getPatternPart next getReachableVars genClauseForASTNode next getReachableVars genClauseForASTNode next getPatternPart next getReachableVars genClauseForASTNode next assertTrue isEmpty assertTrue isPresent get assertTrue isPresent get assertTrue isPresent get assertTrue isPresent get assertTrue isPresent get assertFalse isPresent get assertTrue isPresent get assertTrue isPresent get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReachableVariablesMatchMatchWithMatchReturn()
focal_class.declarator: usedVariablesInClause = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<ClauseId, List<Var>> usedVariablesInClause = new HashMap<>();
focal_class.type: Map<ClauseId, List<Var>>
focal_class.var_name: usedVariablesInClause
focal_class.declarator: reachableVariables = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<ClauseId, AvailableVariables> reachableVariables = new HashMap<>();
focal_class.type: Map<ClauseId, AvailableVariables>
focal_class.var_name: reachableVariables
focal_class.declarator: relationships = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<ClauseId, List<Relationship>> relationships = new HashMap<>();
focal_class.type: Map<ClauseId, List<Relationship>>
focal_class.var_name: relationships
focal_class.declarator: returnExprs = new ArrayList<>()
focal_class.modifier: private
focal_class.original_string: private List<Expr> returnExprs = new ArrayList<>();
focal_class.type: List<Expr>
focal_class.var_name: returnExprs
focal_class.file: cypher2sql/src/main/java/org/cytosm/cypher2sql/lowering/typeck/VarDependencies.java
focal_class.identifier: VarDependencies
focal_class.class_method_signature: VarDependencies.VarDependencies(final Statement statement)
focal_class.full_signature: public  VarDependencies(final Statement statement)
focal_class.identifier: VarDependencies
focal_class.modifiers: public
focal_class.parameters: (final Statement statement)
focal_class.signature:  VarDependencies(final Statement statement)
focal_class.class_method_signature: VarDependencies.getUsedVars(ClauseId clauseId)
focal_class.full_signature: public List<Var> getUsedVars(ClauseId clauseId)
focal_class.identifier: getUsedVars
focal_class.modifiers: public
focal_class.parameters: (ClauseId clauseId)
focal_class.return: List<Var>
focal_class.signature: List<Var> getUsedVars(ClauseId clauseId)
focal_class.class_method_signature: VarDependencies.getAllVariables()
focal_class.full_signature: public Set<Var> getAllVariables()
focal_class.identifier: getAllVariables
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Var>
focal_class.signature: Set<Var> getAllVariables()
focal_class.class_method_signature: VarDependencies.getUsedAndIndirectUsedVars(ClauseId clauseId)
focal_class.full_signature: public List<Var> getUsedAndIndirectUsedVars(ClauseId clauseId)
focal_class.identifier: getUsedAndIndirectUsedVars
focal_class.modifiers: public
focal_class.parameters: (ClauseId clauseId)
focal_class.return: List<Var>
focal_class.signature: List<Var> getUsedAndIndirectUsedVars(ClauseId clauseId)
focal_class.class_method_signature: VarDependencies.getReachableVars(ClauseId clauseId)
focal_class.full_signature: public AvailableVariables getReachableVars(ClauseId clauseId)
focal_class.identifier: getReachableVars
focal_class.modifiers: public
focal_class.parameters: (ClauseId clauseId)
focal_class.return: AvailableVariables
focal_class.signature: AvailableVariables getReachableVars(ClauseId clauseId)
focal_class.class_method_signature: VarDependencies.getRelationships(ClauseId clauseId)
focal_class.full_signature: public List<Relationship> getRelationships(ClauseId clauseId)
focal_class.identifier: getRelationships
focal_class.modifiers: public
focal_class.parameters: (ClauseId clauseId)
focal_class.return: List<Relationship>
focal_class.signature: List<Relationship> getRelationships(ClauseId clauseId)
focal_class.class_method_signature: VarDependencies.getReturnExprs()
focal_class.full_signature: public List<Expr> getReturnExprs()
focal_class.identifier: getReturnExprs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Expr>
focal_class.signature: List<Expr> getReturnExprs()
focal_method.body: public AvailableVariables getReachableVars(ClauseId clauseId) {
          return this.reachableVariables.get(clauseId);
      }
focal_method.class_method_signature: VarDependencies.getReachableVars(ClauseId clauseId)
focal_method.full_signature: public AvailableVariables getReachableVars(ClauseId clauseId)
focal_method.identifier: getReachableVars
focal_method.invocations: get
focal_method.modifiers: public
focal_method.parameters: (ClauseId clauseId)
focal_method.return: AvailableVariables
focal_method.signature: AvailableVariables getReachableVars(ClauseId clauseId)