untitled

Size: px
Start display at page:

Download "untitled"

Transcription

1 PPL 2006

2

3

4

5

6

7

8

9

10

11

12 MinCaml (myth)

13

14 vs. vs. vs.

15 Haskell ( ML ( caml.inria.fr) Standard ML (SML), Objective Caml (OCaml) Scheme (

16 low level GCC C GCJ Java javac Java JVM ocamlc OCaml OCaml VM ocamlopt OCaml MLj SML JVM etc.

17 (MinCaml) let rec gcd m n = if m = 0 then n else if m <= n then gcd m (n - m) else gcd n (m - n)

18 (MinCaml SPARC) let rec gcd m n = if m = 0 then n else if m <= n then gcd m (n - m) else gcd n (m - n) gcd.7: cmp %i2, 0 bne be_else.17 nop mov %i3, %i2 retl nop be_else.17: cmp %i2, %i3 bg ble_else.18 nop sub %i3, %i2, %i3 b gcd.7 nop ble_else.18: sub %i2, %i3, %i2 mov %i3, %o4 mov %i2, %i3 mov %o4, %i2 b gcd.7 nop

19 (* MinCaml main.ml *) Emit.f outchan (RegAlloc.f (Simm13.f (Virtual.f (Closure.f (iter!limit (Alpha.f (KNormal.f (Typing.f (Parser.exp Lexer.token l))))))))) > wc --lines *.ml* 46 alpha.ml 2 alpha.mli 18 assoc.ml 1 assoc.mli 38 beta.ml 1 beta.mli 106 closure.ml 33 closure.mli 50 constfold.ml 2020 total

20 MinCaml OCaml minimal ML

21 MinCaml (1/2) M, N ::= c op(m 1,...,M n ) if M then N 1 else N 2 let x = M in N x let rec xy 1... y n = M in N MN 1... N n...

22 MinCaml (2/2) M, N ::=... (M 1,...,M n ) let (x 1,...,x n ) = M in N Array.create MN M.(N) M 1.(M 2 ) M 3

23

24 OCamlLex/OCamlYacc Cf. packrat parsing ( tricky x-y x(-y)parse simple_exp exp

25 OCaml peculiar int

26

27 : MinCaml SPARC

28 K ML Kit ( MinCaml SPARC : (x-y)-(y-z) let tmp1 = x - y in let tmp2 = y - z in tmp1 - tmp2 4, 5

29 12345-x let tmp1 = in let tmp2 = x in tmp1 - tmp2 let tmp1 = in tmp1 - x let insert_let e k = match e with Var(x) -> k x _ -> let x = gensym () in Let(x, e, k x)

30

31 α "fresh" : let x = in let x = x in -x let x 1 = in let x 2 = x in -x 2 6

32 let rec f x y z = M in... (f a b c)... let rec f x y z = M in... ([a,b,c/x,y,z]m')... Mf... heuristics

33 let x = 7 in let y = 3 in x y let x = 7 in let y = 3 in 4

34 let let rec let x = M in N N x N M

35

36 Closure KSPARC

37 1: (OCaml) let quad x = let dbl y = y + y in dbl (dbl x) in quad 3 let dbl y = y + y ;; let quad x = dbl (dbl x) ;; quad 3

38 2: let make_adder x = let adder y = x + y in adder in (make_adder 3) 7??? let adder y = x + y ;; let make_adder x = adder ;; (make_adder 3) 7 x???

39 ? : adder x () a. C, C++ b.! GCC c. Scheme, ML, Java (inner class)

40 Closure (closure) : closure let make_adder x = (adder, x) ;; : let (body, fv) = make_adder 3 in body 7 fv : let adder y x = x + y ;;

41 2 let make_adder x = let adder y = x + y in adder in (make_adder 3) 7 let adder y x = x + y ;; let make_adder x = (adder, x) ;; apply_closure(make_adder 3, 7) apply_closure((body, fv), arg) body arg fv

42 Closure 13,14 let rec 1. =closure Closure 4. Closure ( )

43 Closure make_closure apply_closure : let f x = x + 3 in f 7 let L f x () = x + 3 ;; make_closure f = (L f, ()) in apply_closure f 7

44 1. closure 2. 1.closure closure let x = 1 in let f y = x + y in (* *) let g z = z + 2 in (* *) (if... then f else g) 3 (* *) fg closure

45

46 17,18

47 greedy mov MinCaml

48 pretty print (register shuffling) call

49

50 : Sun Fire V880 Ultra SPARC III 1.2GHz 8 GB Solaris 9 : MinCaml (32 bit, -iter inline 100) OCamlOpt (32 bit, -unsafe -inline 100) GCC (32 bit & 64 bit, -O3) GCC (32 bit "flat", -O3)

51 min-caml ocamlopt gcc -m32 gcc -m64 gcc -m32 -mflat 1 0 ack fib tak

52 min-caml ocamlopt gcc -m32 gcc -m64 gcc -m32 -mflat raytrace harmonic mandelbrot huffman

53

e ::= c op(e 1,..., e n ) if e 1 then e 2 else e 3 let x = e 1 in e 2 x let rec x y 1... y n = e 1 in e 2 e e 1... e n (e 1,..., e n ) let (x 1,..., x

e ::= c op(e 1,..., e n ) if e 1 then e 2 else e 3 let x = e 1 in e 2 x let rec x y 1... y n = e 1 in e 2 e e 1... e n (e 1,..., e n ) let (x 1,..., x e ::= c op(e 1,..., e n ) if e 1 then e 2 else e 3 let x = e 1 in e 2 x let rec x y 1... y n = e 1 in e 2 e e 1... e n (e 1,..., e n ) let (x 1,..., x n ) = e 1 in e 2 Array.create e 1 e 2 e 1.(e 2 ) e

More information

ML λ λ 1 λ 1.1 λ λ λ e (λ ) ::= x ( ) λx.e (λ ) e 1 e 2 ( ) ML λx.e Objective Caml fun x -> e x e let 1

ML λ λ 1 λ 1.1 λ λ λ e (λ ) ::= x ( ) λx.e (λ ) e 1 e 2 ( ) ML λx.e Objective Caml fun x -> e x e let 1 2005 sumii@ecei.tohoku.ac.jp 2005 6 24 ML λ λ 1 λ 1.1 λ λ λ e (λ ) ::= x ( ) λx.e (λ ) e 1 e 2 ( ) ML λx.e Objective Caml fun x -> e x e let 1 let λ 1 let x = e1 in e2 (λx.e 2 )e 1 e 1 x e 2 λ 3 λx.(λy.e)

More information

Int Int 29 print Int fmt tostring 2 2 [19] ML ML [19] ML Emacs Standard ML M M ::= x c λx.m M M let x = M in M end (M) x c λx.

Int Int 29 print Int fmt tostring 2 2 [19] ML ML [19] ML Emacs Standard ML M M ::= x c λx.m M M let x = M in M end (M) x c λx. 1, 2 1 m110057@shibaura-it.ac.jp 2 sasano@sic.shibaura-it.ac.jp Eclipse Visual Studio ML Standard ML Emacs 1 ( IDE ) IDE C C++ Java IDE IDE IDE IDE Eclipse Java IDE Java Standard ML 1 print (Int. 1 Int

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double

More information

Parametric Polymorphism

Parametric Polymorphism ML 2 2011/04/19 Parametric Polymorphism Type Polymorphism ? : val hd_int : int list - > int val hd_bool : bool list - > bool val hd_i_x_b : (int * bool) list - > int * bool etc. let hd_int = function (x

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double

More information

ML Edinburgh LCF ML Curry-Howard ML ( ) ( ) ( ) ( ) 1

ML Edinburgh LCF ML Curry-Howard ML ( ) ( ) ( ) ( ) 1 More Logic More Types ML/OCaml GADT Jacques Garrigue ( ) Jacques Le Normand (Google) Didier Rémy (INRIA) @garriguejej ocamlgadt ML Edinburgh LCF ML Curry-Howard ML ( ) ( ) ( ) ( ) 1 ( ) ML type nebou and

More information

51 Debian

51 Debian 51 Debian 2009 4 18 51 Debian 2009 4 1 Introduction Debian Debian Debian Debian Debian Developer () face-toface Debian Debian Debian Debian Package Debian 2009 1. () 2. OSC Tokyo 3. VAIO P ( )(?) 4. Git

More information

jssst-ocaml.mgp

jssst-ocaml.mgp Objective Caml Jacques Garrigue Kyoto University garrigue@kurims.kyoto-u.ac.jp Objective Caml? 2 Objective Caml GC() Standard MLHaskell 3 OCaml () OCaml 5 let let x = 1 + 2 ;; val x : int = 3 ;; val-:

More information

fmaster.dvi

fmaster.dvi 9 888 Java Just-in-Time OpenJIT 11 1 1 1 1.1 : : : : : : : : : : : : : : : : : : : : 1 1.2 : : : : : : : : : : : : : : : : : : : : : : : : 2 1.3 : : : : : : : : : : : : : : : : : : : : : : : : 6 1.4 :

More information

コンパイラ演習 第 7 回

コンパイラ演習 第 7 回 コンパイラ演習 第 7 回 (2010/11/18) 秋山茂樹池尻拓朗前田俊行鈴木友博渡邊裕貴潮田資秀小酒井隆広山下諒蔵佐藤春旗大山恵弘佐藤秀明住井英二郎 今日の内容 Type Polymorphism ( 型多相性 ) の実現について Polymorphism 大きく分けて 3 種類ある Parametric polymorphism Subtyping polymorphism Ad-hoc polymorphism

More information

untitled

untitled 1 (1) (2) (3) (4) (1) (2) (3) (1) (2) (3) (1) (2) (3) (4) (5) (1) (2) (3) (1) (2) 10 11 12 2 2520159 3 (1) (2) (3) (4) (5) (6) 103 59529 600 12 42 4 42 68 53 53 C 30 30 5 56 6 (3) (1) 7 () () (()) () ()

More information

MIFES Ver.7.0 ユーザーズマニュアル

MIFES Ver.7.0 ユーザーズマニュアル iii q w e iv v vi vii viii 2 3 4 5 6 7 8 9 10 a a a 11 a a a a a a 12 a a a a a 13 a a a a a a a 14 a 15 a a a a a 16 a a a a a 17 18 19 q 22 23 r t w e y u i 24 25!0 o q 26 w 27 e r 28 t 29 y u 30

More information

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu II 4 : 2001 11 7 keywords: 1 OCaml OCaml (first-class value) (higher-order function) 1.1 1 2 + 2 2 + + n 2 sqsum 1 3 + 2 3 + + n 3 cbsum # let rec sqsum n = # if n = 0 then 0 else n * n + sqsum (n - 1)

More information

Objective Caml 3.12 Jacques Garrigue ( ) with Alain Frisch (Lexifi), OCaml developper team (INRIA)

Objective Caml 3.12 Jacques Garrigue ( )   with Alain Frisch (Lexifi), OCaml developper team (INRIA) Objective Caml 3.12 Jacques Garrigue ( ) http://www.math.nagoya-u.ac.jp/~garrigue/ with Alain Frisch (Lexifi), OCaml developper team (INRIA) Jacques Garrigue Modules in Objective Caml 3.12 1 Objective

More information

(CC Attribution) Lisp 2.1 (Gauche )

(CC Attribution) Lisp 2.1 (Gauche ) http://www.flickr.com/photos/dust/3603580129/ (CC Attribution) Lisp 2.1 (Gauche ) 2 2000EY-Office 3 4 Lisp 5 New York The lisps Sammy Tunis flickr lisp http://www.flickr.com/photos/dust/3603580129/ (CC

More information

koba/class/soft-kiso/ 1 λ if λx.λy.y false 0 λ typed λ-calculus λ λ 1.1 λ λ, syntax τ (types) ::= b τ 1 τ 2 τ 1

koba/class/soft-kiso/ 1 λ if λx.λy.y false 0 λ typed λ-calculus λ λ 1.1 λ λ, syntax τ (types) ::= b τ 1 τ 2 τ 1 http://www.kb.ecei.tohoku.ac.jp/ koba/class/soft-kiso/ 1 λ if λx.λy.y false 0 λ typed λ-calculus λ λ 1.1 λ 1.1.1 λ, syntax τ (types) ::= b τ 1 τ 2 τ 1 τ 2 M (terms) ::= c τ x M 1 M 2 λx : τ.m (M 1,M 2

More information

23_33.indd

23_33.indd 23 2TB 1TB 6TB 3TB 2TB 3TB 3TB 2TB 2TB 1TB 1TB 500GB 4TB 1TB 1TB 500GB 2TB 2TB 1TB 1TB RT RT RT RT RT RT RT MAC 10. 10. 10.6 10.5 MAC 10. 10. 10.6 10.5 MAC 10. 10.6 10.5 MAC 10. 10. 10.6 10.5 MAC 10. 10.6

More information

untitled

untitled 20 7 1 22 7 1 1 2 3 7 8 9 10 11 13 14 15 17 18 19 21 22 - 1 - - 2 - - 3 - - 4 - 50 200 50 200-5 - 50 200 50 200 50 200 - 6 - - 7 - () - 8 - (XY) - 9 - 112-10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 -

More information

untitled

untitled 19 1 19 19 3 8 1 19 1 61 2 479 1965 64 1237 148 1272 58 183 X 1 X 2 12 2 15 A B 5 18 B 29 X 1 12 10 31 A 1 58 Y B 14 1 25 3 31 1 5 5 15 Y B 1 232 Y B 1 4235 14 11 8 5350 2409 X 1 15 10 10 B Y Y 2 X 1 X

More information

JA2008

JA2008 A1 1 10 vs 3 2 1 3 2 0 3 2 10 2 0 0 2 1 0 3 A2 3 11 vs 0 4 4 0 0 0 0 0 3 6 0 1 4 x 11 A3 5 4 vs 5 6 5 1 0 0 3 0 4 6 0 0 1 0 4 5 A4 7 11 vs 2 8 8 2 0 0 0 0 2 7 2 7 0 2 x 11 A5 9 5 vs 3 10 9 4 0 1 0 0 5

More information

untitled

untitled -- -- -3- % % % 6% % % 9 66 95 96 35 9 6 6 9 9 5 77 6 6 5 3 9 5 9 9 55 6 5 9 5 59 () 3 5 6 7 5 7 5 5 6 6 7 77 69 39 3 6 3 7 % % % 6% % % (: ) 6 65 79 7 3 36 33 9 9 5 6 7 3 5 3 -- 3 5 6 76 7 77 3 9 6 5

More information

untitled

untitled NO. 2007 10 10 34 10 10 0570-058-669 http://www.i-nouryoku.com/index.html (40 ) () 1 NO. 2007 10 10 2.2 2.2 130 70 20 80 30 () () 9 10 () 78 8 9 () 2 NO. 2007 10 10 4 7 3 NO. 2007 10 10 40 20 50 2 4 NO.

More information

Terminal ocaml $ ocaml Objective Caml version # 1+2;;<ret> # 1+2;; - : int = 3 ;; OCaml <ret> - : int = 3 OC

Terminal ocaml $ ocaml Objective Caml version # 1+2;;<ret> # 1+2;; - : int = 3 ;; OCaml <ret> - : int = 3 OC Jacques Garrigue, 2013 8 8-9 OCaml 1 OCaml OCaml ML ML Haskell ML Haskell ML 70 Edinburgh LCF Robin Milner 1 Caml ML OCaml OCaml OCaml-Nagoya OCaml 2007 in OCaml 2007 (Computer Science Library 3) 2007

More information

shift/reset [13] 2 shift / reset shift reset k call/cc reset shift k shift (...) k 1 + shift(fun k -> 2 * (k 3)) k 2 * (1 + 3) 8 reset shift reset (..

shift/reset [13] 2 shift / reset shift reset k call/cc reset shift k shift (...) k 1 + shift(fun k -> 2 * (k 3)) k 2 * (1 + 3) 8 reset shift reset (.. arisa@pllab.is.ocha.ac.jp asai@is.ocha.ac.jp shift / reset CPS shift / reset CPS CPS 1 [3, 5] goto try/catch raise call/cc [17] control/prompt [8], shift/reset [5] control/prompt, shift/reset call/cc (continuationpassing

More information

a n a n ( ) (1) a m a n = a m+n (2) (a m ) n = a mn (3) (ab) n = a n b n (4) a m a n = a m n ( m > n ) m n 4 ( ) 552

a n a n ( ) (1) a m a n = a m+n (2) (a m ) n = a mn (3) (ab) n = a n b n (4) a m a n = a m n ( m > n ) m n 4 ( ) 552 3 3.0 a n a n ( ) () a m a n = a m+n () (a m ) n = a mn (3) (ab) n = a n b n (4) a m a n = a m n ( m > n ) m n 4 ( ) 55 3. (n ) a n n a n a n 3 4 = 8 8 3 ( 3) 4 = 8 3 8 ( ) ( ) 3 = 8 8 ( ) 3 n n 4 n n

More information

(1)2004年度 日本地理

(1)2004年度 日本地理 1 2 3 4 1 2 3 4 5 6 7 8 9 10 11 12-5.0-5.1-1.4 4.2 8.6 12.4 16.9 19.5 16.6 10.8 3.3-2.0 6.6 16.6 16.6 18.6 21.3 23.8 26.6 28.5 28.2 27.2 24.9 21.7 18.4 22.7 5 1 2 3 4 5 6 7 8 9 10 11 12 2.2 3.5 7.7 11.1

More information

Emacs ML let start ::= exp (1) exp ::= (2) fn id exp (3) ::= (4) (5) ::= id (6) const (7) (exp) (8) let val id = exp in

Emacs ML let start ::= exp (1) exp ::= (2) fn id exp (3) ::= (4) (5) ::= id (6) const (7) (exp) (8) let val id = exp in Emacs, {l06050,sasano}@sic.shibaura-it.ac.jp Eclipse Visual Studio Standard ML Haskell Emacs 1 Eclipse Visual Studio variable not found LR(1) let Emacs Emacs Emacs Java Emacs JDEE [3] JDEE Emacs Java 2

More information

プログラミング言語 8 字句解析器(lexer)と構文解析器(parser)

プログラミング言語 8   字句解析器(lexer)と構文解析器(parser) 8 (lexer) (parser) 1 / 73 (lexer, tokenizer) (parser) Web Page (HTML XML) CSV, SVG,...... config file... ( )! 2 / 73 1 1 OCaml : ocamllex ocamlyacc 2 Python : ply 2! 3 / 73 ( ) 字句解析器 構文解析器 ご注文はうさぎさんですか?

More information

Agenda Intro & history LLVM overview Demo Pros & Cons LLVM Intermediate Language LLVM tools

Agenda Intro & history LLVM overview Demo Pros & Cons LLVM Intermediate Language LLVM tools LLVM Intro Syoyo Fujita syoyo@lucillerender.org Agenda Intro & history LLVM overview Demo Pros & Cons LLVM Intermediate Language LLVM tools LLVM , Lightweight Language No! No! No! LLVM , Virtual Machine

More information

平成 19 年度 ( 第 29 回 ) 数学入門公開講座テキスト ( 京都大学数理解析研究所, 平成 19 ~8 年月 72 月日開催 30 日 ) 1 PCF (Programming language for Computable Functions) PCF adequacy adequacy

平成 19 年度 ( 第 29 回 ) 数学入門公開講座テキスト ( 京都大学数理解析研究所, 平成 19 ~8 年月 72 月日開催 30 日 ) 1 PCF (Programming language for Computable Functions) PCF adequacy adequacy 1 PCF (Programming language for Computable Functions) PCF adequacy adequacy 2 N X Y X Y f (x) f x f x y z (( f x) y) z = (( f (x))(y))(z) X Y x e X Y λx. e x x 2 + x + 1 λx. x 2 + x + 1 3 PCF 3.1 PCF PCF

More information

プログラミングD - Java

プログラミングD - Java プログラミング D 講義資料 中田明夫 nakata@ist.osaka-u.ac.jp ML 教科書 プログラミング言語 Standard ML 入門 :1,2 章 講義のねらい 関数型プログラムを知る 関数型プログラムを知る利点 プログラムを統一的, 抽象的に捕らえる リスト処理, 高階関数, 再帰関数定義 リストやツリーなどのデータ構造は再帰的に定義 再帰関数で扱うとプログラミングが容易 数学的な裏付け

More information

1. A0 A B A0 A : A1,...,A5 B : B1,...,B

1. A0 A B A0 A : A1,...,A5 B : B1,...,B 1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 3. 4. 5. A0 A B f : A B 4 (i) f (ii) f (iii) C 2 g, h: C A f g = f h g = h (iv) C 2 g, h: B C g f = h f g = h 4 (1) (i) (iii) (2) (iii) (i) (3) (ii) (iv) (4)

More information

つくって学ぶプログラミング言語 RubyによるScheme処理系の実装

つくって学ぶプログラミング言語 RubyによるScheme処理系の実装 Ruby Scheme 2013-04-16 ( )! SICP *1 ;-) SchemeR SICP MIT * 1 Structure and Interpretaion of Computer Programs 2nd ed.: 2 i SchemeR Ruby Ruby Ruby Ruby & 3.0 Ruby ii https://github.com/ichusrlocalbin/scheme_in_ruby

More information

2

2 OCaml Web HTML5 IT PPL 2012 Web 2012 8 21 ( ) 14:30-17:30 2 Web JavaScript HTML5 3 Web JavaScript CoffeeScript Dart Haxe S2JS (Scala) JSX Ocamljs, Js_of_ocaml (OCaml) 4 OCaml 5 6 js_of_ocaml 7 OCaml Web

More information

人芯経営論 ・・・リーダーシップ考②

人芯経営論 ・・・リーダーシップ考② 2009/12/15 2009/11/17 2009/11/16 2009/10/19 2009/10/15 2009/10/1 2009/9/17 2009/9/1 2009/8/17 2009/8/17 2009/8/14 2009/8/12 2009/7/28 2009/7/17 2009/7/15 2009/6/24 2009/6/18 2009/6/15 2009/5/20 2009/5/15

More information

untitled

untitled PC murakami@cc.kyushu-u.ac.jp muscle server blade server PC PC + EHPC/Eric (Embedded HPC with Eric) 1216 Compact PCI Compact PCIPC Compact PCISH-4 Compact PCISH-4 Eric Eric EHPC/Eric EHPC/Eric Gigabit

More information

Jacques Garrigue

Jacques Garrigue Jacques Garrigue Garrigue 1 Garrigue 2 $ print_lines () > for i in $1; do > echo $i > done $ print_lines "a b c" a b c Garrigue 3 Emacs Lisp (defun print-lines (lines) (dolist (str lines) (insert str)

More information

imai@eng.kagawa-u.ac.jp No1 No2 OS Wintel Intel x86 CPU No3 No4 8bit=2 8 =256(Byte) 16bit=2 16 =65,536(Byte)=64KB= 6 5 32bit=2 32 =4,294,967,296(Byte)=4GB= 43 64bit=2 64 =18,446,744,073,709,551,615(Byte)=16EB

More information

Copyright c 2008 Zhenjiang Hu, All Right Reserved.

Copyright c 2008 Zhenjiang Hu, All Right Reserved. 2008 10 27 Copyright c 2008 Zhenjiang Hu, All Right Reserved. (Bool) True False data Bool = False True Remark: not :: Bool Bool not False = True not True = False (Pattern matching) (Rewriting rules) not

More information

Microsoft PowerPoint - ml1.ppt

Microsoft PowerPoint - ml1.ppt プログラミング演習 B ML 編 第 1 回 2010/6/1( コミ ) 2010/6/2( 情報 知能 ) 住井 http://www.kb.ecei.tohoku.ac.jp/ ~sumii/class/proenb2010/ml1/ 今日のポイント 1. ML って何? 2. 式を 評価 すると値になる 3. 式や値には 型 がある レポートについて 電気 情報系内のマシンから http://130.34.188.208/

More information

(個別のテーマ) 放射線検査に関連した医療事故

(個別のテーマ) 放射線検査に関連した医療事故 - 131 - III - 132 - - 133 - III - 134 - - 135 - III - 136 - - 137 - III - 138 - - 139 - III - 140 - - 141 - III - 142 - - 143 - III - 144 - - 145 - III - 146 - - 147 - III - 148 - - 149 - III - 150 - -

More information

(個別のテーマ) 薬剤に関連した医療事故

(個別のテーマ) 薬剤に関連した医療事故 - 67 - III - 68 - - 69 - III - 70 - - 71 - III - 72 - - 73 - III - 74 - - 75 - III - 76 - - 77 - III - 78 - - 79 - III - 80 - - 81 - III - 82 - - 83 - III - 84 - - 85 - - 86 - III - 87 - III - 88 - - 89

More information

# let st1 = {name = "Taro Yamada"; id = };; val st1 : student = {name="taro Yamada"; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n

# let st1 = {name = Taro Yamada; id = };; val st1 : student = {name=taro Yamada; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n II 6 / : 2001 11 21 (OCaml ) 1 (field) name id type # type student = {name : string; id : int};; type student = { name : string; id : int; } student {} type = { 1 : 1 ;...; n : n } { 1 = 1 ;...; n = n

More information

org/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp

org/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp 3 Haskell Haskell Haskell 1. 2. 3. 4. 5. 1. 2. 3. 4. 5. 6. C Java 3.1 Haskell Haskell GHC (Glasgow Haskell Compiler 1 ) GHC Haskell GHC http://www.haskell. 1 Guarded Horn Clauses III - 1 org/ghc/ Windows

More information

-2-

-2- -1-2009 3 2 2 HP http://homepage3.nifty.com/office-wada/ -2- -3-1 01 X Y 100 Y Y 02 A B B C A -4- 2 03 X Y Y X XY Y X Y X Y Z XY Z Z X 261 24 14 49 41 77 1 48 6 21 27 6 712 11 1 53 9 14 906 88 X1 X2 X3

More information

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2:

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2: Java Jojo ( ) ( ) A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2: Java Jojo Jojo (1) :Globus GRAM ssh rsh GRAM ssh GRAM A rsh B Jojo (2) ( ) Jojo Java VM JavaRMI (Sun) Horb(ETL) ( ) JPVM,mpiJava etc. Send,

More information

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v 1 http://www7.bpe.es.osaka-u.ac.jp/~kota/classes/jse.html kota@fbs.osaka-u.ac.jp /* do-while */ #include #include int main(void) double val1, val2, arith_mean, geo_mean; printf( \n );

More information

メタコンピュータ構成方式の研究

メタコンピュータ構成方式の研究 : ( ) Internet, Computational Resources, , MPI, PVM - RPC, (ORB),, Java (JVM) Java?,, code verification & sand box Java JIT Java (JVM) : Java (, ) cf., disconnected operation - Java MobaThread.goTo( );

More information

: gettoken(1) module P = Printf exception End_of_system (* *) let _ISTREAM = ref stdin let ch = ref ( ) let read () = (let c =!ch in ch := inp

: gettoken(1) module P = Printf exception End_of_system (* *) let _ISTREAM = ref stdin let ch = ref ( ) let read () = (let c =!ch in ch := inp 7 OCaml () 1. 2. () (compiler) (interpreter) 2 OCaml (syntax) (BNF,backus normal form ) 1 + 2; let x be 2-1 in x; ::= ; let be in ; ::= + - ::= * / ::= 7.1 ( (printable characters) (tokens) 1 (lexical

More information

Copyright c 2006 Zhenjiang Hu, All Right Reserved.

Copyright c 2006 Zhenjiang Hu, All Right Reserved. 1 2006 Copyright c 2006 Zhenjiang Hu, All Right Reserved. 2 ( ) 3 (T 1, T 2 ) T 1 T 2 (17.3, 3) :: (Float, Int) (3, 6) :: (Int, Int) (True, (+)) :: (Bool, Int Int Int) 4 (, ) (, ) :: a b (a, b) (,) x y

More information

ML 演習 第 4 回

ML 演習 第 4 回 ML 演習第 4 回 おおいわ Mar 6, 2003 今回の内容 補足 Ocaml のモジュールシステム structure signature functor Ocaml コンパイラの利用 2 識別子について 利用可能文字 先頭文字 : A~Z, a~z, _ ( 小文字扱い ) 2 文字目以降 : A~Z, a~z, 0~9, _, 先頭の文字の case で 2 つに区別 小文字 : 変数,

More information

3 3.1 algebraic datatype data k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] B

3 3.1 algebraic datatype data k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] B 3 3.1 algebraic datatype data 1 2... k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] Bob String y Charlie Foo Double Integer Alice 3.14 [1,2],

More information

「計算と論理」 Software Foundations その4

「計算と論理」  Software Foundations   その4 Software Foundations 4 cal17@fos.kuis.kyoto-u.ac.jp http://www.fos.kuis.kyoto-u.ac.jp/~igarashi/class/cal/ November 7, 2017 ( ) ( 4) November 7, 2017 1 / 51 Poly.v ( ) ( 4) November 7, 2017 2 / 51 : (

More information

新・明解Java入門

新・明解Java入門 第 1 章 画面 文字 表示 Java Java Java Java Java JRE Java JDK 21 1-1 Java Java Java Java 誕生 Fig.1-1 Oak Java Sun Microsystems 2010 Oracle Java Oracle 4 Java http://www.java.com/ http://www.alice.org/ Fig.1-1Java

More information

ML 演習 第 4 回

ML 演習 第 4 回 ML 演習第 4 回 佐藤春旗, 山下諒蔵, 前田俊行 2006/06/20 ICFP Programming Contest 過去の O'Caml プログラムの実績 1998: 2 位 (ENS Camlist, France) 1999: 1 位 (Camls R Us, O'Caml 作者グループ ) 2000: 1 位 (PLClub, U-Penn, 米澤研住井, 細谷参加 ) 2 位 (Camls

More information

n 2 + π2 6 x [10 n x] x = lim n 10 n n 10 k x 1.1. a 1, a 2,, a n, (a n ) n=1 {a n } n=1 1.2 ( ). {a n } n=1 Q ε > 0 N N m, n N a m

n 2 + π2 6 x [10 n x] x = lim n 10 n n 10 k x 1.1. a 1, a 2,, a n, (a n ) n=1 {a n } n=1 1.2 ( ). {a n } n=1 Q ε > 0 N N m, n N a m 1 1 1 + 1 4 + + 1 n 2 + π2 6 x [10 n x] x = lim n 10 n n 10 k x 1.1. a 1, a 2,, a n, (a n ) n=1 {a n } n=1 1.2 ( ). {a n } n=1 Q ε > 0 N N m, n N a m a n < ε 1 1. ε = 10 1 N m, n N a m a n < ε = 10 1 N

More information

プログラミングD - Java

プログラミングD - Java プログラミング D ML 大阪大学基礎工学部情報科学科中田明夫 nakata@ist.osaka-u.ac.jp 教科書 プログラミング言語 Standard ML 入門 1,2 章 講義のねらい 関数型プログラムを知る 関数型プログラムの特徴 利点 : 数学的な裏づけ プログラムの正しさの証明が容易 リスト処理, 高階関数, 再帰関数定義 リストやツリーなどのデータ構造は再帰的に定義 再帰関数で扱うとプログラミングが容易

More information

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

: : : TSTank 2

: : : TSTank 2 Java (8) 2008-05-20 Lesson6 Lesson5 Java 1 Lesson 6: TSTank1, TSTank2, TSTank3 java 2 car1 car2 Car car1 = new Car(); Car car2 = new Car(); car1.setcolor(red); car2.setcolor(blue); car2.changeengine(jet);

More information

使用説明書

使用説明書 PUB. DIJ-126E 2 3 4 5 6 7 8 9 10 11 12 13 14 15 e q w q w e 16 PUSH r t y q w 0 : 0 0 : 01 e 0 : 0 1 : 00 q 17 ea 3 c ` 1 18 19 P AV P DV DC IN 9.5V m m m m m m 20 21 WIRELESS CONTROLLER WL-D78 rt r w

More information

untitled

untitled A = QΛQ T A n n Λ Q A = XΛX 1 A n n Λ X GPGPU A 3 T Q T AQ = T (Q: ) T u i = λ i u i T {λ i } {u i } QR MR 3 v i = Q u i A {v i } A n = 9000 Quad Core Xeon 2 LAPACK (4/3) n 3 O(n 2 ) O(n 3 ) A {v i }

More information

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.  このサンプルページの内容は, 新装版 1 刷発行時のものです. C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009383 このサンプルページの内容は, 新装版 1 刷発行時のものです. i 2 22 2 13 ( ) 2 (1) ANSI (2) 2 (3) Web http://www.morikita.co.jp/books/mid/009383

More information

Excel97関数編

Excel97関数編 Excel97 SUM Microsoft Excel 97... 1... 1... 1... 2... 3... 3... 4... 5... 6... 6... 7 SUM... 8... 11 Microsoft Excel 97 AVERAGE MIN MAX SUM IF 2 RANK TODAY ROUND COUNT INT VLOOKUP 1/15 Excel A B C A B

More information

2

2 Haskell ( ) kazu@iij.ad.jp 1 2 Blub Paul Graham http://practical-scheme.net/trans/beating-the-averages-j.html Blub Blub Blub Blub 3 Haskell Sebastian Sylvan http://www.haskell.org/haskellwiki/why_haskell_matters...

More information

明解Java入門編

明解Java入門編 1 Fig.1-1 4 Fig.1-1 1-1 1 Table 1-1 Ease of Development 1-1 Table 1-1 Java Development Kit 1 Java List 1-1 List 1-1 Chap01/Hello.java // class Hello { Java System.out.println("Java"); System.out.println("");

More information

haskell.gby

haskell.gby Haskell 1 2 3 Haskell ( ) 4 Haskell Lisper 5 Haskell = Haskell 6 Haskell Haskell... 7 qsort [8,2,5,1] [1,2,5,8] "Hello, " ++ "world!" "Hello, world!" 1 + 2 div 8 2 (+) 1 2 8 div 2 3 4 map even [1,2,3,4]

More information

2 2 ( M2) ( )

2 2 ( M2) ( ) 2 2 ( M2) ( ) 2007 3 3 1 2 P. Gaudry and R. Harley, 2000 Schoof 63bit 2 8 P. Gaudry and É. Schost, 2004 80bit 1 / 2 16 2 10 2 p: F p 2 C : Y 2 =F (X), F F p [X] : monic, deg F = 5, J C (F p ) F F p p Frobenius

More information

( ) ( ) lex LL(1) LL(1)

( ) ( ) lex LL(1) LL(1) () () lex LL(1) LL(1) http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 29 5 14 1 1 () / (front end) (back end) (phase) (pass) 1 2 1 () () var left, right; fun int main() { left = 0; right = 10;

More information

Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1) (2) ( ) BASIC BAS

Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1) (2) ( ) BASIC BAS Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1 (2 ( BASIC BASIC download TUTORIAL.PDF http://hp.vector.co.jp/authors/va008683/

More information