View Javadoc

1   // BitVectorFact.java, created Mar 22, 2004 2:09:27 PM 2004 by jwhaley
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 joeq.Compiler.Dataflow;
5   
6   import jwutil.math.BitString;
7   
8   public abstract class BitVectorFact implements Fact {
9   
10      protected final BitString fact;
11  
12      protected BitVectorFact(int size) {
13          this.fact = new BitString(size);
14      }
15      
16      protected BitVectorFact(BitString s) {
17          this.fact = s;
18      }
19  
20      /* (non-Javadoc)
21       * @see joeq.Compiler.Dataflow.Fact#merge(Compiler.Dataflow.Fact)
22       */
23      public abstract Fact merge(Fact that);
24      
25      /* (non-Javadoc)
26       * @see joeq.Compiler.Dataflow.Fact#equals(Compiler.Dataflow.Fact)
27       */
28      public boolean equals(Fact that) {
29          return this.fact.equals(((BitVectorFact) that).fact);
30      }
31      
32      public String toString() {
33          return fact.toString();
34      }
35      
36      public abstract BitVectorFact makeNew(BitString s);
37      
38  }