1 cananian 1.1 // SingularOracle.java, created Sat May 3 19:27:35 2003 by cananian 2 cananian 1.1 // Copyright (C) 2003 C. Scott Ananian <cananian@alumni.princeton.edu> 3 cananian 1.1 // Licensed under the terms of the GNU GPL; see COPYING for details. 4 cananian 1.1 package harpoon.Analysis.Companions; 5 cananian 1.1 6 cananian 1.1 import harpoon.ClassFile.HCodeElement; 7 cananian 1.1 import harpoon.ClassFile.HMethod; 8 cananian 1.1 import harpoon.Temp.Temp; 9 cananian 1.1 import java.util.Collection; 10 cananian 1.1 import java.util.Set; 11 cananian 1.1 /** 12 cananian 1.1 * A <code>SingularOracle</code> provides information about 13 cananian 1.1 * singularity and mutual singularity of static values. 14 cananian 1.1 * 15 cananian 1.1 * @author C. Scott Ananian <cananian@alumni.princeton.edu> 16 cananian 1.2 * @version $Id: SingularOracle.java,v 1.2 2003/05/12 19:29:37 cananian Exp $ 17 cananian 1.1 */ 18 cananian 1.1 public interface SingularOracle<HCE extends HCodeElement> { 19 cananian 1.1 /** Returns a set of parameters the given static value is 20 cananian 1.1 * conditionally singular dependent on, or <code>null</code> 21 cananian 1.1 * if there is no such set (the static value is not singular). 22 cananian 1.1 */ 23 cananian 1.1 Set<Temp> conditionallySingular(HMethod m, StaticValue<HCE> sv); 24 cananian 1.2 25 cananian 1.1 /** Returns a set of parameters the given static values are 26 cananian 1.1 * conditionally singular dependent on, or <code>null</code> 27 cananian 1.1 * if there is no such set (the values are not mutually singular). 28 cananian 1.1 */ 29 cananian 1.1 Set<Temp> mutuallySingular(HMethod m, Collection<StaticValue<HCE>> svs); 30 cananian 1.1 }