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 */ 013package org.jikesrvm.compilers.opt.dfsolver; 014 015import java.util.Iterator; 016 017import org.jikesrvm.compilers.opt.util.GraphNode; 018 019/** 020 * Represents a single lattice cell in a dataflow equation system. 021 */ 022public interface DF_LatticeCell extends GraphNode { 023 024 /** 025 * Returns an enumeration of the equations in which this 026 * lattice cell is used. 027 * @return an enumeration of the equations in which this 028 * lattice cell is used 029 */ 030 Iterator<DF_Equation> getUses(); 031 032 /** 033 * Returns an enumeration of the equations in which this 034 * lattice cell is defined. 035 * @return an enumeration of the equations in which this 036 * lattice cell is defined 037 */ 038 Iterator<DF_Equation> getDefs(); 039 040 /** 041 * Return a string representation of the cell 042 * @return a string representation of the cell 043 */ 044 @Override 045 String toString(); 046 047 /** 048 * Note that this variable appears on the RHS of an equation 049 * 050 * @param eq the equation 051 */ 052 void addUse(DF_Equation eq); 053 054 /** 055 * Note that this variable appears on the LHS of an equation 056 * 057 * @param eq the equation 058 */ 059 void addDef(DF_Equation eq); 060} 061 062 063