use of org.evosuite.symbolic.expr.ref.ReferenceExpression in project evosuite by EvoSuite.
the class SymbolicHeap method array_load.
public StringValue array_load(ReferenceExpression symb_array, int conc_index, String conc_value) {
Map<Integer, Expression<?>> symb_array_contents = getOrCreateSymbolicArray(symb_array);
StringValue symb_value = (StringValue) symb_array_contents.get(conc_index);
if (symb_value == null || !((String) symb_value.getConcreteValue()).equals(conc_value)) {
symb_value = ExpressionFactory.buildNewStringConstant(conc_value);
symb_array_contents.remove(conc_index);
}
return symb_value;
}
use of org.evosuite.symbolic.expr.ref.ReferenceExpression in project evosuite by EvoSuite.
the class SymbolicHeap method array_load.
public RealValue array_load(ReferenceExpression symb_array, int conc_index, double conc_value) {
Map<Integer, Expression<?>> symb_array_contents = getOrCreateSymbolicArray(symb_array);
RealValue symb_value = (RealValue) symb_array_contents.get(conc_index);
if (symb_value == null || ((Double) symb_value.getConcreteValue()).doubleValue() != conc_value) {
symb_value = ExpressionFactory.buildNewRealConstant(conc_value);
symb_array_contents.remove(conc_index);
}
return symb_value;
}
use of org.evosuite.symbolic.expr.ref.ReferenceExpression 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.ref.ReferenceExpression in project evosuite by EvoSuite.
the class SymbolicFunctionVM method INVOKESPECIAL.
@Override
public void INVOKESPECIAL(String owner, String name, String desc) {
functionUnderExecution = getFunction(owner, name, desc);
if (functionUnderExecution != null) {
ReferenceExpression symb_receiver = getReceiverFromStack();
functionUnderExecution.setReceiver(null, /* receiver not yet ready */
symb_receiver);
if (Type.getArgumentTypes(desc).length == 0) {
callBeforeExecution(functionUnderExecution);
}
}
}
use of org.evosuite.symbolic.expr.ref.ReferenceExpression in project evosuite by EvoSuite.
the class SymbolicFunctionVM method CALLER_STACK_PARAM.
@Override
public void CALLER_STACK_PARAM(int nr, int calleeLocalsIndex, Object conc_arg) {
if (functionUnderExecution != null) {
ReferenceExpression symb_arg = getReferenceFromStack(nr);
functionUnderExecution.setParam(nr, conc_arg, symb_arg);
beforeExecuteFunction(nr);
}
}
Aggregations