@Override public DoubleConstant getConstant() { return DoubleConstant.v(value); }
public static DoubleConstant v(double value) { return new DoubleConstant(value); }
@Override public NumericConstant subtract(NumericConstant c) { assertInstanceOf(c); return DoubleConstant.v(this.value - ((DoubleConstant) c).value); }
@Override public NumericConstant lessThan(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Double.compare(this.value, ((DoubleConstant) c).value) < 0 ? 1 : 0); }
@Override public Expression mkDoubleConstant(DoubleConstant arg0) { if (!constantDictionary.containsKey(arg0)) { constantDictionary.put(arg0, SootTranslationHelpers.v().getProgram().lookupGlobalVariable( "$double" + constantDictionary.size(), lookupType(arg0.getType()))); } return new IdentifierExpression(this.statementSwitch.getCurrentLoc(), constantDictionary.get(arg0)); }
@Override public NumericConstant notEqual(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Double.compare(this.value, ((DoubleConstant) c).value) != 0 ? 1 : 0); }
@Override public NumericConstant negate() { return DoubleConstant.v(-(this.value)); }
@Override public NumericConstant divide(NumericConstant c) { assertInstanceOf(c); return DoubleConstant.v(this.value / ((DoubleConstant) c).value); }
public static DoubleConstant v(double value) { return new DoubleConstant(value); }
@Override public NumericConstant greaterThan(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Double.compare(this.value, ((DoubleConstant) c).value) > 0 ? 1 : 0); }
public DoubleConstant toDoubleConstant() { return DoubleConstant.v(Double.longBitsToDouble(value)); }
@Override public NumericConstant add(NumericConstant c) { assertInstanceOf(c); return DoubleConstant.v(this.value + ((DoubleConstant) c).value); }
public static DoubleConstant v(double value) { return new DoubleConstant(value); }
@Override public NumericConstant greaterThanOrEqual(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Double.compare(this.value, ((DoubleConstant) c).value) >= 0 ? 1 : 0); }
public Value createJimpleConstantValue(cp_info[] constant_pool) { return DoubleConstant.v(convert()); } }
@Override public NumericConstant multiply(NumericConstant c) { assertInstanceOf(c); return DoubleConstant.v(this.value * ((DoubleConstant) c).value); }
@Override public NumericConstant equalEqual(NumericConstant c) { assertInstanceOf(c); return IntConstant.v(Double.compare(this.value, ((DoubleConstant) c).value) == 0 ? 1 : 0); }
/** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:29 */ public soot.Value eval(Body b) { return soot.jimple.DoubleConstant.v(constant().doubleValue()); } /**
@Override public NumericConstant remainder(NumericConstant c) { assertInstanceOf(c); return DoubleConstant.v(this.value % ((DoubleConstant) c).value); }