001    /*
002     *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003     *
004     *  This file is licensed to You under the Eclipse Public License (EPL);
005     *  You may not use this file except in compliance with the License. You
006     *  may obtain a copy of the License at
007     *
008     *      http://www.opensource.org/licenses/eclipse-1.0.php
009     *
010     *  See the COPYRIGHT.txt file distributed with this work for information
011     *  regarding copyright ownership.
012     */
013    package org.jikesrvm.compilers.opt.dfsolver;
014    
015    import java.util.Iterator;
016    
017    import org.jikesrvm.compilers.opt.util.GraphNode;
018    
019    /**
020     * DF_LatticeCell.java
021     *
022     * Represents a single lattice cell in a dataflow equation system.
023     */
024    public interface DF_LatticeCell extends GraphNode {
025    
026      /**
027       * Returns an enumeration of the equations in which this
028       * lattice cell is used.
029       * @return an enumeration of the equations in which this
030       * lattice cell is used
031       */
032      Iterator<DF_Equation> getUses();
033    
034      /**
035       * Returns an enumeration of the equations in which this
036       * lattice cell is defined.
037       * @return an enumeration of the equations in which this
038       * lattice cell is defined
039       */
040      Iterator<DF_Equation> getDefs();
041    
042      /**
043       * Return a string representation of the cell
044       * @return a string representation of the cell
045       */
046      String toString();
047    
048      /**
049       * Note that this variable appears on the RHS of an equation
050       *
051       * @param eq the equation
052       */
053      void addUse(DF_Equation eq);
054    
055      /**
056       * Note that this variable appears on the LHS of an equation
057       *
058       * @param eq the equation
059       */
060      void addDef(DF_Equation eq);
061    }
062    
063    
064