Principles of Programming Languages
UNIT I: Preliminary Concepts
- Reasons for Studying Concepts of Programming Languages:
To understand the core concepts behind programming languages and their application areas.
- Programming Domains: Different areas like scientific computing, business applications, etc.
- Language Evaluation Criteria: Readability, writability, reliability, and cost.
- Influences on Language Design: Machine architecture, programming methodologies.
- Language Categories: Imperative, declarative, functional, scripting, etc.
- Language Design Trade-Offs: Balancing readability, writability, and performance.
- Implementation Methods: Compilation, interpretation, and hybrid approaches.
- Syntax and Semantics: Syntax defines structure; semantics define meaning.
- General Problem of Describing Syntax and Semantics: Challenges in formal representation.
- Formal Methods of Describing Syntax: Using BNF, EBNF, and syntax diagrams.
- Attribute Grammars: Extending grammars with semantic rules.
UNIT II: Names, Bindings, and Scopes
- Introduction: The role of names and their bindings.
- Concept of Binding: Associations between names and their attributes.
- Scope and Lifetime: Static and dynamic scoping; lifetime of variables.
- Referencing Environments: The active bindings at a given time.
- Named Constants: Constants as fixed values in programs.
- Data Types: Overview of primitive, composite, and user-defined types.
- Type Checking: Strong vs. weak typing; static vs. dynamic type checking.
- Type Equivalence: Structural and name equivalence in types.
- Expressions and Statements: Operators, type conversions, boolean expressions.
- Assignment Control Structures: If, switch, loops, and other control constructs.
UNIT III: Subprograms and Blocks
- Fundamentals of Subprograms: Definitions, prototypes, and return types.
- Design Issues: Parameter passing, local environments, recursion.
- Abstract Data Types: Encapsulation, modularity, and language examples.
UNIT IV: Concurrency
- Concurrency Concepts: Threads, parallelism, synchronization.
- Semaphores and Monitors: Techniques for handling process communication.
- Language Examples: Concurrency in Java, Python, and other modern languages.