SECTOR
sort Sacbr
Imports INTEGER, BOOLEAN
Enter - adds an altcraft to the sector if safety conditions are satisfed Lesve-ramoves an alrcraft from the sector
Move - moves an arcraft from one height to another if eata to do so Lookup - Finds the height of an aircraft in the sector
Create - creates an empty sector
Put - adds an aircraft to a sactor with no constraint chacks In-space-check if an aircraft is already in a sector Occipled-chacks if a specified height 6 salable
Enter (Sector, Call-elgn, Height) → Sector
Leave (Sector, Cal-sign) → Sactor Move (Sector, Cal-aign, Haight) → Sector Lockup (Sector, Call-sign)→ Height
Craab3ectr
Put (Sactor, Cal-sign, Height) → Sactor
In-space (Sector, Call-Eign)
Occupied (Sector, Haight
Enter (5, CS, H)=
Baclean
Boolean
In-Epace (S, CS) then Sexception (Aircraft already in sactor) els if Occupied (S, H) then 3 exception (Height confict) else Put('S, CS, H)
Lesve (Create, CS) = Create exception (Aircraft not in Escor} Leave (Put (3, C51, H1), CS) =
Ir CS = CS1 then 3 ́else Put (Leave (5, CS), CS1, H1)
Mova (5, CS, H) =
S = Create then Creata exception (No aircrafl in sector) e16 If not In-Epaca (S, CS) then S exception (Aircraft not in sector) elsif Occupied (S, H) then 3 exception (Haight canfilct)
else Put (Leave (5, C5), CS, H)
--NO-HEIGHT is a constant indicating that a valid haight cannot be returned
Lockup (Craale, CS) = NO-HEIGHT exception (Aircraft not in Gactor)
Lackup (Put (S, CS1, H1), CS) =
Irds= CS1 then H1 else Lockup (S, CS)
Occupied (Creata, H) = false
Occupied (Put (S, C$1, H1), H) =
If (H1H and H1-H '300) or (HH1 and H-H1300) then true else Occupied (S,H)
In-space (Create, CS) = false
In-space (Put(5, CS1, H1), CS) =
ics cst then true else In-space (S, CS)
المواصفات السلوكية Behavioral specification يمكن أن تكون المواصفات الجبرية مزعجة وبطيئة عندما تكون عمليات الكائن Object operations غير مستقلة Not independent عن حالة الكائن Object state وتتخلى المواصفات المعتمدة على النموذج Model-based specification عن حالة النظام System state وتعرف العمليات بمصطلحات التغييرات على هذه الحالة، ويعد تدوین زد Z notation الحالة الناضجة للمواصفات المعتمدة على النموذج، ويدمج
(190)
ص ١٩٠