gen_register(...) Module Interface Specification

(0) CHARACTERISTICS

-type specified: register

-features: non-deterministic, parameterized

-foreign types: status

-parameters: smallest,biggest: int

(1) SYNTAX

ACCESS-PROGRAMS

Program Name
Arg#1Arg#2Result Type
PICKregister:VO  int:R
DISPOSEregister:VOint:V 

(2) CANONICAL TRACES

canonical(T) n:<int>; x[1]..x[n]:<int> [T = [PICK(*) (x[i])]i=1..n T1,T2,T3:<register>; y,z:<int> [T = T1.PICK(*) (y).T2.PICK(*) (z).T3 y < z] i:<int>1 i i n [x[i] _] (0 n n biggest - smallest + 1)]

(3) SEMANTICS

ACCESS-PROGRAMS

Legality(PICK((reg, T))) = %legal%

PICK((reg, T) ) a =

ConditionValue
a _T1.PICK(*) (a).T2 where T1,T2:<register> [T = T1.T2 canonical(T1.PICK(*) (a).T2)]
a = _ T

PICK((reg, T)) a |

ConditionValue
count(T, "PICK") biggest - smallest + 1a = _
count(T, "PICK") < biggest - smallest + 1a _ ¬ T1,T2:<register> [T = T1.PICK(*) (a).T2 ]

Legality(DISPOSE((reg, T), a)) = %legal%

DISPOSE((reg, T) , a) =

ConditionValue
T1,T2:<register> [T = T1.PICK(*) (a).T2 ]T1.T2
¬ T1,T2:<register> [T = T1.PICK(*) (a).T2 ]T