CS 362  LANGUAGES and TRANSLATION
Fall 2017 SYLLABUS

Instructor: Loren Rhodes
Office: C-208 BAC, 814-641-3620 
Email: rhodes@juniata.edu
Cell/text: 814-644-3309

Office Hours; see office door for last minute changes; others by appt. 

Top of Page | Course Materials | Course Policies | Grading & Objectives | Lecture Outline

 

Page last updated 04-Sep-2017

Meeting times: M 4:00-5:00 and TTh 1:00-2:20 in C102

Course description from catalog:  A systematic approach to the study and analysis of computer programming languages. The procedural, functional, object-oriented and logical language paradigms are examined through the use of representative languages. Syntax and semantics issues are emphasized through the study of translation techniques in formal labs and group projects

Objectives:

Top of Page | Course Materials | Grading & Objectives | Lecture Outline

Required text:

Recommended resources:

These were used to develop the compiler project. Lex and Yacc references are easily found on the internet.


Grading:

Use these exams as a guide to question style and as a study guide.

Exams from Fall 2003 Exam #1 Exam #2
Exams from Spring 2006 Exam #1 -- Key #1 Exam #2-- Key #2
Exams from Fall 2007 Exam #1 --Key#1 Exam #2
Exams from Fall 2009 Exam #1-- Key#1 Exam #2--Key#2
Exams from Fall 2011 Exam #1-- Key#1 Exam #2--Key#2
Exams from Fall 2013 Exam #1-- Key#1 Exam #2--Key#2 not available
Exams from Fall 2015 Exam #1-- Key#1 Exam #2--Key#2

Exam 1, 20%,Sept. 26, 2017 (study guide)
Exam 2, 20%, Nov. 2, 2017 (study guide)
Final, 25%, TBA (study guide)
Labs, assignments and programs 35%

Rhodes's Course Policies link

Policies on dropping, attendance, late homework, and academic integrity are found on this page.  You are responsible for knowing the instructor's policies by visiting this page on-line.

Homework, projects and programs are due to be turned in at the beginning of class. Exercises are to be prepared for the next class.  They may be collected for grading  Unless otherwise designated, your submitted work must be your own.

Disabilities Policy

In accordance with the Americans with Disabilities Act and Section 504 of the Rehabilitation Act, students with a documented disability are eligible to request reasonable accommodations. To make such a request or for more information, please contact Steve Ankney, Interim Director of Academic Support, in the Academic Resource Center by visiting his office in Founders Hall, emailing him at ankneys@juniata.edu, or calling 814-641-3405. It is best to submit accommodation requests within the drop/add period, however, requests can be made at any time in the semester. Please keep in mind that accommodations are not retroactive.

.

Top of Page | Course Materials | Grading & Objectives | Lecture Outline


LANGUAGES and TRANSLATION
FALL 2017 TENTATIVE LECTURE OUTLINE

TIOBE Index of Language usage

Week.meeting - date
Readings (from Sebesta) and Topics
Links for Study and Class Discussion

Labs, out-of-class exercises and assignments 
(due dates are posted in Moodle)

1.1- 8/24 (Th) Ch 1 Preliminaries Introduction; Paradigms; Criteria
Hardware, firmware, translators, virtual machines
Ch 1 Problem set: 1, 3, 4, 6, 8, 10, 11 (class discussion only)
1.2- 8/28 (M) Ch 2 Evolution of the major programming languages History   Ch 2 Problem set: 6, 7, 9, 12, 14, 22 (class discussion only)
1.3- 8/29 (T)   Syntax and translation stages
Compiler Overview
 
2.1- 8/31 (Th)   Unix and C++ review, Makefiles
Pascal Overview
 Compiler warm-up and start exercises
2.2- 9/4 (M)  Ch 3.1-3.4 Describing syntax and semantics Formal Languages (BNF)
Ch 3 Problem set: 2b, 6a,7d,8,10,11 (see Moodle for submission)
2.3- 9/5 (T)   Formal Languages (w/ FSM)

 

3.1- 9/7 (Th) Ch 4.1-4.2 Lexical analysis Lex Analysis
Lex
Compiler project lexical analysis
3.2- 9/11 (M) Ch 4.3-4.4 Syntactic analysis; Parsing theory Context-Free Grammars and bottom up parsing
Ch 4 Problem set: 4,5,7 (see Moodle for submission)
3.3- 9/12 (T) yacc   yacc/bison
Compiler parsing continued
Compiler grammar load
4.1- 9/14 (Th) Ch 5.1-5.4 Names and binding Binding  Ch 5 Problem set: 1,3
4.2- 9/18 (M)
Symbol Table Management Compiler symbol table
4.3- 9/19 (T) Ch 5.5-5.8 Scope, lifetime, environments Scoping Ch 5 Problem set: 6-7,11,12
Programming exercises 5-6
5.1- 9/21 (Th) Ch 6.1-6.4 Primitive data types Primitive data types; Structured data types  
5.2- 9/25 (M) Review and catch up    
5.3- 9/26 (T) Exam 1 Ch 1-6.4; Compiling: lexical analysis and parsing, C++
6.1- 9/28 (Th) Ch 6.5-6.6 Arrays Structured data types: arrays  Compiler simple code emission
6.2- 10/2 (M) Ch 6.7-6.10 Other types and type checking Structures: records
Ch 6 Problem set: 1, 7, 9, 11, 21
Programming exercises 3
6.3- 10/3 (T) Ch 6.11-6.15 Other types and type checking Type Definitions  
7.1- 10/5 (Th) FORTRAN, "formula translation" FORTRAN Overview FORTRAN 90/95 program: Extend the program at this link to compute the average and then print all the values larger than the average. Call the SUM function once, however. Use simple format statements everywhere. (Also found on the Unix server at ~rhodes/lt/example1.f90
7.2- 10/9 (M) Compiler arithmetic expression handling   Compiler arithmetic and I/O
7.3- 10/10 (T) Compiler array handling   Compiler array handling
Fall Break
8.1- 10/16 (M) Ch 7.1-7.4 Arithmetic expressions Arithmetic expressions  
8.2- 10/17 (T)  Ch 7.5-7.8 Boolean expressions, assignments, mixed mode   Ch 7 Problem set: 4, 9, 18; Programming exerccise 8
8.3- 10/19 (Th) Ch 8.1-8.2 Statement control: selection control abstractions  
9.1- 10/23 (M) Ch 8.3-8.6 Statement control: iteration, branching   Ch 8 Programming set: 1ab, 3a, 4
9.2- 10/24 (T) Compiler statement flow control

Compiler control Flow
9.3- 10/26 (Th) Ch 9.1-9.4 Subprograms Procedural abstractions Ch 9 Problem set: 5,7
10.1- 10/30 (M) Ch 9.5-9.6 Parameter passing

Parameter passing methods

Parameters lab in C++
10.2- 10/31 (T)   Review and catch up  
10.3- 11/2 (Th) Exam 2 Ch 7-10, Fortran, code generation  
11.1- 11/6 (M) Compiler subprogram handling   compiling subroutines
11.2- 11/7 (T)  Ch 9.7-9.12 Subprogram issues

Block structures: Algol and Pascal ;

 
11.3- 11/9 (Th) Ch 10 Implementing subprograms, blocks Inheritance
Java issues
Storage Management
Encapsulation

Implementation
Ch 10 Problem set: 1-3
12.1- 11/13 (M) Ch 11.1-11.5 Abstract data types and encapsulation

Abstract data types

Ch 11 Problem set: 2,10
12.2- 11/14 (T)  Ch 12.1-12.4 Object oriented programming; Smalltalk Object oriented classes and polymorphism
Smalltalk
Smalltalk lab
12.3 -11/16 (Th) Ch 12.5, 12.6, 12.7, 12.10 Other OO language and constructs   Ch 12 Problem set: 12,13,17,18
13.1-11/20 (M) Ch 14.1-14.4 Exception handling Exception Handling Ch 14 Problem set: 9
13.2- 11/21 (T) Ch 15.1-15.5 Functional paradigm: Scheme data types LISP programs I
13.3- 11/27 (M) LISP/Scheme Scheme forms and operators
In class exploration
Ch 15 Problem set: 1,4-18
14.1- 11/28 (T) LISP/Scheme   LISP programs II
14.2- 11/30 (Th) Ch 15.9-15.10 LISP/Scheme wrap up    
14.3- 12/4 (M) Ch 16 Prolog PROLOG
More PROLOG
Logic Programming
PROLOG programming
Ch 16 Problem Set: 3,4
15.1- 12/5 (T)   Compiler Optimization

15.2- 12/7 (Th)

  Catch up and exam review
Friday 12/15/17
8:00 a.m.
Final Ch 9-11, code generation,Smalltalk, LISP, Prolog  
Top of Page | Course Materials | Grading & Objectives | Lecture Outline