1. For the 1st part, following are some of the test cases been tested and their outcomes.
Functionality tested
|
Input source code(.psd)
|
Expected output
|
Generated .tmp file
|
ZIV subscripts
|
FOR i:=1 TO 10 DO
a[j] := b[i] + c[1];
c[j] := a[1] + a[j-1];
ENDFOR;
|
FOR i:=1 TO 10 DO
a[j] := b[i] + c[i];
c[i] := a[1] + a[j - 1];
ENDFOR;
|
FOR i:=1 TO 10 DO
a[j] := b[i] + c[i];
c[i] := a[1] + a[j - 1];
ENDFOR;
|
Strong SIV
|
FOR i:=1 TO 32 DO
a[i] := a[i-1] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[i] := a[i - 1] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[i] := a[i - 1] + c[i];
ENDFOR;
|
Strong SIV
('d' > loop- bounds)
|
FOR i:=1 TO 32 DO
a[i] := a[i+32] + c[i];
ENDFOR;
|
a[1:32] :=:32 a[1+32:32+32] +:32 c[1:32];
|
a[1:32] :=:32 a[1+32:32+32] +:32 c[1:32];
|
Strong SIV(non-integer 'd')
|
FOR i:=1 TO 32 DO
a[3*i+1] := a[3*i+32] + c[i];
ENDFOR;
|
a[3*1+1:3*32+1] :=:32 a[3*1+32:3*32+32] +:32 c[1:32];
|
a[3*1+1:3*32+1] :=:32 a[3*1+32:3*32+32] +:32 c[1:32];
|
Strong SIV
|
FOR i:=1 TO 32 DO
a[3 * i + 1] := a[3 * i + 61] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[3 * i + 1] := a[3 * i + 61] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[3 * i + 1] := a[3 * i + 61] + c[i];
ENDFOR;
|
Weak zero SIV
|
FOR i:=1 TO 32 DO
a[i] := a[i] + c[i];
d[i] := a[10] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[i] := a[i] + c[i];
d[i] := a[10] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[i] := a[i] + c[i];
d[i] := a[10] + c[i];
ENDFOR;
|
Weak zero SIV
('d' outside array bounds)
|
FOR i:=1 TO 32 DO
a[i] := a[i] + c[i];
d[i] := a[80] + c[i];
ENDFOR;
|
a[1:32] :=:32 a[1:32] +:32 c[1:32];
FOR i:=1 TO 32 DO
d[i] := a[80] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
d[i] := a[80] + c[i];
ENDFOR;
a[1:32] :=:32 a[1:32] +:32 c[1:32];
|
Weak zero SIV
('d' not an integer)
|
FOR i:=1 TO 32 DO
a[2*i] := a[2*i] + c[i];
d[i] := a[9] + c[i];
ENDFOR;
|
a[2*1:2*32] :=:32 a[2*1:2*32] +:32 c[1:32];
FOR i:=1 TO 32 DO
d[i] := a[9] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
d[i] := a[9] + c[i];
ENDFOR;
a[2*1:2*32] :=:32 a[2*1:2*32] +:32 c[1:32];
|
Weak crossing SIV('d' is integer)
|
FOR i:=1 TO 32 DO
a[-2*i+1] := a[2*i+13] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[-2 * i + 1] := a[2 * i + 13] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[-2 * i + 1] := a[2 * i + 13] + c[i];
ENDFOR;
|
Weak crossing SIV('d' is integer+1/2)
|
FOR i:=1 TO 32 DO
a[-2*i+1] := a[2*i+15] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[-2 * i + 1] := a[2 * i + 15] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[-2 * i + 1] := a[2 * i + 15] + c[i];
ENDFOR;
|
Weak crossing SIV('d' outside loop bounds)
|
FOR i:=1 TO 32 DO
a[-2*i+1] := a[2*i+257] + c[i];
ENDFOR;
|
a[-2*1+1:-2*32+1] :=:32 a[2*1+257:2*32+257] +:32 c[1:32];
|
a[-2*1+1:-2*32+1] :=:32 a[2*1+257:2*32+257] +:32 c[1:32];
|
Weak crossing SIV('d' not a integer or int1/2)
|
FOR i:=1 TO 32 DO
a[-2*i+1] := a[2*i+14] + c[i];
ENDFOR;
|
a[-2*1+1:-2*32+1] :=:32 a[2*1+14:2*32+14] +:32 c[1:32];
|
a[-2*1+1:-2*32+1] :=:32 a[2*1+14:2*32+14] +:32 c[1:32];
|
General SIV
|
FOR i:=1 TO 32 DO
a[2*i+1] := a[3*i+15] + c[i];
ENDFOR;
|
a[2*1+1:2*32+1] :=:32 a[3*1+15:3*32+15] +:32 c[1:32];
|
a[2*1+1:2*32+1] :=:32 a[3*1+15:3*32+15] +:32 c[1:32];
|
General SIV
|
FOR i:=1 TO 32 DO
a[2*i+15] := a[3*i+1] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[2 * i + 15] := a[3 * i + 1] + c[i];
ENDFOR;
|
FOR i:=1 TO 32 DO
a[2 * i + 15] := a[3 * i + 1] + c[i];
ENDFOR;
|