Standards /

WCPS-Manual / binaryInducedExpr

The binaryInducedExpr element specifies a binary induced operation, i.e., an operation involving two coverage-valued arguments.

The coverage range types shall be numeric.

Let

C1, C2 be coverageExprs,
S1, S2 be rangeValues,
where

imageCrsDomain(C1,a) = imageCrsDomain(C2,a),
imageCrs(C1,a) = imageCrs(C2,a),
generalDomain(C1,a) = generalDomain(C2,a),
crsSet(C1,a) = crsSet(C2,a) for all a ∈ axisSet(C2),
crsSet(C1) = crs(C2),
rangeFieldNames(C1) = rangeFieldNames(C2),
rangeType(C1,f) is cast-compatible with rangeType(C2,f) or rangeType(C2,f) is cast-compatible with rangeType(C1,f) for all f ∈ rangeFieldNames(C1),
null(C1) = null(C2),
S1, S2 are of type rangeType(C1).

Then,

for any coverageExpr C3
where C3 is one of

CplusCC = C1 + C2 and rangeType(C1), rangeType(C2) numeric
CminCC = C1 - C2 and rangeType(C1), rangeType(C2) numeric
CmultCC = C1 * C2 and rangeType(C1), rangeType(C2) numeric
CdivCC = C1 / C2 and rangeType(C1), rangeType(C2) numeric
CandCC = C1 and C2 and
rangeType(C1)=rangeType(C2)=Boolean
CorCC = C1 or C2 and
rangeType(C1)=rangeType(C2)=Boolean
CxorCC = C1 xor C2 and
rangeType(C1)=rangeType(C2)=Boolean
CeqCC = C1 = C2 and rangeType(C1), rangeType(C2) numeric or Boolean
CltCC = C1 < C2 and rangeType(C1), rangeType(C2) numeric or Boolean
CgtCC = C1 > C2 and rangeType(C1), rangeType(C2) numeric or Boolean
CleCC = C1 <= C2 and rangeType(C1), rangeType(C2) numeric or Boolean
CgeCC = C1 >= C2 and rangeType(C1), rangeType(C2) numeric or Boolean
CneCC = C1 != C2 and rangeType(C1), rangeType(C2) numeric or Boolean
CovlCC = C1 overlay C2 and rangeType(C1), rangeType(C2) numeric or Boolean
CplusSC = S1 + C2 and S1, rangeType(C2) numeric
CminSC = S1 - C2 and S1, rangeType(C2) numeric
CmultSC = S1 * C2 and S1, rangeType(C2) numeric
CdivSC = S1 / C2 and S1, rangeType(C2) numeric
CandSC = S1 and C2 and S1, rangeType(C2) Boolean
CorSC = S1 or C2 and S1, rangeType(C2) Boolean
CxorSC = S1 xor C2 and S1, rangeType(C2) Boolean
CeqSC = S1 = C2 and S1, rangeType(C2) numeric or Boolean
CltSC = S1 < C2 and S1, rangeType(C2) numeric or Boolean
CgtSC = S1 > C2 and S1, rangeType(C2) numeric or Boolean
CleSC = S1 <= C2 and S1, rangeType(C2) numeric or Boolean
CgeSC = S1 >= C2 and S1, rangeType(C2) numeric or Boolean
CneSC = S1 != C2 and S1, rangeType(C2) numeric or Boolean
CovlSC = S1 overlay C2 and S1, rangeType(C2) numeric or Boolean
CplusCS = C1 + S2 and rangeType(C1), S2 numeric
CminCS = C1 - S2 and rangeType(C1), S2 numeric
CmultCS = C1 * S2 and rangeType(C1), S2 numeric
CdivCS = C1 / S2 and rangeType(C1), S2 numeric
CandCS = C1 and S2 and rangeType(C1), S2 Boolean
CorCS = C1 or S2 and rangeType(C1), S2 Boolean
CxorCS = C1 xor S2 and rangeType(C1), S2 Boolean
CeqCS = C1 = S2 and rangeType(C1), S2 numeric or Boolean
CltCS = C1 < S2 and rangeType(C1), S2 numeric or Boolean
CgtCS = C1 > S2 and rangeType(C1), S2 numeric or Boolean
CleCS = C1 <= S2 and rangeType(C1), S2 numeric or Boolean
CgeCS = C1 >= S2 and rangeType(C1), S2 numeric or Boolean
CneCS = C1 != S2 and rangeType(C1), S2 numeric or Boolean
CovlCS = C1 overlay S2 and rangeType(C1), S2 numeric or Boolean

C2 is defined as follows:

Example

The following expression describes a coverage composed of the sum of the red, green, and blue fields of coverage C:

C.red + C.green + C.blue