- , . .
, .
, : " ?"
: " - ?"
, , ,
. ,
. ,
, - ,
. - ,
.
, .
, , . . . , .
.
, . , , . . .
, ] , . - , , , .
. :
, - . .
""- "", , . , , (. . 4.3). , , .
. ( ), : (. . 2.3.1), - .
, - , .
""- "", (. . 6). - .
. , . :
. . - (http://www.math.spbu.ru/user/tseytin/papers.html). [Hoare, Jifeng 1998].
. .
- , . .
- . (. . 6.2.1.1), , .
- . (. . 1.7.3). - . .
. , , ( - ) . - ( " -> ") .
, , .
- - , .
. - , (, , , . .). - , , (, , , . .).
, , :
<> ::= < > | < >
< > ::= < > | < > | < >
< > ::= < > | < >
| < >
< > ::= <> := <>;
< > ::= < ( < >);
< > ::= return [ <> ];
< > ::= begin <>* end
< > ::= if <> then <>* ( elseif
<> then <>*)* [ else <>* ] end
< > ::= while <> do <>* end
, . , , . , , . .
- ( ). . .
, , . , . , , .
, . , Plankalkuel ( plan calculus), 1945-1946 (Konrad Zuse).
, 50- - 70- XX , . 2.1. , 80- 90- . , .
, - . . , . . (, ), , .
, , .
. " . " [, 1991].
.
. " "
- - , , , .
, ( ""). , - . , , ( ), , . - .
- - . , .
- , . (. . 4.3.2.3).
- . .
- , . , . .
( ). - , . -, , . , , , . .
- . - , . . - , .
- , .
, . . , . , , , .
"" - :
Object :subclass Point :fields { x, };
Point :answer isnew :args { init_x, init_y } :body {
Integer :new :value { init_y )
Point :answer getx :args {} :body { ^ };
Point :answer gety :args {} :body { ^ };
Point :answer setx :args {new_x} :body { x :set new_x };
Point :answer sety :args {new_y} :body ( :set new_y };
Point :answer move :args {delta_x, delta_y} :body {
x :add delta_x
:add delta_y
};
Point, , , :
Point :new A :value (0, 0};
A :move [+2, -2};
...
. , , . . - .
, .
, - . , -. , . , . :
- , , , . - (. 2.2).
. .
- "- C++" [ 1998]. - " - . " [, , , 2001].
, .
.
- , , - , , - .
. -, 30- XX (Alonzo Church). Lisp, (John McCarthy) 50- XX [, 1986]. .
- , , . , , . .
- , . .
- , , ( ). , , ( ) .
. . , .
- .
, , " -".
:
<> ::= < >
| < >
< > ::= <> | <>
< > ::= <-> | <> | <
> | <>
<-> ::= lambda <> -> <> end
<> ::= (<> <>)
< > ::= let (<> = <>;)* in
<> end
<> ::= if <> then <> (elseif <> then
<>)* else <> end
- , , , . . "". - - "" -. - , , , .
, - . , . .
- , - . "" (, ), (, ), . , - , , , , . - () .
, . , , - . , add = lambda x -> lambda -> + end end number -> number -> number, apply- any(X) .any(Y). (X->Y)->X->Y, any " " , Y .
" " "", , ( 2.1).
2.1.
let
(f, [head | tail]) -> [f(head) |map(f,tail)]
end fun;
end fun
( "" ), , . " " [, 1993] .
- , , , , - . , , . . . , , . (, ) - , . . , . , .
. 2.3 . 70- - 80- XX . , - Haskell.
- . . 15 . (ML, Haskell) - , , , .
, . , . , , , , .
" " [, 1993] " . " [ 1983]. (Philip Wadler) (http://cm.bell-labs.com/cm/cs/who/wadler/guide.html).
, , .
( )
, , .
.
- , , .
60- XX , (Cordell Green) . (Alain Colmerauer) 1971 . . 80- XX , [ 1988].
.
- .
- .
:- b1, ..., bn.
( ) "":
.
member(X, [|_]).
member(X, [_|T]) :-member(X, ).
: " , , ". - member.
: " 2 [1,2,3]?" :
?- member(2, [1,2,3]).
Prolog- member, 2 [1,2,3]. . , member, 2 [2,3]. (. . 2 t2,3]), Prolog- :
yes ->
, , . "" ,
Prolog-. member 2, [2,3], , 2 [3]. 2 != 3, , , member(2, []). , member , Prolog- :
no.
Prolog- "" - -< , " , [1,2,3]?": J
?- member(X, [1,2,3]).
:
X=1 ->
=2 ->
=3 ->
.
"" : " , 1 ?":
?- member(1, X).
X = [1|_] ->
X = [_, 1|_] ->
X = [_, _, 1|_] ->
...
, , . Prolog- , 1, "" . "." member(1, X).
Prolog- . - , , , , . , f(x, 2) f(i, ), , Y - , : X=1, Y=2. f (X) . , , . , :- b, c. b . - modus ponens,
( & =>) => .
, , . , . Prolog (. 2.4), .
.
" " [ 1988]. Prolog [, , , 1992].
,
, .
, . " "
- , , . . , . . , , - .
80- XX , , .
, . .
- .
- V = {v[1], ..., v[n]}, () D = {D[1], ..., D[n]}, C = {[1], ..., C[m]}. , "" v[j], j=l..m v. - , C[j].
. , . - , Prolog. : " ". , :
? (X : integer) X>1, member(X, [1,2,3]).
, Prolog- , , 1. , , , , . :
=2 =3.
, . , : integer, x>2, <4 =. X, : integer, X*2=Y X: integer, Y mod 2 = 0.
"", . :
assume X>0.
when X+K10 ?
:
in (0..9).
, .
, . . 80- XX (. 2.5).
, "make".
( ) . [, , 1988]. ( ), .
( 2.2).
2.2.
'
: (I1, I2, I3, U1, U2, U3, R1, R2, R3: ';
' U1 = I1 * R1;
' U2 = I2 * R2;
' U3 = I3 * R3;
' I1 + I2 + I3 = 0);
1:
R1 = 16, R2 = 32, R3 = 5,
U1 = 50, U2 = -28;
'
' 1 ' U3;
- . , . .
" ()" [, , 1988]. (Roman Bartak) (http://kti.mff.cuni.cz/~bartak/constraints/).
- , , , . .
, .
. ( , ) [ 1978].
- , . . (. . 1.7.3).
- , . (. . 4.3.4).
- . , . (. . 4.3.3).
(, ) .
, , . , , . 2.1.
2.1. goto
goto |
goto |
|
|
() | BLISS, PDL | ||
goto | Java, Modula-2 | ||
( goto) | BASIC | ||
, goto | C, Ada |
. , , .
"| " [ 1975]. " " [, , 1982]. " + = " [ 1985]. [ 1999].
- , .
. , , , . . , (, ).
- . (. . 7.2.2.1).
. , . . , .
. , .
, . , . , " ", " " . .
, , , . :
* - . . (, ). , :
<>
::= < > | <
< > ::= < > | < > | <
>
< > ::= < > | < >
< > ::= < > << <>;
< > ::= < > >> <>;
< > ::= <, >
< > ::= seq <>* end
< > ::= par <>* end
, , . , , , . (, ). " ", , . , .
, , , .
. .
. 2.6 , .
. . , , (. . 7.2).
: " " [ 1987] " " [ 1999].
2.4.2.
- ,
. , .
, .
. " "
. :- b, . b , . , b - . - , , , . member (. . 2.2.4.4) , - . - , . , (, () :- (), ().), . ( ) .
Concurrent Prolog, . (Ehud Shapiro), [ 1988]. ( , ). - . , , . - . / , - , - .
Concurrent Prolog - . , - , - . : B1 2 ... Bn. .
Concurrent Prolog - . . - . Concurrent Prolog , . , , . . , .
, , , : () :- q(x, Y), (Y?). Y q r. . , . , , ( ) . , .
.
Concurrent Prolog , .
, :
.
. , , .
- " - ". , , , , [ 1990].
[ 1990]. , .
. . , , , .
. , .
1. , , , 1992- . ., . ., . ., . . . -5 . - .: - - , 1992.
2. 1998 - . - C++, 2- . - .: , .: 1998.
3. 1985 - . + = . - .: , 1985.
4. , , , 2001 - ., ., ., . - . . - .: , 2001.
5. 1975 - . // ., ., . . - .: , 1975, . 7-97.
6. 1978 - . . - .: , 1978.
7. , 1991 - . ., . . . . - .: , 1991.
8. , , 1988 - . ., . ., . X. (). - .: , 1988.
9. 1999 - . . . - .: , 1999.
10. 1977 - . . - .: , 1977.
11. , , 1982 - ., X., . . - .: , 1982.
12. 1990 - . . - .: , 1990.
13. 1988 - . - .: , 1988.
14. 1999 - . . . - .: , 1999.
15. 1990 - . . . - .: - , 1990.
16. 1987 - . . . - .: , 1987.
17. , 1993- ., . . - .: , 1993.
18. 1983 - . . . - .: , 1983.
19. , 1986 - ., . . 2- . - .: , 1990.
20. 1992 - . . , : , , ( ). - : - , 1992.
21. 1988 - : . 1983-1986 . / . . . . - .: , 1988.
22. Bal, Grune 1994 - Henri E. Bal, Dick Grune. Programming Language Essentials. Addison-Wesley Publishing Company, 1994.
23. , Jifeng 1998 - C. A.R. Hoare, He Jifeng. Unifying Theories of Programming. Prentice Hall International, 1998.
10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _. 10.11.2021 - 12:36: - Conscience -> . ? - _. 10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _. 10.11.2021 - 12:35: - Ecology -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> . - _. 10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _. 10.11.2021 - 09:18: - New Technologies -> , 5G- - _. 10.11.2021 - 09:18: - Ecology -> - _. 10.11.2021 - 09:16: - Ecology -> - _. 10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _. 10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _. |