/** Return the function result.
* @return A Type.
*/
public Object getValue() {
Type type1 = _port1.getType();
Type type2 = _port2.getType();
if ((type1 == BaseType.UNKNOWN) || (type2 == BaseType.UNKNOWN)) {
return BaseType.UNKNOWN;
} else if ((type1 instanceof ArrayType)
&& (type2 instanceof ArrayType)) {
Type elType1 = ((ArrayType) type1).getElementType();
Type elType2 = ((ArrayType) type2).getElementType();
CPO lattice = TypeLattice.lattice();
return lattice.leastUpperBound(elType1, elType2);
} else if ((type1 instanceof MatrixType)
&& (type2 instanceof MatrixType)) {
Type elType1 = ((MatrixType) type1).getElementType();
Type elType2 = ((MatrixType) type2).getElementType();
CPO lattice = TypeLattice.lattice();
return lattice.leastUpperBound(elType1, elType2);
} else {
return BaseType.UNKNOWN;
}