public IResult<TupleLatticeElement<Variable, BooleanConstantLE>> transfer(
LoadLiteralInstruction instr, List<ILabel> labels,
TupleLatticeElement<Variable, BooleanConstantLE> value) {
if (instr.getNode() instanceof BooleanLiteral) {
BooleanLiteral boolNode = (BooleanLiteral)instr.getNode();
if (labels.contains(BooleanLabel.getBooleanLabel(true)) && labels.contains(BooleanLabel.getBooleanLabel(false)))
{
TupleLatticeElement<Variable, BooleanConstantLE> tVal, fVal;
LabeledResult<TupleLatticeElement<Variable, BooleanConstantLE>> result = LabeledResult.createResult(value);
tVal = ops.copy(value);
fVal = ops.copy(value);
tVal.put(instr.getTarget(), boolNode.booleanValue() ? BooleanConstantLE.TRUE : BooleanConstantLE.BOTTOM);
fVal.put(instr.getTarget(), !boolNode.booleanValue() ? BooleanConstantLE.FALSE : BooleanConstantLE.BOTTOM);
value.put(instr.getTarget(), boolNode.booleanValue() ? BooleanConstantLE.TRUE : BooleanConstantLE.FALSE);
result.put(BooleanLabel.getBooleanLabel(true), tVal);
result.put(BooleanLabel.getBooleanLabel(false), fVal);
return result;
}
else
value.put(instr.getTarget(), boolNode.booleanValue() ? BooleanConstantLE.TRUE : BooleanConstantLE.FALSE);
}
return LabeledSingleResult.createResult(value, labels);
}