Article SCMPDS_1, MML version 4.99.1005
:: SCMPDS_1:th 9
theorem
for b1 being integer set holds
b1 in (union {INT}) \/ SCM-Memory;
:: SCMPDS_1:th 10
theorem
for b1 being integer set holds
b1 in SCM-Data-Loc \/ INT;
:: SCMPDS_1:th 11
theorem
for b1 being Element of SCM-Data-Loc holds
b1 in SCM-Data-Loc \/ INT;
:: SCMPDS_1:funcnot 1 => SCMPDS_1:func 1
definition
func SCMPDS-Instr -> Element of bool [:NAT,((union {INT}) \/ SCM-Memory) *:] equals
((({[0,<*b1*>] where b1 is Element of INT: TRUE} \/ {[1,<*b1*>] where b1 is Element of SCM-Data-Loc: TRUE}) \/ {[b1,<*b2,b3*>] where b1 is Element of Segm 14, b2 is Element of SCM-Data-Loc, b3 is Element of INT: b1 in {2,3}}) \/ {[b1,<*b2,b3,b4*>] where b1 is Element of Segm 14, b2 is Element of SCM-Data-Loc, b3 is Element of INT, b4 is Element of INT: b1 in {4,5,6,7,8}}) \/ {[b1,<*b2,b3,b4,b5*>] where b1 is Element of Segm 14, b2 is Element of SCM-Data-Loc, b3 is Element of SCM-Data-Loc, b4 is Element of INT, b5 is Element of INT: b1 in {9,10,11,12,13}};
end;
:: SCMPDS_1:def 3
theorem
SCMPDS-Instr = ((({[0,<*b1*>] where b1 is Element of INT: TRUE} \/ {[1,<*b1*>] where b1 is Element of SCM-Data-Loc: TRUE}) \/ {[b1,<*b2,b3*>] where b1 is Element of Segm 14, b2 is Element of SCM-Data-Loc, b3 is Element of INT: b1 in {2,3}}) \/ {[b1,<*b2,b3,b4*>] where b1 is Element of Segm 14, b2 is Element of SCM-Data-Loc, b3 is Element of INT, b4 is Element of INT: b1 in {4,5,6,7,8}}) \/ {[b1,<*b2,b3,b4,b5*>] where b1 is Element of Segm 14, b2 is Element of SCM-Data-Loc, b3 is Element of SCM-Data-Loc, b4 is Element of INT, b5 is Element of INT: b1 in {9,10,11,12,13}};
:: SCMPDS_1:th 13
theorem
[0,<*0*>] in SCMPDS-Instr;
:: SCMPDS_1:funcreg 1
registration
cluster SCMPDS-Instr -> non empty;
end;
:: SCMPDS_1:th 14
theorem
for b1 being Element of SCM-Memory
st b1 <> NAT & not b1 in SCM-Data-Loc
holds b1 in NAT;
:: SCMPDS_1:th 16
theorem
for b1 being Element of NAT holds
(for b2 being Element of NAT holds
b1 <> (2 * b2) + 1 or b1 <> 0 &
(for b2 being Element of NAT holds
b1 <> (2 * b2) + 2)) &
(for b2 being Element of NAT holds
b1 <> (2 * b2) + 2 or b1 <> 0 &
(for b2 being Element of NAT holds
b1 <> (2 * b2) + 1));
:: SCMPDS_1:funcnot 2 => SCMPDS_1:func 2
definition
func SCMPDS-OK -> Function-like quasi_total Relation of SCM-Memory,{INT} \/ {SCMPDS-Instr,NAT} means
for b1 being Element of SCM-Memory holds
(b1 = NAT implies it . b1 = NAT) & (b1 in SCM-Data-Loc implies it . b1 = INT) & (b1 in NAT implies it . b1 = SCMPDS-Instr);
end;
:: SCMPDS_1:def 4
theorem
for b1 being Function-like quasi_total Relation of SCM-Memory,{INT} \/ {SCMPDS-Instr,NAT} holds
b1 = SCMPDS-OK
iff
for b2 being Element of SCM-Memory holds
(b2 = NAT implies b1 . b2 = NAT) & (b2 in SCM-Data-Loc implies b1 . b2 = INT) & (b2 in NAT implies b1 . b2 = SCMPDS-Instr);
:: SCMPDS_1:modenot 1
definition
mode SCMPDS-State is Element of product SCMPDS-OK;
end;
:: SCMPDS_1:th 17
theorem
NAT <> SCMPDS-Instr & SCMPDS-Instr <> INT;
:: SCMPDS_1:th 18
theorem
for b1 being Element of SCM-Memory holds
SCMPDS-OK . b1 = NAT
iff
b1 = NAT;
:: SCMPDS_1:th 19
theorem
for b1 being Element of SCM-Memory holds
SCMPDS-OK . b1 = INT
iff
b1 in SCM-Data-Loc;
:: SCMPDS_1:th 20
theorem
for b1 being Element of SCM-Memory holds
SCMPDS-OK . b1 = SCMPDS-Instr
iff
b1 in NAT;
:: SCMPDS_1:th 21
theorem
for b1 being Element of SCM-Data-Loc holds
SCMPDS-OK . b1 = INT;
:: SCMPDS_1:th 22
theorem
for b1 being Element of NAT holds
SCMPDS-OK . b1 = SCMPDS-Instr;
:: SCMPDS_1:th 23
theorem
pi(product SCMPDS-OK,NAT) = NAT;
:: SCMPDS_1:th 24
theorem
for b1 being Element of SCM-Data-Loc holds
pi(product SCMPDS-OK,b1) = INT;
:: SCMPDS_1:th 25
theorem
for b1 being Element of NAT holds
pi(product SCMPDS-OK,b1) = SCMPDS-Instr;
:: SCMPDS_1:funcnot 3 => SCMPDS_1:func 3
definition
let a1 be Element of product SCMPDS-OK;
func IC A1 -> Element of NAT equals
a1 . NAT;
end;
:: SCMPDS_1:def 5
theorem
for b1 being Element of product SCMPDS-OK holds
IC b1 = b1 . NAT;
:: SCMPDS_1:funcnot 4 => SCMPDS_1:func 4
definition
let a1 be Element of product SCMPDS-OK;
let a2 be natural set;
func SCM-Chg(A1,A2) -> Element of product SCMPDS-OK equals
a1 +* (NAT .--> a2);
end;
:: SCMPDS_1:def 6
theorem
for b1 being Element of product SCMPDS-OK
for b2 being natural set holds
SCM-Chg(b1,b2) = b1 +* (NAT .--> b2);
:: SCMPDS_1:th 26
theorem
for b1 being Element of product SCMPDS-OK
for b2 being natural set holds
(SCM-Chg(b1,b2)) . NAT = b2;
:: SCMPDS_1:th 27
theorem
for b1 being Element of product SCMPDS-OK
for b2 being natural set
for b3 being Element of SCM-Data-Loc holds
(SCM-Chg(b1,b2)) . b3 = b1 . b3;
:: SCMPDS_1:th 28
theorem
for b1 being Element of product SCMPDS-OK
for b2, b3 being natural set holds
(SCM-Chg(b1,b2)) . b3 = b1 . b3;
:: SCMPDS_1:funcnot 5 => SCMPDS_1:func 5
definition
let a1 be Element of product SCMPDS-OK;
let a2 be Element of SCM-Data-Loc;
let a3 be integer set;
func SCM-Chg(A1,A2,A3) -> Element of product SCMPDS-OK equals
a1 +* (a2 .--> a3);
end;
:: SCMPDS_1:def 7
theorem
for b1 being Element of product SCMPDS-OK
for b2 being Element of SCM-Data-Loc
for b3 being integer set holds
SCM-Chg(b1,b2,b3) = b1 +* (b2 .--> b3);
:: SCMPDS_1:th 29
theorem
for b1 being Element of product SCMPDS-OK
for b2 being Element of SCM-Data-Loc
for b3 being integer set holds
(SCM-Chg(b1,b2,b3)) . NAT = b1 . NAT;
:: SCMPDS_1:th 30
theorem
for b1 being Element of product SCMPDS-OK
for b2 being Element of SCM-Data-Loc
for b3 being integer set holds
(SCM-Chg(b1,b2,b3)) . b2 = b3;
:: SCMPDS_1:th 31
theorem
for b1 being Element of product SCMPDS-OK
for b2 being Element of SCM-Data-Loc
for b3 being integer set
for b4 being Element of SCM-Data-Loc
st b4 <> b2
holds (SCM-Chg(b1,b2,b3)) . b4 = b1 . b4;
:: SCMPDS_1:th 32
theorem
for b1 being Element of product SCMPDS-OK
for b2 being Element of SCM-Data-Loc
for b3 being integer set
for b4 being Element of NAT holds
(SCM-Chg(b1,b2,b3)) . b4 = b1 . b4;
:: SCMPDS_1:funcnot 6 => SCMPDS_1:func 6
definition
let a1 be Element of product SCMPDS-OK;
let a2 be Element of SCM-Data-Loc;
redefine func a1 . a2 -> integer set;
end;
:: SCMPDS_1:funcnot 7 => SCMPDS_1:func 7
definition
let a1 be Element of product SCMPDS-OK;
let a2 be Element of SCM-Data-Loc;
let a3 be integer set;
func Address_Add(A1,A2,A3) -> Element of SCM-Data-Loc equals
[1,abs ((a1 . a2) + a3)];
end;
:: SCMPDS_1:def 8
theorem
for b1 being Element of product SCMPDS-OK
for b2 being Element of SCM-Data-Loc
for b3 being integer set holds
Address_Add(b1,b2,b3) = [1,abs ((b1 . b2) + b3)];
:: SCMPDS_1:funcnot 8 => SCMPDS_1:func 8
definition
let a1 be Element of product SCMPDS-OK;
let a2 be integer set;
func jump_address(A1,A2) -> Element of NAT equals
abs ((IC a1) + a2);
end;
:: SCMPDS_1:def 9
theorem
for b1 being Element of product SCMPDS-OK
for b2 being integer set holds
jump_address(b1,b2) = abs ((IC b1) + b2);
:: SCMPDS_1:funcnot 9 => SCMPDS_1:func 9
definition
let a1 be Element of SCM-Data-Loc;
let a2 be integer set;
redefine func <*a1, a2*> -> FinSequence of SCM-Data-Loc \/ INT;
end;
:: SCMPDS_1:funcnot 10 => SCMPDS_1:func 10
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1 being Element of SCM-Data-Loc st
ex b2 being Element of Segm 14 st
a1 = [b2,<*b1*>];
func A1 address_1 -> Element of SCM-Data-Loc means
ex b1 being FinSequence of SCM-Data-Loc st
b1 = a1 `2 & it = b1 /. 1;
end;
:: SCMPDS_1:def 10
theorem
for b1 being Element of SCMPDS-Instr
st ex b2 being Element of SCM-Data-Loc st
ex b3 being Element of Segm 14 st
b1 = [b3,<*b2*>]
for b2 being Element of SCM-Data-Loc holds
b2 = b1 address_1
iff
ex b3 being FinSequence of SCM-Data-Loc st
b3 = b1 `2 & b2 = b3 /. 1;
:: SCMPDS_1:th 33
theorem
for b1 being Element of Segm 14
for b2 being Element of SCMPDS-Instr
for b3 being Element of SCM-Data-Loc
st b2 = [b1,<*b3*>]
holds b2 address_1 = b3;
:: SCMPDS_1:funcnot 11 => SCMPDS_1:func 11
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1 being integer set st
ex b2 being Element of Segm 14 st
a1 = [b2,<*b1*>];
func A1 const_INT -> integer set means
ex b1 being FinSequence of INT st
b1 = a1 `2 & it = b1 /. 1;
end;
:: SCMPDS_1:def 11
theorem
for b1 being Element of SCMPDS-Instr
st ex b2 being integer set st
ex b3 being Element of Segm 14 st
b1 = [b3,<*b2*>]
for b2 being integer set holds
b2 = b1 const_INT
iff
ex b3 being FinSequence of INT st
b3 = b1 `2 & b2 = b3 /. 1;
:: SCMPDS_1:th 34
theorem
for b1 being Element of Segm 14
for b2 being Element of SCMPDS-Instr
for b3 being integer set
st b2 = [b1,<*b3*>]
holds b2 const_INT = b3;
:: SCMPDS_1:funcnot 12 => SCMPDS_1:func 12
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1 being Element of SCM-Data-Loc st
ex b2 being integer set st
ex b3 being Element of Segm 14 st
a1 = [b3,<*b1,b2*>];
func A1 P21address -> Element of SCM-Data-Loc means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 1;
end;
:: SCMPDS_1:def 12
theorem
for b1 being Element of SCMPDS-Instr
st ex b2 being Element of SCM-Data-Loc st
ex b3 being integer set st
ex b4 being Element of Segm 14 st
b1 = [b4,<*b2,b3*>]
for b2 being Element of SCM-Data-Loc holds
b2 = b1 P21address
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 1;
:: SCMPDS_1:funcnot 13 => SCMPDS_1:func 13
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1 being Element of SCM-Data-Loc st
ex b2 being integer set st
ex b3 being Element of Segm 14 st
a1 = [b3,<*b1,b2*>];
func A1 P22const -> integer set means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 2;
end;
:: SCMPDS_1:def 13
theorem
for b1 being Element of SCMPDS-Instr
st ex b2 being Element of SCM-Data-Loc st
ex b3 being integer set st
ex b4 being Element of Segm 14 st
b1 = [b4,<*b2,b3*>]
for b2 being integer set holds
b2 = b1 P22const
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 2;
:: SCMPDS_1:th 35
theorem
for b1 being Element of Segm 14
for b2 being Element of SCMPDS-Instr
for b3 being Element of SCM-Data-Loc
for b4 being integer set
st b2 = [b1,<*b3,b4*>]
holds b2 P21address = b3 & b2 P22const = b4;
:: SCMPDS_1:funcnot 14 => SCMPDS_1:func 14
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
ex b4 being Element of Segm 14 st
a1 = [b4,<*b1,b2,b3*>];
func A1 P31address -> Element of SCM-Data-Loc means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 1;
end;
:: SCMPDS_1:def 14
theorem
for b1 being Element of SCMPDS-Instr
st ex b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
ex b5 being Element of Segm 14 st
b1 = [b5,<*b2,b3,b4*>]
for b2 being Element of SCM-Data-Loc holds
b2 = b1 P31address
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 1;
:: SCMPDS_1:funcnot 15 => SCMPDS_1:func 15
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
ex b4 being Element of Segm 14 st
a1 = [b4,<*b1,b2,b3*>];
func A1 P32const -> integer set means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 2;
end;
:: SCMPDS_1:def 15
theorem
for b1 being Element of SCMPDS-Instr
st ex b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
ex b5 being Element of Segm 14 st
b1 = [b5,<*b2,b3,b4*>]
for b2 being integer set holds
b2 = b1 P32const
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 2;
:: SCMPDS_1:funcnot 16 => SCMPDS_1:func 16
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
ex b4 being Element of Segm 14 st
a1 = [b4,<*b1,b2,b3*>];
func A1 P33const -> integer set means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 3;
end;
:: SCMPDS_1:def 16
theorem
for b1 being Element of SCMPDS-Instr
st ex b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
ex b5 being Element of Segm 14 st
b1 = [b5,<*b2,b3,b4*>]
for b2 being integer set holds
b2 = b1 P33const
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 3;
:: SCMPDS_1:th 36
theorem
for b1 being Element of Segm 14
for b2 being Element of SCMPDS-Instr
for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set
st b2 = [b1,<*b3,b4,b5*>]
holds b2 P31address = b3 & b2 P32const = b4 & b2 P33const = b5;
:: SCMPDS_1:funcnot 17 => SCMPDS_1:func 17
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
ex b5 being Element of Segm 14 st
a1 = [b5,<*b1,b2,b3,b4*>];
func A1 P41address -> Element of SCM-Data-Loc means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 1;
end;
:: SCMPDS_1:def 17
theorem
for b1 being Element of SCMPDS-Instr
st ex b2, b3 being Element of SCM-Data-Loc st
ex b4, b5 being integer set st
ex b6 being Element of Segm 14 st
b1 = [b6,<*b2,b3,b4,b5*>]
for b2 being Element of SCM-Data-Loc holds
b2 = b1 P41address
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 1;
:: SCMPDS_1:funcnot 18 => SCMPDS_1:func 18
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
ex b5 being Element of Segm 14 st
a1 = [b5,<*b1,b2,b3,b4*>];
func A1 P42address -> Element of SCM-Data-Loc means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 2;
end;
:: SCMPDS_1:def 18
theorem
for b1 being Element of SCMPDS-Instr
st ex b2, b3 being Element of SCM-Data-Loc st
ex b4, b5 being integer set st
ex b6 being Element of Segm 14 st
b1 = [b6,<*b2,b3,b4,b5*>]
for b2 being Element of SCM-Data-Loc holds
b2 = b1 P42address
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 2;
:: SCMPDS_1:funcnot 19 => SCMPDS_1:func 19
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
ex b5 being Element of Segm 14 st
a1 = [b5,<*b1,b2,b3,b4*>];
func A1 P43const -> integer set means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 3;
end;
:: SCMPDS_1:def 19
theorem
for b1 being Element of SCMPDS-Instr
st ex b2, b3 being Element of SCM-Data-Loc st
ex b4, b5 being integer set st
ex b6 being Element of Segm 14 st
b1 = [b6,<*b2,b3,b4,b5*>]
for b2 being integer set holds
b2 = b1 P43const
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 3;
:: SCMPDS_1:funcnot 20 => SCMPDS_1:func 20
definition
let a1 be Element of SCMPDS-Instr;
assume ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
ex b5 being Element of Segm 14 st
a1 = [b5,<*b1,b2,b3,b4*>];
func A1 P44const -> integer set means
ex b1 being FinSequence of SCM-Data-Loc \/ INT st
b1 = a1 `2 & it = b1 /. 4;
end;
:: SCMPDS_1:def 20
theorem
for b1 being Element of SCMPDS-Instr
st ex b2, b3 being Element of SCM-Data-Loc st
ex b4, b5 being integer set st
ex b6 being Element of Segm 14 st
b1 = [b6,<*b2,b3,b4,b5*>]
for b2 being integer set holds
b2 = b1 P44const
iff
ex b3 being FinSequence of SCM-Data-Loc \/ INT st
b3 = b1 `2 & b2 = b3 /. 4;
:: SCMPDS_1:th 37
theorem
for b1 being Element of Segm 14
for b2 being Element of SCMPDS-Instr
for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set
st b2 = [b1,<*b3,b4,b5,b6*>]
holds b2 P41address = b3 & b2 P42address = b4 & b2 P43const = b5 & b2 P44const = b6;
:: SCMPDS_1:funcnot 21 => SCMPDS_1:func 21
definition
let a1 be Element of product SCMPDS-OK;
let a2 be Element of SCM-Data-Loc;
func PopInstrLoc(A1,A2) -> Element of NAT equals
(abs (a1 . a2)) + 2;
end;
:: SCMPDS_1:def 21
theorem
for b1 being Element of product SCMPDS-OK
for b2 being Element of SCM-Data-Loc holds
PopInstrLoc(b1,b2) = (abs (b1 . b2)) + 2;
:: SCMPDS_1:funcnot 22 => SCMPDS_1:func 22
definition
func RetSP -> Element of NAT equals
0;
end;
:: SCMPDS_1:def 22
theorem
RetSP = 0;
:: SCMPDS_1:funcnot 23 => SCMPDS_1:func 23
definition
func RetIC -> Element of NAT equals
1;
end;
:: SCMPDS_1:def 23
theorem
RetIC = 1;
:: SCMPDS_1:funcnot 24 => SCMPDS_1:func 24
definition
let a1 be Element of SCMPDS-Instr;
let a2 be Element of product SCMPDS-OK;
func SCM-Exec-Res(A1,A2) -> Element of product SCMPDS-OK equals
SCM-Chg(a2,jump_address(a2,a1 const_INT))
if ex b1 being integer set st
a1 = [0,<*b1*>],
SCM-Chg(SCM-Chg(a2,a1 P21address,a1 P22const),succ IC a2)
if ex b1 being Element of SCM-Data-Loc st
ex b2 being integer set st
a1 = [2,<*b1,b2*>],
SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P21address,a1 P22const),IC a2),succ IC a2)
if ex b1 being Element of SCM-Data-Loc st
ex b2 being integer set st
a1 = [3,<*b1,b2*>],
SCM-Chg(SCM-Chg(a2,a1 address_1,a2 . Address_Add(a2,a1 address_1,RetSP)),PopInstrLoc(a2,Address_Add(a2,a1 address_1,RetIC)))
if ex b1 being Element of SCM-Data-Loc st
a1 = [1,<*b1*>],
SCM-Chg(a2,IFEQ(a2 . Address_Add(a2,a1 P31address,a1 P32const),0,succ IC a2,jump_address(a2,a1 P33const)))
if ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
a1 = [4,<*b1,b2,b3*>],
SCM-Chg(a2,IFGT(a2 . Address_Add(a2,a1 P31address,a1 P32const),0,succ IC a2,jump_address(a2,a1 P33const)))
if ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
a1 = [5,<*b1,b2,b3*>],
SCM-Chg(a2,IFGT(0,a2 . Address_Add(a2,a1 P31address,a1 P32const),succ IC a2,jump_address(a2,a1 P33const)))
if ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
a1 = [6,<*b1,b2,b3*>],
SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P31address,a1 P32const),a1 P33const),succ IC a2)
if ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
a1 = [7,<*b1,b2,b3*>],
SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P31address,a1 P32const),(a2 . Address_Add(a2,a1 P31address,a1 P32const)) + (a1 P33const)),succ IC a2)
if ex b1 being Element of SCM-Data-Loc st
ex b2, b3 being integer set st
a1 = [8,<*b1,b2,b3*>],
SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P41address,a1 P43const),(a2 . Address_Add(a2,a1 P41address,a1 P43const)) + (a2 . Address_Add(a2,a1 P42address,a1 P44const))),succ IC a2)
if ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
a1 = [9,<*b1,b2,b3,b4*>],
SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P41address,a1 P43const),(a2 . Address_Add(a2,a1 P41address,a1 P43const)) - (a2 . Address_Add(a2,a1 P42address,a1 P44const))),succ IC a2)
if ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
a1 = [10,<*b1,b2,b3,b4*>],
SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P41address,a1 P43const),(a2 . Address_Add(a2,a1 P41address,a1 P43const)) * (a2 . Address_Add(a2,a1 P42address,a1 P44const))),succ IC a2)
if ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
a1 = [11,<*b1,b2,b3,b4*>],
SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P41address,a1 P43const),a2 . Address_Add(a2,a1 P42address,a1 P44const)),succ IC a2)
if ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
a1 = [13,<*b1,b2,b3,b4*>],
SCM-Chg(SCM-Chg(SCM-Chg(a2,Address_Add(a2,a1 P41address,a1 P43const),(a2 . Address_Add(a2,a1 P41address,a1 P43const)) div (a2 . Address_Add(a2,a1 P42address,a1 P44const))),Address_Add(a2,a1 P42address,a1 P44const),(a2 . Address_Add(a2,a1 P41address,a1 P43const)) mod (a2 . Address_Add(a2,a1 P42address,a1 P44const))),succ IC a2)
if ex b1, b2 being Element of SCM-Data-Loc st
ex b3, b4 being integer set st
a1 = [12,<*b1,b2,b3,b4*>]
otherwise a2;
end;
:: SCMPDS_1:def 24
theorem
for b1 being Element of SCMPDS-Instr
for b2 being Element of product SCMPDS-OK holds
(for b3 being integer set holds
b1 <> [0,<*b3*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(b2,jump_address(b2,b1 const_INT))) &
(for b3 being Element of SCM-Data-Loc
for b4 being integer set holds
b1 <> [2,<*b3,b4*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,b1 P21address,b1 P22const),succ IC b2)) &
(for b3 being Element of SCM-Data-Loc
for b4 being integer set holds
b1 <> [3,<*b3,b4*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P21address,b1 P22const),IC b2),succ IC b2)) &
(for b3 being Element of SCM-Data-Loc holds
b1 <> [1,<*b3*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,b1 address_1,b2 . Address_Add(b2,b1 address_1,RetSP)),PopInstrLoc(b2,Address_Add(b2,b1 address_1,RetIC)))) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [4,<*b3,b4,b5*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(b2,IFEQ(b2 . Address_Add(b2,b1 P31address,b1 P32const),0,succ IC b2,jump_address(b2,b1 P33const)))) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [5,<*b3,b4,b5*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(b2,IFGT(b2 . Address_Add(b2,b1 P31address,b1 P32const),0,succ IC b2,jump_address(b2,b1 P33const)))) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [6,<*b3,b4,b5*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(b2,IFGT(0,b2 . Address_Add(b2,b1 P31address,b1 P32const),succ IC b2,jump_address(b2,b1 P33const)))) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [7,<*b3,b4,b5*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P31address,b1 P32const),b1 P33const),succ IC b2)) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [8,<*b3,b4,b5*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P31address,b1 P32const),(b2 . Address_Add(b2,b1 P31address,b1 P32const)) + (b1 P33const)),succ IC b2)) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [9,<*b3,b4,b5,b6*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P41address,b1 P43const),(b2 . Address_Add(b2,b1 P41address,b1 P43const)) + (b2 . Address_Add(b2,b1 P42address,b1 P44const))),succ IC b2)) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [10,<*b3,b4,b5,b6*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P41address,b1 P43const),(b2 . Address_Add(b2,b1 P41address,b1 P43const)) - (b2 . Address_Add(b2,b1 P42address,b1 P44const))),succ IC b2)) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [11,<*b3,b4,b5,b6*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P41address,b1 P43const),(b2 . Address_Add(b2,b1 P41address,b1 P43const)) * (b2 . Address_Add(b2,b1 P42address,b1 P44const))),succ IC b2)) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [13,<*b3,b4,b5,b6*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P41address,b1 P43const),b2 . Address_Add(b2,b1 P42address,b1 P44const)),succ IC b2)) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [12,<*b3,b4,b5,b6*>] or SCM-Exec-Res(b1,b2) = SCM-Chg(SCM-Chg(SCM-Chg(b2,Address_Add(b2,b1 P41address,b1 P43const),(b2 . Address_Add(b2,b1 P41address,b1 P43const)) div (b2 . Address_Add(b2,b1 P42address,b1 P44const))),Address_Add(b2,b1 P42address,b1 P44const),(b2 . Address_Add(b2,b1 P41address,b1 P43const)) mod (b2 . Address_Add(b2,b1 P42address,b1 P44const))),succ IC b2)) &
((for b3 being integer set holds
b1 <> [0,<*b3*>]) &
(for b3 being Element of SCM-Data-Loc
for b4 being integer set holds
b1 <> [2,<*b3,b4*>]) &
(for b3 being Element of SCM-Data-Loc
for b4 being integer set holds
b1 <> [3,<*b3,b4*>]) &
(for b3 being Element of SCM-Data-Loc holds
b1 <> [1,<*b3*>]) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [4,<*b3,b4,b5*>]) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [5,<*b3,b4,b5*>]) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [6,<*b3,b4,b5*>]) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [7,<*b3,b4,b5*>]) &
(for b3 being Element of SCM-Data-Loc
for b4, b5 being integer set holds
b1 <> [8,<*b3,b4,b5*>]) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [9,<*b3,b4,b5,b6*>]) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [10,<*b3,b4,b5,b6*>]) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [11,<*b3,b4,b5,b6*>]) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [13,<*b3,b4,b5,b6*>]) &
(for b3, b4 being Element of SCM-Data-Loc
for b5, b6 being integer set holds
b1 <> [12,<*b3,b4,b5,b6*>]) implies SCM-Exec-Res(b1,b2) = b2);
:: SCMPDS_1:funcreg 2
registration
let a1 be Function-like quasi_total Relation of SCMPDS-Instr,Funcs(product SCMPDS-OK,product SCMPDS-OK);
let a2 be Element of SCMPDS-Instr;
cluster a1 . a2 -> Relation-like Function-like;
end;
:: SCMPDS_1:funcnot 25 => SCMPDS_1:func 25
definition
func SCMPDS-Exec -> Function-like quasi_total Relation of SCMPDS-Instr,Funcs(product SCMPDS-OK,product SCMPDS-OK) means
for b1 being Element of SCMPDS-Instr
for b2 being Element of product SCMPDS-OK holds
(it . b1) . b2 = SCM-Exec-Res(b1,b2);
end;
:: SCMPDS_1:def 25
theorem
for b1 being Function-like quasi_total Relation of SCMPDS-Instr,Funcs(product SCMPDS-OK,product SCMPDS-OK) holds
b1 = SCMPDS-Exec
iff
for b2 being Element of SCMPDS-Instr
for b3 being Element of product SCMPDS-OK holds
(b1 . b2) . b3 = SCM-Exec-Res(b2,b3);