Документ взят из кэша поисковой машины. Адрес оригинального документа : http://sp.cs.msu.ru/courses/ooap/varwithansw.pdf
Дата изменения: Sun Nov 17 22:25:20 2013
Дата индексирования: Thu Feb 27 22:59:03 2014
Кодировка:

I. a) b) c) II a) b) : ; d) ; ; e) #; ; f) %. : ; e) ; ; f) .

. , ; c) ; d)

III. , RUP, ( , , : a, b, c . .): : a) d) b) e) a) ; d) ; b) ; e) ; c) ; f) .

IV a) b) c) d) e) f) g)
V. a) b) c) VI a) b) c) d)

, S1 : act1, act2, act3, act4, ev1, act5; entry / ac t1 act1, act3, ev2, act4, act6, act3, ev1, act4, act2, act5; ex it / ac t2 act1, act3, ev1, act5, act2, act4; S2 act1, act3, ev1, act4, act2, act5; entry / ac t3 act1, act3, ev1, act2, act4, act5; ex it / ac t4 act3, ev1, act4, act5; act1, act3, ev2, act4, act2, act6, act1, act3, ev1, act4, ev1 / act5 act2, act5.
, ; d) ; e) f) ; / , ( )

ev2 / act6

.

: ; ; .

, : ; ; ; . : . . . . . A, , { { { { { b o s s m ag rd eq et ul } e u } t red} ence iset } } B; B; B; B; B.

VII. a) b) c) d) e)



VIII. A B . B, . ? a) {bag} A; f) b) {ordered} A; g) h) c) {sequence} A; i) d) {set} A; j) e) {multiset} A; IX a) b) X. a) b) c) d)

. ( , ), : c) if; e) while; g) else; alt; d) opt; f) ref; h) par. loop; Z Y, T, G A. Z X. , , Z T: , T, A. A , X. G , X. G, X.









«»
(

, . , OCL-, . ( 1 !). , . , ) . . . . , , . , . , . . . , . , . , - . : , , . , , . , .
s c c s c c c ontext ize() ontext ontext um() ontext ontext ontext

OCL:

ontext :: derive: self.->size() :: derive: self.-> :: derive: self..->sum() :: derive: self..-> :: derive: self.. :: derive: self.. inv: .asSet()->size()+.asSet()->

{ordere d}

{ordere d}

size() + .asSet()->size() = 1 context inv: .asSet()->notEmpty() implies (self. = .) and (self. = .) context inv: .asSet()->notEmpty() implies (self. >= .) and (self. >= .) context :: derive self..-> indexOf(self) context :: derive self..-> indexOf(self)




«»

«/», «», «», « 1», « 2», « 3». , . «/». , ­ , 1. , , . : « 1» ­ ; « 2» ­ ; « 3» ­ . . , . «» . «» , . «/» . 30 , . «», « 1», « 2», « 3» . «» . . 30 , . () . «/» . , , , , . , . : , , , , 1, 2, 3; after(30min); , - when(...). : engineOff ­ , ; engineOn(v) ­ , , v ­ ­ 1, 2 3. , (if b then a1), . . .