강의 내용 및 방법 접근방법 –lambda calculus, proof of correctness 은 강의 간단히...

25
강강 강강 강 강강 접접접접 Lambda Calculus, Proof of Correctness 접 접접 접접접 접접 접접접 2 접접접 접접접접 1 접 접접 , term project 접 접접 (ABEEK 접 접접 접접접 ) 접 접접 접접접접 접 접접 접접 접접 접접 접접 , 접접 접 1~2 접 접접접 접접접접 접접접 75 접 (14:30-15:45), 접접 접접접접 접접

Upload: cornelia-bridges

Post on 04-Jan-2016

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

강의 내용 및 방법 접근방법

– Lambda Calculus, Proof of Correctness 은 강의 간단히 설명

리포트– 2 주일에 프로그램 1 개 정도 , term project 는 없음

(ABEEK 의 이론 과목임 ) – 각 장의 문제풀기 및 다른 문제 제공

시험– 중간 , 기말 및 1~2 회 정도의 쪽지시험

수업은 75 분 (14:30-15:45), 혹시 부족하면 보강

Page 2: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

참고자료 Http://borame.cs.pusan.ac.kr/lecture

– 강의참고자료 ( 한글 )– 2002 년 강의 내용– 2002 년 리포트 , 기타 참고사항– 2003, 2004, 2005, 2006 년 강의노트– 다른 대학교 , 자료 , 우균 교수 자료 ( 한글 ) 참고

강의 중에 이해가 안 되는 부분은 언제나 홈페이지의 묻고 답하기에 질문할 수 있음

Page 3: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Introduction

Programming Language Design and Implementation (4th Edition)

by T. Pratt and M. ZelkowitzPrentice Hall, 2001

Sections 1-1.3.2

Page 4: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

언어란 ?

생각을 표현하는 도구 !! 정보를 교환하는 도구 !!– 개념화 : 물체 (Object), 물체와 관계 , 추상화

• 중력의 법칙 , 예측– 인간은 전체를 듣지 않고도 부분을 이해함 , 스스로

보완하여 인식함 프로그래밍언어 !!

– 우리의 생각을 컴퓨터가 처리할 수 있게 표현하는 도구– 조금만 틀려도 이해 못함– 오류가 없는 프로그램은 만들 수 없음– 기계와 인간 간의 간격을 줄일수록 바람직함– 기계뿐 아니라 인간도 이해해야 함 ( 쉽게 프로그램할

수 있어야 )

Page 5: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Organization of Programming Languages

Understand how languages are designed and implemented

구조– Lexicon – What sorts of words are legal?– Syntax -- What a program looks like?– Semantics -- What a program means?

Implementation -- How a program executes Understand most appropriate language for solving

specific problems, For example:– Pascal, C -- procedural, statement oriented– C++, Java, Smalltalk -- Object oriented– ML, Lisp -- Functional – Prolog -- Rule-based– JavaScript, PHP – Procedural, Event-driven

accessing

Page 6: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Language Goals During 1950s--1960s - Compile programs to execut

e efficiently. – There is a direct connection between language features and hardware - integers, reals, goto statements

– Programmers cheap; Machines expensive; Keep the machine busy

But today– Compile programs that are built efficiently– CPU power and memory very cheap– Direct connection between language features and design concepts - encapsulation, records, inheritance, functionality, assertions

– Event-driven programming, Service-oriented approach, Web-service, Very High-level Language

Page 7: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Era Application Majorlanguages

Otherlanguages

Business COBOL AssemblerScientific FORTRAN Algol, BASIC,

APLSystem Assembler JOVIAL, Forth

1960s

Artificialintelligence

LISP SNOBOL

Business COBOL, C++,Java, spreadsheet

C, PL/I, 4GLs

Scientific FORTRAN, C,C++, Java

BASIC

System C, C++, Java Ada, BASIC,Modula

Artificialintelligence

LISP, Prolog

Publishing TeX, Postscript,word processing

Process UNIX shell, TCL,Perl, Javascript

AWK, Marvel,SED

Today

New paradigms ML, Smalltalk Eiffel

Page 8: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Why study programming languages? (1)

To improve your ability to develop effective algorithms– Improper use of recursion– Object-oriented programming, logic programming, c

oncurrent programming To improve your use of your existing programm

ing language– Data structures for arrays, strings, lists, recor

ds, set, bag, table (associative array)– Malloc() garbage collection– Implementation details of recursion, object class

es, subroutine calls, exception(event) handling …– Service-oriented developing

• Web-service, Semantic web, Script language

Page 9: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Why study programming languages? (2)

To increase your vocabulary of useful programming constructs– Increase programming vocabulary and its implementati

on tech.– Coroutine, Semaphore, event-driven programming, asso

ciative array

To allow a better choice of programming language– Numeric computation : C, FORTRAN, Ada– AI : LISP, Prolog– Internet applications : Perl, Java, HTML, XML, Web S

ervice(SOAP), PHP

Page 10: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Why study programming languages? (3)

To make it easier to learn a new language– Web programming (JavaScript, PHP), Semantic web

To make it easier to design a new language– User interface design

*** C, COBOL, SMALLTALK 의 덧셈의 속도차이를 초래하는 언어개념 및 구현의 차이

Page 11: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Evolution of software architecture

1950s - Large expensive mainframe computers ran single programs (Batch processing)

1960s - Interactive programming (time-sharing) on mainframes

1970s - Development of Minicomputers and first microcomputers. Apple II. Early work on windows, icons, and PCs at XEROX PARC

1980s - Personal computer - Microprocessor, IBM PC and Apple Macintosh. Use of windows, icons and mouse

1990s - Client-server computing - Networking, The Internet, the World Wide Web

2000s - P2P, Grid Computing, Web Service, Event-driven approach, Service-oriented programming, Script language, …

Page 12: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Attributes of a good language (1)

Clarity, simplicity, and unity - provides both a framework for thinking about algorithms and a means of expressing those algorithms – Conceptual integrity– 나쁜 예 : APL, SNOBOL4

Orthogonality - every combination of features is meaningful– Fewer exceptions C 언어에서 !!!– Logical errors and inefficiency

Page 13: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음
Page 14: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음
Page 15: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Attributes of a good language(2)

Naturalness for the application - program structure reflects the logical structure of algorithm– Sequential algorithm, concurrent algorithm, logic

algorithm, non-deterministic algorithm– Appropriate data structures, operations, control

structures, natural syntax

Support for abstraction - program data reflects problem being solved– Data abstraction <D,O,C> – Encapsulation

Page 16: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Attributes of a good language (3)

Ease of program verification - verifying that program correctly performs its required function – Verification/validation– Comments, assert()– Design specification

Programming environment - external support for the language– Debugger, syntax-directed editor– Supporting function, platforms– Smalltalk – Supporting all the software lifecycle phases

Page 17: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Attributes of a good language (continued)

Portability of programs - transportability of the resulting programs from the computer on which they are developed to other computer systems– Transportability– C, C++, Pascal Java (Byte-code)– ML : single source implementation

Cost of use - program execution, program translation, program creation, and program maintenance– Code optimization, (Smalltalk, Perl), lifecycle costs

Page 18: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Language paradigms

Imperative languages – Goal is to understand a machine state (set of

memory locations, each containing a value)– Statement oriented languages that change machine

state (C, Pascal, FORTRAN, COBOL)– Syntax: S1, S2, S3, ...

Applicative (functional) languages– Goal is to understand the function that produces

the answer– Function composition is major operation (ML, LISP)– Syntax: P1(P2(P3(X)))– Programming consists of building the function that

computes the answer

Page 19: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음
Page 20: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음
Page 21: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음
Page 22: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

Language paradigms (continued)

Rule-based languages– Specify rule that specifies problem solution

(Prolog, BNF Parsing)– Other examples: Decision procedures, Grammar rules

(BNF)– Syntax: Answer specification rule– Programming consists of specifying the attributes of

the answer

Object-oriented languages– Imperative languages that merge applicative design

with imperative statements (Java, C++, Smalltalk)– Syntax: Set of objects (classes) containing data

(imperative concepts) and methods (applicative concepts)

Page 23: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음
Page 24: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

New Paradigm

Internet, Home Computing, Ubiquitous Computing, Embedded Computing, etc

Languages and Compilers that are smart, small and safe– Moveable code agents– Independent from machines and programming

environments– Supporting pragmatics or intelligence

Java, XML, Mobile computing. Mobile code Event driven approach, Service-oriented Architecture,

Web Service

Page 25: 강의 내용 및 방법 접근방법 –Lambda Calculus, Proof of Correctness 은 강의 간단히 설명 리포트 –2 주일에 프로그램 1 개 정도, term project 는 없음

다음을 조사하라 !!

(1) 왜 ActiveX 가 새로운 Windows( 비스타 )에서 문제를 발생하는가 ? 왜 우리나라에서 유달리 ActiveX 를 많이 쓰는가 ? – ActiveX 대신 문제를 해결하는 방법은 ?

Wikipedia 를 참고하라 !!! (2) Orthogonality 가 C 언어에서 발생시킬 수

있는 오류의 예를 들어라 !