1 / 11

Teknik Kompilator (Compiler Techniques) IKI40800 Dosen: Heru Suhartanto staff.ui.ac.id/heru

Teknik Kompilator (Compiler Techniques) IKI40800 Dosen: Heru Suhartanto http://staff.ui.ac.id/heru E-mail: heru@cs.ui.ac.id Room : Gedung A, 1216. Kuliah ini membahas beberapa teknik pembuatan suatu kompilator berdasarkan tatabahasa yang diberikan.

avari
Download Presentation

Teknik Kompilator (Compiler Techniques) IKI40800 Dosen: Heru Suhartanto staff.ui.ac.id/heru

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

E N D

Presentation Transcript


  1. Teknik Kompilator (Compiler Techniques) IKI40800 Dosen: Heru Suhartanto http://staff.ui.ac.id/heru E-mail: heru@cs.ui.ac.id Room : Gedung A, 1216 • Kuliah ini membahas beberapa teknik pembuatan suatu kompilator berdasarkan tatabahasa yang diberikan. • Teknik-teknik ini akan dibahas sesuai dengan tahap pembuatan suatu kompilator. Dimulai dari tahap pembacaan program sumber, analisis tatabahasa, dan diakhiri oleh pembentukan kode (bahasa sasaran). • Peserta kuliah akan mempelajari model suatu kompilator sesuai dengan tahapan tersebut, mengembangkannya dengan menambah fitur-fitur suatu kompilator. Introduction

  2. References • Semester : Genap (was Ganjil in 2008/2009) • Compilers: Principles, Tehchniques, and Tools    Aho, A. V., Sethi, R., Ullman, J. D. Addison Wesley 1986 • Modern Compiler Implementation in Java http://www.cs.princeton.edu/~appel/modern/java/ • Dick Grune et. Al, Modern Compiler Design, John Wiley & Sons, 2000 • Lex - A Lexical Analyzer Generator (available on line - aol) • Yacc - Yet Another Compiler-Compiler (aol) • Heru Suhartanto, Model Pemroses Bahasa Pemrograman Dengan tools berbasis Java, 2006. , http://telaga.cs.ui.ac.id/~heru/publications/modeUserGuidelJava.pdf • Resources : see at scele Introduction

  3. Topics and Ref. To Text book • WeekTopicsChapters/Sections • 1-2 Introduction, Lexical Analysis              2.1-2.6,3.1--3.4 • 3-4 Parsing      2.4, 4.1-4.5, 4-7 • 5 Symbol Table 2.7, 7.6 • 5-6 Syntax directed translation                2.5, 5.1-5.5 • 7 Type checking                                   6.1-6.2 • 8 Run-time organization                      7.1-7.3, 7.4-7.5 • 9-10 Intermediate code generation         8.1-8.3 • 11-12 Code generation                                9.1-9-4 • 13 Code optimization                             10.1-10.2 Introduction

  4. Tools: http://telaga.cs.ui.ac.id/WebKuliah/IKI40800/jtools.html • http://www.cs.princeton.edu/~appel/modern/java/JLex/ • http://www.cs.princeton.edu/~appel/modern/java/CUP/ • http://www2.informatik.unibw-muenchen.de/Research/Tools/JACCIE/jaccie.html • http://www.jflex.de/ • http://troi.lincom-asg.com/~rjamison/byacc/ • http://www.javaworld.com/javaworld/jw-12-1996/jw-12-jack.html Introduction

  5. Jlex,CUP and Jaccie are available here at • http://telaga.cs.ui.ac.id/WebKuliah/IKI40800/tools/ • Cara penilaian : lihat BRP • Assignments : lihat BRP Introduction

  6. RULES • Exams and homework  Cheating=0 mark, • Homework  Deduction of 5% for each day lateness, unaccepted for 1 (or more) week delays. • Cheating : any kind of plagiarism ! Introduction

  7. Introduction: Definisi • A compiler is a program that accepts as input a program text in a certain language and produces as output a program text in another language, while preserving the meaning of that text. • The process is called translation. • The input is considered the source language and the output is target language. • The language the compiler itself is written in is called the implementation language. Introduction

  8. Introduction: kenapa perlu teknik kompilasi [4]? • Compiler construction is a very succesful branch of computer science, and one of the earliest to earn that predicate; • Given its close relation to file conversion, it has wider application than just compilers; • It contains many generally useful algorithms in a realistic setting. Introduction

  9. Introduction : proses kompilasi dan running a compiler [fig 1.1 – 4] Introduction

  10. Introduction: perbedaan compiler dan interpreter [fig 1.3 – 4] Introduction

  11. Introduction: struktur suatu kompilator [fig 1.21 – 4] AST :: Abstract Syntax Tree Introduction

More Related