1
2
3
4 package joeq.Compiler.Dataflow;
5
6 import jwutil.math.BitString;
7
8 /***
9 * UnionBitVectorFact
10 *
11 * @author jwhaley
12 * @version $Id: UnionBitVectorFact.java 1931 2004-09-22 22:17:47Z joewhaley $
13 */
14 public class UnionBitVectorFact extends BitVectorFact {
15
16 protected UnionBitVectorFact(int size) {
17 super(size);
18 }
19
20 protected UnionBitVectorFact(BitString s) {
21 super(s);
22 }
23
24
25
26
27 public Fact merge(Fact that) {
28 BitVectorFact r = (BitVectorFact) that;
29 BitString s = new BitString(this.fact.size());
30 s.or(this.fact);
31 boolean b = s.or(r.fact);
32 if (!b) return this;
33 else return new UnionBitVectorFact(s);
34 }
35
36 public BitVectorFact makeNew(BitString s) {
37 return new UnionBitVectorFact(s);
38 }
39 }