• 検索結果がありません。

不定元を含むストリーム計算の実現

N/A
N/A
Protected

Academic year: 2021

シェア "不定元を含むストリーム計算の実現"

Copied!
1
0
0

読み込み中.... (全文を見る)

全文

(1)Vol. 45. No. SIG 12(PRO 23). Nov. 2004. 情報処理学会論文誌:プログラミング. 発表概要. 不定元を含むストリーム計算の実現 杉. 原. 佳. 次†. 立. 木. 秀. 樹†. 計算機で実数計算を行うとき,グレイコードによる実数表現を用いれば,実数を一意に表すことが でき,実数上の標準的な計算可能概念を導出できる.グレイコードとは,一般の 2 進表現とは異なる {0,1} の無限列としての実数表現であり,その列の中に無限列をたかだか 1 つ含むものである.この グレイコードによる実数表現を扱う計算を不定元を含むストリーム演算として関数型言語で実装する ことを考える.グレイコードに含まれる不定元はふつうの文字と同じように評価するとその評価を終 了できないため,その部分の評価を行わずに計算を進めていく必要がある.これは,決定不能な部分 の評価を非決定的に避ける McCarthy の amb という演算子を用いれば実現できる.しかし,この演 算子を実現するには並列処理の機構が必要である.ところが,グレイコードを用いた実数計算を行う 関数に含まれる amb 演算子には,その 2 つの引数を表すグラフが必ず部分グラフを共有していると いう特徴がある.そして,この特徴を用いれば並列処理を行うことなく,実数計算に必要な部分に関 して amb と同じ動作をする演算子 gamb を関数型言語に追加することができる.さらに,この演算 子の評価は,グラフの書き換え規則の適用と共有されている部分の評価を繰り返し行うだけでよい. 本発表では,不定元を含むストリーム演算を実現する際に,gamb 演算子をどのように関数型言語に 追加するかについて述べ,この演算子が正しく動作することについての説明を行う.. Implementing Bottomed Streams in Functional Languages Keiji Sugihara† and Hideki Tsuiki† In this presentation, we propose a way of implementing Gray-code based real-number computation with bottomed sequences by extending functional languages. A bottom cell is a cell whose computation does not terminate, so we have to evaluate this cell in a different way from the other cells. This computation can be implemented with McCarthy’s amb operator, which is a bottom-avoiding nondeterministic choice operator. In order to implement this operator, we need concurrency. However, when implementing Gray-code based real-number computation, the arguments of this operator always share the subgraph. And by using this characteristic, we can implement a partial sequential realization of the amb operator in a functional language. This partial amb operator is evaluated only by applying the graph-rewriting rules and evaluating the shared redex. Therefore we do not need concurrency to implement this operator. In this presentation, we explain why this operator is enough for Gray-code based real-number computation, and show how it is implemented as an extension of Gofer, which is a graph-reduction based functional language implemented based on the G-machine. We also give higher order programming examples to show how it really works.. (平成 16 年 3 月 19 日発表). † 京都大学大学院人間・環境学研究科 Graduate School of Human and Environmental Studies, Kyoto University. 99.

(2)

参照

関連したドキュメント

An example of a database state in the lextensive category of finite sets, for the EA sketch of our school data specification is provided by any database which models the

We study the real roots of the Yablonskii–Vorob’ev polynomials, which are spe- cial polynomials used to represent rational solutions of the second Painlev´ e equation.. It has

In this paper, we establish the following result: Let M be an n-dimensional complete totally real minimal submanifold immersed in CP n with Ricci curvature bound- ed from

Comparing the Gauss-Jordan-based algorithm and the algorithm presented in [5], which is based on the LU factorization of the Laplacian matrix, we note that despite the fact that

In the study of dynamic equations on time scales we deal with certain dynamic inequalities which provide explicit bounds on the unknown functions and their derivatives.. Most of

The aim of this work is to prove the uniform boundedness and the existence of global solutions for Gierer-Meinhardt model of three substance described by reaction-diffusion

In this paper, based on a new general ans¨atz and B¨acklund transformation of the fractional Riccati equation with known solutions, we propose a new method called extended

Here we do not consider the case where the discontinuity curve is the conic (DL), because first in [11, 13] it was proved that discontinuous piecewise linear differential