1
- !"
- #$%
− &#$ − '()#$ − #$ − *)#$ − #$+(,
- -.
!"
!"
- /)(
- 0.(
- &((1
- ,(.2
- ,
- .((
1 #$$ - - PDF document
!"
!"
3.(.
4.(5(("5 ...(5. .(
.6..7()) ).5.
5.
/5.)) .(.
)5"5
!"
!"
4(
0. . #
!"
!"
4.B 4.C 4.*
..(
/C
..(
/,
..(
!"
!"
D.
!"
!"
# #(
'()
(
!"
!"
!"
!"
!"
!"
!"
!"
!"
*5) >...A
!"
!"
!"
!"
!"
!"
!"
!"
3 HC 3 HJ ⇒ '3HKJ
!"
!"
&
!"
&
!"
!"
!"
!"
!"
!"
!"
!"
!"
!"
procedure replaceText( inout text: TextFile; oldWords, in newWords: WordList); (* Replace in the text text all occurrences of the i-th word *) (* in oldWords by the i-th word in newWords; *) (* oldWords and newWords must have the same length *)
!"
!"
!"
function getPosition( a: array of Element; el: Element) return integer; (* Returns the relative position of el in a *) precondition ∃ i ∈ [a`First..a`Last]: a[i] = el (* el exists *) postcondition a[getPosition( a, el)] = el and a = a.old (* getPosition returns pos. of el in a and a is unchanged *) precondition ∃ i ∈ [a`First..a`Last]: a[i] = el (* el exists *) and ∀ i,j ∈ [a`First..a`Last]: i < j ⇒ a[i] < a[j] (* a is sorted *) /((..)).
!"
5 ;>4
BB BC / BQ -. BJ #) B >
JC (
Q %A.) A
B ; C
3 J /5(
K ')
L
B +C-; !&$6 D #&$+ )
$ %! #
!"
#$B #$C #$Q #$J #$ 4Q 4C 4G 4B
!"
%69" +C;-; !&$6 %6%" %+!E 1 05 5 ;>4 ( %+!E3$ @*
CC (( CQ * CJ (( C /)(.. 1 BB BC / BQ -. BJ #) B > 1 'B ; 'C
3 'J /5( ' ( 'K ') ' # ' #) 'L
$ %! #
!"
&'(%
!"
!"
!"