1
2
3
4 package net.sf.bddbddb.ir;
5
6 import java.util.Collection;
7 import java.util.Map;
8 import jwutil.io.SystemProperties;
9
10 /***
11 * Interpreter
12 *
13 * @author mcarbin
14 * @version $Id: Interpreter.java 522 2005-04-29 02:34:44Z joewhaley $
15 */
16 public abstract class Interpreter {
17 boolean TRACE = SystemProperties.getProperty("traceinterpreter") != null;
18 IR ir;
19 OperationInterpreter opInterpreter;
20 Map
21 Map
22
23 public abstract void interpret();
24 public static class RelationStats {
25 public int size;
26
27 public RelationStats() {
28 size = 0;
29 }
30
31 /***
32 * @param that
33 * @return the result of joining
34 */
35 public RelationStats join(RelationStats that) {
36 RelationStats result = new RelationStats();
37 result.size = (this.size > that.size) ? this.size : that.size;
38 return result;
39 }
40
41 public RelationStats copy() {
42 RelationStats result = new RelationStats();
43 result.size = this.size;
44 return result;
45 }
46
47
48
49
50 public boolean equals(Object o) {
51 if (o instanceof RelationStats) {
52 return this.size == ((RelationStats) o).size;
53 }
54 return false;
55 }
56
57
58
59
60 public int hashCode() {
61 return this.size;
62 }
63
64 public String toString() {
65 return "size: " + Double.toString(size);
66 }
67 }
68 public static class LoopStats {
69 Collection
70 }
71 }