Lecture

Writing a Recursive Power Set Function in Scheme

This module focuses on writing a recursive power set function in Scheme. Key points include:

  • Utilizing lambda functions for mapping operations
  • Implementing let bindings for recursive calls
  • Understanding memory allocation and imimmutable lists
  • Exploring recursive permutations of lists
  • Learning about Scheme's memory model and operations

Course Lectures
  • This module introduces the course's objectives and administrative details. It covers essential topics like:

    • Course grading and exam schedules
    • Submission and grading policies for assignments
    • Overview of programming paradigms: procedural vs. object-oriented
    • Concurrent programming and data sharing issues
    • Introduction to functional programming with Scheme
    • Overview of Python and its benefits
  • This module focuses on data types in C and C++. Key topics include:

    • Interpretations and sizes of C/C++ data types
    • The breakdown of bytes into bits
    • Representations of negative numbers
    • Understanding two's complement addition
    • Conversion between different data types, such as chars and shorts
    • Handling floats and their conversions
  • This module teaches conversion between different types using pointers. Topics include:

    • Understanding little-endian vs. big-endian formats
    • How structs store data and access it
    • Pointer arithmetic on arrays
    • Memory layout and casting of arrays
    • Dynamically allocated strings vs. character arrays
    • Generic functions in C using memory and pointers
  • This module focuses on creating a generic swap function for data types of arbitrary size. It covers:

    • Using void* as a generic pointer type
    • Implementation of swap using memcpy
    • Client interfaces for the generic swap function
    • Comparison of C generics vs. C++ generics
    • Common pitfalls and errors when using generics
    • Implementing generic linear search functions
  • This module focuses on the prototype for a generic linear search function. Key learning points include:

    • Creating a comparison function for various data types
    • Implementation of the generic linear search
    • Casting void pointers to access data
    • Working with C-strings and comparison functions
    • Implementing non-generic data structures like stacks
    • Understanding memory allocation and stack usage
  • This module covers the implementation of an integer stack, focusing on constructors and destructors. Key areas include:

    • Implementing stack push and pop operations
    • Memory reallocation using realloc
    • Generic stack implementation techniques
    • Static functions and their usage in stack management
    • Ensuring safe memory handling during stack operations
  • This module identifies problems related to memory ownership in C programming. Topics include:

    • Ownership issues with dynamically allocated data
    • Implementing free functions for proper memory management
    • Using C library functions like memmove
    • Understanding the layout of memory in programs
    • Heap management and allocation strategies
    • Common pitfalls related to memory handling
  • This module explores heap management, focusing on how allocation information is stored. Topics include:

    • Understanding memory allocation and freeing
    • Heap allocation algorithms and strategies
    • Fragmentation issues and management techniques
    • Stack segment layout and local variable allocation
    • Understanding registers and the ALU in memory management
  • This module investigates how code snippets are translated into assembly instructions. It covers:

    • Basic store, load, and ALU operations
    • Assembly optimizations for address handling
    • Translating loops and branch instructions
    • Pointer and array arithmetic in assembly
    • Encoding assembly instructions in memory
  • This module delves into activation records and their layout during function calls. Key topics include:

    • Structure of an activation record and its components
    • Storing return addresses and function parameters on the stack
    • Recursion and its translation into assembly
    • Understanding stack pointer states during function calls
    • Assembly code examples demonstrating function execution
  • This module contrasts C code generation with C++ code generation, focusing on swap functions. Key points include:

    • Code generation for pointer swap functions
    • Understanding references and their treatment in C++
    • Local variables and their memory effects
    • The "this" pointer in class methods
    • Static class methods and their functionality
    • Compilation and linking processes in C/C++
  • This module introduces preprocessing commands in C/C++. Key aspects include:

    • Understanding #define and its usage
    • Creating macros with and without arguments
    • Handling circular #include loops
    • How preprocessing affects compilation
    • Viewing preprocessor output for debugging
  • This module reviews the compilation process of simple programs. Key learning points include:

    • Understanding how header files affect compilation
    • Inferring prototypes in gcc
    • Linking standard library files with gcc
    • Debugging common errors during compilation
    • Exploring seg faults and bus errors
  • This module contrasts sequential programming with concurrent programming. Topics include:

    • Examples of data sharing issues in concurrent programming
    • Understanding threading and multiprocessing
    • Real-world applications of concurrent programming
    • Exploring the benefits of concurrent execution
    • Modeling real-world problems using threads
  • This module transitions from sequential to concurrent programming using a ticket sale example. Key areas include:

    • Identifying problems in the sequential model
    • Rewriting the ticket sale example with threading
    • Understanding critical regions and semaphore usage
    • Preventing race conditions in concurrent execution
    • Designing efficient multithreaded applications
  • Semaphores
    Jerry Cain

    This module reviews semaphore concepts and their applications in multithreading. Key topics include:

    • Semaphore syntax and basic functions
    • Using semaphores to protect critical regions
    • Modeling race conditions in concurrent applications
    • Understanding different semaphore patterns
    • Detecting and eliminating deadlock situations
  • This module provides a detailed review of the Dining Philosopher Problem, focusing on:

    • Modeling each philosopher as a thread
    • Understanding deadlock and its prevention
    • Implementing solutions using semaphores
    • Exploring thread synchronization techniques
    • Applying concurrency to real-world scenarios
  • This module introduces the Ice Cream Store Problem, focusing on:

    • Setting up customer, cashier, clerk, and manager threads
    • Designing interactions between threads using semaphores
    • Writing main functions for thread management
    • Handling inspections and customer service efficiently
    • Understanding thread synchronization in service environments
  • This module introduces the functional programming paradigm using Scheme. Key points include:

    • Contrasting imperative and functional paradigms
    • Defining functions and their return values in Scheme
    • Understanding Scheme primitives and list operations
    • Exploring recursive function definitions and examples
    • Implementing basic functions like Celsius to Fahrenheit conversion
  • This module tackles the Car-Cdr recursion problem in Scheme. Key learning points include:

    • Implementing recursive functions to sum elements in a list
    • Understanding type checking during runtime
    • Using the cond structure for branching logic
    • Writing utility functions like flattening a list
    • Generalizing functions with comparison parameters
  • This module introduces the Kawa development environment for Scheme. Key topics include:

    • Evaluating expressions and loading function definitions
    • Mapping functions over lists using Scheme
    • Implementing mapping functions with multiple inputs
    • Using apply and eval for dynamic evaluations
    • Writing utility functions and exploring lambda expressions
  • This module focuses on writing a recursive power set function in Scheme. Key points include:

    • Utilizing lambda functions for mapping operations
    • Implementing let bindings for recursive calls
    • Understanding memory allocation and imimmutable lists
    • Exploring recursive permutations of lists
    • Learning about Scheme's memory model and operations
  • Scheme Memory Model
    Jerry Cain

    This module explores the Scheme memory model and its operations. Key areas include:

    • Understanding linked lists and their implementations
    • Learning about garbage collection and memory management
    • Examining the layout of lists and types in memory
    • Exploring high-level mechanics of garbage collection
    • Comparing Scheme with other functional languages
  • This module covers overarching features of Python, including:

    • Understanding Python as a scripting language
    • Dynamic typing and whitespace significance
    • Executing basic statements and method calls
    • Working with strings, lists, and dictionaries
    • Exploring basic syntax and data manipulation techniques
  • Python Object Model
    Jerry Cain

    This module delves into the Python object model, focusing on:

    • Understanding how objects are implemented in Python
    • Writing RSG grammar using dictionaries and lists
    • Exploring object references and copying techniques
    • Accessing underlying dictionaries of objects
    • Examining constructors and object initialization
  • This module introduces XML processing in Python, covering:

    • Two different XML processing models
    • Using tag handlers to parse XML streams
    • Defining functions for XML parsing and handling
    • Implementing an RSS feed reader using Python
    • Exploring advantages of tree-based XML rendering
  • This module introduces Haskell, focusing on:

    • History and features of Haskell
    • Safeguards that avoid runtime errors in Haskell
    • Lazy evaluation and its applications
    • Defining user-defined data types
    • Exploring list types and pattern matching