JPS585851A - Function type information processing unit - Google Patents

Function type information processing unit

Info

Publication number
JPS585851A
JPS585851A JP56104015A JP10401581A JPS585851A JP S585851 A JPS585851 A JP S585851A JP 56104015 A JP56104015 A JP 56104015A JP 10401581 A JP10401581 A JP 10401581A JP S585851 A JPS585851 A JP S585851A
Authority
JP
Japan
Prior art keywords
variable
function
value
list
local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP56104015A
Other languages
Japanese (ja)
Inventor
Takeshi Shinoki
剛 篠木
Hiroshi Hayashi
弘 林
Akira Hattori
彰 服部
Akio Shinagawa
明雄 品川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP56104015A priority Critical patent/JPS585851A/en
Publication of JPS585851A publication Critical patent/JPS585851A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • G06F9/4486Formation of subprogram jump address

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To speed up the reference of variables in a frame on an environmental list by providing the titled unit with a register directly indicating the leading value of a local variable value group on a stack of a variable restricting block lately inputted to an external device of a main starage device. CONSTITUTION:When a local variable is referred at compiling, the local variable name and the variable number are stored. A register for a program pointer PP, a specific pointer indicating the leading value of a local variable value group, is conncted as one hardware. When a block is updated on the supposition of PP=EP-[contents of (EP-1)]*2, stacks of the block are accessed at random by the contents of a PP register in accordance with (the variable refference PP + the variable number) if the PP indicates the leading value of the local variable value group, so that the variable can be referred quickly. The EP is a pointer indicating the latest variable restricting block.

Description

【発明の詳細な説明】 本発明は数値ではなく記号を処理するリス!(Llsp
す危わちLi5t Prestss@r )のような関
数盟嘗*mosgiui情報処理装置に係ル、と・〈に
関数が実行1れゐ!境(変数の値として何をつかうかと
いうむと)をWンビ島−夕内部の記憶回路にスタv1m
造的に格納するに#)九うてそのスターツタに格納され
た変数O検索時間を短縮す石九め上記スタV!メ毫すO
外部にレジスタを設けることを特徴とする閤歇腫情報処
層装置に関する一すスlはjllllに示すような2進
木、リストすなわち起上〇)tallを節点と枝の集合
である本構造(第ill←))であられしたものを扱う
ものである・ すなわち、第ill伽)のよう・力木構造であられされ
る記号Oつなが〉を第1間係)のように各ノードかもで
る枝が3本づつである2迩本表現に直し大拳で第1m1
(@)に示されるような主記憶装置に格納する。
[Detailed Description of the Invention] The present invention is a squirrel that processes symbols instead of numbers! (Llsp
When it comes to information processing devices such as Li5t Prestss@r), the function is executed 1! Set the border (what should be used as the value of the variable) to the memory circuit inside W Nbi Island-Yu.
To store it structurally #) nine times the variable stored in that start point O to shorten the search time stone nine point above star V! Mail O
The first step regarding an intermittent information processing device that is characterized by having external registers is to convert a binary tree, a list, i.e., a list, as shown in jllll, into a main structure that is a set of nodes and branches ( It deals with things that are created in the ``ill←)''. In other words, the symbol ``O Tsuna'', which is created in a power tree structure, is handled by the branch that appears at each node, as shown in the ``first division''. 1st m1 with a large fist, changing the expression to 2 strokes, which is 3 strokes each.
Store in the main memory as indicated by (@).

す−電わち、4に9スト竜ルは主記憶装置の1.語゛ま
良は21Iからejlそ04)竜ルは左、右2つの部分
から謙る。壷セにの左゛の部分は普iはある記号、九と
えばムという′文字の記号を表現するものが格納され、
右O部分はその記号とっなが為べき、次の記号を格納し
、ているセルのII地を格納することによって2つセル
が連結し’cv−hhことを表現する。
In other words, the 4th to 9th strokes are 1. The word ``mara'' is from 21I to ejlso04) The dragon bows from two parts, the left and the right. The left part of the jar usually stores i, which represents a certain symbol, and nine, for example, which represents the symbol for the letter 'm'.
The right O part stores the next symbol that the symbol should be, and by storing the II position of the cell, it expresses that two cells are connected and 'cv-hh'.

従り、て、第1図(o)のリメト七ルの′)ながシは、
第1図(b)の2進水リストを記憶■路上で実現してい
るものである。リスプは、このようなりスト構造をリス
プ言語を奥行することによって、プロセッサを使って動
的に変換し、−的0リスト構造を得る装置である。
Therefore, the length of rimetoshichiru') in Figure 1 (o) is,
The binary launch list shown in FIG. 1(b) is stored and realized on the road. Lisp is a device that dynamically converts such a list structure using a processor by deepening the Lisp language to obtain a -target0 list structure.

リス!においτプロダラムするというコトは、2進本リ
ストを変換するために#l!な以下の5つの基本関数を
組み合せて形成される関数を定義し、その値を求めるこ
とである。
squirrel! The thing about smell τ program is #l! to convert the binary book list! The purpose is to define a function formed by combining the following five basic functions and find its value.

5つの基本関数とは。What are the five basic functions?

イ) l4ar(X〕カール 2進木リス)Xの左の枝の*にある2進水リストを値と
する。
b) l4ar(X] Curl binary tree squirrel) Take the binary list at * on the left branch of X as the value.

口)  啼む(X)#ダー 1進木リストXの右12)aO*にある2道木リストを
値とす為。
Mouth) Cry (X) #dar 1 path tree list to the right of X 12) aO* to take the value of the 2 path tree list.

J%)  l−’om*(X:Y) :I yx新しい
リスト・セルを設け、その左の枝を2進水リストXとし
右の枝を2−木、リストYとするような新たな2進水リ
ストを作ってそれを値とする。
J%) l-'om*(X:Y) :I yxCreate a new list cell, and create a new list cell with the left branch as 2-launch list X and the right branch as 2-tree, list Y. Create a binary launch list and use it as the value.

二)  h jam Cx)アトム Xがアトムの時、真という値(“T#や@*7*”で示
めす)を*b、そうでないとき、偽(” NIL’とい
うアトムで示す)とする。
2) h jam Cx) When atom .

ホ)・q(X:Y)イク XとYが同じ2!l!木リストの時1真の値(″T”や
1市TI#)を取シ、そうでない時、偽の値(’NIL
”)を取る。
e)・q(X:Y) Iku X and Y are the same 2! l! When it is a tree list, it takes 1 true value (``T'' or 1 city TI#), otherwise it takes a false value ('NIL).
")I take the.

例えば% /(217)■3EF + y”の定義は!
−λ((x +y) ;x’+y” ) ト表わスコト
ニョシ、/(2,3)0値は、λ((X4):X’+Y
”)(2,3)−2”+32とな)、変数の対応関係を
明確に規定することができる。
For example, the definition of % / (217)■3EF + y” is!
−λ((x +y) ;x'+y'')
”)(2,3)-2”+32), the correspondence of variables can be clearly defined.

こζで、(X、Y)は仮引数と呼ばれる変数であってC
2m5>は(x e y )のそのときの値である実引
数と呼ばれるものである。そして、こ0実引数(2,3
)を仮引数(X、Y)K代入することを束縛(bjnd
lng)すると呼び、実引数を仮引数に束縛することに
よって関数の値、この場合21 + 32という目的の
リストをつくることがリスプを実行する仁とである。し
たがって、リス!すなわち関数層情報処理装置にあって
は、仮引数と実引数をどのように束縛するかが問題とな
る。
Here, (X, Y) are variables called formal parameters, and C
2m5> is called an actual argument, which is the current value of (x e y ). And this 0 actual arguments (2, 3
) is assigned to formal arguments (X, Y) K by binding (bjnd
lng) and create a desired list of function values, in this case 21 + 32, by binding the actual arguments to the formal arguments. Hence the squirrel! In other words, in a functional layer information processing device, the problem is how to bind formal arguments and actual arguments.

本発明においては、変数の束縛値(ilind Val
tI・)が線形リスト(1mmソリストすなわちFIL
O(Flrst In La5t Out jたはPu
5k down Popup) ffiスタスタヘ変数
名と値の対で格納される。ここでFlll)@スタ、り
とは前記記憶回路上で2進木リスト構造でデータを蘭接
アドレス方式(すなわち、あるセフに次につながるセル
のアドレスを格納しておく方式)で格納していく仁とで
ある。この変数名と値との対を格納していく順序は、引
数変数の関数が呼ばれえときに実引数を値とする順番に
なるいわゆるダイナζ、クスコービンダ(Dymami
@8@oping)nuの環境をもつ閤数置言■であり
て、その変数の値が何であるかを参照する手順は、基本
的に社上記積境リスト(又はスタ、り)を先頭か、らシ
ーケンシャルに検索して最初に見つかった値を使う、I
いわゆるディープノ苛インド(・D・・p limdm
変数束縛を行なう場合に、局所変数を捜し出すアクセス
タイムを短縮するために主記憶装置の外部に最近入っ九
変数束縛fo、りのスタッタ上の局所変数値群・の先頭
を直接指すレジスjを設けることが本発明の特徴である
In the present invention, the bound value (ilind Val
tI・) is a linear list (1mm soloist or FIL
O(Flrst In La5t Out j or Pu
5k down Popup) Stored as a variable name and value pair in the ffi database. Here, data is stored in a binary tree list structure on the memory circuit using a rank address method (i.e., a method in which the address of the next cell is stored in one cell). With Ikujin. The order in which pairs of variable names and values are stored is the so-called dyna ζ, which is the order in which the actual argument is the value when the function of the argument variable can be called, or the Kuskovinda (Dymami
@8@oping) The procedure for referring to the value of a variable with an environment of nu is basically to start the company's development list (or star) , search sequentially and use the first value found, I
So-called deep India (・D・・p limdm
When performing variable binding, in order to shorten the access time to search for local variables, a register j is provided outside the main memory that directly points to the beginning of the local variable value group on the stutter of the nine most recent variable bindings fo and ri. This is a feature of the present invention.

一般に、第2図に示すように関数型とは、その!ログラ
ム構造中実行形態が呼ぶべき関数すなわち奥行するべき
関数f−λ((X 、Y) :x’+y” ) O仮引
数(x、y)へ実引数(2,3)を結合すなわち束縛(
バインド)シ、呼ばれ九(起動された)関数は、渡され
たすなわち代入されるぺ龜実引数や大域変数を参照して
所定の手続きを奥行し、その関数O値2”+3”を呼び
側へ返し、それ以外の副作用(ml境を変更すること)
はないものを言う、副作用については、本発明の要旨か
らみて、説明を省略す為。
In general, as shown in Figure 2, the functional type means that! In the program structure, the function that the execution form should call, that is, the depth power function f-λ((X, Y) :x'+y'')
The called (invoked) function executes the predetermined procedure by referring to the passed or assigned actual arguments and global variables, and calls the function value 2"+3". Return to the side, other side effects (changing the ml boundary)
In view of the gist of the present invention, explanations regarding side effects will be omitted.

関数を呼び出す(Callする)場合、その仮引数への
実引数の束縛の方法には、ディープ・童インド法とシャ
ローバインド(8hall・vllind)法がある。
When calling a function, there are two methods for binding an actual argument to a formal argument: the deep/indian method and the shallow bind (8hall/vllind) method.

ディーグツ量インド法は前述したように、束縛された変
数名(X、Y)と値(2,3)の対(ペア、すなわち、
Xは2.Yは3の対)をamリストやスタッタ構造に格
納し、変数値を参照する場合には、最後に束縛された方
向からシーケンシャルにたど夛、最初に発見したその変
数の値を使うという環境の構造である。
As mentioned above, the Digts quantity Indian method uses a pair of bound variable names (X, Y) and values (2, 3), that is,
X is 2. An environment in which Y is a pair of 3) is stored in an am list or stutter structure, and when referencing a variable value, it is sequentially retrieved from the direction in which it was bound last, and the value of the variable found first is used. The structure is

すなわち、ディープバインド法は、第3図(a) K示
すように、主記憶装置の記憶単位である語の構成が左、
右2つの部分に分かれ、1つのセルになっていて、左部
に変数名を格納し、右部はそのセルが接続する次のセル
のアドレスを格納することによって次のセルのその変数
の値を知ることができ、沢山の変数がある場合は、第3
図(a)のように連結し、勢価的KIg3図(b)のよ
うなFILOffiのスタ、りを構成するものである。
That is, in the deep bind method, as shown in FIG.
The right part is divided into two parts and becomes one cell, the left part stores the variable name, and the right part stores the address of the next cell to which that cell connects, thereby determining the value of that variable in the next cell. can be known and there are many variables, the third
They are connected as shown in Figure (a) to form a FILoffi star as shown in Figure (b).

関数コール(Call)の時に、引数変数に値をパイン
Pするときには、m境すス)(または環境スタ、り)O
検索出発点の方向から、その名前と値の対をつなげ、検
索出発点ポインタを新たに付加し九項目の先頭へ更新す
る。すなわち、第3図(a)の主記憶装置上では、先頭
に1つのセルn+1を設けることに対応し、そのセルが
つながる次のセルがnであるととに対応する。これは、
第3図(b)においては、スタックのプツシ、 (Pu
sh)動作ムに対応し、その変数名がn+1であって、
その値が(n+1)であるセルをスタ、りの最下段に!
、シ1して入れることに対応する。関数のリターン(R
@tten)時には、その関数がコールされ九ときの状
態に検索出発点4インメを戻す。すなわち、第3図(a
)の主記憶回路上では、先頭のセルn+1  を1つと
って、セル鳳を先頭にすることに対応し、第3間係)で
は、口+1とその値(m+1)を4.f動作Bで外に出
すことを意味する。ディープ・量インド法の長所は、ス
タックの!、シ、/、f動作が簡単であるので関数コー
ル時の引数変数のバインド処理、関数リターン時の引数
変数のアン・母インド(Un−b i nd )処理の
オーバーへ、ドが比較的少ないことであり、短所は、大
域変数(自由変数とも呼ぶ)のように、かな如以前にバ
インドされた変数すなわちスタックの奥の方にある変数
の参照に時間がかかることである。
When making a function call (Call), when pinpointing a value to an argument variable, use
The name and value pairs are connected from the direction of the search starting point, a new search starting point pointer is added, and it is updated to the top of the nine items. That is, on the main memory device of FIG. 3(a), this corresponds to providing one cell n+1 at the beginning and the next cell to which that cell is connected is n. this is,
In FIG. 3(b), the push of the stack, (Pu
sh) corresponds to the action, and its variable name is n+1,
Place the cell whose value is (n+1) at the bottom of the star!
, corresponds to si1 and input. Function return (R
@tten) When the function is called, it returns the search starting point to the state it was in at the time. That is, Fig. 3 (a
), the first cell n+1 is taken as the first cell, and cell Otori is set as the first cell.In the third cell), the cell +1 and its value (m+1) are set to 4. f-movement B means to take it out. The advantage of deep quantity Indian method is stack! , C, /, F Since the operation is simple, there are relatively few overloads in the binding process of argument variables when calling a function, and the un-bind process of argument variables when returning from a function. The disadvantage is that, like global variables (also called free variables), it takes time to reference variables that were previously bound, that is, variables that are deep in the stack.

シャローバインド法は、各変数毎に、その値を保持する
ランダムアクセス域(Valu@C@11 ト呼5 )
を設け、関数コール時には引数騒数のパリ、−セルへそ
の実引数を格納し、パリ、−セルに以前から存在した値
を、線形リスト(を九はスタ、り)へ名前と旧値の対と
して格納し、変数参照は対応するパリ、−セルを読むだ
けでよく、関数リターン時には、その引数変数のパリー
−七ルヘ線形リスト(tたはスタック)へ格納してあっ
九旧値を戻す。シャロー・童インド法の長所は、変数参
照時間が短かいことであ)、短所は関数コール時の引数
変数のバインド処理、関数のリターン時のアンバインド
処理のオーバーヘッドが大きいことである。
The shallow binding method uses a random access area (Valu@C@11) that holds the value for each variable.
When a function is called, the actual argument is stored in the argument number cell, and the value that previously existed in the cell is stored in a linear list (9 is a star) as a pair of name and old value. The variable reference only needs to read the corresponding cell, and when the function returns, it is stored in the linear list (t or stack) of the argument variable and returns the old value. The advantage of the shallow/child Indian method is that variable reference time is short), and the disadvantage is that the overhead of binding argument variables when a function is called and unbinding when the function returns is large.

以上のようにディープバインド法社シャローバインド法
に比べて、引数のノ量インド/アンバインド処環につい
ては高速であるが、変数の参照が遅い、すなわち、従来
は変数の参照を4インクを1つづつ減らす逐次方式で行
なっていたので、非常に処理が遅そかった。この点を改
良するのが本発明の方式である。
As mentioned above, compared to the deep binding method and the shallow binding method, it is faster to ind/unbind the number of arguments, but referencing variables is slower. The process was very slow because it was done in a sequential manner, reducing the amount one by one. The method of the present invention improves this point.

本発明の目的は、上述したような関数微情報処理装置に
おいて、データ関のつなが〕を表わすリストをディープ
バインド方式に従ってスタックメモリ内に格納される変
数を参照するアクセスタイムを短縮するために主記憶装
置の外部に最近入った変数束縛ブロックのスタ、り上の
局所変数値群の先頭を直接指すレジスタを設は環境リス
ト上の1フレーム(l関数)内の変数参照の高速化を図
る関数微情報処理装置を提供することにある。
An object of the present invention is to provide a functional fine information processing device as described above, in order to shorten the access time of referring to variables stored in the stack memory by using a deep binding method to store a list representing the connection of data relationships in the main memory. Setting a register that directly points to the beginning of the local variable value group on the star of the variable binding block that recently entered outside the device is a function function function that speeds up variable references within one frame (l function) on the environment list. The purpose of the present invention is to provide an information processing device.

本発明の特徴とするところは、!ログラムの構造及び実
行形態が仮引数としての変数名と実引数としての変数値
の対として環境リストであるFirst(難−La−t
−Oat mlのスタックメモリへ格納することによっ
て、呼ぶべき関数の仮引数変数へ夾引数を束縛し、呼ば
れ九関数は変数の値を参照する場合、上記環境リストの
最近の束縛値を使って処理を行い、その関数の値が得ら
れれば、関数の仮引数変数を上記環境リストから削除し
て上記関数値をリターンするという一連の処理を繰返す
関数型情報処理装置において、最近入った変数束縛プロ
、りのスタ、り上の局所変数値群の先頭を直接指すレジ
スタを有することを特徴とする関数型情報処理装置it
俄1ろこヒて山ス。
The features of the present invention are! The structure and execution form of the program is First (Difficult-La-t) where the environment list is a pair of variable names as formal arguments and variable values as actual arguments.
- By storing in the stack memory of Oat ml, bind the variable to the formal argument variable of the function to be called, and when the called function refers to the value of the variable, use the most recent binding value in the environment list above. In a functional information processing device that repeats a series of processes in which a process is performed and the value of the function is obtained, the formal argument variable of the function is deleted from the environment list and the function value is returned, the recently entered variable binding A functional information processing device characterized in that it has a register that directly points to the head of a local variable value group on a program.
迄1 rokohiteyamasu.

以下図面を参照して本発明の一実施例を説明する。An embodiment of the present invention will be described below with reference to the drawings.

まず、スタ、り上のディーグバインド方式では次のよう
な処理が行なわれている。関数呼び出しが起こる手前で
実引数がそろうとスメ、りは第4図(i)のようになる
。ここで8TPはスメ、クト、グIインタである。関数
が呼び出されると呼び出され九関数側で第4図(b)の
ような形になる。第4図(b)に示すように、変数束縛
ブロックとは、実引数と仮引数との束縛対が格納されて
いる領域である。
First, the following processing is performed in the digbind method on the star. If the actual arguments are ready before the function is called, the process will look like Figure 4 (i). Here, 8TP is sume, kuto, and gui interface. When a function is called, it will be called and the form as shown in Figure 4(b) will be created on the nine function side. As shown in FIG. 4(b), the variable binding block is an area in which a binding pair of an actual argument and a formal argument is stored.

以上のような処理によりて第4図(e)のようにスタッ
ク中の関数毎の情報間は、旧FPによってリンクされる
。ここでFPはフレームポインタすなわち現在実行して
いる関数の制御情報の先頭を指すものである。このリン
クによって変数の参照があっ九ときそれをたどって変数
名をサーチすることによってその値を得ることができる
Through the above processing, information for each function in the stack is linked by the old FP as shown in FIG. 4(e). Here, FP is a frame pointer, that is, it points to the beginning of the control information of the function currently being executed. When a variable is referenced through this link, its value can be obtained by following it and searching for the variable name.

たとえば F 1(2)−Z” +F2 (10)F2(d−に2
+m+F3(7) F3(d−=5+1+z という関係にある3つの関数において、 Fl (3)
の値を求める場合を説明する。関数F1@)をコールす
る時点で仮引数2は3に束縛されて、環境リスト上にそ
O束縛関係が格納される。しがしFl(2))の計算に
は関数P2(x)の値F2(10)が必要であるC)L
”、関数F2に)をコールする。このコール時において
、仮引数Xは10に束縛されて環境リスト上にその束縛
関係が格納される。しかし、また、F2(10)O計算
には関数F3保)の値F3(7)が必要であるので、関
数F3←)をコールする。このコール時において、仮引
数Xは7に束縛されて環境リスト上にその束縛関係が格
納される しかし、F3(x)の値F3(7)を求める
のにF3(x)=−+1+zの2は大域変数、すガわち
、その時点で束縛されない変数であるが、2はFl■)
をプールする時点でZ−3に束縛されているので1m境
リすト上をさかのぼって2が3であることをサーチする
わけである。そしてはじめてF3(7)−75+1+3
が求まシ、F2(x)にリターンしてF2(10)−1
02+10+F3(7)が求を夛、y112)に9!−
ンして、Fl(3)■32+F2(10)とな)、Fl
(3)という値が求まるのである。
For example, F 1 (2) - Z" + F2 (10) F2 (2 on d-
+m+F3(7) F3(d-=5+1+z For the three functions in the relationship, Fl (3)
The case of finding the value of will be explained. When calling the function F1@), the formal argument 2 is bound to 3, and the binding relationship is stored on the environment list. The value F2(10) of the function P2(x) is required to calculate Fl(2))C)L
”, function F2) is called. At the time of this call, the formal argument Since the value F3 (7) of F3 is required, the function F3←) is called.At the time of this call, the formal argument X is bound to 7 and the binding relationship is stored on the environment list. To find the value F3(7) of (x), 2 of F3(x)=-+1+z is a global variable, that is, a variable that is not bound at that point, but 2 is Fl■)
Since it is bound to Z-3 at the time of pooling, we search back over the 1m boundary list to find that 2 is 3. And for the first time F3(7)-75+1+3
is found, return to F2(x) and get F2(10)-1
02+10+F3(7) is requested, y112) is 9! −
Then, Fl (3) ■ 32 + F2 (10)), Fl
The value (3) is found.

第5図の環境リストにおいて、関@yiはF2を、F2
はF3を、F3はF4を、F4はF5を、そしてF5は
F6をコールするようになっているとする。このとき関
数F6を F6韓厘 (ローカルa; amX+Z: リターンN2+a ローカルa;はこの関数内のみで使用される入所変数1
の宣言 IJ J−ンN’+a:はこの関数が返す値であると仮
定する。すなわち、NFi局所変数で、耳と2は大域変
数である。大域変数であるXは関数F2 (!5y)t
コールする時点でx−5であるように束縛されており、
2は関数F3@)をコールする時点でZ−Sであるよう
に束縛されている。
In the environment list in Figure 5, Seki@yi sets F2 to F2.
Assume that F3 calls F3, F3 calls F4, F4 calls F5, and F5 calls F6. In this case, function F6 is changed to F6(local a; amX+Z: return N2+a local a; is entry variable 1 used only within this function.
Assume that the declaration IJJ-N'+a: is the value returned by this function. That is, NFi is a local variable, and ear and 2 are global variables. The global variable X is a function F2 (!5y)t
It is bound to be x-5 at the time of the call,
2 is bound to be Z−S at the time of calling the function F3@).

F6Hの値を計算するために、aとNと°Xそして2の
各変数を参照するため、環境リスト上をサーチする必要
がある。
To calculate the value of F6H, it is necessary to search on the environment list to refer to the variables a, N, °X, and 2.

本発明に従ってlllグリスト上1フレーム内(1関数
)内)の局所変数参照を行うためグログラムをコンパク
ルして奥行する方式をとっ九ときには、変数の参照があ
っ九とき、その変数の定義が参照と同じ関数であれば、
サーチは必要でなくせる。つtb、コンパクル時には局
所変数を見たとき局所変数名と何番目の局所変数である
か(変数番号)を記憶しておき、変数の参照をみたとき
、そのオブジェクトコードとして最近の変数束縛プ口、
りを指すエンパイロメントーインクEnvlrom@n
t Po1nt*r(EP )からのインデ、クシング
で変数の値を得るようなコードが出せる。つまシ、オ!
ジェクトコードとして、(gp−x)、が変数個数格納
ワードのアドレスで(IP−1)の中味が変数個数であ
るから、 IP−1−IJP−1の中味〕$2+変数番号を実行す
る。すなわち実引数群(局所変数群)の先頭アドレス+
変数番号のコードを出せば、逐次的サーチの必要はない
、しかし、局所変数の参照は、頻繁に行なわれるので、
前記コードを実行するのに演算回路を介して行う丸めか
なシの時間がかかシ、これだけでは不満足である。
According to the present invention, in order to perform local variable references within one frame (within one function) on the glist, a method is used to compact and deepen the globogram.When there is a reference to a variable, the definition of that variable is If it is the same function,
Search is no longer necessary. When using compactor, when looking at a local variable, the local variable name and the local variable number (variable number) are memorized, and when looking at a variable reference, the recent variable binding program is stored as the object code. ,
Empyromentor Ink Envlrom@n
You can create a code that obtains the value of a variable by indexing and cushing from tPo1nt*r(EP). Tsumashi, oh!
As the object code, (gp-x) is the address of the word storing the number of variables, and the contents of (IP-1) are the number of variables, so execute the following: Contents of IP-1-IJP-1]$2+variable number. In other words, the start address of the actual argument group (local variable group) +
If you issue the code for the variable number, there is no need to perform a sequential search, but local variables are referenced frequently, so
In order to execute the code, it takes time to perform rounding via an arithmetic circuit, and this alone is unsatisfactory.

そこで、本発明は、第6図にボすように1局所変数値群
の先頭を指す。特別のポインタすなわち!ログメインl
PP用のレジスタをハード的に設ける。e こでPP−
EP−1−(IcP−1の中味〕ネ2として、新しくブ
ロックに入っ九とき、PPに局所変数値群の先at指さ
せておけば、変数の参照があったときは pp十変数番号 によって、前記PP用レジスタの内容でスタ、りをラン
ダムにアクセスすれば変数は高速に参照することができ
る。
Therefore, the present invention points to the beginning of one local variable value group as shown in FIG. Special pointers ie! log main l
A register for PP is provided in hardware. e here PP-
EP-1- (Contents of IcP-1) 2. When entering a new block, if you let PP point to the first local variable value group, when a variable is referenced, it will , variables can be referenced at high speed by randomly accessing the star register based on the contents of the PP register.

このように、本発明は最近入っ九変数束縛!ロックのス
タ、り上の局所変数群を直接さすレジスタを備える関数
量情報処理装置を提供するもので。
In this way, the present invention recently introduced nine variable constraints! The present invention provides a functional quantity information processing device that includes a register that directly points to a group of local variables on the register of a lock.

このレジスタを設けることによりて1フレーム内の局所
変数参照か゛9高遠に行うことができるという効果を奏
するものである。
By providing this register, it is possible to refer to local variables within one frame at a greater distance.

【図面の簡単な説明】[Brief explanation of drawings]

第1図(a) e (b) 、 (e)は2進木リスト
を説明する図、第2図は関数型情報処理を説明する図、
第3図(1)。 (b)はディープバインド法を説明する図、第4図(a
)。 (b) 、 (c)はスタ、り上のディーツノ量インド
法を説明する図、第5図はディープバインド法を具体的
に説明する図、第6図は本発明の一実施例をスタ。 り上に示めす図である。 STP・・・スタ、クト、デIイン!、FP・・・フレ
ームポインタ、AP・・・アーイ、メントポインタ實5
図 實6図
Figure 1 (a) e (b), (e) is a diagram explaining a binary tree list, Figure 2 is a diagram explaining functional information processing,
Figure 3 (1). (b) is a diagram explaining the deep binding method, Figure 4 (a)
). (b) and (c) are diagrams illustrating the bind method on the starboard, FIG. 5 is a diagram specifically explaining the deep bind method, and FIG. 6 is a diagram illustrating an embodiment of the present invention. FIG. STP...sta, cut, dein! , FP...Frame pointer, AP...Ai, Ment pointer Fact 5
Figure 6

Claims (1)

【特許請求の範囲】[Claims] 1、プロダラムの構造及び実行形態が仮引数としての変
数名と実引数としての変数値の対として環゛境すストで
あるFirst −In −La5t −Oat ml
のスタックメモリへ格納することによって呼ぶべき関数
の仮引数変数へ実引数を束縛し、呼ばれ丸関数は変数の
値を参照する場合、前記環境リスFの最近の束縛値を使
って処理を行い、その関数の値が得られれば関数の仮引
数変数會前記濃境リストから削除して前記関数値をリタ
ーンするという一連の処理を繰返す関数型情報J6!装
置において、最近入った変数車縛ブロックのスタ、り上
の局所変数値群の先頭を直接指すレジスタを有すること
を特徴とする関数部情報処理装置。
1. First -In -La5t -Oat ml where the structure and execution form of the program program is the environment as a pair of variable names as formal arguments and variable values as actual arguments.
Bind the actual argument to the formal argument variable of the function to be called by storing it in the stack memory of , function type information J6!, which repeats a series of processes in which, when the value of the function is obtained, the formal argument variables of the function are deleted from the above-mentioned boundary list and the above-mentioned function value is returned. 1. A function section information processing device, characterized in that the device has a register that directly points to the head of a group of local variable values on the star of a recently entered variable-bound block.
JP56104015A 1981-07-03 1981-07-03 Function type information processing unit Pending JPS585851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56104015A JPS585851A (en) 1981-07-03 1981-07-03 Function type information processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56104015A JPS585851A (en) 1981-07-03 1981-07-03 Function type information processing unit

Publications (1)

Publication Number Publication Date
JPS585851A true JPS585851A (en) 1983-01-13

Family

ID=14369431

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56104015A Pending JPS585851A (en) 1981-07-03 1981-07-03 Function type information processing unit

Country Status (1)

Country Link
JP (1) JPS585851A (en)

Similar Documents

Publication Publication Date Title
WO2024045382A1 (en) Implementation of reflective mechanism in blockchain
Spitzen et al. The verification and synthesis of data structures
US5721924A (en) Method and device for obtaining a value of a referred to variable defined in a source program having a specific variable name
CN113434533A (en) Data tracing tool construction method, data processing method, device and equipment
CN110990001A (en) IVR (Interactive Voice response) process execution method and device
Lawson Programming-language-oriented instruction streams
CN107766036A (en) A kind of construction method of module, construction device and terminal device
Reddy Functional logic languages part I
US6198813B1 (en) System and method for providing call processing services using call independent building blocks
EP0240108A2 (en) A data processing system
JPS585851A (en) Function type information processing unit
JP2000353097A (en) Method and device for generating low density interference graph
Deshpande et al. C & Data Structures
Weiskamp Advanced turbo C programming
CN111381827A (en) Method and device for generating syntax tree of code file and electronic equipment
Blelloch et al. A parallel complexity model for functional languages
Smith Class-based NewtonScript programming
University of Michigan Computing Center Computing Center Memo
Feldman Edward W. Czeck
Mailund et al. Sequences
KR100323372B1 (en) Type Reconstruction Method Of Run Time Stack For EM Code
Hodges et al. Dependency Management
JPH0126092B2 (en)
JPH07129408A (en) Executing system for language processing program
Savitch RE Stearns, J. Hartmanis, and PM LewisII. Hierarchies of memory limited computations. Sixth Annual Symposium on Switching Circuit Theory and Logical Design, University of Michigan, Ann Arbor, Mich., The Institute of Electrical and Electronics Engineers, Inc., New York 1965, pp. 179–190.