View Javadoc

1   // Problem.java, created Jul 3, 2004 1:17:45 PM by joewhaley
2   // Copyright (C) 2004 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package net.sf.bddbddb.dataflow;
5   
6   import net.sf.bddbddb.IterationList;
7   import net.sf.bddbddb.ir.Operation;
8   
9   /***
10   * Problem
11   * 
12   * @author John Whaley
13   * @version $Id: Problem.java 328 2004-10-16 02:45:30Z joewhaley $
14   */
15  public abstract class Problem {
16      public abstract TransferFunction getTransferFunction(Operation o);
17  
18      public abstract Fact getBoundary();
19  
20      public abstract boolean direction();
21  
22      public boolean compare(Fact f1, Fact f2) {
23          return f1.equals(f2);
24      }
25      public abstract static interface Fact {
26          public abstract Fact join(Fact that);
27  
28          public abstract Fact copy(IterationList loc);
29  
30          public abstract void setLocation(IterationList loc);
31  
32          public abstract IterationList getLocation();
33      }
34      public abstract static class TransferFunction {
35          public abstract Fact apply(Fact f);
36      }
37  }