460-2018/02 – Programming Languages and Compilers (PJP)

Gurantor departmentDepartment of Computer ScienceCredits6
Subject guarantorIng. Marek Běhálek, Ph.D.Subject version guarantorIng. Marek Běhálek, Ph.D.
Study levelundergraduate or graduateRequirementOptional
Year2Semestersummer
Study languageEnglish
Year of introduction2015/2016Year of cancellation2020/2021
Intended for the facultiesFEIIntended for study typesBachelor
Instruction secured by
LoginNameTuitorTeacher giving lectures
BEH01 Ing. Marek Běhálek, Ph.D.
Extent of instruction for forms of study
Form of studyWay of compl.Extent
Full-time Credit and Examination 2+2
Combined Credit and Examination 8+2

Subject aims expressed by acquired skills and competences

Students get an overview of the area of programming, main programming paradigms (imperative, functional, logic) and their typical representatives. They also get some theoretical body of knowledge and practical experience of compiling methods, especially concentrated to the source code analysis and intermediate code synthesis phases. Students develop practical abilities to use compiler generators like JavaCC. After this lectures student should be able to effectively implement analyzers of a structured text data or of simple languages. Also they should understand concepts and constructions common for today's programming languages.

Teaching methods

Lectures
Tutorials
Project work

Summary

Students get an overview of the area of programming, main programming paradigms (imperative, functional, logic) and their typical representatives. They also get some theoretical body of knowledge and practical experience of compiling methods, especially concentrated to the source code analysis and intermediate code synthesis phases. Students develop practical abilities to use compiler generators like JavaCC.

Compulsory literature:

Torben Mogensen: Basics of Compiler Design - freely available at http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/

Recommended literature:

Aho, A. V., Lam M.S., Sethi, R., Ullman, J. D.: Compilers. Principles, Techniques, and Tools. Addison Wesley; 2nd edition (September 10, 2006). ISBN 0321486811.7 Pierce B.C.: Types and Programming Languages, MIT Press, 2002, ISBN: 9780262162098.

Way of continuous check of knowledge in the course of semester

Conditions for credit: At least 21 points required. Students obtain points based on solution of two projects.

E-learning

Další požadavky na studenta

It is expected, that students will be able to actively create programs in programming language Java or C#.

Prerequisities

Subject has no prerequisities.

Co-requisities

Subject has no co-requisities.

Subject syllabus:

Lectures: Introduction: Goals and contents of the course, requirements, organization, resources. Programming languages classification. Usage and applications of compilers. Source and target languages. History of programming languages and compilers: theoretical aspects, first programming languages and compilers, high-order programming languages, structured programming, modular languages, object-oriented languages, scripting languages. Functional and logic programming languages: Declarative style of programming, advantages and disadvantages of this approach, basics of Lambda Calculus, implementation of practical examples in Haskell. Scripting languages: description of differences between traditional languages and scripting languages, description of some representatives of scripting languages, practical examples, overview of PHP. Imperative programming languages: basic principles, imperative programming languages. Examples of different programming paradigms. Object-oriented programming: basic principles, less known object-oriented programming languages. Structure and functions of a compiler: Source code models, transformations. Compiler organization - phases, passes. One-pass and optimising compilers. Utility programs. Testing and maintenance of a compiler. Lexical analysis: Function of a scanner, symbol representation. Regular languages, finite automaton, regular expression. Scanner implementation. Parsing: Goals and methods of the syntactic analysis. Top-down and Bottom-up analysis. LL(1) grammars, FIRST and FOLLOW set computation. Parsing table. Parser implementation: Pushdown automaton for LL(1) languages. Recursive descent analysis. Syntax directed translation: Translation grammar, attribute translation grammar. Implementation of attribute translation during top-down parsing. Compiler Compiler JavaCC. Symbol table: Basic notions - binding, range, visibility, life time. Functions of symbol table. Programming language model. Organization of symbol table. Block structured symbol table. Implementation. Internal representation of program: Formats of internal representation - graph, stack code, three-address code. Implementation of three-address code. Translation of expressions. Array items addressing. Translation of Boolean expressions. Generation of stack code as attribute translation. Run-time program structure: Run-time system. Subroutines - activation, static and dynamic structure, activation record. Memory organization, memory allocation for activation records, access pointers. Parameter passing. Laboratories (only on PC labs): Examples of different programming paradigms. Examples of declarative style of programming. Practical implementation of some simple tasks in Haskell. Implementation of some tasks in Haskell. Scripting languages: Implementation of simple task in PHP. Imperative and object oriented languages. Examples of programs written in some less known languages. Work on firs project. Implementation in simple filters and lexical analyzers. Practical realization of grammars for a basic constructions common in programming languages. Implementation of algorithms for a computation of sets FIRST a FOLLOW. Demonstration of LL(1) a LR(1) based syntactic analyzers. Implementation of a syntactic analyzer using recursive descent. Implementation of a simple compiler using compiler compiler JavaCC. Work on second project.

Conditions for subject completion

Full-time form (validity from: 2015/2016 Winter semester, validity until: 2020/2021 Summer semester)
Task nameType of taskMax. number of points
(act. for subtasks)
Min. number of points
Credit and Examination Credit and Examination 100 (100) 51
        Credit Credit 45  21
        Examination Examination 55  25
Mandatory attendence parzicipation: 80% attendance at the exercises

Show history

Occurrence in study plans

Academic yearProgrammeField of studySpec.FormStudy language Tut. centreYearWSType of duty
2019/2020 (B2647) Information and Communication Technology (1103R031) Computational Mathematics P English Ostrava 2 Optional study plan
2019/2020 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology P English Ostrava 2 Optional study plan
2019/2020 (B2647) Information and Communication Technology (2612R059) Mobile Technology P English Ostrava 2 Optional study plan
2019/2020 (B2647) Information and Communication Technology (1103R031) Computational Mathematics K English Ostrava 2 Optional study plan
2019/2020 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology K English Ostrava 2 Optional study plan
2019/2020 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology K English Ostrava 2 Optional study plan
2019/2020 (B2647) Information and Communication Technology (2612R059) Mobile Technology K English Ostrava 2 Optional study plan
2019/2020 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology P English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (1103R031) Computational Mathematics P English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology P English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (2612R059) Mobile Technology P English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (1103R031) Computational Mathematics K English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology K English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology K English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (2612R059) Mobile Technology K English Ostrava 2 Optional study plan
2018/2019 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology P English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (1103R031) Computational Mathematics P English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (1103R031) Computational Mathematics K English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology P English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology K English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology P English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology K English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (2612R059) Mobile Technology P English Ostrava 2 Optional study plan
2017/2018 (B2647) Information and Communication Technology (2612R059) Mobile Technology K English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (1103R031) Computational Mathematics P English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (1103R031) Computational Mathematics K English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology P English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology K English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology P English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology K English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (2612R059) Mobile Technology P English Ostrava 2 Optional study plan
2016/2017 (B2647) Information and Communication Technology (2612R059) Mobile Technology K English Ostrava 2 Optional study plan
2015/2016 (B2647) Information and Communication Technology (1103R031) Computational Mathematics P English Ostrava 2 Optional study plan
2015/2016 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology P English Ostrava 2 Optional study plan
2015/2016 (B2647) Information and Communication Technology (2601R013) Telecommunication Technology K English Ostrava 2 Optional study plan
2015/2016 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology P English Ostrava 2 Optional study plan
2015/2016 (B2647) Information and Communication Technology (2612R025) Computer Science and Technology K English Ostrava 2 Optional study plan
2015/2016 (B2647) Information and Communication Technology (2612R059) Mobile Technology P English Ostrava 2 Optional study plan
2015/2016 (B2647) Information and Communication Technology (2612R059) Mobile Technology K English Ostrava 2 Optional study plan

Occurrence in special blocks

Block nameAcademic yearForm of studyStudy language YearWSType of blockBlock owner