More changes
[repair.git] / Repair / RepairCompiler / MCC / IR / Expr.java
1 package MCC.IR;
2
3 import java.util.*;
4
5 public abstract class Expr {
6     
7     TypeDescriptor td = null;
8
9     public Expr() {}
10
11     public abstract boolean equals(Map remap, Expr e);
12
13     public abstract Set getRequiredDescriptors();
14
15     public abstract void generate(CodeWriter writer, VarDescriptor dest);
16
17     public TypeDescriptor getType() {
18         assert td != null : toString();
19         return td;
20     }
21
22     public abstract TypeDescriptor typecheck(SemanticAnalyzer sa);
23
24     public abstract void prettyPrint(PrettyPrinter pp);
25
26     public Set getInversedRelations() {
27         throw new IRException("unsupported");
28     }
29
30     public DNFRule constructDNF() {
31         return new DNFRule(this);
32     }
33
34     public Descriptor getDescriptor() {
35         return null;
36     }
37
38     public int[] getRepairs(boolean negated) {
39         return new int[0];
40     }
41
42     public boolean inverted() {
43         return false;
44     }
45
46     public boolean usesDescriptor(RelationDescriptor rd) {
47         return false;
48     }
49
50 }