import java.util.*;
public abstract class Expr {
-
+
TypeDescriptor td = null;
public Expr() {}
return td;
}
+ public String toString() {
+ return name();
+ }
+
public String name() {
System.out.println(this.getClass().getName());
return "?";
return null;
}
- public boolean isValue() {
+ public boolean isValue(TypeDescriptor td) {
return false;
}
return false;
}
+ public Set useDescriptor(Descriptor d) {
+ return new HashSet();
+ }
+
public boolean usesDescriptor(Descriptor rd) {
System.out.println(this.getClass().getName());
throw new Error("UNIMPLEMENTED");
public void findmatch(Descriptor d, Set s) {
}
+
+ public Set getfunctions() {
+ return null;
+ }
+
+ public SetDescriptor getSet() {
+ return null; /* unknown value */
+ }
+
+ public Expr stripCastExpr() {
+ Expr ptr=this;
+ while (ptr instanceof CastExpr)
+ ptr=((CastExpr)ptr).getExpr();
+ return ptr;
+ }
+
+ public boolean isSafe() {
+ return true;
+ }
+
+ public Expr getLower() {
+ return null;
+ }
+
+ public Expr getUpper() {
+ return null;
+ }
+ public boolean isInvariant(Set vars) {
+ return false;
+ }
+ public Set findInvariants(Set vars) {
+ return new HashSet();
+ }
}