FPL CS Core

FPL-A: Object-Oriented Programming

  1. Object-oriented design
    1. Decomposition into objects carrying state and having behavior
    2. Class-hierarchy design for modeling
  2. Definition of classes: fields, methods, and constructors
  3. Subclasses, inheritance (including multiple inheritance), and method overriding
  4. Dynamic dispatch: definition of method-call
  5. Exception handling
  6. Object-oriented idioms for encapsulation
    1. Privacy, data hiding, and visibility of class members
    2. Interfaces revealing only method signatures
    3. Abstract base classes, traits and mixins
  7. Dynamic vs static properties
  8. Composition vs inheritance

FPL-B: Functional Programming

  1. Lambda expressions and evaluation
    1. Variable binding and scope rules
    2. Parameter passing
    3. Nested lambda expressions and reduction order
  2. Effect-free programming
    1. Function calls have no side effects, facilitating compositional reasoning
    2. Immutable variables and data copying vs. reduction
    3. Use of recursion vs. loops vs. pipelining (map/reduce)
  3. Processing structured data (e.g., trees) via functions with cases for each data variant
    1. Functions defined over compound data in terms of functions applied to the constituent pieces
    2. Persistent data structures
  4. Using higher-order functions (taking, returning, and storing functions)

FPL-D: Scripting

  1. Divide, combine, conquer
  2. Concurrency
  3. Error/exception handling
  4. I/O redirection
  5. System commands
  6. Environment variables
  7. File test operators
  8. Data structures
    1. Arrays and lists
    2. Slices
    3. List Comprehensions
  9. Regular expressions
  10. Dynamic typing
  11. Function declarations
  12. Processes and threads
  13. Code objects

FPL-E: Event-Driven and Reactive Programming

  1. Procedural programming vs. reactive programming: advantages of reactive programming in capturing events
  2. Components of reactive programming: event-source, event signals, listeners and dispatchers, event objects, adapters, event-handlers
  3. Behavior model of event-based programming
  4. Canonical uses such as GUIs, mobile devices, robots, servers
  5. Reactive programs as state transition system

FPL-F: Parallel and Distributed Computing

  1. Safety and liveness
    1. Race conditions
    2. Dependencies/preconditions
    3. Fault models
    4. Termination
  2. Programming models
    1. Actor models
    2. Procedural and reactive models
    3. Synchronous/asynchronous programming models
    4. Data parallelism
  3. Semantics
    1. Commutativity
    2. Ordering
    3. Independence
    4. Consistency
    5. Atomicity
    6. Consensus
  4. Execution control
    1. Async await
    2. Promises
    3. Threads
  5. Communication and coordination
    1. Message-passing
    2. Shared memory
    3. cobegin-coend
    4. Monitors
    5. Channels
    6. Threads
    7. Guards

 

 

FPL-G: Type Systems

  1. A type as a set of values together with a set of operations
    1. Primitive types (e.g., numbers, Booleans)
    2. Compound types built from other types (e.g., records, unions, arrays, lists, functions, references) using set operations
  2. Association of types to variables, arguments, results, and fields
  3. Type safety as an aspect of program correctness [cross-reference: FPL-Q: Formal Semantics]
  4. Type safety and errors caused by using values inconsistently given their intended types
  5. Statically-typed vs dynamically-typed programming languages
  6. Type equivalence: structural vs name equivalence
  7. Goals and limitations of static and dynamic typing
    1. Detecting and eliminating errors as early as possible
  8. Generic types (parametric polymorphism)
    1. Definition and advantages of polymorphism: parametric, subtyping, overloading and coercion
    2. Comparison of monomorphic and polymorphic types
    3. Comparison with ad-hoc polymorphism (overloading) and subtype polymorphism
    4. Generic parameters and typing
    5. Use of generic libraries such as collections
    6. Comparison with ad hoc polymorphism (overloading) and subtype polymorphism
    7. Prescriptive vs. descriptive polymorphism
    8. Implementation models of polymorphic types

FPL-H: Language Translation and Execution

  1. Interpretation vs. compilation to native code vs. compilation to portable intermediate representation
  2. Language translation pipeline: syntax analysis, parsing, optional type-checking, translation/code generation and optimization, linking, loading, execution
    1. BNF and extended BNF representation of context-free grammar
    2. Parse tree using a simple sentence such as arithmetic expression or if-then-else statement
    3. Ambiguity in Parsing due to lack of precedence order and resolution
    4. Execution as native code or within a virtual machine
    5. Alternatives like dynamic loading and dynamic (or “just-in-time”) code generation
  3. Control-flow diagrams using selection and iteration
  4. Data structures for translation, execution, translation and code mobility such as stack, heap, aliasing (sharing using pointers), indexed sequence and string
  5. Direct, indirect, and indexed access to memory location
  6. Runtime representation of data abstractions such as variables, arrays, vectors, records, pointer-based data elements such as linked-lists and trees, and objects
  7. Abstract low-level machine with simple instruction, stack and heap to explain translation and execution
  8. Run-time layout of memory: activation record (with various pointers), static data, call-stack, heap [cross reference: AR/Memory System Architecture and Organization, OS/Memory Management]
    1. Translating selection and iterative constructs to control-flow diagrams
    2. Translating control-flow diagrams to low level abstract code
    3. Implementing loops, recursion, and tail calls
    4. Translating function/procedure calls and return from calls, including different parameter passing mechanism using an abstract machine
  9. Memory management [cross reference: OS/Memory Management, FPL/Hardware Interface]
    1. Low level allocation and accessing of high-level data structures such as basic data types, n-dimensional array, vector, record, and objects
    2. Return from procedure as automatic deallocation mechanism for local data elements in the stack
    3. Manual memory management: allocating, de-allocating, and reusing heap memory
    4. Automated memory management: garbage collection as an automated technique using the notion of reachability