Difference between revisions of "BSc: Advanced Compilers Construction and Program Analysis"

From IU
Jump to navigation Jump to search
Line 84: Line 84:
   
 
Topics covered in this section:
 
Topics covered in this section:
  +
 
* References, store typings, raising and handling exceptions
 
* References, store typings, raising and handling exceptions
 
* Subsumption and the subtyping relation, coercion semantics, the Bottom Type
 
* Subsumption and the subtyping relation, coercion semantics, the Bottom Type

Revision as of 14:46, 17 February 2023

Advanced Compilers Construction and Program Analysis

  • Course name: Advanced Compilers Construction and Program Analysis
  • Code discipline: XYZ
  • Subject area: Programming Languages and Software Engineering

Short Description

This course covers the following concepts: Advanced Compilers Construction and Program Analysis concepts:


Key concepts of the class

  • Type Systems
  • Lambda calculi as the core representation
  • Type checking and type inference
  • Simple types and derived forms
  • Subtyping
  • Imperative objects
  • Recursive types
  • Universal polymorphism
  • Compiling lazy functional languages

Prerequisites

Prerequisite subjects

Prerequisite topics

Course Topics

Course Sections and Topics
Section Topics within the section
Introduction to subject, computer networks basics, transport layer protocols, and socket programming
  1. General introduction to the course
  2. Computer networks basic
  3. Socket programming
  4. UDP socket programming
  5. TCP socket programming
Coordination, consistency, and replication in distributed systems
Fault tolerance and security in distributed systems


Section 1

Section title: Lambda calculus and simple types Topics covered in this section:

  • The history of typed languages. Type systems and language design.
  • Basic notions: untyped lambda calculus, nameless representation, simple types.

Typical questions for ongoing performance evaluation within this section 4

  • What is the role of the type system in language design?
  • How to evaluate lambda terms using call-by-name/call-by-value strategies?
  • What is the typing relation?
  • What is type safety?
  • What is erasure of types?
  • What is general recursion?

Typical questions for seminar classes (labs) within this section

  • Evaluate a given lambda expression using call-by-name strategy.
  • Convert a given lambda expression to/from a nameless representation.
  • Draw a type derivation tree for a given lambda term in simply typed lambda calculus.
  • Provide a type for a given lambda term in a given simple type system.

Test questions for final assessment in this section

  • Present an implementation of an interpreter for untyped lambda calculus.
  • Present an implementation of a type checker for simply typed lambda

calculus.

Section 2

Section title: References, exceptions, imperative objects, Featherweight Java


Topics covered in this section:

  • References, store typings, raising and handling exceptions
  • Subsumption and the subtyping relation, coercion semantics, the Bottom Type
  • Object-oriented programming and lambda calculus with imperative objects
  • Featherweight Java

Typical questions for ongoing performance evaluation within this section

  • How operational semantic changes when introducing references?
  • How operational semantic changes when introducing exceptions?
  • What is the concept of imperative objects?
  • What are the features of Featherweight Java?
  • Explain effects of call-by-name and call-by-value evaluation strategies on terms with references.

Typical questions for seminar classes (labs) within this section

  • Evaluate given expression with references.
  • Evaluate given expression with exceptions.
  • Draw a type derivation tree for a given lambda term in simply typed

lambda calculus with references and exceptions.

  • Provide a type for a given lambda term in a given simple type system with references and exceptions.

Test questions for final assessment in this section

  • Present and/or explain an implementation of an interpreter for lambda calculus with references and exceptions.
  • Present and/or explain an implementation of a type checker for simply typed lambda calculus with references and exceptions.


Section 3

Section title: Recursive types, type reconstruction, universal polymorphism Topics covered in this section:

  • Recursive types, induction and coinduction, finite and infinite types
  • Polymorphism, type reconstruction, universal types
  • System F and Hindley-Milner type system

Typical questions for ongoing performance evaluation within this section

  • What is the concept of recursive types?
  • What is the motivation for universal types?
  • Explain the differences between System F and Hindley-Milner type system.

Typical questions for seminar classes (labs) within this section

  • Evaluate given expression in System F with recursive types.
  • Draw a type derivation tree for a given term in System F.
  • Provide a type for a given term in System F.

Test questions for final assessment in this section

  • Present and/or explain an implementation of an interpreter for lambda calculus with references and exceptions.
  • Present and/or explain an implementation of a type checker for simply typed lambda calculus with references and exceptions.
  • Present and/or explain the Hindley-Milner type inference algorithm.

Section 4

Section title: Compiling lazy functional languages

Topics covered in this section:

  • Challenges of compiling lazy functional languages
  • Representing functional closures at run-time
  • Representing lazy data structures at run-time
  • The syntax and semantics of the STG language

Typical questions for ongoing performance evaluation within this section

  • How are closures represented during run-time?
  • How are lazy data structures represented during run-time?
  • Describe the main constructions of the STG Language?

Typical questions for seminar classes (labs) within this section

  • Explain how a given term in STG language evaluates.
  • Translate a given lambda term into STG language

Test questions for final assessment in this section

  • Present and/or explain the STG machine.

Intended Learning Outcomes (ILOs)

What is the main purpose of this course?

Advanced Compilers Construction and Program Analysis have become

ILOs defined at three levels

Level 1: What concepts should a student know/remember/explain?

By the end of the course, the students should be able to ...


Level 2: What basic practical skills should a student be able to perform?

By the end of the course, the students should be able to ...


Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios?

By the end of the course, the students should be able to ...

Grading

Course grading range

Grade Range Description of performance
A. Excellent 90-100 -
B. Good 75-89 -
C. Satisfactory 60-74 -
D. Poor 0-59 -

Course activities and grading breakdown

Activity Type Percentage of the overall course grade
Laboratory assignments 55%
Final exam 35%
Attendance 10%

Recommendations for students on how to succeed in the course

Resources, literature and reference materials

Open access resources

  • Textbook:. Available online:
  • Reference:. Available online:
  • Reference:. Available online:

Closed access resources

Software and tools used within the course

Resources and reference material

  • Benjamin C. Pierce. ’‘Types and Programming Languages. The MIT Press 2002”
  • Simon Peyton Jones. ’‘Implementing functional languages: a tutorial. Prentice Hall 1992”
  • Simon Peyton Jones. ’‘Implementing Lazy Functional Languages on Stock Hardware: The Spineless Tagless G-machine. Journal of Functional Programming 1992”

Teaching Methodology: Methods, techniques, & activities

Activities and Teaching Methods

Activities within each section
Learning Activities Section 1 Section 2 Section 3 Section 4
Development of individual parts of software product code 1 1 1 1
Homework and group projects 1 1 1 1
Testing (written or computer based) 1 1 1 1
Oral polls 1 1 1 1
Discussions 1 1 1 1

Formative Assessment and Course Activities

Ongoing performance assessment

Section 1

Activity Type Content Is Graded?
Question ? 1
Question . 1
Question ? 1
Question ? 1
Question ? 1
Question ? 1
Question ? 1

Section 2

Activity Type Content Is Graded?
Question You have a list of large numbers, and you need to find if they are prime or not. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. 0
Question You need to send multiple requests to a server and receive responses. Assume there is a few msecs of delay before you receive the response from the server. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. (Order of the requests/responses doesn't matter) 0
Question Discuss two ways of creating the threads using threading module in Python: 1) passing the worker function as a target, 2) subclassing the Thread class 0
Question Given the function implemented locally, make it available to be called through RPC from remote process? Use xmlRPC. 0

Section 3

Activity Type Content Is Graded?
Question ? 1
Question ? 1
Question ? 1
Question ? 1
Question ? 1

Section 4

Activity Type Content Is Graded?
Question Same as above 0

Final assessment

Section 1

  1. ?
  2. ?
  3. ?
  4. ?

Section 2

Section 3

Section 4

  1. Same as above

The retake exam

Section 1

Section 2

Section 3

Section 4