理工学部Faculty of Science and Engineering
COT300XE(計算基盤 / Computing technologies 300)コンパイラCompiler
和佐 州洋Kunihiro WASA
授業コードなどClass code etc
学部・研究科Faculty/Graduate school | 理工学部Faculty of Science and Engineering |
添付ファイル名Attached documents | |
年度Year | 2024 |
授業コードClass code | H6049 |
旧授業コードPrevious Class code | |
旧科目名Previous Class title | |
開講時期Term | 春学期授業/Spring |
曜日・時限Day/Period | 水曜4時限水4/Wed.4 |
科目種別Class Type | |
キャンパスCampus | 小金井 |
教室名称Classroom name | 小南館‐AL教室2 |
配当年次Grade | 3年 |
単位数Credit(s) | |
備考(履修条件等)Notes | |
他学部公開科目Open Program | |
他学部公開(履修条件等)Open Program (Notes) | |
グローバル・オープン科目Global Open Program | |
成績優秀者の他学部科目履修制度対象Interdepartmental class taking system for Academic Achievers | |
成績優秀者の他学部科目履修(履修条件等)Interdepartmental class taking system for Academic Achievers (Notes) | |
実務経験のある教員による授業科目Class taught by instructors with practical experience | |
SDGsCPSDGs CP | |
アーバンデザインCPUrban Design CP | |
ダイバーシティCPDiversity CP | |
未来教室CPLearning for the Future CP | |
カーボンニュートラルCPCarbon Neutral CP | |
千代田コンソ単位互換提供(他大学向け)Chiyoda Campus Consortium | |
カテゴリー<理工学部>Category |
応用情報工学科 学科専門科目 |
すべて開くShow all
すべて閉じるHide All
Outline (in English)
This course introduces students to the design of compilers for programming languages. In particular, students will learn the theoretical background of each component of compilers for a variant of PL/0 as an example.
By the end of this course, students should be able to do the following:
(1) Students can explain the outline of the process of compilers.
(2) Students can explain how lexical analysis works.
(3) Students can explain how syntax analysis works.
(4) Students can explain how a code generator works.
Before/after each class meeting, students will be expected to spend four hours to understand the course content.
Your overall grade in the class will be decided based on the following
Term-end report: 60%, Short tests: 40%.
授業で使用する言語Default language used in class
日本語 / Japanese
授業の概要と目的(何を学ぶか)Outline and objectives
コンパイラは,コンピュータを利用する上で必要不可欠なソフトウェアのひとつであり,計算機科学におけるさまざまな知識が盛り込まれている.本講義では,比較的単純な言語に対するコンパイラの作成方法の理論的背景を理解することで,コンパイラの各構成要素を理解することを目的とする.
到達目標Goal
(1) コンパイラの概要を説明できること.
(2) 字句解析の仕組みを説明できること.
(3) 構文解析の仕組みを説明できること.
(4) コード生成とその実行方法を説明できること.
授業で使用する言語Default language used in class
日本語 / Japanese
授業の進め方と方法Method(s)(学期の途中で変更になる場合には、別途提示します。 /If the Method(s) is changed, we will announce the details of any changes. )
座学形式で行う.コンパイラはいくつかの要素から成り立っている.本講義では,各要素についての理論的背景および実装のアイディアを説明する.また,理解度を把握するために適宜小テストを行う.「コンパイラ演習」においては実際に実装する方法を学ぶ.課題等に対するフィードバックは学習支援システムまたは授業等を通じて行う.
アクティブラーニング(グループディスカッション、ディベート等)の実施Active learning in class (Group discussion, Debate.etc.)
なし / No
フィールドワーク(学外での実習等)の実施Fieldwork in class
なし / No
授業計画Schedule
授業形態/methods of teaching:対面/face to face
※各回の授業形態は予定です。教員の指示に従ってください。
第1回[対面/face to face]:導入
コンパイラの概要
第2回[対面/face to face]:文法と言語
バッカス記法,構文図式
第3回[対面/face to face]:字句解析 (1)
正規表現,有限オートマトン
第4回[対面/face to face]:字句解析 (2)
字句の切り出し
第5回[対面/face to face]:構文解析 (1)
再帰的下向き構文解析
第6回[対面/face to face]:構文解析 (2)
LR構文解析
第7回[対面/face to face]:中間試験
前半の内容に関する試験
第8回[対面/face to face]:意味解析 (1)
記号表とその構成法・探索法
第9回[対面/face to face]:意味解析 (2)
意味解析における型検査
第10回[対面/face to face]:誤り処理,実行時環境
誤りの出力,誤りからの復帰,実行時環境の管理方法
第11回[対面/face to face]:コード生成 (1)
目的コードの生成方法
第12回[対面/face to face]:コード生成 (2)
目的コードの実行方法
第13回[対面/face to face]:最適化とまとめ
覗き穴などの最適化手法の紹介,および,本講義のまとめ
第14回[対面/face to face]:コンパイラの作成
yacc と lex を用いた簡易的なコンパイラの作成
授業時間外の学習(準備学習・復習・宿題等)Work to be done outside of class (preparation, etc.)
本授業の準備・復習等の授業時間外学習は,各週につき4時間を標準とする.
テキスト(教科書)Textbooks
特に指定しない.教員が作成した資料を利用する.
参考書References
中田育男,コンパイラ 作りながら学ぶ,オーム社,2017.
湯淺 太一,コンパイラ,オーム社,2014.
エイホ A.V., ラム M.S.,コンパイラ: 原理・技法・ツール. サイエンス社, 2009.
成績評価の方法と基準Grading criteria
レポート(60%) および 中間試験 (40%)により評価する.到達目標に対して,60%以上の点数を獲得した学生が合格となる.
学生の意見等からの気づきChanges following student comments
これまで下記の点が指摘されたので,これらに注意して行う.
- 講義中で行われる演習の難易度が授業の内容を超えている場合があった.
- 定期的な小テストを行うなど,受講生が自身の理解度を確認できる仕組みを導入してほしい.
学生が準備すべき機器他Equipment student needs to prepare
講義資料を電子ファイルで配布するので,それを閲覧できる機器があるのが望ましい.
その他の重要事項Others
「コンパイラ演習」も同時に履修することが望ましい.これまでも「コンパイラ演習と同時に履修してよかった」との声があった.