1 / 9

構成的アルゴリズムに対する Java プログラムの生成

構成的アルゴリズムに対する Java プログラムの生成. 数理 7 研 00669 村上 拓真. 構成的アルゴリズム 関数型プログラム. オブジェクト指向 手続き型プログラム. 研究の目的と背景. 変換システムの作成. プログラム変換. 実行速度. 関数プログラム 整数 論理値 リスト. Java コード Integer クラス Boolean クラス List クラス. データの変換. 関数プログラム (+ 5 2). Java コード Func_Plus.apply(5,2);. 関数の変換. 一般の関数. 基本関数.

makala
Télécharger la présentation

構成的アルゴリズムに対する Java プログラムの生成

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 構成的アルゴリズムに対するJavaプログラムの生成構成的アルゴリズムに対するJavaプログラムの生成 数理7研 00669 村上 拓真

  2. 構成的アルゴリズム 関数型プログラム オブジェクト指向 手続き型プログラム 研究の目的と背景 変換システムの作成 • プログラム変換 • 実行速度

  3. 関数プログラム 整数 論理値 リスト Javaコード Integerクラス Booleanクラス Listクラス データの変換

  4. 関数プログラム (+ 5 2) Javaコード Func_Plus.apply(5,2); 関数の変換 一般の関数 基本関数 • リストクラスのメソッド

  5. 関数プログラム (fold + list) Javaコード list.fold(Func_Plus); 基本関数の変換 fold・・・リストをたたみ込む (fold + [a,b,c,d]) = a+b+c+d for(i=0;i<n-1;i++){ x=list[i]+list[i+1]; }

  6. esum関数(1) (defun esum (list) (if (null list) 0 (let ((x (head list)) (xs (tail list))) (if (even x) (+ x (esum xs)) (esum xs)))))

  7. esum関数(2) (defun esum (list) (fold + (filter even list))) • リストから偶数の要素を選び(filter even) • 値を合計する(foldr +)

  8. esum関数の実行時間

  9. 本研究の成果 • 自動的な変換を実現 • Java版インタープリタ • 基本関数の最適化

More Related