CSCI 305: Programming Languages
Midterm Review
Exam Time and Location: 8:00–9:50am, Roberts 101
Relevant Course Materials
- Slide Decks: Lectures 23 (Memory Locations) – 39 (Concurrency)
- Readings: Webster Chapters 12 through 22
- Assignments: HW4, HW5, HW6
- Matching
- Free Response:
- Be able to understand simple program(s) in C, Java, ML, or Prolog syntax
- ML and Java coding will not be a part of the exam, but expect to be required to write simple Prolog rules.
Materials Allowed
- Permitted: 2 page, 2 sides, 8.5 x 11” crib sheet
- NOT Permitted: electronic devices of any kind
- NOT Permitted: textbook, notebooks
Final Concepts
The following is a high-level list of the topics that may be covered on the exam. Expect to be required to not only know and understand the terminology surrounds these concepts
ML
- Understand Currying
- Understand Lambda Functions (Anonymous Functions, p. 135)
Memory Locations for Variables
- Activation Records
- Dynamic Stacks and Stack Frames
- Nested Functions
- Functions as Parameters
- nesting links
Memory Management
- Stacks
- Heaps
- First-Fit
- Coalescing Free Blocks
- Fragmentation
- Heap Links
- Heap Compaction
- Garbage Collection
- dangling pointers
- memory leaks
- Allocation/Deallocation and associated Issues
Object-Oriented
- classes
- overloading
- information hiding
- inheritance
- polymorphism
- delegation
- dynamic dispatch
Java
- Java Basics
- Equality issues in Java
- Classes, Interfaces, and the Type System
- Exception Handling
- Runtime Exceptions
- Errors
- Checked Exceptions
- The try..catch..finally
- Multiple Inheritance Issues
- Pure methods vs. Side-effects
Parameters
- Formal vs Actual, keyword and positional parameters
- lvalue, rvalue, aliases, capture
- lazy and eager evaluation
- By Value
- By Result
- By Value-Result
- By Reference
- By Name
- How these different types affect interpretation of the code
Prolog
- Terms and Atoms
- Imperative vs Declarative
- Unification
- Backtracking
- Substitution
- Resolution
- Basics of the language
- Working with Lists
Cost Models
- Cost models associated with lists
- Cost models associated with arrays
- Cost model assoicated with Prolog Search
- Tail Calls and Tail Recursion
- Array Indexing
- Function Inlining
Concurrency
- Threads/Tasks/Processes
- Synchronization
- Cooperation Synchronization
- Competition Synchronization
- Differences between Parallel and Concurrent Programs
- Concurrency Issues
- Monitors
- Semaphores