Compiler Design: Principles, Techniques and Tools

所在平台: Udemy

课程主页: https://www.udemy.com/course/compiler-design-rmm/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:编译原理:原则、技术与工具 课程概述: 本课程旨在介绍语言翻译和编译设计的主要概念,并传授构建编译器所需的实用技能。课程涵盖编译器的各个阶段,包括解析、语法导向翻译、类型检查、符号表的使用、代码优化技术、中间代码生成、代码生成和数据流分析等内容。 课程目标: - 设计一种编译器,能够处理特定语言特性。 - 理解模式、标记和正则表达式在词法分析中的应用。 - 掌握使用lex和yacc工具开发扫描器和解析器的技能。 - 设计和实现LL和LR解析器。 - 设计代码优化算法,以提高程序在空间和时间复杂度方面的性能。 - 设计生成机器码的算法。 课程大纲: 模块一:介绍 - 编译器的结构,构建编译器的科学,编程语言基础。 - 词法分析:词法分析器的角色、输入缓冲、标记的识别、词法分析器生成器Lex、有限自动机、正则表达式到自动机的转换、词法分析器生成器的设计、DFA模式匹配器的优化。 模块二:语法分析 - 导入、上下文无关文法、文法的编写。 - 自顶向下解析、 自底向上解析。LR解析的简介:简单LR解析器、更强大的LR解析器、使用歧义文法和解析器生成器。 模块三:语法导向翻译 - 语法导向定义、SDD的评估顺序、语法导向翻译的应用、语法导向翻译方案、实施L属性SDD。 - 中间代码生成:语法树的变体、三地址码、类型与声明、类型检查、控制流、开关语句、过程的中间代码。 模块四:运行时环境 - 堆栈空间的分配、对堆栈上非局部数据的访问、堆管理、垃圾回收简介、基于跟踪的收集简介。 - 代码生成:代码生成器设计中的问题、目标语言、目标代码中的地址、基本块和流图、基本块的优化、简单代码生成器、盲点优化、寄存器分配与赋值、动态编程代码生成。 模块五:机器无关优化 - 优化的主要来源、数据流分析简介、数据流分析的基础、常量传播、部分冗余消除、流图中的循环。 参考书目:编译原理:原则、技术与工具,第二版,阿尔弗雷德·V·阿霍、莫妮卡·S·蓝、拉维·塞西、杰弗里·D·乌尔曼。

课程评论(0条)

课程详情

Course Objectives: Introduce the major concepts of language translation and compiler design and impart the knowledge of practical skills necessary for constructing a compiler. Topics include phases of compiler, parsing, syntax directed translation, type checking use of symbol tables, code optimization techniques, intermediate code generation, code generation and data flow analysis. Course Outcomes: Demonstrate the ability to design a compiler given a set of language features. Demonstrate the the knowledge of patterns, tokens & regular expressions for lexical analysis. Acquire skills in using lex tool & yacc tool for developing a scanner and parser. Design and implement LL and LR parsers Design algorithms to do code optimization in order to improve the performance of a program in terms of space and time complexity. Design algorithms to generate machine code. SYLLABUS: Module- I:Introduction: The structure of a compiler, the science of building a compiler, programming language basics.Lexical Analysis: The Role of the Lexical Analyzer, Input Buffering, Recognition of Tokens, The Lexical-Analyzer Generator Lex, Finite Automata, From Regular Expressions to Automata, Design of a Lexical-Analyzer Generator, Optimization of DFA-Based Pattern Matchers. Module- II:Syntax Analysis: Introduction, Context-Free Grammars, Writing a Grammar.Top-Down Parsing, Bottom-Up Parsing.Introduction to LR Parsing: Simple LR, More Powerful LR Parsers, Using Ambiguous Grammars and Parser Generators. Module- III: Syntax-Directed Translation: Syntax-Directed Definitions, Evaluation Orders for SDD's, Applications of Syntax-Directed Translation, Syntax-Directed Translation Schemes, Implementing L-Attributed SDD's.Intermediate-Code Generation: Variants of Syntax Trees, Three-Address Code, Types and Declarations, Type Checking, Control Flow, Switch-Statements, Intermediate Code for Procedures. Module- IV: Run-Time Environments: Stack Allocation of Space, Access to Non-local Data on the Stack, Heap Management, Introduction to Garbage Collection, Introduction to Trace-Based Collection. Code Generation: Issues in the Design of a Code Generator, The Target Language, Addresses in the Target Code, Basic Blocks and Flow Graphs, Optimization of Basic Blocks, A Simple Code Generator, Peephole Optimization, Register Allocation and Assignment, Dynamic Programming Code-Generation. Module- V: Machine-Independent Optimization: The Principal Sources of Optimization, Introduction to Data-Flow Analysis, Foundations of Data-Flow Analysis, Constant Propagation, Partial-Redundancy Elimination, Loops in Flow Graphs. Reference: Compilers: Principles, Techniques and Tools, Second Edition, Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffry D. Ullman.

课程标签

0人关注该课程

主题相关的课程