
大小:39 MB
下载:164次
安信12娱乐
- 支 持:macOS
- 分 类:养成游戏
- 大 小:548 MB
- 版 本:1.5.6
- 评 分:
- 开发者:飞跃未来软件科技有限公司
- 下载量:4383次
- 发 布:2025-02-22 16:25:59
扫码免费下载
#安信12娱乐简介
。史帝芬·羅素在閱讀完約翰·麥卡錫的論文後,認為其中的eval函数可以用機器碼來實作,从而创造了一個能工作的Lisp解释器。解释器可以用来运行Lisp程序,或者更恰当的说为:“求值Lisp表达式”A form is an expression that can be evaluated. A form that is merely a constant has that constant as its value. If a form is a variable, then the value of the form is the S-expression that is bound to that variable at the time when we evaluate the form. ……A function can be simply a name. In this case its meaning must be previously understood. A function may be defined by using the lambda notation and establishing a correspondence between the arguments and the variables used in a form. If the function is recursive, it must be given a name by using a label. ……An interpreter or universal function is one that can compute the value of any given function applied to its arguments when given a description of that function. (Of course, if the function that is being interpreted has infinite recursion, the interpreter will recur infinitely also.)We are now in a position to define the universal LISP function evalqyotefn;args. When evalquote is given a function and a list of arguments for that function, it computes the value of the function applied to the arguments.LISP functions have S-expressions as arguments. In particular, the argument "fn" of the function evalquote must be an S-expression. Since we have been writing functions as M-expressions, it is necessary to translate them into S-expressions. ……evalquote is defined by using two main functions, called eval and apply. apply handles a function and its arguments, while eval handles forms. Each of these functions also has another argument that is used as an association list for storing the values of bound variables and function names. ……A variable is a symbol that is used to represent an argument of a function. ……The formalism for variables in LISP is the Church lambda notation. The part of the interpreter that binds variables is called apply. When apply encounters a function beginning with LAMBDA, the list of variables is paired with the list of arguments and added to the front of the a-list During the evaluation of the function, variables may be encountered. They are evaluated by looking them up on the a-list. If a variable has been bound several times, the last or most recent value is used. The part of the interpreter that does this is called eval. The following example will illustrate this discussion. Suppose the interpreter is given the following doublet: fn: (LAMBDA (X Y) (CONS X Y)) args: (A B)evalquote will give these arguments to apply. (Look at the universal function of Section I.) apply(LAMBDA (X Y) (CONS X Y)); (A B);NILapply will bind the variables and give the function and a-list to eval. eval(CONS X Y); ((X . A) (Y . B))eval will evaluate the variables and give it to cons. consA;B = (A . B)The actual interpreter skips one step required by the universal function, namely, applyCONS;(A B);((X . A) (Y . B)). ……It is sometimes assumed that a constant stands for itself as opposed to a variable which stands for something else. …… It seems more reasonable to say that one variable is more nearly constant than another if it is bound at a higher level and changes value less frequently.In LISP, a variable remains bound within the scope of the LAMBDA that binds it. When a variable always has a certain value regardless of the current a-list, it will be called a constant. This is accomplished by means of the property list (p-list) of the variable symbol. Every atomic symbol has a p-list. When the p-list contains the indicator APVAL, then the symbol is a constant and the next item on the list is the value. eval searches p-lists before a-lists when evaluating variables, thus making it possible to set constants. ……An interesting type of constant is one that stands for itself. NIL is an example of this. It can be evaluated repeatedly and will still be NIL. T, F. NIL, and other constants cannot be used as variables. ……The program form has the structure - (PROG, list of program variables, sequence of statements and atomic' symbols…)……Program variables are treated much like bound variables, but they are not bound by LAMBDA. The value of each program variable is NIL until it has been set to something else. To set a program variable, use the form SET. To set variable PI to 3.14 write (SET (OUOTE PI) 3.14). SETQ is like SET except that it quotes its first argument. Thus (SETQ PI 3.14). SETQ is usually more convenient. SET and SETQ can change variables that are on the a-list from higher level functions. The value of SET or SETQ is the value of its second argument. ……Every atomic symbol has a property list. When an atomic symbol is read in for the first time, a property list is created for it.A property list is characterized by having the special constant 777778 (i.e., minus 1) as the first element of the list. The rest of the list contains various properties of the atomic symbol. Each property is preceded by an atomic symbol which is called its indicator. Some of the indicators are: PNAME - the print name of the atomic symbol for input-output use. EXPR - S-expression defining a function whose name is the atomic symbol on whose property list the EXPR appears. SUBR - Function defined by a machine language subroutine. APVAL - Permanent value for the atomic symbol considered as a variable.The atomic symbol NIL has two things on its property list - its PNAME, and an APVAL that gives it a value of NIL. Its property list looks like this:
射影線性群 PGL(''n'', ''F'')和射影特殊線性群 PSL(''n'',''F'')是GL(''n'',''F'')和SL(''n'',''F'')模以中心(它由某些倍數的單位矩陣的構成)的商群。