Copy Free \Scheme " Copy Free \Scheme " 2 (2a) (2b) (2c) 3 (3a) (The Internet) (3b) (6a) (6b) (6c) (6d) Scheme

Size: px
Start display at page:

Download "Copy Free \Scheme " Copy Free \Scheme " 2 (2a) (2b) (2c) 3 (3a) (The Internet) (3b) (6a) (6b) (6c) (6d) Scheme"

Transcription

1 Scheme ( ) c1993, 1994, 1995, 1996 Hirotsugu Kakugawa : ( ) kakugawa@sehiroshima-uacjp

2 Copy Free \Scheme " Copy Free \Scheme " 2 (2a) (2b) (2c) 3 (3a) (The Internet) (3b) (6a) (6b) (6c) (6d) Scheme

3 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 12 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 13 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 2 Scheme : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Scheme (NGSCM) : : : : : : : : : : : : : : : : : : : Scheme : : : : : : : : : : : : : : : : : : : : : Mule : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Scheme : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 23 3 Scheme ( ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ( 1) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 40 1

4 2 363 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : let : : : : : : : : : : : : : : : : : : : : : : : : : : : let* : : : : : : : : : : : : : : : : : : : : : : : : : : ( 1) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : if : : : : : : : : : : : : : : : : : : : : : : : : : : : cond : : : : : : : : : : : : : : : : : : : : : : : : : : begin : : : : : : : : : : : : : : : : : : : : : : : and or : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 69 4 NGSCM : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : NGSCM : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : NGSCM : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Mule : : : : : : : : : : : : : : : : : : : : : : : : : : : : Scheme : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 114

5 6 Scheme ( ) ( 2) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ( ) : : : : : : : : : : : : : : : : : : : : : : : : : : ( ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ( 2) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : case : : : : : : : : : : : : : : : : : : : : : : : : : : let : : : : : : : : : : : : : : : : : : : : : letrec : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : NGSCM NGSCM : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Scheme Scheme Scheme Interaction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : NGSCM Scheme : : : : : : : : : : : : : : : : : : : : 182 3

6 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Scheme ( ) ( 3) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : do : : : : : : : : : : : : : : : : : : : : : : : : : for-each : : : : : : : : : : : : : : : : : : : : : map : : : : : : : : : : : : : : : : : : : : : : : : : : aplly : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : A : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 244

7 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Scheme : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : REP : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ( 1) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ( ) : : : : : : : : : : : : : : : : : : : : : : : : : : ( 2 ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ( ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 308 A ASCII 313 B Scheme 315 C NGSCM 327 5

8 6 D Scheme 333 D1 Scheme : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 333 D2 FTP : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

9 Scheme W Clinger, J Rees ( ) \Revised 4 Report on the Algorithmic Language Scheme" ( R4RS) Scheme R4RS Scheme force delay R4RS Scheme (essential) R4RS ( ) } (scheme-proc arg) 4 (scheme-proc arg) p (scheme-proc arg) Scheme ( ) Typewrite Font Scheme Italic Typewrite Face Scheme ( )

10 1 (computer) ( ) ( ) ( (program) ) Scheme ( ) ( ) 1

11 2 1 q q ( ) q Hello World q q q q q q 11: 11 3 ( ) 1 ( ) 2 ( ) 3 ( ) 3 1 ( 11 ) 1 CPU Central Processing Unit I/O Input/Output

12 11 3 CRT X-Y 12: 1 (CPU) 2 (main memory) 3 (I/O device) 12 IC (Integrated Circuit ) LSI (Large Scale Integrated Circuit ) (memory cell) (bit) 0 1 ( ) 1

13 4 1 p p p p p p p p p p p p 13: (word) ? (binary number) ASCII A ,1,2,

14 pp pp pp pp pp ppppp pppppppp pp 12 5 q q q q q q q p ppp p ppp ppp pp p p pp pp p pp p p p pp pp p pp p p pppp ppp ppp p p p ppp p ppppp ppp p p p p p pp pp p p p ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp p p p p p p p p p pp p p p p p p p p p p p p ppp q q q q q q q pppp pp p p p p p p ppppppppppppppp ppppppppppppppppppppppppppppppppppppppppp p p p p p p ppp q q q q q 1 q q q q q q N q q q q q q q p p p p ppppp pppp pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp p p p p pp ppppppppppppppppppppppppppppppppppp ppppppppppppppppppppppppppppppppppppppp ppppp pppppp ppppppp ppppppp pppppp 14: ( ) ( ) (0 1 ) (native language) Scheme C Fortran ( ) ( ) ( 14 ) (register)

15 6 1 (program counter) ( ) 1 ( ) 2 3 ( 1 ) MC MC

16 LDX #100 LDA,X ADDA 1,X STA 2,X 1 LDX #100 X 100 X , , LDX # LDA,X X A X A ADDA 1,X X 1 ( X ) A A X 2 ( X ) A ( ) (application program) 3

17 8 1 (system program) 131 (operating system)? 1 (multitasking) ( (multiprogramming)) 001 1

18 13 9 Unix 1960 AT&T (American Telephone & Telegram) MS-DOS MS-DOS Microsoft ( 1 0 1!)

19 10 1 SUM: LDD #100 PSHS D LDD #0 PSHS D L: LDD 0,S ADDD 2,S STD 0,S LDD 2,S SUBD #1 STD 2,S BNE L LDD 0,S LEAS 4,S RTS 15: MC6809 (programming language) (high level language) Scheme 1 C, Lisp, Pascal, Fortran, Ada MC6809 ( MC6809 ) 132(a), (b) Scheme, Pascal 15 ( ) ( )

20 13 11 (define (sum n) (if (= i 0) 0 (+ n (sum (- n 1))))) (sum 100) (a) Scheme PROGRAM Sum(input, output); VAR thesum, i : INTEGER; BEGIN thesum := 0; FOR i := 1 TO 100 DO thesum := thesum + i; WRITELN(thesum) END (b) Pascal (language processor) 4 NEC PC-9801 Apple Macintosh Macintosh Macintosh PC-9801 Macintosh PC ( CPU C )

21 (compiler) (interpreter) ( ) ( ) 133 (editor) (le) 5

22 13 13 (41 )

23 (waterfall model) 1 2

24 Alan W Biermann ( ), \,", 1993 M A Arbib, A J Kfoury, R N Moll (,, ), \," Information&Computing-1,, 1984 P AKidwell, P ECeruzzi ( ), \,", 1995

25 16 1 Bill Gates ( ), \,", 1995, \," 1,, 1988 Ullman ( ), \ ",, \," 6,, 1988 J L Peterson, A Silberschatz (, ), \,", 1987 G J Nutt, ( ), \ /,", 1992, \," 5,, 1989, \," 4,, 1994 N Wirth ( ), \,", 1986,, \The BUG,", 1995 F P Brooks Jr ( ), \,", 1977

26 2 Scheme Scheme NGSCM 1 Scheme Scheme Scheme Unix Unix 1 ( ) : MS-DOS : Unix login: (cursor) 1 NGSCM Scheme NGSCM Appendix D 17

27 18 2 Scheme login: owl login: 1,2 ( ) pooh login: pooh RET RET login: pooh Password: 2 Last login: Thu Mar 16 20:32:25 from gull SunOS Release 412-JLE112 (GENERIC) #3: Fri Mar 5 15:34:42 JST 1993 % % (prompt) % > login: pooh Password: Login incorrect login: 2 Sun Unix SparcStation ELC SunOS 412 JLE 112

28 22 Scheme (NGSCM) Scheme (NGSCM) Scheme NGSCM % ngscm RET 21 NGSCM Version 332 of 01/20/96 on owl (FreeBSD SNAP) Copyright (C) 1992,1993,1994,1995,1996 Hirotsugu Kakugawa NGSCM is based on Ng editor by Shigeki Yoshida et al Type C-h for help (`C-' means use CTRL key) NGSCM comes with ABSOLUTELY NO WARRANTY You may give out copies of NGSCM; type C-h C-c to see the conditions Type C-h t for a tutorial on using NGSCM Type C-h T for a Japanese tutorial on using NGSCM Type C-j or C-c C-e to evaluate the expression before point Type C-g to abort evaluation SCM version 4e1, Copyright (C) 1990, 1991, 1992, 1993, 1994 Aubrey Jaffer SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)' This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 119 msec (0 in gc) 9993 cells work, bytes other > --**-NGSCM: *scheme* (-EE:fundamental-Scheme Interaction)-- 21: ngscm NGSCM ( ) NGSCM C-x C-c C-x C-c x c C- C-x C-c 1 C-x C-c ESC : 1,2 C-g C-x C-c

29 20 2 Scheme SCM version 4e1, Copyright (C) 1990, 1991, 1992, 1993, 1994 Aubrey Jaffer SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)' This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 105 msec (0 in gc) 9993 cells work, bytes other > [--]E_+--:--**-Mule: *scheme* 6:27pm 059 Mail (Inferior Scheme:run) Loading cmuschemedone 22: Mule Scheme 2 : Save file /home/pooh/honey-jar/lunchscm? (y or n) y 23 Scheme 231 Mule Mule % mule RET Mule ESC x run-scheme RET 22 (Mule Scheme SCM )

30 24 Scheme 21 Mule Scheme NGSCM RET Mule NGSCM C-x C-c Scheme emacs (autoload 'run-scheme "cmuscheme" "Run an inferior Scheme process" t) (setq scheme-program-name "scm") ( Scheme SCM "scm" ) 232 Scheme ( Scheme SCM ) % scm RET Scheme SCM, MIT Scheme, ELK, C-d C-d 24 Scheme Scheme > > Scheme Scheme Scheme

31 22 2 Scheme Scheme ( ) Scheme ( ) + ( ) ( 20 26) ( ) DEL C-j ( j ) C-j (Scheme DEL BS ( C-j RET ) > ( ) C-j ;Evaluation took 0 msec (0 in gc) 0 cons work 56 ( ) ;Evaluation took 0 msec (0 in gc) 0 cons work ( ) 56 (= ) > : > ( ) ;Evaluation took 0 msec (0 in gc) 0 cons work 56 > 4 5 > (* 4 5) C-j ;Evaluation took 0 msec (0 in gc) 0 cons work 20 >

32 25 23 > (+ 3 (* 2 4)) C-j ;Evaluation took 0 msec (0 in gc) 0 cons work 11 3+(2 4) (* 2 4) Scheme 242 Scheme ( 7 ) (load) proc > (load "sumscm") C-j ;loading "sumscm" ;done loading "sumscm" ;Evaluation took 7 msec (0 in gc) 77 cells work, 87 bytes other #<unspecified> > "sumscm" 25 (logout) % logout RET login: : Scheme

33 24 2 Scheme Scheme 1 ( ) 2 (* 4 6) 3 (- 10 2) 4 (+ (* 2 3) 4) 5 (* (+ 1 2) (+ 3 4)) 6 (/ 100 (+ 1 1))

34 3 Scheme ( ) Scheme Scheme Scheme Scheme (NGSCM Mule ) Scheme (Scheme ) > 2001 C-j ( j ) ( Scheme RET ) > 2001 C-j > 2001 ;Evaluation took 33 msec (0 in gc) 45 cons work 2001 > 2001 Scheme (Scheme ) 25

35 26 3 Scheme ( ) ;Evaluation took 33 msec (0 in gc) 45 cons work NGSCM ( Scheme ) : Scheme Scheme C-j 3+5 Scheme (+ 3 5) Scheme 3+5 (+ 3 5) ( ) + ( ) > (+ 3 5) 8 8 Scheme (expression) 2001 ( ) (+ 3 5) (* ) > (+ (* 3 4) (* 2 9)) 30 (+ (* 3 4) (* 2 9)) (* 3 4) (* 2 9) ( ) 30

36 32 27 > (+ (* (- 5 4) (- 3 1)) 10) 12 (+ (* (- 5 4) (- 3 1)) 10) = (+ (* 1 2) 10) = (+ 2 10) = 12 Scheme (Scheme (evaluation) ) ( ) ( ) (a 0 a 1 a 2 a n ) a 0,,a n b 0,,b n b 1 ; :::; b n b 0 b (variable) ( ) define } (define h i h i) h i h i income 1 a0 Scheme + +

37 28 3 Scheme ( ) > (define income ) #<unspecified> > income > (+ income 10000) #<unspecified> 2 define ( income) > (define expense ( )) #<unspecified> > expense (define expense ( )) expense ( ) expense expense (define ) define define Scheme (special form) ( ) set! } (set! h i h i) h i h i define set! tax 2 Scheme (define income ) define NGSCM #<unspecified> Scheme ( )

38 33 29 > tax Error: unbound variable: tax tax tax set! > (set! tax 15000) Error: unbound variable: tax define set! > (define tax 10000) #<unspecified> > tax > (set! tax 15000) #<unspecified> > tax : (define 'age 17) 'age (quote age) (define (quote age) 17) quote 'age quote (quote Scheme ) 33 Scheme (symbol)

39 30 3 Scheme ( ) > (define princess 'masako) #<unspecified> > princess masako (list) > (define friends '(yumiko mayuko hiroko noriko)) #<unspecified> > friends (yumiko mayuko hiroko noriko) 2 ' (quote) s 's (quote s) quote > (define masako 'owada) #<unspecified> > masako owada > (define princess masako) #<unspecified> > princess owada princess owada (define princess masako) masako owada princess ( masako princess masako ) friends? (yumiko mayuko hiroko noriko) yumiko mayuko hiroko noriko mayuko hiroko noriko yumiko : ', ( 103 )

40 34 31 princess friends (symbol) Scheme lambda FOOBAR ZAP!! number->string Okey? Mar21 acb3wdj $5 *the-state* this-identifyer-is-very-long-but-its-ok (+ - * / < = >!? : $ % ) ( 3 symbol? } (symbol? h i) h i #t #f #t yes #f no > (symbol? 'mayuko) #t > (symbol? 10) #f 34 (list) (yumiko mayuko hiroko noriko) ( ) : () (a) (NISHIDA HIKARU) (1 a 2 b) ((pi 31415) (e )) (a (ba bb) (ca (cba cbb) cc) d) 3 -A

41 32 3 Scheme ( ) () (empty list) '() () '() 4 null? } (null? h i) h i #t #f > (null? '(yumiko mayuko)) #f > (null? '(yumiko)) #f > (null? '()) #t > (null? 'miho) #f 5 Scheme C Pascal Fortran 6 (pair) car cdr 7 car cdr 4 () (Scheme () Scheme ) 5 6 Scheme Pascal ( ) ( ) ( ) ( ) IBM IBM 7090 Lisp (Scheme ) IBM 7090 (address) (decrement) car Contents of Address part of Register cdr Contents of Decrement part of Register IBM 7090 car cdr

42 34 33 > (define idols '(hikaru miho hiroko noriko)) #<unspecified> > (car idols) hikaru > (cdr idols) (miho hiroko noriko)) car car cdr 2 3 > (car (cdr idols)) miho > (car (cdr (cdr idols))) hiroko > (car (cdr (cdr (cdr idols)))) noriko 3 4 car cdr car cdr (cadr S) (car (cdr S)) (cadar S) (car (cdr (car S))) car cdr 4 ( cadr, caddr, cadddr ) > (cadr idols) mami > (caddr idols) hiroko > (cadddr idols) noriko Scheme (pair) 31(a) 2 Scheme ( 31(c) 3 ) cons 8 cons 2 (cons a b) ( ) a ( ) b ( ) (cons 8 cons construct ( )

43 34 3 Scheme ( ) 2 3 (a) (b) (cons 2 3) (c) (cons 1 (cons 2 3)) 31: a b) ( ) car cdr } (car h i) h i car } (cdr h i) h i cdr (a b) ( ) (cons 1 2) (1 2) ( 31(b) ) 2 ( ) (cons 1 (cons 2 3)) (1 (2 3)) (dotted notation) (a (b ())) (a b) (a1 (a2 (an ()) )) (a1 a2 an) (list notation) (cons 1 (cons 2 3))

44 34 35 () a b c 32: (a b c) > (cons 1 (cons 2 3)) (1 2 3) (1 (2 3)) (1 2 3) Scheme 9 (list) cdr cdr 32 cdr pair? list? } (pair? h i) h i #t #f } (list? h i) h i #t #f pair? ( car cdr ) list? cdr pair? list? > (pair? '(a b)) #t > (pair? '())! 9 (a1 (a2 (am (an ())) )) (a1 a2 am an)

45 36 3 Scheme ( ) #f > (pair? '(1 2)) #t > (list? '(a b c)) #t > (list? '()) #t > (list? '(1 2)) #f > (list? '(0 1 2)) #f list?, pair?, null? '() (pooh) (pooh piglet owl) (kanga roo) list? #t #t #t #f pair? #f #t #t #t null? #t #f #f #f 35 car, cdr, cons ( ) (cons 1 (cons 2 (cons 3 (cons 4 '())))) '( ) a1, a2, a3, a4 : > '(a1 a2 a3 a4) (a1 a2 a3 a4) (cons a1 (cons a2 (cons a3 (cons a4 '())))) list } (list h 1 i h 2 i ) h 1 ih 2 i (h 1 i h 2 i )

46 35 37 > (define a 100) #<unspecified> > (define b 200) #<unspecified> > (list ) ( ) > (list a b) ( ) > (list a '(a b) b) (100 (a b) 200) > (list a '(a b) 'b) (100 (a b) b) } (length h i) h i } (append h 1 i h 2 i ) h 1 i h 2 i } (reverse h i) h i } (list-ref h i i) h i i 4 (list-tail h i) h i > (length '(a b c d)) 4 > (length '(a b )) 2 > (length '()) 0 > (length '((a) (b c d))) 2 > (length '((a) (b c d) e))

47 38 3 Scheme ( ) 3 > (append (list 'a 'b) (list 'c 'd)) (a b c d) > (append (list 'a '(b c)) (list 'd 'e)) (a (b c) d e) > (reverse '(a b c d e)) (e d c b a) > (reverse '(a (b c) ((d)) e)) (e ((d)) (b c) a) > (reverse '()) () > (list-ref '(a b c d e) 0) a > (list-ref '(a b c d e) 1) b > (list-ref '(a b c d e) 4) e 36 ( 1) 2 Scheme ( ) (boolean) #t #f if cond 11 (selfevaluating) > #t #t Scheme #f

48 36 ( 1) 39 > #f #f > '#t #t boolean? } (boolean? h i) h i #t #f > (boolean? #t) #t > (boolean? #f) #t > (boolean? 10) #f > (boolean? '(1 2 3)) #f > (boolean? '()) #f not } (not h i) h i #f #t #f (h i ) > (not #t) #f > (not #f) #t > (not 10) #f > (not (cons 1 2)) #f > (not '()) #f

49 40 3 Scheme ( ) 362 Scheme (numbers) Scheme (integer) (rational) (real) (complex) 4 (Scheme ) 4 1:5 6:0 } (+ x 1 x 2 ) x 1 + x 2 + } (- x),x } (- x 1 x 2 ) x 1, x 2 4 (- x 1 x 2 x 3 ) x 1, x 2, x 3, ( ) } (* x 1 x 2 ) x 1 x 2 } (/ x) 1=x } (/ x 1 x 2 ) x 1 =x 2 4 (/ x 1 x 2 x 3 ) x 1 =(x 2 x 3 )( ) } (min x 1 x 2 ) x 1 ;x 2 ; } (max x 1 x 2 ) x 1 ;x 2

50 36 ( 1) 41 } (abs x) x } (floor x) x } (ceiling x) x } (truncate x) } (round x) > (+ 2 4) 6 6 > (+ 2 40) > (- 2 3) -1 > (- 3) -3 > (* 30 45) +135 > (/ 10 5) 2 > (/ 10 50) +20 > (max ) 23 > (min ) 2 > (abs -8) 8 > (floor 103) 10 > (floor -103)

51 42 3 Scheme ( ) -11 > (ceiling 103) 11 > (ceiling -103) -10 > (round -103) -10 } (gcd n 1 n 2 ) } (lcm n 1 n 2 ) } (quotient n 1 n 2 ) } (remainder n 1 n 2 ) } (modulo n 1 n 2 ) gcd lcm quotient, remainder, modulo (quotient n 1 n 2 ) ) n 3 (remainder n 1 n 2 ) ) n 4 (modulo n 1 n 2 ) ) n 4 n 1 = n 2 n 3 + n 4 0 n 4 <n 2 (n 3 n 4 ) remainder modulo > (remainder 17 3) 2 > (modulo 17 3) 2 > (remainder -17 3) -2

52 36 ( 1) 43 > (modulo -17 3) 1 12 } (= x 1 x 2 ) x 1 = x 2 =? } (< x 1 x 2 ) x 1 <x 2 <? } (> x 1 x 2 ) x 1 >x 2 >? } (<= x 1 x 2 ) x 1 x 2? } (>= x 1 x 2 ) x 1 x 2? } (zero? x) x? } (positive? x) x? } (negative? x) x? } (odd? n) n? } (even? n) n? > (= 3 3 3) #t > (= 1 3 3) #f 12

53 44 3 Scheme ( ) > (< 3 4 5) #t > (<= ) #t > (zero? 2) #f > (zero? 0) #t > (positive? 2) #t > (negative? -2) #t > (odd? 3) #t > (odd? 2) #f > (even? 2) #t } (number? x) x ( / / / ) #t #f } (integer? x) x #t #f x 0 #t } (real? x) x #t #f ( x #t ) > (number? 'foobar) #f > (number? 82) #t > (number? 2)

54 36 ( 1) 45 #t > (integer? 82) #f > (real? 82) #t > (integer? 2) #t > (integer? 20) #t > (real? 100) #t ( ) : :33333 real? 1 #t integer? 100 #t integer? real? Scheme (exactness) (exact number) (inexact number) } (exact? x) x #t #f } (inexact? x) x #t #f 4 (inexact->exact n) n

55 46 3 Scheme ( ) 4 (exact->inexact n) n > (exact? 1) #t > (integer? 10) #t > (exact? 10) #f > (real? 1) #t > (inexact? 1) #f > (inexact? 10) #t > (inexact->exact 44) 4 > (inexact->exact 45) 5 > (exact->inexact 4) (exp x) e x (e ) 4 (log x) log e x 4 (sin x) sin x 4 (cos x) cos x 4 (tan x) tan x 13 Scheme

56 36 ( 1) 47 4 (asin x) sin,1 x 4 (acos x) cos,1 x 4 (atan x) tan,1 x 4 (atan y x) tan,1 y=x 4 (sqrt x) p x 4 (expt x y) x y 363 (string) " "honey" "Pooh and Piglet" "" "" (null string) > '"This is a string" "This is a string" > "This is a string" "This is a string" \ \" \ =Y \ =Y

57 48 3 Scheme ( ) > "He said, \"Are you sure?\"" "He said, \"Are you sure?\"" > (display "He said \"Are you sure?\"") He said "Are you sure?"#<unspecified> display #<unspecified> #<unspecified> display ( ) string? } (string? h i) h i #t #f > (string? 'apple) #f > (string? "apple") #t > (string? 1924) #f } (string-length h i) h i ( ) } (substring h i x y) h i x y ( 0 ) y x y 0 (length h i) x y } (string-append h 1 i h 2 i h 1 i h 2 i > (string-length "Pooh and Piglet") 15 > (string-length "")

58 36 ( 1) 49 0 > (substring "Pooh, Owl, Piglet" 6 9) "Owl" > (substring "Pooh" 0 0) "" > (string-append "Winnie" "-" "the" "-" "Pooh") "Winnie-the-Pooh" } (string=? h 1 i h 2 i) h 1 i h 2 i? } (string-ci=? h 1 i h 2 i) h 1 i h 2 i? } (string<? h 1 i h 2 i) h 1 i h 2 i? } (string-ci<? h 1 i h 2 i) h 1 i h 2 i? } (string>? h 1 i h 2 i) h 1 i h 2 i? } (string-ci>? h 1 i h 2 i) h 1 i h 2 i? } (string<=? h 1 i h 2 i) h 1 i h 2 i? } (string-ci<=? h 1 i h 2 i) h 1 i h 2 i? } (string>=? h 1 i h 2 i) h 1 i h 2 i? } (string-ci>=? h 1 i h 2 i) h 1 i h 2 i? -ci a A "b" < "ba" < "baa" < "bb" < "c"

59 50 3 Scheme ( ) > (string=? "a b" "a b") #t > (string=? "a b" "a b c") #f > (string-ci=? "a b" "A B") #t > (string<? "aa" "ab") #t > (string<? "aa" "a") #f > (string>? "aba" "aaa") #t : "A"<"B"< ::: <"Z" : "a"<"b"< ::: <"z" : "0"<"1"< ::: <"9" : "A"<"a", "B"<"b", = = 2 } (eqv? h 1 i h 2 i) } (eq? h 1 i h 2 i) } (equal? h 1 i h 2 i) 15;16 Scheme ( )

60 h 1 ih 2 i ( ) #t #f 2 #t > (define qwe '(have fun)) #<unspecified> > (eqv? qwe qwe) #t > (eq? qwe qwe) #t > (equal? qwe qwe) #t #t 2 #f > (eqv? 'abc "2") #f > (eq? 'abc 314) #f > (equal? "314" 314) #f eqv? #t 2 #t #f ( )

61 52 3 Scheme ( ) > (eqv? 'abc 'abc) #t > (eqv? 'foo 'bar) #f > (eqv? '() '()) #t > (eqv? 16 16) #t > (eqv? 16 (* 2 8)) #t > (eqv? ) #f > (eqv? (list 'pooh 'piglet) (list 'pooh 'piglet)) #f > (define animal (list 'pooh 'piglet)) #<unspecified> > (eqv? animal animal) #t eqv? (eqv? "A" "A") 2 "A" eqv? 2 (eqv? '(1 2) '(1 2)) (eqv? '(b) (cdr '(a b))) eq? 2 ( ) #t eq? eqv? #t Scheme eq? =, eqv? equal? > (eq? 'a 'a) #t > (eq? 'a 'b) #f

62 38 53 > (eq? (list 'pooh 'piglet) (list 'pooh 'piglet)) #f > (define animal (list 'pooh 'piglet)) #<unspecified> > (eqv? animal animal) #t > (eq? '() '()) #t equal? ( 612 ) ( ) eqv? ( 2 equal? #t ) > (equal? '(a b) '(a b)) #t > (equal? (list 'a 'b) (list 'a 'b)) #t > (equal? '(a b (c d)) '(a b (c d))) #t > (equal? "my home" "my home") #t > (equal? 13 13) #t > (equal? ) #t > (equal? 1 10) #f 38 (primitive procedure) (compound procedure) define (compound procedure)

63 54 3 Scheme ( ) 1 add1 > (define (add1 n) (+ n 1)) #<unspecified> > (add1 1) 2 > (add1 99) 100 define (actual argument) (add1 1) 1 add1 n add1 add1 (+ n 1) n add1 (formal argument) n add1 add1 n add1 n n add1 add1 > (define n 10) #<unspecified> > n 10 > (add1 1) 2 > n 10 n 10 add1 n 10 add1 n add > (define (distance x y) (sqrt (+ (* x x) (* y y)))) #<unspecified> > (distance 1 1) > (distance 2 4)

64 38 55 (define (h i h i) h 1 i h 2 i h n i ) h i h i (h i h i) (define count 0) define add1 (define add1 (lambda (n) (+ n 1))) (lambda ) ( expression) (procedure) } (lambda h i h i) h i h i } (procedure? h i) h i #t #f 1 (lambda (n) (+ n 1)) 1 define > ((lambda (n) (+ n 1)) 10) 11

65 56 3 Scheme ( ) (lambda (n) (+ n 1)) > (add1 10) 11 add > (define (calc x op y) (op x y)) #<unspecified> > (calc 3 + 4) 7 > (calc 2-8) -6 > (calc 3 * 6) 18 +, -, * calc op (op x y) op x y calc (x op y) (calc 2) : > (calc 2) Error: Wrong number of args to in excpression: ( calc 2) in top level environment ; Evaluation took 50msec + 2 4

66 39 57 (foo (list a b c d e)) 1 foo 1 (define h i (lambda h i h i )) h i (define foo (lambda s (if (null? s) '() (list-ref s (- (length s) 1))))) foo (foo ) s ( ) > (foo 1 2) 2 > (foo ) 5 > (foo) () 39 f(x) =x 4 + g(x)x 2 f1 (g(x) g ) (define (f1 x) (+ (* x x x x) (* (g x) x x))) x x x x + g(x) x x f y = x 2 y y + y f1 f2 :

67 58 3 Scheme ( ) (define y 0) (define (f2 x) (set! y (* x x)) (+ (* y y) (* (g x) y))) ( (define y 0) y y 0 ) f1 g y g y f2 (local variable) Scheme let, let*, letrec let let* letrec let f f (define (f x) (let ((y (* x x))) (+ (* y y) (* (g x) y)))) let } (let ((h 1 i h 1 i) (h 2 i h 2 i) (h n i h n i)) h i) h i let h 1 i, h 2 i,, h n i h 1 i, h 2 i,, h n i h 1 i, h 2 i,,h n i h i h 1 i,h 2 i,,h n i h i h i let let let

68 39 59 > (define x 10) #<unspecified> > x 10 > (let ((x 7)) (set! x (* x x)) x) 49 > x 10 let x set! 49 x > (define x 1) #<unspecified> > (define y 3) #<unspecified> > (let ((a (+ y 1)) (b (* x 2))) (+ a b)) 6 > (let ((x (+ y 1)) (y (* x 2))) (+ x y)) 6 (+ y 1) (* x 2) x y let ( 4 2 ) let let 392 let* let* 4 (let* ((h 1 i h 1 i) 18 (h 2 i h 2 i) (h n i h n i)) h i) 18 Scheme

69 60 3 Scheme ( ) let* let let > (define x 1) #<unspecified> > (define y 3) #<unspecified> > (let* ((x (+ y 1)) (y (* x 2))) (+ x y)) 12 (+ y 1) 4 x (* x 2) y x y 4 let let*? (let ((x 0)) (let ((x 1)) x)) 1 (let ((x 1) ( 1) 3101 if if 2 foo n 0 zero non-zero (define (foo n) (if (zero? n) 'zero 'non-zero))

70 310 ( 1) 61 > (foo -1) non-zero > (foo 0) zero > (foo 68000) non-zero if } (if h i h 1 i h 2 i) h i ( #f ) h 1 i if h 2 i if h 2 i 4 (if h i h i) 19 h i ( #f ) h i if if cond cond (define (score n) (cond ((<= n 50) 'fail) ((< n 70) 'poor) ((< n 80) 'fair) (else 'excellent))) 19 Scheme 20

71 62 3 Scheme ( ) score n 50 fail poor fair 80 excellent : > (score 30) fail > (score 67) poor > (score 79) fair > (score 96) excellent cond } (cond h 1 i h 2 i h n i) cond cond- (cond-clause) h i h i (h 1 i h 1 i ) h i ( #f ) h i cond #f h n i else h n i cond cond score2 (define (score2 n) (cond ((< n 80) 'fair)

72 310 ( 1) 63 ((< n 70) 'poor) ((<= n 50) 'fail) (else 'excellent))) > (score2 30) fair 30 fair 3103 begin begin begin > (define x 10) #<unspecified> > (define y 3) #<unspecified> > (begin (display "10 * 3 = ") (display (* 10 3)) (newline)) 10 * 3 = 30 #<unspecified> display newline ( ) begin } (begin h 1 i h 2 i h n i) h 1 i,h 2 i h n i h n i begin begin

73 64 3 Scheme ( ) (side eect) set! display 3104 and or and or and } (and h 1 i h 2 i h n i) h 1 i ( #f ) h 2 i h n i and and #f and > (define x 10) #<unspecified> > (and (number? x) (> x 0) (+ x 1)) 11 (number? x) (> x 0) (+ x 1) 11 and > (and (number? x) (> x 100) (+ x 1)) #f (> x 100) and #f and and ( )

74 x (+ x 1) 1 or } (or h 1 i h 2 i h n i) or h 1 i #f h 2 i #f or or or or > (define x -20) #<unspecified> > (if (or (< x 0) (> x 100)) "x < 0 or 100 < x" "else") "x < 0 or 100 < x" x -20 (< x 0) or > (if (or (= x 0) (> x 0)) "x >= 0" "x < 0") "x < 0" or or #f if "x < 0" 311 Scheme (recursion) : Pascal, C, Fortran Pascal FOR Fortran

75 66 3 Scheme ( ) DO Scheme 1011 (recursion) Scheme fact (define (fact n) (if (= n 0) 1 (* n (fact (- n 1))))) 1 n n! = 1 2 (n, 1) n (fact 4) (fact 4) ) (* 4 (fact 3)) ) (* 4 (* 3 (fact 2))) ) (* 4 (* 3 (* 2 (fact 1)))) ) (* 4 (* 3 (* 2 (* 1 (fact 0))))) ) (* 4 (* 3 (* 2 (* 1 1)))) ) (* 4 (* 3 (* 2 1))) ) (* 4 (* 3 2)) ) (* 4 6) ) 24 (fact 4) 4 (fact 3) (fact 3) 3 (fact 2) (fact 2) 2 (fact 1) (fact 1) 1 (fact 0) (fact 0) 1 (fact 1) 1 1=1 (fact 2) 2 1=2 (fact 3) 3 2=6

76 (fact 4) 4 6=24 (recursion) 21 l l l 0 (cdr l) 1 l (define (len l) (if (null? l) 0 (+ (len (cdr l)) 1))) l (cdr l) l (null? l) fact (fact n) (fact n, 1) n (fact n, 1) n (fact 5) 1 n n fact2 (define (fact2 n) (define (fact-sub n f) (if (= n 0) f (fact-sub (- n 1) (* f n)))) (fact-sub n 1)) 21 f g g f (mutual recursion)

77 68 3 Scheme ( ) (fact2 4) (anonther-fact 4) ) (fact-sub 4 1) ) (fact-sub 3 4) ) (fact-sub 2 12) ) (fact-sub 1 24) ) (fact-sub 0 24) ) 24 fact2 fact-sub 1 n 0 fact-sub Scheme fact2 n (stack) f g g f g g g f g f f ( ) fact n ( ) fact2 (tail recursive) A B B B A B B A

78 Scheme Scheme ( (load) ) } (load h i) h i Scheme h i 4 (transcript-on h i) h i h i 4 (transcript-off) transcript-on Scheme transcript-on transcript-off load h i Scheme sin-tablescm ;; sqrt-tablescm ;; --- prints values of square root of 110 (define (print-sqrt-table from to) (print-sqrt-table2 from to)) (define (print-sqrt-table2 i to) (if (> i to) 'done (begin (display i) (display " ") (display (sqrt i)) (newline) (print-sqrt-table2 (+ i 1) to)))) (print-sqrt-table 1 10)

79 70 3 Scheme ( ) (print-sqrt-table 1 10) > (load "sqrt-tablescm") ;loading "prog/sqrt-tablescm" ;done loading "sqrt-tablescm" ;Evaluation took 14 msec (0 in gc) 216 cells work, 212 bytes other #<unspecified> > transcript-on transcript-off > (transcript-on "LOG-FILE") ;Evaluation took 0 msec (0 in gc) 6 cells work, 37 bytes other #<unspecified> > ( ) ;Evaluation took 0 msec (0 in gc) 11 cells work, 37 bytes other 6 > (* ) ;Evaluation took 0 msec (0 in gc) 32 cells work, 51 bytes other > (transcript-off) #<unspecified> LOG-FILE transcript-on transcript-off : ;Evaluation took 0 msec (0 in gc) 6 cells work, 37 bytes other #<unspecified> > ( ) ;Evaluation took 0 msec (0 in gc) 11 cells work, 37 bytes other 6 > (* ) ;Evaluation took 0 msec (0 in gc) 32 cells work, 51 bytes other > (transcript-off) transcript-on transcript-off Scheme ( )

80 Scheme Scheme ( ) 6 Scheme Appendix B Scheme

81 72 3 Scheme ( )

82 4 NGSCM Mule Appendix NGSCM , (editor) 1 41 (editing buer) ( (buer) ) (text) (save) 73

83 74 4 NGSCM q (define (qweqwe n) (if (= n 1) 1 (* n (qweqwe (- n 1))))) q p A quick brown fox jumps over a lazy dog She sells sea shells in the sea shore p p p 41: (window) ( ) (cursor) 42 NGSCM NGSCM NGSCM 42

84 42 NGSCM 75 --**-NGSCM: *scheme* Find file: (-EE:fundamental-Scheme Interaction)-- 42: ( ) 422 ;; ;; fact - compute factorial ;; (define (fact n) (define (fact2 n f) (if (= n 1) f (fact2 (- n 1) (* n f)))) (fact2 n 1)) --**-NGSCM: qwescm (-EE:fundamental-Scheme) under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 316 msec (0 in gc) 8829 cons work ;Evaluation took 0 msec (0 in gc) 9 cons work #<unspecified> > (fact 10) ;Evaluation took 16 msec (0 in gc) 56 cons work > --**-NGSCM: *scheme* (-EE:fundamental-Scheme Interaction)-- 43: NGSCM NGSCM **-NGSCM: qwescm (-EE:fundamental-Scheme) :

85 76 4 NGSCM qwescm *scheme* (mode line) --**-NGSCM: -----NGSCM: NGSCM: 43 qwescm ( ) *scheme* ( ) 2 (-EE: NGSCM Mule fundamental-scheme fundermental ( ) Scheme Scheme 43 NGSCM NGSCM 431 NGSCM % ngscm RET % Unix % ngscm sumscm RET

86 44 77 sumscm NGSCM 432 NGSCM % ngscm RET NGSCM C-x C-f NGSCM C-x C-c (C-x C-c CTL x CTL c ) NGSCM Save file /home/pooh/sumscm? (y or n) y n NGSCM ( /home/pooh/sumscm ) ( NGSCM ) 44 NGSCM ( : 8 Scheme ) n 1 n Scheme 1 n n =1 1

87 78 4 NGSCM n, 1 n ( 1 n =1 sum(n) = sum(n, 1) + n Scheme (define (sum n) (if (= n 1) 1 (+ (sum (- n 1)) n))) sumscm scm Scheme scm Scheme scm -----NGSCM: sumscm (New file) (-EE:fundamental-Scheme) : ngscm sumscm NGSCM % ngscm sumscm RET

88 44 79 C-p q C-b q q q C-f C-n 46: 45 sumscm sumscm (New file) sumscm NGSCM ( ) (control key) C-b 1 (b backward character b) C-f 1 (f forward character f) C-p (p previous line p) C-n (n next line n) C-d 1 (d delete character d) DEL 1 RET

89 80 4 NGSCM 46 ( 47 ) (define (sum n) (if (= n 1) 1 (+ (sum (- n 1)) n))) --**-NGSCM: sumscm (-EE:fundamental-Scheme) : sum ) ( Scheme C-x (define ) C-c C-e C-c C-e ( (define (sum n)) ) Scheme ( ) Scheme sum C-c C-e 49 ( ) Scheme sum C-x o Scheme ( 410) C-j (sum 10) (sum 10) C-j 411

90 44 81 (define (sum n) (if (= n 1) 1 (+ (sum (- n 1)) n))) --**-NGSCM: sumscm (-EE:fundamental-Scheme) This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 119 msec (0 in gc) 9993 cells work, bytes other ;Evaluation took 0 msec (0 in gc) 36 cells work, 41 bytes other #<unspecified> > --**-NGSCM: *scheme* (-EE:fundamental-Scheme Interaction)-- 48: C-x 2 2 (define (sum n) (if (= n 1) 1 (+ (sum (- n 1)) n))) --**-NGSCM: sumscm (-EE:fundamental-Scheme) This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 119 msec (0 in gc) 9993 cells work, bytes other ;Evaluation took 0 msec (0 in gc) 36 cells work, 41 bytes other #<unspecified> > --**-NGSCM: *scheme* (-EE:fundamental-Scheme Interaction)-- 49: C-c C-e

91 82 4 NGSCM (define (sum n) (if (= n 1) 1 (+ (sum (- n 1)) n))) --**-NGSCM: sumscm (-EE:fundamental-Scheme) This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 119 msec (0 in gc) 9993 cells work, bytes other ;Evaluation took 0 msec (0 in gc) 36 cells work, 41 bytes other #<unspecified> > --**-NGSCM: *scheme* (-EE:fundamental-Scheme Interaction)-- 410: C-x o Scheme (define (sum n) (if (= n 1) 1 (+ (sum (- n 1)) n))) --**-NGSCM: sumscm (-EE:fundamental-Scheme) This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 119 msec (0 in gc) 9993 cells work, bytes other ;Evaluation took 0 msec (0 in gc) 36 cells work, 41 bytes other #<unspecified> > (sum 10) ;Evaluation took 7 msec (0 in gc) 34 cells work, 33 bytes other 55 > --**-NGSCM: *scheme* (-EE:fundamental-Scheme Interaction)-- 411: (sum 10)

92 44 83 : 1 C-x o 2 3 C-c C-e ( ) Scheme 4 C-x o Scheme (sum 10) C-j 10 NGSCM C-x C-c : Save file /home/pooh/sumscm? (y or n) ( /home/pooh/sumscm ) y n NGSCM : 1 RET (* (+ 1 2) (* (+ 3 4) (+ 5 6)) (+ 7 (* 8 2))) 1 (* (+ 1 2) (* (+ 3 4) (+ 5 6)) (+ 7 (* 8 2))) (+ 1 2) (* (+ 3 4) (+ 5 6)) (+ 7 (* 8 2))

93 84 4 NGSCM : (innite loop) ( Garbage collecting Garbage collectingdone ) C-g Scheme 1 1 NGSCM 2 3 Ctlx2 2 4 C-c C-e Scheme 5 C-x o Scheme ( C-g ) C-x C-c NGSCM 441 Mule Unix Mule Scheme 1 Mule % mule sumscm RET 2 3 C-x Scheme C-c

94 44 85 SCM version 4e1, Copyright (C) 1990, 1991, 1992, 1993, 1994 Aubrey Jaffer SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)' This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 91 msec (0 in gc) 9993 cells work, bytes other > [--]E_+--:--**-Mule: *scheme* 4:53pm 031 Mail (Inferior Scheme:run) (define (sum n) (if (= n 1) 1 (+ (sum (- n 1)) n))) [--]E:-----Mule: sumscm 4:53pm 031 Mail (Scheme)--All : Mule Scheme 4 Scheme M-x run-scheme RET Scheme M-x run-scheme ESC x run-scheme RET ( 412 ) 5 RET 6 C-x o Scheme C-c C-e 442 Scheme NGSCM Scheme vi Scheme SCM 1 vi (vi NGSCM vi ) % vi sumscm RET 2

95 86 4 NGSCM 3 Scheme % scm SCM version 4e1, Copyright (C) 1990, 1991, 1992, 1993, 1994 Aubrey Jaffer SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)' This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details ;loading "/usr/local/lib/scm/transcenscm" ;done loading "/usr/local/lib/scm/transcenscm" ;Evaluation took 333 msec (0 in gc) 8829 cons work > 4 load > (load "sumscm") RET 5 C-c ( C-c C-g ) 6

96 5 Scheme : ( addressscm )

97 88 5 * (* ) ( )

98 (rational) a=b 3=10;,1=3; 101=9 Scheme ( ) 1 make-rat is-rat? rat-num rat-den rat:+ 511 (make-rat a b) a b 2 (is-rat? r) r #t #f rat rational

99 ( rat) make-rat (define (make-rat a b) (list 'rat a b)) rat ' (quote) rat rat rat Scheme car is-rat? (define (is-rat? r) (eq? (car r) 'rat)) eq? 2 rat Scheme 2 > (define r1 (make-rat 1 3)) 1/3 #<unspecified> > (is-rat? r1) r1? #t is-rat? 3 > (is-rat? 10) ERROR: car: Wrong type in arg1 10! car is-rat? r car 3 10 = 10=

100 51 91 car list? is-rat? (define (is-rat? r) (and (list? r) (eq? (car r) 'rat))) and #f #f #f and 4 r 1 r 2 [ ] [ ] [ ] [ ] r 1 + r 2 = r 1 r 2 + r 1 r 2 r 1 r 2 r 1, r 2 = r 1 r 2, r 1 r 2 r 1 r 2 r 1 r 2 = r 1 r 2 r 1 r 2 r 1 =r 2 = r 1 r 2 r 1 r 2 rat-num rat-den 5 s i (list-ref s i) ( 0 ) error error ( error Scheme ) rat-num, rat-den 4 and 10 5 numerator, denominator

101 92 5 (define (rat-num r) (if (is-rat? r) (list-ref r 1) (error "rat-num - not rational number"))) (define (rat-den r) (if (is-rat? r) (list-ref r 2) (error "rat-den - not rational number"))) error rat-num - not rational number > (define r (make-rat 1 3)) #<unspecified> > (rat-num r) 1 > (rat-den r) 3 > (rat-den 10) Error: rat-num - not rational number > rat:+ (define (rat:+ r1 r2) (if (and (is-rat? r1) (is-rat? r2)) (make-rat (+ (* (rat-num r1) (rat-den r2)) (* (rat-den r1) (rat-num r2))) (* (rat-den r1) (rat-den r2))) (error "rat:+ - not rational number"))) : (define (rat:+ r1 r2) (if h r1 r2?i (make-rat

102 51 93 h i h i ) h i )) 2 r1 r2 make-rat 2 error > (define r (make-rat 1 3)) 1/3 #<unspecified> > (define s (make-rat 2 5)) 2/5 #<unspecified> > (define t (rat:+ r s)) t = 1/3 + 2/5 #<unspecified> > (rat-num t) > (rat-den t) =3+2=5 =11=15 : (define (rat:- r1 r2) (if (and (is-rat? r1) (is-rat? r2)) (make-rat (- (* (rat-num r1) (rat-den r2)) (* (rat-den r1) (rat-num r2))) (* (rat-den r1) (rat-den r2))) (error "rat:- - not rational number"))) 512

103 94 5 a b make-rat a=b rat-num a a=b rat-den b 51: make-rat, rat-num, rat-den, is-rat? make-rat, rat-den, rat:+ (data abstraction) (abstract data type) (information hiding)

104 51 95 (message passing) 1 rat:* 2 f f(r) =r + r 2 + r 3 ( r ) f rat:+ rat:* 3 rat:/ 4 rat:inv 5 display write (rational-number 11 15) 11/15 rat:print ( : display write ) 6 reducible? #t #f ( : a b (gcd a b) ) 7 rat:reduce 8 rat:reduce r 1 r 2 (1) 2 (2) (3) r 1 + r 2 (4)

105 96 5 rat:show > (rat:show+ (make-rat 2 3) (make-rat 1 4)) (2/3) + (1/4) Tsuubun Shimasu = (4/4)*(2/3) + (3/3)*(1/4) = (8/12) + (3/12) Tashi Masu = ((8+3)/12) Kotae Desu = (11/12) > (rat:show+ (make-rat 1 8) (make-rat 3 8)) (1/8) + (3/8) Bunbo ga Onaji Tashi Shimasu = ((1+3)/8) Kotae Desu = (4/8) Yakubun Shimasu = ((4*1)/(4*2)) Yakubun Shita Kotae Desu = (1/2) 11 (rat:+ (make-rat 1 2) 2) 5=2 (rat:+ 1 2) 3=1 exact? (exact? 613 ) 12 rat:+ (rat:+ (make-rat 1 2) 12) 1:7 inexact? (inexact? 613 ) 13 make-rat

106 * 1=1 1

107 (recursion) ( 1) (3 6 pooh piglet 9) 3 (pooh) 0 ( (1 (2 3) 4 ) s 1: s s 0 2: s : 1 2-1: s car : (cdr s) 1 s 2 2-2: s car : (cdr s) s

108 52 99 count-numbers-1a (define (count-numbers-1a s) (if (null? s) 0 1 (if (number? (car s)) (+ (count-numbers-1a (cdr s)) 1) 2-1 (count-numbers-1a (cdr s))))) 2-2 if cond (define (count-numbers-1b s) (cond ((null? s) 0) 1 ((number? (car s)) (+ (count-numbers-1b (cdr s)) 1)) 2-1 (else (count-numbers-1b (cdr s))))) 2-2 > (count-numbers-1a '(3 6 pooh piglet 9)) 3 > (count-numbers-1a '(pooh piglet)) 0 > (count-numbers-1a '()) 0 > (count-numbers-1a '(3 6 9)) 3 ' (quote) ( ) (count-numbers1a '(3 6 pooh piglet 9)) (count-numbers1a (3 6 pooh piglet 9)) Scheme (3 6 pooh piglet 9) > (count-numbers1a (3 6 pooh piglet 9))

109 100 5 ERROR: Wrong type to apply: (see errobj) ; in expression: ( 3 6 pooh piglet 9) ; in top level environment > ' ( 2) ((3 alice 6) hatter (9 2)) 4 ((3 alice 6) hatter ((1 2) (3 4))) 6 ((3 alice 6) ((1 (2)))) 4 s count-numbers-1a car 1: s s 0 2: s : 1 2-1: (car s) : (car s) (cdr s) s 2 2-2: (car s) : (cdr s) 1 s 3 2-3: : (cdr s) s count-number-2a (define (count-numbers-2a s) (if (null? s) 0 1

110 (cond ((list? (car s)) (+ (count-numbers-2a (car s)) (count-numbers-2a (cdr s)))) 2-1 ((number? (car s)) (+ (count-numbers-2a (cdr s)) 1)) 2-2 (else (count-numbers-2a (cdr s)))))) 2-3 (1 2 rabbit owl) (1 2) (pooh honey) () (4 5 6) (4 5 6) s 1: s 2: s 1 2-1: (car s) (car s) (cdr s) cons 2 2-2: (car s) (cdr s) (define (collect-numbers s) (if (null? s) '() 1 (if (number? (car s)) (cons (car s) (collect-numbers (cdr s))) 2-1 (collect-numbers (cdr s))))) 2-2

111 102 5 ( ) ( ) () () s 1: s 2: s (car s) (cdr s) cons (define (squared-numbers s) (if (null? s) '() 1 (cons (* (car s) (car s)) 2 (squeared-numbers (cdr s))))) 1 ( ) 0 (pooh piglet 2001) 2 ( (owl rabbit)) 0 2 ( ) ( ) 0 (pooh piglet 2001) 2 ( (owl rabbit)) 2

112 ( ) 2 (pooh piglet 2001) 1 ( (owl rabbit)) num sym ( ) (1 pooh honey 2) (num sym sym num) (owl rabbit) (sym sym) () () 7 ( : string-append) ("Winnie" "-the-" "Pooh") "Winnie-the-Pooh" ("Pooh") "Pooh"

113 : 2 94 ( 2: ) ( ) A 1 2 A 3 A 4 5 ( ) (!) ( )

114 53 1: *ADDRESS-BOOK* *ADDRESS-BOOK-OPENED* (open) (close) 6 *ADDRESS-BOOK-STATE* ;;; (define *ADDRESS-BOOK* '()) ;;; (define *ADDRESS-BOOK-STATE* #f) ; (define *ADDRESS-BOOK-OPENED* #f) ; ; ; 7 (yumiko ) ((mayuko ) (misako ) (hikaru ) ) 6 7 ;

115 106 5 car ( ) make-address-item 8 ; (define (make-address-item name phone) (list name phone)) ; (define (get-name item) (car item)) ; (define (get-phone item) (cadr item)) ; (define (make-new-address-book) (set! *ADDRESS-BOOK* '())) cons add-to-address-book 8 Scheme

116 53 1: 107 *ADDRESS-BOOK* *ADDRESS-BOOK-STATE* () Misako Mayuko Narimi Chisato : ; (define (add-to-address-book name phone) (set! *ADDRESS-BOOK* (cons (make-address-item name phone) *ADDRESS-BOOK*))) make-address-item 2 (address-book) Chisato, Mayuko, Narimi, Misako 4 ; (define (address-book) (make-new-address-book) (add-initial-address)) ;;; (define (add-initial-address) (add-to-address-book 'Chisato ' ) (add-to-address-book 'Narimi ' ) (add-to-address-book 'Mayuko ' ) (add-to-address-book 'Misako ' )) *ADDRESS-BOOK-OPENED*

117 108 5 *ADDRESS-BOOK-OPENED* ; (define (open-address-book) (set! *ADDRESS-BOOK-STATE* *ADDRESS-BOOK*) (set! *ADDRESS-BOOK-OPENED* #t)) ; (define (close-address-book) (set! *ADDRESS-BOOK-OPENED* #f)) 52 *ADDRESS-BOOK* *ADDRESS-BOOK-STATE* cdr read-address 2 lookup-address next-address lookup-address *ADDRESS-BOOK-STATE* lookup-address ; ( ) (define (lookup-address) (if *ADDRESS-BOOK-OPENED* (car *ADDRESS-BOOK-STATE*) (error:not-opened))) *ADDRESS-BOOK-OPENED* *ADDRESS-BOOK-STATE* ( ) next-address *ADDRESS-BOOK-STATE*

118 53 1: 109 ; (define (next-address) (if *ADDRESS-BOOK-OPENED* (set! *ADDRESS-BOOK-STATE* (cdr *ADDRESS-BOOK-STATE*)) (error:not-opened))) 2 read-address ; ( ) (define (read-address) (if *ADDRESS-BOOK-OPENED* (let ((value (lookup-address))) (next-address) value) (error:not-opened))) *ADDRESS-BOOK-STATE* (car *ADDRESS-BOOK-STATE*) car end-of-address-book? ; (define (end-of-address-book?) (if *ADDRESS-BOOK-OPENED* (null? *ADDRESS-BOOK-STATE*) (error:not-opened))) (define (error:opened) (error "Already opened")) (define (error:not-opened) (error "Not opened")) error ( )

119 110 5 ;;; addressscm ( ) ;;; (define *ADDRESS-BOOK* '()) ;;; (define *ADDRESS-BOOK-STATE* #f) ; (define *ADDRESS-BOOK-OPENED* #f) ; ;;; ; (define (make-address-item name phone) (list name phone)) ; (define (get-name item) (car item)) ; (define (get-phone item) (cadr item)) ;;; ; (define (make-new-address-book) (set! *ADDRESS-BOOK* '())) ; (define (add-to-address-book name phone) (set! *ADDRESS-BOOK* (cons (make-address-item name phone) *ADDRESS-BOOK*))) ; (define (address-book) (make-new-address-book) (add-initial-address)) ;;; (define (add-initial-address) (add-to-address-book 'Chisato ' ) (add-to-address-book 'Narimi ' ) (add-to-address-book 'Mayuko ' ) (add-to-address-book 'Misako ' )) ;;; ; (define (open-address-book) (set! *ADDRESS-BOOK-STATE* *ADDRESS-BOOK*) (set! *ADDRESS-BOOK-OPENED* #t)) ; (define (close-address-book) (set! *ADDRESS-BOOK-OPENED* #f))

120 53 1: 111 ; ( ) (define (read-address) (if *ADDRESS-BOOK-OPENED* (let ((value (lookup-address))) (next-address) value) (error:not-opened))) ; ( ) (define (lookup-address) (if *ADDRESS-BOOK-OPENED* (car *ADDRESS-BOOK-STATE*) (error:not-opened))) ; (define (next-address) (if *ADDRESS-BOOK-OPENED* (set! *ADDRESS-BOOK-STATE* (cdr *ADDRESS-BOOK-STATE*)) (error:not-opened))) ; (define (end-of-address-book?) (if *ADDRESS-BOOK-OPENED* (null? *ADDRESS-BOOK-STATE*) (error:not-opened))) ;;; (define (error:opened) (error "Already opened")) (define (error:not-opened) (error "Not opened")) 532 (address-book) (add-to-address-book h i h i) (open-address-book) (close-address-book)

SCM (v0201) ( ) SCM 2 SCM 3 SCM SCM 2.1 SCM SCM SCM (1) MS-DOS (2) Microsoft(R) Windows 95 (C)Copyright Microsoft Corp

SCM (v0201) ( ) SCM 2 SCM 3 SCM SCM 2.1 SCM SCM SCM (1) MS-DOS (2) Microsoft(R) Windows 95 (C)Copyright Microsoft Corp SCM (v0201) ( ) 14 4 20 1 SCM 2 SCM 3 SCM 4 5 2 SCM 2.1 SCM SCM 2 1 2 SCM (1) MS-DOS (2) Microsoft(R) Windows 95 (C)Copyright Microsoft Corp 1981-1996. 1 (3) C:\WINDOWS>cd.. C:\>cd scm C:\SCM> C:\SCM>

More information

X Window System X X &

X Window System X X & 1 1 1.1 X Window System................................... 1 1.2 X......................................... 1 1.3 X &................................ 1 1.3.1 X.......................... 1 1.3.2 &....................................

More information

GNU Emacs GNU Emacs

GNU Emacs GNU Emacs GNU Emacs 2015 10 2 1 GNU Emacs 1 1.1....................................... 1 1.2....................................... 1 1.2.1..................................... 1 1.2.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 Z Z m, n Z m n m, n A m, n B m=n (1) A, B (2) A B = A B = Z/ π : Z Z/ (3) A B Z/ (4) Z/ A, B (5) f : Z Z f(n) = n f = g π g : Z/ Z A, B (6)

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

(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

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

1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 5 3. 4. 5. A0 (1) A, B A B f K K A ϕ 1, ϕ 2 f ϕ 1 = f ϕ 2 ϕ 1 = ϕ 2 (2) N A 1, A 2, A 3,... N A n X N n X N, A n N n=1 1 A1 d (d 2) A (, k A k = O), A O. f

More information

Microsoft PowerPoint - IntroAlgDs-05-7.ppt

Microsoft PowerPoint - IntroAlgDs-05-7.ppt アルゴリズムとデータ構造入門 2005 年 11 月 15 日 アルゴリズムとデータ構造入門 2. データによる抽象の構築 2 Building Abstractions with Data 奥乃 博 具体から抽象へは行けるが 抽象から具体へは行けない ( 畑村洋太郎 直観でわかる数学 岩波書店 ) 1 11 月 15 日 本日のメニュー 2 Building Abstractions with Data

More information

n 第1章 章立ての部分は、書式(PC入門大見出し)を使います

n 第1章 章立ての部分は、書式(PC入門大見出し)を使います FORTRAN FORTRAN FORTRAN ) DO DO IF IF FORTRAN FORTRAN(FORmula TRANslator)1956 IBM FORTRAN IV FORTRAN77 Fortran90 FORTRAN77 FORTRAN FORTARN IF, DO C UNIX FORTRAN PASCAL COBOL PL/I BASIC Lisp PROLOG Lisp

More information

all.dvi

all.dvi fortran 1996 4 18 2007 6 11 2012 11 12 1 3 1.1..................................... 3 1.2.............................. 3 2 fortran I 5 2.1 write................................ 5 2.2.................................

More information

Microsoft Word - Sample_CQS-Report_English_backslant.doc

Microsoft Word - Sample_CQS-Report_English_backslant.doc ***** Corporation ANSI C compiler test system System test report 2005/11/16 Japan Novel Corporation *****V43/NQP-DS-501-1 Contents Contents......2 1. Evaluated compiler......3 1.1. smp-compiler compiler...3

More information

r3.dvi

r3.dvi 2012 3 / Lisp(2) 2012.4.19 1 Lisp 1.1 Lisp Lisp (1) (setq) (2) (3) setq defun (defun (... &aux...)...) ( ) ( nil ) [1]> (defun sisoku (x y &aux wa sa sho seki) (setq wa (+ x y)) (setq sa (- x y)) (setq

More information

r3.dvi

r3.dvi / 94 2 (Lisp ) 3 ( ) 1994.5.16,1994.6.15 1 cons cons 2 >(cons a b) (A. B).? Lisp (S ) cons 2 car cdr n A B C D nil = (A B C D) nil nil A D E = (A (B C) D E) B C E = (A B C D. E) A B C D B = (A. B) A nil.

More information

Fortran90/95 [9]! (1 ) " " 5 "Hello!"! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1

Fortran90/95 [9]! (1 )   5 Hello!! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1 Fortran90/95 2.1 Fortran 2-1 Hello! 1 program example2_01! end program 2! first test program ( ) 3 implicit none! 4 5 write(*,*) "Hello!"! write Hello! 6 7 stop! 8 end program example2_01 1 program 1!

More information

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for embedded systems that use microcontrollers (MCUs)

More information

0 (18) /12/13 (19) n Z (n Z ) 5 30 (5 30 ) (mod 5) (20) ( ) (12, 8) = 4

0   (18) /12/13 (19) n Z (n Z ) 5 30 (5 30 ) (mod 5) (20) ( ) (12, 8) = 4 0 http://homepage3.nifty.com/yakuikei (18) 1 99 3 2014/12/13 (19) 1 100 3 n Z (n Z ) 5 30 (5 30 ) 37 22 (mod 5) (20) 201 300 3 (37 22 5 ) (12, 8) = 4 (21) 16! 2 (12 8 4) (22) (3 n )! 3 (23) 100! 0 1 (1)

More information

AN 100: ISPを使用するためのガイドライン

AN 100: ISPを使用するためのガイドライン ISP AN 100: In-System Programmability Guidelines 1998 8 ver.1.01 Application Note 100 ISP Altera Corporation Page 1 A-AN-100-01.01/J VCCINT VCCINT VCCINT Page 2 Altera Corporation IEEE Std. 1149.1 TCK

More information

ohp1.dvi

ohp1.dvi 2008 1 2008.10.10 1 ( 2 ) ( ) ( ) 1 2 1.5 3 2 ( ) 50:50 Ruby ( ) Ruby http://www.ruby-lang.org/ja/ Windows Windows 3 Web Web http://lecture.ecc.u-tokyo.ac.jp/~kuno/is08/ / ( / ) / @@@ ( 3 ) @@@ :!! ( )

More information

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa I 2017 11 1 SageMath SageMath( Sage ) Sage Python Sage Python Sage Maxima Maxima Sage Sage Sage Linux, Mac, Windows *1 2 Sage Sage 4 1. ( sage CUI) 2. Sage ( sage.sage ) 3. Sage ( notebook() ) 4. Sage

More information

Microsoft PowerPoint - IntroAlgDs-06-8.ppt

Microsoft PowerPoint - IntroAlgDs-06-8.ppt アルゴリズムとデータ構造入門 2006 年 11 月 21 日 アルゴリズムとデータ構造入門 2. データによる抽象の構築 2.2 階層データ構造と閉包性 奥乃博大学院情報学研究科知能情報学専攻知能メディア講座音声メディア分野 http://winnie.kuis.kyoto-u.ac.jp/~okuno/lecture/06/introalgds/ okuno@i.kyoto-u.ac.jp 12

More information

Pascal Pascal Free Pascal CPad for Pascal Microsoft Windows OS Pascal

Pascal Pascal Free Pascal CPad for Pascal Microsoft Windows OS Pascal Pascal Pascal Pascal Free Pascal CPad for Pascal Microsoft Windows OS 2010 10 1 Pascal 2 1.1.......................... 2 1.2.................. 2 1.3........................ 3 2 4 2.1................................

More information

Microsoft PowerPoint - IntroAlgDs-05-2.ppt

Microsoft PowerPoint - IntroAlgDs-05-2.ppt アルゴリズムとデータ構造入門 2005 年 10 月 11 日 アルゴリズムとデータ構造入門 1. 手続きによる抽象の構築 1.1 プログラムの要素 奥乃 博 1. TUT Schemeが公開されました. Windowsは動きます. Linux, Cygwin はうまく行かず. 調査中. 2. 随意課題 7の追加 友人の勉学を助け,TAの手伝いをする. 支援した内容を毎回のレポート等で詳細に報告.

More information

Microsoft PowerPoint - IntroAlgDs pptx

Microsoft PowerPoint - IntroAlgDs pptx アルゴリズムとデータ構造入門 -11 2013 年 12 月 17 日 大学院情報学研究科知能情報学専攻 http://winnie.kuis.kyotou.ac.jp/~okuno/lecture/13/introalgds/ okuno@i.kyoto-u.ac.jp if mod( 学籍番号の下 3 桁,3) 0 if mod( 学籍番号の下 3 桁,3) 1 if mod( 学籍番号の下 3

More information

joho09.ppt

joho09.ppt s M B e E s: (+ or -) M: B: (=2) e: E: ax 2 + bx + c = 0 y = ax 2 + bx + c x a, b y +/- [a, b] a, b y (a+b) / 2 1-2 1-3 x 1 A a, b y 1. 2. a, b 3. for Loop (b-a)/ 4. y=a*x*x + b*x + c 5. y==0.0 y (y2)

More information

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble 25 II 25 2 6 13:30 16:00 (1),. Do not open this problem boolet until the start of the examination is announced. (2) 3.. Answer the following 3 problems. Use the designated answer sheet for each problem.

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1 I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming

More information

6-1

6-1 6-1 (data type) 6-2 6-3 ML, Haskell, Scala Lisp, Prolog (setq x 123) (+ x 456) (setq x "abc") (+ x 456) ; 6-4 ( ) subtype INDEX is INTEGER range -10..10; type DAY is (MON, TUE, WED, THU, FRI, SAT, SUN);

More information

2

2 2011.11.11 1 2 MapReduce 3 4 5 6 Functional Functional Programming 7 8 9 10 11 12 13 [10, 20, 30, 40, 50] 0 n n 10 * 0 + 20 * 1 + 30 * 2 + 40 * 3 + 50 *4 = 400 14 10 * 0 + 20 * 1 + 30 * 2 + 40 * 3 + 50

More information

,,,,., C Java,,.,,.,., ,,.,, i

,,,,., C Java,,.,,.,., ,,.,, i 24 Development of the programming s learning tool for children be derived from maze 1130353 2013 3 1 ,,,,., C Java,,.,,.,., 1 6 1 2.,,.,, i Abstract Development of the programming s learning tool for children

More information

Revised 5 Report on the Algorithmic Language Scheme [ Scheme ] RICHARD KELSEY, WILLIAM CLINGER, AND JONATHAN REES (Editors) H. ABELSON R. K. DYBVIG C.

Revised 5 Report on the Algorithmic Language Scheme [ Scheme ] RICHARD KELSEY, WILLIAM CLINGER, AND JONATHAN REES (Editors) H. ABELSON R. K. DYBVIG C. Revised 5 Report on the Algorithmic Language Scheme [ Scheme ] RICHARD KELSEY, WILLIAM CLINGER, AND JONATHAN REES (Editors) H. ABELSON R. K. DYBVIG C. T. HAYNES G. J. ROZAS N. I. ADAMS IV D. P. FRIEDMAN

More information

program.dvi

program.dvi 2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation

More information

main.dvi

main.dvi 1 F77 5 hmogi-2008f@kiban.civil.saitama-u.ac.jp 2013/5/13 1 2 f77... f77.exe f77.exe CDROM (CDROM D D: setupond E E: setupone 5 C:work\T66160\20130422>f77 menseki.f -o menseki f77(.exe) f77 f77(.exe) C:work\T66160\20130422>set

More information

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC PBASIC 2.5 PBASIC 2.5 BASIC Stamp Editor / Development System Version 2.0 Beta Release 2 2.0 PBASIC BASIC StampR PBASIC PBASIC PBASIC 2.5 Parallax, Inc. PBASIC 2.5 PBASIC 2.5 support@microbot-ed.com 1

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

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir 13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software 37.1 37.1 Nspire Nspire Nspire 37.1: Student Software 13 2 13 Student Software esc

More information

2006 [3] Scratch Squeak PEN [4] PenFlowchart 2 3 PenFlowchart 4 PenFlowchart PEN xdncl PEN [5] PEN xdncl DNCL 1 1 [6] 1 PEN Fig. 1 The PEN

2006 [3] Scratch Squeak PEN [4] PenFlowchart 2 3 PenFlowchart 4 PenFlowchart PEN xdncl PEN [5] PEN xdncl DNCL 1 1 [6] 1 PEN Fig. 1 The PEN PenFlowchart 1,a) 2,b) 3,c) 2015 3 4 2015 5 12, 2015 9 5 PEN & PenFlowchart PEN Evaluation of the Effectiveness of Programming Education with Flowcharts Using PenFlowchart Wataru Nakanishi 1,a) Takeo Tatsumi

More information

1 1.1 (JCPRG) 30 Nuclear Reaction Data File (NRDF) PC GSYS2.4 JCPRG GSYS2.4 Java Windows, Linux, Max OS X, FreeBSD GUI PNG, GIF, JPEG X Y GSYS2

1 1.1 (JCPRG) 30 Nuclear Reaction Data File (NRDF) PC GSYS2.4 JCPRG GSYS2.4 Java Windows, Linux, Max OS X, FreeBSD GUI PNG, GIF, JPEG X Y GSYS2 (GSYS2.4) GSYS2.4 Manual SUZUKI Ryusuke Hokkaido University Hospital Abstract GSYS2.4 is an update version of GSYS version 2. Main features added in this version are Magnifying glass function, Automatically

More information

Microsoft PowerPoint - IntroAlgDs-05-5.ppt

Microsoft PowerPoint - IntroAlgDs-05-5.ppt アルゴリズムとデータ構造入門 25 年 月 日 アルゴリズムとデータ構造入門. 手続きによる抽象の構築.3 Formulating Astractions with Higher-Order Procedures ( 高階手続きによる抽象化 ) 奥乃 博. 3,5,7で割った時の余りが各々,2,3という数は何か? 月 日 本日のメニュー.2.6 Example: Testing for Primality.3.

More information

Microsoft PowerPoint - enshu4.ppt [äº™æ‘łã…¢ã…¼ã…›]

Microsoft PowerPoint - enshu4.ppt [äº™æ‘łã…¢ã…¼ã…›] 4. リスト, シンボル, 文字列 説明資料 本日の内容 1. リストとは 2. Scheme プログラムでのリストの記法 list 句 3. リストに関する演算子 first, rest, empty?, length, list-ref, append 4. 数字, シンボル, 文字列を含むリスト 1. Scheme でのシンボルの記法 2. Scheme での文字列の記法 リストとは 15 8

More information

たのしいプログラミング Pythonではじめよう!

たのしいプログラミング Pythonではじめよう! Title of English-language original: Python for Kids A Playful Introduction to Programming ISBN 978-1-59327-407-8, published by No Starch Press, Inc. Copyright 2013 by Jason R. Briggs. Japanese-language

More information

1 NScripter 1 [ NScripter ] NScripter NScripter 2 nathki bugyo 1 http://www.shuwasystem.co.jp/cgi-bin/detail.cgi?isbn=4-7980-1104-5 2 http://www.pulltop.com/gp04/ 2 NScripter NScripter BASIC ( ) NScLisper

More information

05 I I / 56

05 I I / 56 05 I 2015 2015.05.14 I 05 2015.05.14 1 / 56 I 05 2015.05.14 2 / 56 cd mkdir vis01 OK cd vis01 cp /tmp/150514/leibniz.*. I 05 2015.05.14 3 / 56 I 05 2015.05.14 4 / 56 Information visualization Data visualization,

More information

スパコンに通じる並列プログラミングの基礎

スパコンに通じる並列プログラミングの基礎 2016.06.06 2016.06.06 1 / 60 2016.06.06 2 / 60 Windows, Mac Unix 0444-J 2016.06.06 3 / 60 Part I Unix GUI CUI: Unix, Windows, Mac OS Part II 0444-J 2016.06.06 4 / 60 ( : ) 6 6 ( ) 6 10 6 16 SX-ACE 6 17

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

fx-9860G Manager PLUS_J

fx-9860G Manager PLUS_J fx-9860g J fx-9860g Manager PLUS http://edu.casio.jp k 1 k III 2 3 1. 2. 4 3. 4. 5 1. 2. 3. 4. 5. 1. 6 7 k 8 k 9 k 10 k 11 k k k 12 k k k 1 2 3 4 5 6 1 2 3 4 5 6 13 k 1 2 3 1 2 3 1 2 3 1 2 3 14 k a j.+-(),m1

More information

グラフ数値読み取りシステム (GSYS2.4) 利用の手引

グラフ数値読み取りシステム (GSYS2.4) 利用の手引 (GSYS2.4) GSYS2.4 Manual SUZUKI Ryusuke Hokkaido University Hospital 2011 6 7 Abstract GSYS2.4 is an update version of GSYS version 2. Main features added in this version are Magnifying glass function,

More information

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè11²ó

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè11²ó 11 2013 6 19 11 (6/19) 6 (18:10-19:40) λ13 UNIX : 2 / 26 UNIX UNIX sort, head, tail, cat, cut diff, tee, grep, uniq, wc join, find, sed, awk, screen 3 / 26 sort sort : $ sort [options] [FILE...] options

More information

syspro-0405.ppt

syspro-0405.ppt 3 4, 5 1 UNIX csh 2.1 bash X Window 2 grep l POSIX * more POSIX 3 UNIX. 4 first.sh #!bin/sh #first.sh #This file looks through all the files in the current #directory for the string yamada, and then prints

More information

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 (Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 17 Fortran Formular Tranlator Lapack Fortran FORTRAN, FORTRAN66, FORTRAN77, FORTRAN90, FORTRAN95 17.1 A Z ( ) 0 9, _, =, +, -, *,

More information

コンピュータ概論

コンピュータ概論 4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For

More information

学習内容と日常生活との関連性の研究-第2部-第4章-1

学習内容と日常生活との関連性の研究-第2部-第4章-1 69 V A V + A V A 2A 2 http://www.jba-hp.jp/ http://www.kbn3.com/ http://www.usba.org/ 70 (1) (1996)35 7 pp.28-33 (2) (1994) 71 () 3 1 1 99 8 1 10 1 11.3 2.5 1 100 11.4 30.9 1 72 (1) http://www.stat.go.jp/data/zensho/1999/zuhyou/a906-6.xls

More information

Microsoft PowerPoint - IntroAlgDs-05-4.ppt

Microsoft PowerPoint - IntroAlgDs-05-4.ppt アルゴリズムとデータ構造入門 2005 年 0 月 25 日 アルゴリズムとデータ構造入門. 手続きによる抽象の構築.2 Procedures and the Processes They generate ( 手続きとそれが生成するプロセス ) 奥乃 博. TUT Scheme が公開されました. Windows は動きます. Linux, Cygwin も動きます. 0 月 25 日 本日のメニュー.2.

More information

51 Lego MindStorms Lisp XS Lego MindStorms 8 CPU RCX RCX Lisp XS XS RCX PC Scheme Lego MindStorms is a robot development kit which makes it possible t

51 Lego MindStorms Lisp XS Lego MindStorms 8 CPU RCX RCX Lisp XS XS RCX PC Scheme Lego MindStorms is a robot development kit which makes it possible t 51 Lego MindStorms Lisp XS Lego MindStorms 8 CPU RCX RCX Lisp XS XS RCX PC Scheme Lego MindStorms is a robot development kit which makes it possible to control one s own robot by attaching various sensors

More information

2017 (413812)

2017 (413812) 2017 (413812) Deep Learning ( NN) 2012 Google ASIC(Application Specific Integrated Circuit: IC) 10 ASIC Deep Learning TPU(Tensor Processing Unit) NN 12 20 30 Abstract Multi-layered neural network(nn) has

More information

I117 II I117 PROGRAMMING PRACTICE II SOFTWARE DEVELOPMENT ENV. 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara

I117 II I117 PROGRAMMING PRACTICE II SOFTWARE DEVELOPMENT ENV. 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara I117 II I117 PROGRAMMING PRACTICE II SOFTWARE DEVELOPMENT ENV. 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of

More information

I

I I 6 4 10 1 1 1.1............... 1 1................ 1 1.3.................... 1.4............... 1.4.1.............. 1.4................. 1.4.3........... 3 1.4.4.. 3 1.5.......... 3 1.5.1..............

More information

1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf ("%s", str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i

1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf (%s, str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i ABC066 / ARC077 writer: nuip 2017 7 1 For International Readers: English editorial starts from page 8. A : ringring a + b b + c a + c a, b, c a + b + c 1 # include < stdio.h> 2 3 int main (){ 4 int a,

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

More information

CM1-GTX

CM1-GTX CM1-GTX000-2002 R R i R ii 1-1 1-2 1-3 Process Variables Process Variables Pressure Output Analog Output Sensor Temp. Lower Range Value (0%) Upper Range Value (100%) Pressure Pressure Chart Pressure

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

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

C FGIH C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C

C FGIH C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C TUDSR5SET TUDSR5 C 7 8 9 ch DIGITAL CS TUNER C C C C S-A C FGIH C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C

More information

GPGPU

GPGPU GPGPU 2013 1008 2015 1 23 Abstract In recent years, with the advance of microscope technology, the alive cells have been able to observe. On the other hand, from the standpoint of image processing, the

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

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

Microsoft Word - D JP.docx

Microsoft Word - D JP.docx Application Service Gateway Thunder/AX Series vthunder ライセンスキー インストール 手順 1 1.... 3 2. vthunder... 3 3. ACOS... 3 4. ID... 5 5.... 8 6.... 8 61... 8 62 GUI... 10 2 1. 概要 2. vthunder へのアクセス 方法 SSHHTTPSvThunder

More information

Nios® II HAL API を使用したソフトウェア・サンプル集 「Modular Scatter-Gather DMA Core」

Nios® II HAL API を使用したソフトウェア・サンプル集 「Modular Scatter-Gather DMA Core」 ALTIMA Company, MACNICA, Inc Nios II HAL API Modular Scatter-Gather DMA Core Ver.17.1 2018 8 Rev.1 Nios II HAL API Modular Scatter-Gather DMA Core...3...3...4... 4... 5 3-2-1. msgdma... 6 3-2-2. On-Chip

More information

2

2 L C -24K 9 L C -22K 9 2 3 4 5 6 7 8 9 10 11 12 11 03 AM 04 05 0 PM 1 06 1 PM 07 00 00 08 2 PM 00 4 PM 011 011 021 041 061 081 051 071 1 2 4 6 8 5 7 00 00 00 00 00 00 00 00 30 00 09 00 15 10 3 PM 45 00

More information

スパコンに通じる並列プログラミングの基礎

スパコンに通じる並列プログラミングの基礎 2018.06.04 2018.06.04 1 / 62 2018.06.04 2 / 62 Windows, Mac Unix 0444-J 2018.06.04 3 / 62 Part I Unix GUI CUI: Unix, Windows, Mac OS Part II 2018.06.04 4 / 62 0444-J ( : ) 6 4 ( ) 6 5 * 6 19 SX-ACE * 6

More information

1 1 Gnuplot gnuplot Windows gnuplot gp443win32.zip gnuplot binary, contrib, demo, docs, license 5 BUGS, Chang

1 1 Gnuplot gnuplot   Windows gnuplot gp443win32.zip gnuplot binary, contrib, demo, docs, license 5 BUGS, Chang Gnuplot で微分積分 2011 年度前期 数学解析 I 講義資料 (2011.6.24) 矢崎成俊 ( 宮崎大学 ) 1 1 Gnuplot gnuplot http://www.gnuplot.info/ Windows gnuplot 2011 6 22 4.4.3 gp443win32.zip gnuplot binary, contrib, demo, docs, license 5

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 11 20 p.1/34 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

,, create table drop table alter table

,, create table drop table alter table PostgreSQL 1 1 2 1 3,, 2 3.1 - create table........................... 2 3.2 - drop table............................ 3 3.3 - alter table............................ 4 4 - copy 5 4.1..................................

More information

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page htt

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page   htt Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page http://www.stsci.edu/resources/software_hardware/specview http://specview.stsci.edu/javahelp/main.html Specview

More information

R1RW0408D シリーズ

R1RW0408D シリーズ お客様各位 カタログ等資料中の旧社名の扱いについて 2010 年 4 月 1 日を以って NEC エレクトロニクス株式会社及び株式会社ルネサステクノロジが合併し 両社の全ての事業が当社に承継されております 従いまして 本資料中には旧社名での表記が残っておりますが 当社の資料として有効ですので ご理解の程宜しくお願い申し上げます ルネサスエレクトロニクスホームページ (http://www.renesas.com)

More information

Solution Report

Solution Report CGE 3 GAMS * Date: 2018/07/24, Version 1.1 1 2 2 GAMSIDE 3 2.1 GAMS................................. 3 2.2 GAMSIDE................................ 3 2.3 GAMSIDE............................. 7 3 GAMS 11

More information

Platypus-QM β ( )

Platypus-QM β ( ) Platypus-QM β (2012.11.12) 1 1 1.1...................................... 1 1.1.1...................................... 1 1.1.2................................... 1 1.1.3..........................................

More information

Copyright Oracle Parkway, Redwood City, CA U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated softw

Copyright Oracle Parkway, Redwood City, CA U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated softw Oracle Solaris Studio 12.3 Part No: E26466 2011 12 Copyright 2011 500 Oracle Parkway, Redwood City, CA 94065 U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,

More information

listings-ext

listings-ext (6) Python (2) ( ) ohsaki@kwansei.ac.jp 5 Python (2) 1 5.1 (statement)........................... 1 5.2 (scope)......................... 11 5.3 (subroutine).................... 14 5 Python (2) Python 5.1

More information

RT300/140/105シリーズ 取扱説明書

RT300/140/105シリーズ 取扱説明書 REMOTE & BROADBAND ROUTER RT300i/RT140p/RT140f/RT140i RT140e/RT105p/RT105i/RT105e 2 3 4 5 6 7 8 9 10 Bold face Enter Ctrl Tab BS Del Console RT105i RT300i RT140p RT140f RT140i RT140e RT105p RT105i RT105e

More information

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment 28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment 1170288 2017 2 28 Docker,.,,.,,.,,.,. Docker.,..,., Web, Web.,.,.,, CPU,,. i ., OS..,, OS, VirtualBox,.,

More information

Microsoft Word - Win-Outlook.docx

Microsoft Word - Win-Outlook.docx Microsoft Office Outlook での設定方法 (IMAP および POP 編 ) How to set up with Microsoft Office Outlook (IMAP and POP) 0. 事前に https://office365.iii.kyushu-u.ac.jp/login からサインインし 以下の手順で自分の基本アドレスをメモしておいてください Sign

More information

ストラドプロシージャの呼び出し方

ストラドプロシージャの呼び出し方 Release10.5 Oracle DataServer Informix MS SQL NXJ SQL JDBC Java JDBC NXJ : NXJ JDBC / NXJ EXEC SQL [USING CONNECTION ] CALL [.][.] ([])

More information

OS Windows Mac OS Windows Mac OS Windows XP Mac OS X OS Windows 95 Mac OS

OS Windows Mac OS Windows Mac OS Windows XP Mac OS X OS Windows 95 Mac OS About use of the Chinese character which is not in a computer Reuse and sharing of data by the large-scale character set and the Macro program HUKUDA Sinobu 1 125000 800 JIS 2 2000 3 1 488 545 2 JIS X

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

1,.,,,., RDBM, SQL. OSS,, SQL,,.

1,.,,,., RDBM, SQL. OSS,, SQL,,. 1,.,,,., RDBM, SQL. OSS,, SQL,,. 3 10 10 OSS RDBMS SQL 11 10.1 OSS RDBMS............................ 11 10.1.1 PostgreSQL................................. 11 10.1.2 MySQL...................................

More information

EQUIUM EQUIUM S5010 1 1 1 2 3 4 2 1 2 3 2 3 1 2 3 4 5 6 7 8 4 1 2 3 5 1 2 1 2 3 4 5 6 7 6 1 3 7 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 4 5 6 7 8 1 1 2 3 4 10 1 11 12 1 13 14 1 15 1 16 1 1 17 1 2 18 3 1 4 5 19

More information

1 138

1 138 5 1 2 3 4 5 6 7 8 1 138 BIOS Setup Utility MainAdvancedSecurityPowerExit Setup Warning Item Specific Help Setting items on this menu to incorrect values may cause your system to malfunction. Select 'Yes'

More information

Ver.1 1/17/2003 2

Ver.1 1/17/2003 2 Ver.1 1/17/2003 1 Ver.1 1/17/2003 2 Ver.1 1/17/2003 3 Ver.1 1/17/2003 4 Ver.1 1/17/2003 5 Ver.1 1/17/2003 6 Ver.1 1/17/2003 MALTAB M GUI figure >> guide GUI GUI OK 7 Ver.1 1/17/2003 8 Ver.1 1/17/2003 Callback

More information

01_OpenMP_osx.indd

01_OpenMP_osx.indd OpenMP* / 1 1... 2 2... 3 3... 5 4... 7 5... 9 5.1... 9 5.2 OpenMP* API... 13 6... 17 7... 19 / 4 1 2 C/C++ OpenMP* 3 Fortran OpenMP* 4 PC 1 1 9.0 Linux* Windows* Xeon Itanium OS 1 2 2 WEB OS OS OS 1 OS

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

LC304_manual.ai

LC304_manual.ai Stick Type Electronic Calculator English INDEX Stick Type Electronic Calculator Instruction manual INDEX Disposal of Old Electrical & Electronic Equipment (Applicable in the European Union

More information

スパコンに通じる並列プログラミングの基礎

スパコンに通じる並列プログラミングの基礎 2018.09.10 furihata@cmc.osaka-u.ac.jp ( ) 2018.09.10 1 / 59 furihata@cmc.osaka-u.ac.jp ( ) 2018.09.10 2 / 59 Windows, Mac Unix 0444-J furihata@cmc.osaka-u.ac.jp ( ) 2018.09.10 3 / 59 Part I Unix GUI CUI:

More information

num2.dvi

num2.dvi kanenko@mbk.nifty.com http://kanenko.a.la9.jp/ 16 32...... h 0 h = ε () 0 ( ) 0 1 IEEE754 (ieee754.c Kerosoft Ltd.!) 1 2 : OS! : WindowsXP ( ) : X Window xcalc.. (,.) C double 10,??? 3 :, ( ) : BASIC,

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

pptx

pptx iphone 2010 8 18 C xkozima@myu.ac.jp C Hello, World! Hello World hello.c! printf( Hello, World!\n );! os> ls! hello.c! os> cc hello.c o hello! os> ls! hello!!hello.c! os>./hello! Hello, World!! os>! os>

More information

( ) [2] H 4 4! H 4 4! (5 4 3 )= = Fortran C 0 #include <stdio.h> 1 #include

( ) [2] H 4 4! H 4 4! (5 4 3 )= = Fortran C 0 #include <stdio.h> 1 #include J.JSSAC (2006) Vol. 12, No. 3, pp. 3-16 IIJ 2000 8 bit TULIPS KING KISS WINK 1 ( ) Ackermann GC [1] CPU 6502 wada@u-tokyo.ac.jp c 2006 Japan Society for Symbolic and Algebraic Computation 4 12 3 2006 (1943-05-16

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

エッセー

エッセー 5.13................................... 3 5.14........................................ 9 5.15.................................. 12 5.16................................ 15 5.17..................... 18 5.18...................................

More information