JavaPatternMatching/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java

57 lines
1.9 KiB
Java
Executable File

// ino.module.MulOp.8605.package
package de.dhbwstuttgart.syntaxtree.operator;
// ino.end
// ino.module.MulOp.8605.import
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
import de.dhbwstuttgart.syntaxtree.statement.Binary;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.Type;
import de.dhbwstuttgart.typeinference.ConstraintType;
import de.dhbwstuttgart.typeinference.Pair;
import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
import de.dhbwstuttgart.typeinference.exceptions.DebugException;
import de.dhbwstuttgart.typeinference.unify.Unify;
// ino.class.MulOp.24231.declaration
public abstract class MulOp extends Operator
// ino.end
// ino.class.MulOp.24231.body
{
// ino.method.MulOp.24235.definition
public MulOp(int offset, int variableLength)
// ino.end
// ino.method.MulOp.24235.body
{
super(offset, variableLength);
}
// ino.end
@Override
protected Hashtable<RefType, RefType> getOperatorTypes() {
Hashtable<RefType, RefType> types = new Hashtable<RefType, RefType>();
return types;
}
@Override
public HashMap<ConstraintType,ConstraintType> getReturnTypes(TypeAssumptions ass) {
HashMap<ConstraintType,ConstraintType> ret = new HashMap<>();
ret.put(new RefType("java.lang.Integer",this,-1).TYPE(ass, this), new RefType("java.lang.Integer",this,-1).TYPE(ass, this));
ret.put(new RefType("java.lang.Double",this,-1).TYPE(ass, this), new RefType("java.lang.Double",this,-1).TYPE(ass, this));
ret.put(new RefType("java.lang.Float",this,-1).TYPE(ass, this), new RefType("java.lang.Float",this,-1).TYPE(ass, this));
ret.put(new RefType("java.lang.Long",this,-1).TYPE(ass, this), new RefType("java.lang.Long",this,-1).TYPE(ass, this));
return ret;
}
}
// ino.end