header
Rectangle Area Calculation

Tag:
Edit edit   Starstar

Program Information

Name: Rectangle Area Calculation
Domain: Geometry
Functionality: Calculate the area of rectangle.
Input: $a$ and $b$ denote length and width of the rectangle.
Output: $Rec(a,b)$ denotes the area of the rectangle.

Reference

 MT: A Data Mutation Directed Metamorphic Relation Acquisition Methodology https://doi.org/10.1145/2896971.2896974 

MR Information

MR1------ swapping the two parameters

Description:
Property: $Rec(b,a)=Rec(a,b)$
Source input: $(a,b)$
Source output: $Rec(a,b)$
Follow-up input: $(b,a)$
Follow-up output: $Rec(b,a)$
Input relation: $(a,b) \Rightarrow (b,a)$
Output relation: $Rec(b,a)=Rec(a,b)$
Pattern:

MR2------ increase the parameter by 1

Description:
Property: $Rec(a+1,b)>Rec(a,b)$
Source input: $(a,b)$
Source output: $Rec(a,b)$
Follow-up input: $(a+1,b)$
Follow-up output: $Rec(a+1,b)$
Input relation: $(a,b) \Rightarrow (a+1,b)$
Output relation: $Rec(a+1,b)>Rec(a,b)$
Pattern:

MR3------ decrease the parameter by 1

Description:
Property: $Rec(a-1,b)<Rec(a,b)$
Source input: $(a,b)$
Source output: $Rec(a,b)$
Follow-up input: $(a-1,b)$
Follow-up output: $Rec(a-1,b)$
Input relation: $(a,b) \Rightarrow (a-1,b)$
Output relation: $Rec(a-1,b)<Rec(a,b)$
Pattern:

MR4------ double the value

Description:
Property: $Rec(2*a,b)=2*Rec(a,b)$ or $Rec(2*a,b)>Rec(a,b)$
Source input: $(a,b)$
Source output: $Rec(a,b)$
Follow-up input: $(2*a,b)$
Follow-up output: $Rec(2*a,b)$
Input relation: $(a,b) \Rightarrow (2*a,b)$
Output relation: $Rec(2*a,b)=2*Rec(a,b)$ or $Rec(2*a,b)>Rec(a,b)$
Pattern:

MR5------ halve the value

Description:
Property: $Rec(0.5*a,b)=0.5*Rec(a,b)$ or $Rec(0.5*a,b)<Rec(a,b)$
Source input: $(a,b)$
Source output: $Rec(a,b)$
Follow-up input: $(0.5*a,b)$
Follow-up output: $Rec(0.5*a,b)$
Input relation: $(a,b) \Rightarrow (0.5*a,b)$
Output relation: $Rec(0.5*a,b)=0.5*Rec(a,b)$ or $Rec(0.5*a,b)<Rec(a,b)$
Pattern:
Insert title here