2013-10-18 11:33:46 +00:00
|
|
|
// ino.module.RelOp.8610.package
|
2014-09-02 08:33:54 +00:00
|
|
|
package de.dhbwstuttgart.syntaxtree.operator;
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.end
|
|
|
|
|
|
|
|
// ino.module.RelOp.8610.import
|
2014-05-07 06:10:55 +00:00
|
|
|
import java.util.HashMap;
|
2013-10-18 11:33:46 +00:00
|
|
|
import java.util.Hashtable;
|
|
|
|
import java.util.Iterator;
|
2015-04-22 19:40:22 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.Menge;
|
2014-04-23 15:59:39 +00:00
|
|
|
|
2014-09-04 14:35:44 +00:00
|
|
|
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
|
|
|
import de.dhbwstuttgart.myexception.JVMCodeException;
|
2014-09-02 08:33:54 +00:00
|
|
|
import de.dhbwstuttgart.syntaxtree.statement.Binary;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.Type;
|
2014-09-08 13:12:47 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.ConstraintType;
|
|
|
|
import de.dhbwstuttgart.typeinference.Pair;
|
2014-09-02 08:33:54 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
|
|
|
|
import de.dhbwstuttgart.typeinference.exceptions.DebugException;
|
2014-09-02 09:07:16 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.unify.Unify;
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.class.RelOp.24299.declaration
|
|
|
|
public abstract class RelOp extends Operator
|
|
|
|
// ino.end
|
|
|
|
// ino.class.RelOp.24299.body
|
|
|
|
{
|
|
|
|
// ino.method.RelOp.24303.definition
|
|
|
|
public RelOp(int offset, int variableLength)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.RelOp.24303.body
|
|
|
|
{
|
|
|
|
super(offset, variableLength);
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
protected Hashtable<RefType, RefType> getOperatorTypes() {
|
|
|
|
Hashtable<RefType, RefType> types = new Hashtable<RefType, RefType>();
|
|
|
|
|
2014-09-14 16:38:43 +00:00
|
|
|
types.put(new RefType("java.lang.Integer",this,-1), new RefType("java.lang.Boolean",this,-1));
|
|
|
|
types.put(new RefType("java.lang.Double",this,-1), new RefType("java.lang.Boolean",this,-1));
|
|
|
|
types.put(new RefType("java.lang.Float",this,-1), new RefType("java.lang.Boolean",this,-1));
|
|
|
|
types.put(new RefType("java.lang.Long",this,-1), new RefType("java.lang.Boolean",this,-1));
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
return types;
|
|
|
|
}
|
|
|
|
|
2014-04-23 15:59:39 +00:00
|
|
|
@Override
|
2014-09-08 13:12:47 +00:00
|
|
|
public HashMap<ConstraintType,ConstraintType> getReturnTypes(TypeAssumptions ass) {
|
|
|
|
HashMap<ConstraintType,ConstraintType> ret = new HashMap<>();
|
2015-03-31 10:37:45 +00:00
|
|
|
ret.put(new RefType("java.lang.Boolean",this,-1).TYPE(ass, this), new RefType("java.lang.Integer",this,-1).TYPE(ass, this));
|
|
|
|
ret.put(new RefType("java.lang.Boolean",this,-1).TYPE(ass, this), new RefType("java.lang.Double",this,-1).TYPE(ass, this));
|
|
|
|
ret.put(new RefType("java.lang.Boolean",this,-1).TYPE(ass, this), new RefType("java.lang.Float",this,-1).TYPE(ass, this));
|
|
|
|
ret.put(new RefType("java.lang.Boolean",this,-1).TYPE(ass, this), new RefType("java.lang.Long",this,-1).TYPE(ass, this));
|
2014-05-07 06:10:55 +00:00
|
|
|
|
2014-04-23 15:59:39 +00:00
|
|
|
return ret;
|
2014-04-24 10:42:10 +00:00
|
|
|
}
|
2014-05-07 06:10:55 +00:00
|
|
|
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
// ino.end
|