Local Data Referencing Environment
Local Data Referencing Environment
Local Variables
Vars
that are defined inside subprograms are called local vars.
Local vars can be either static or stack dynamic.
By default an variable in stack dynamic.
Advantages of using stack dynamic variable:
a. Support for recursion.
c. Subprograms cannot be history sensitive “can’t retain data values of local vars
between calls.”
b. Their storage can’t be shared with the local vars of other inactive subprograms.
int sum = 0;
sum = a+b;
return sum;
sum = a+b;
return sum;
Nested Subprograms
Residing of a subprogram under another subprogram is known as
nested subprogram.
When a subprogram is placed within another subprogram,it gets hide
from the rest of the program.
Algol 68, Pascal, Ada, JavaScript, Python, Ruby allows nesting of
subprogram.
C, do not allow subprogram nesting.
Video lecture on Local Referencing Environments
References:
1. Sebesta,”Concept of programming Language”, Pearson Edu
2. Louden, “Programming Languages: Principles & Practices” ,
Cengage Learning
3. Tucker, “Programming Languages: Principles and paradigms “, Tata
McGraw –Hill.
4. E Horowitz, “Programming Languages”, 2nd Edition, Addison
Wesley
PPL
Language Evaluation Criteria
Influences on Language Design
Programming Paradigm
Compilation
Virtual Machine | PPL
Programming Environments | PPL
Issues in Language Translation
Parse Tree | PPL
Pointer & Reference Type | PPL
Concept of Binding
Type Checking
PPL: Strong Typing
Sequence Control & Expression | PPL
Subprograms
Scope and lifetime of variable
Static and Dynamic scope
Design issues of subprogram
PPL: Local referencing environments
Parameter passing methods
Overloaded subprograms
Generic Subprograms
Design issues for functions
PPL: Coroutines
Abstract Data types
Abstraction and encapsulation
Static and Stack-Based Storage management
Garbage Collection
OOP in C++ | PPL
PPL: OOP in PHP
OOP in C# | PPL
OOP in Java | PPL
Concurrency
PPL: Semaphores
Monitors
Message passing
PPL: Java Threads
PPL: C# Threads
PPL: Exception Handling
Exception handler in Java
Exception Propagation
PPL: Exception Handler in C++
PPL: Exceptions
Introduction and overview of Logic programming
Application of Logic programming
Functional programming languages
PPL: Introduction to 4GL
Basic elements of Prolog
Video Lectures
PPL Practicals
Memory Implementation of 2D Array.
Memory Implementation of 3D Array.
Implementation of pointers in C++
program in Java to implement exception handling
Call by value in C++
Call by reference in C++
program in Java to implement concurrent execution of a job using
threads.
Implement Inheritance in C#
Implement Encapsulation in C#
Static polymorphism in C#
Dynamic runtime polymorphism in C#
EasyExamNotes © 2023