Skip to main content
FPL-A: Object-Oriented Programming
- Object-oriented design
- Decomposition into objects carrying state and having behavior
- Class-hierarchy design for modeling
- Definition of classes: fields, methods, and constructors
- Subclasses, inheritance (including multiple inheritance), and method overriding
- Dynamic dispatch: definition of method-call
- Exception handling
- Object-oriented idioms for encapsulation
- Privacy, data hiding, and visibility of class members
- Interfaces revealing only method signatures
- Abstract base classes, traits and mixins
- Dynamic vs static properties
- Composition vs inheritance
FPL-B: Functional Programming
- Lambda expressions and evaluation
- Variable binding and scope rules
- Parameter passing
- Nested lambda expressions and reduction order
- Effect-free programming
- Function calls have no side effects, facilitating compositional reasoning
- Immutable variables and data copying vs. reduction
- Use of recursion vs. loops vs. pipelining (map/reduce)
- Processing structured data (e.g., trees) via functions with cases for each data variant
- Functions defined over compound data in terms of functions applied to the constituent pieces
- Persistent data structures
- Using higher-order functions (taking, returning, and storing functions)
FPL-D: Scripting
- Divide, combine, conquer
- Concurrency
- Error/exception handling
- I/O redirection
- System commands
- Environment variables
- File test operators
- Data structures
- Arrays and lists
- Slices
- List Comprehensions
- Regular expressions
- Dynamic typing
- Function declarations
- Processes and threads
- Code objects
FPL-E: Event-Driven and Reactive Programming
- Procedural programming vs. reactive programming: advantages of reactive programming in capturing events
- Components of reactive programming: event-source, event signals, listeners and dispatchers, event objects, adapters, event-handlers
- Behavior model of event-based programming
- Canonical uses such as GUIs, mobile devices, robots, servers
- Reactive programs as state transition system
FPL-F: Parallel and Distributed Computing
- Safety and liveness
- Race conditions
- Dependencies/preconditions
- Fault models
- Termination
- Programming models
- Actor models
- Procedural and reactive models
- Synchronous/asynchronous programming models
- Data parallelism
- Semantics
- Commutativity
- Ordering
- Independence
- Consistency
- Atomicity
- Consensus
- Execution control
- Async await
- Promises
- Threads
- Communication and coordination
- Message-passing
- Shared memory
- cobegin-coend
- Monitors
- Channels
- Threads
- Guards
FPL-G: Type Systems
- A type as a set of values together with a set of operations
- Primitive types (e.g., numbers, Booleans)
- Compound types built from other types (e.g., records, unions, arrays, lists, functions, references) using set operations
- Association of types to variables, arguments, results, and fields
- Type safety as an aspect of program correctness [cross-reference: FPL-Q: Formal Semantics]
- Type safety and errors caused by using values inconsistently given their intended types
- Statically-typed vs dynamically-typed programming languages
- Type equivalence: structural vs name equivalence
- Goals and limitations of static and dynamic typing
- Detecting and eliminating errors as early as possible
- Generic types (parametric polymorphism)
- Definition and advantages of polymorphism: parametric, subtyping, overloading and coercion
- Comparison of monomorphic and polymorphic types
- Comparison with ad-hoc polymorphism (overloading) and subtype polymorphism
- Generic parameters and typing
- Use of generic libraries such as collections
- Comparison with ad hoc polymorphism (overloading) and subtype polymorphism
- Prescriptive vs. descriptive polymorphism
- Implementation models of polymorphic types
FPL-H: Language Translation and Execution
- Interpretation vs. compilation to native code vs. compilation to portable intermediate representation
- Language translation pipeline: syntax analysis, parsing, optional type-checking, translation/code generation and optimization, linking, loading, execution
- BNF and extended BNF representation of context-free grammar
- Parse tree using a simple sentence such as arithmetic expression or if-then-else statement
- Ambiguity in Parsing due to lack of precedence order and resolution
- Execution as native code or within a virtual machine
- Alternatives like dynamic loading and dynamic (or “just-in-time”) code generation
- Control-flow diagrams using selection and iteration
- Data structures for translation, execution, translation and code mobility such as stack, heap, aliasing (sharing using pointers), indexed sequence and string
- Direct, indirect, and indexed access to memory location
- Runtime representation of data abstractions such as variables, arrays, vectors, records, pointer-based data elements such as linked-lists and trees, and objects
- Abstract low-level machine with simple instruction, stack and heap to explain translation and execution
- 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]
- Translating selection and iterative constructs to control-flow diagrams
- Translating control-flow diagrams to low level abstract code
- Implementing loops, recursion, and tail calls
- Translating function/procedure calls and return from calls, including different parameter passing mechanism using an abstract machine
- Memory management [cross reference: OS/Memory Management, FPL/Hardware Interface]
- Low level allocation and accessing of high-level data structures such as basic data types, n-dimensional array, vector, record, and objects
- Return from procedure as automatic deallocation mechanism for local data elements in the stack
- Manual memory management: allocating, de-allocating, and reusing heap memory
- Automated memory management: garbage collection as an automated technique using the notion of reachability