use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class SymbolicHeap method getField.
/**
* @param className
* @param fieldName
* @param conc_receiver
* @param symb_receiver
* @param conc_value
* @return
*/
public RealValue getField(String className, String fieldName, Object conc_receiver, ReferenceExpression symb_receiver, double conc_value) {
Map<ReferenceExpression, Expression<?>> symb_field = getOrCreateSymbolicField(className, fieldName);
RealValue symb_value = (RealValue) symb_field.get(symb_receiver);
if (symb_value == null || ((Double) symb_value.getConcreteValue()).doubleValue() != conc_value) {
symb_value = ExpressionFactory.buildNewRealConstant(conc_value);
symb_field.remove(symb_receiver);
}
return symb_value;
}
use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class SymbolicFunctionVM method CALLER_STACK_PARAM.
@Override
public void CALLER_STACK_PARAM(int nr, int calleeLocalsIndex, double conc_arg) {
if (functionUnderExecution != null) {
RealValue symb_arg = getRealExprFromStack(nr);
functionUnderExecution.setParam(nr, conc_arg, symb_arg);
beforeExecuteFunction(nr);
}
}
use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class SINH method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue sinhExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.SINH;
sinhExpr = new RealUnaryExpression(realExpression, op, res);
} else {
sinhExpr = this.getSymbRealRetVal();
}
return sinhExpr;
}
use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class TAN method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue tanExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.TAN;
tanExpr = new RealUnaryExpression(realExpression, op, res);
} else {
tanExpr = this.getSymbRealRetVal();
}
return tanExpr;
}
use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class ToDegrees method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue toDegreesExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.TODEGREES;
toDegreesExpr = new RealUnaryExpression(realExpression, op, res);
} else {
toDegreesExpr = this.getSymbRealRetVal();
}
return toDegreesExpr;
}
Aggregations