0% found this document useful (0 votes)
17 views90 pages

Unit 1

The document outlines the fundamentals of programming languages, emphasizing their importance, history, and the impact of programming paradigms. It discusses various programming paradigms such as procedural, object-oriented, functional, and logic-based, and highlights the significance of understanding programming languages for improving problem-solving skills. Additionally, it covers the evolution of programming languages and their application domains, as well as the role of programming environments in enhancing the programming experience.

Uploaded by

harshad.darawade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views90 pages

Unit 1

The document outlines the fundamentals of programming languages, emphasizing their importance, history, and the impact of programming paradigms. It discusses various programming paradigms such as procedural, object-oriented, functional, and logic-based, and highlights the significance of understanding programming languages for improving problem-solving skills. Additionally, it covers the evolution of programming languages and their application domains, as well as the role of programming environments in enhancing the programming experience.

Uploaded by

harshad.darawade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Principles of Programming Languages

Unit 1
1

FUNDAMENTALS OF
PROGRAMMING
Content of Syllabus: Unit-1
2

Importance of Studying Programming Languages, History of


Programming Languages, Impact of Programming Paradigms, Role of
Programming Languages, Programming Environments.

Impact of Machine Architectures: The operation of a computer, Virtual


Computers and Binding Times. Programming paradigms-
Introduction to programming paradigms, Introduction to four main
Programming paradigms- procedural, object oriented, functional, and
logic and rule based.

Pratush Jadoun
Importance of Studying Programming Languages
3

Computers aren't very


smart.

Ask the computer to draw a picture of bird...Will


it draw?
Importance of Studying Programming Languages
4

Computers are bad at understanding


things
Importance of Studying Programming Languages
5

Computers cannot understand


English
Importance of Studying Programming Languages
6

 So learning and doing programming is an exercise for your

brain that eventually improves your problem-solving and


logical ability.
 Learning to code will teach you to solve the problems we

encounter every day in our life and that is the best thing you
can do to change this world.

Prepared By Mr. Vipin K.


Wani
Functional View of a Computer
7
Functional View of a Computer
8

 Humans interact with computers via Input and Output (I0) devices.
 Information from Input devices are processed by the CPU and may
be shuffled off to the main or secondary memory
 When information need to be displayed, the CPU sends them to
one or more
Output devices
Importance of Studying Programming Languages
9

 A program is just a sequence of instructions telling the computer what


to do
 Obviously, we need to provide these instructions in a language that
computers can understand
 We refer to this kind of a language as a programming language
 Python, Java, C and C++ are examples of programming languages
 Every structure in a programming language has an exact form (i.e.,
syntax) and a precise meaning (i.e., semantic)
Importance of Studying Programming Languages
10

Six reasons to Learn Programming Languages


 To improve your ability to develop effective
algorithms
 To improve your use of your existing programming
language
 To increase your vocabulary of useful programming
constructs
 To allow a better choice of programming language
 To make it easier to learn a new language
 To make it easier to design a new language
Importance of Studying Programming Languages
11

Reason 1: To improve your ability to develop effective algorithms


 The depth at which people can think is heavily influenced by the
expressive power of their language.
 It is difficult for people to conceptualize structures that they
cannot describe,
verbally or in writing.
Importance of Studying Programming Languages
12

Reason 2: To improve your use of your existing programming


language (Help to understand how any language can be used to
create any application by understanding its concepts)

 Many professional programmers have a limited formal education in


computer
science, limited to a small number of programming languages.
 They are more likely to use languages with which they are most
comfortable than the most suitable one for a particular job.
 By understanding how features in the language are implemented,
greatly increase our ability to write efficient programs.
Importance of Studying Programming Languages
13

Reason 3: To increase your vocabulary of useful


programming constructs (Can Understand different
programming language and can use language suitable for particular
application)

 They are more likely to use languages with which they are most
comfortable than
the most suitable one for a particular job.
 Computer science is consider as a young discipline and most
software technologies (design methodology, software development,
and programming
languages) are not yet mature. Therefore, they are still evolving.
Prepared By Mr. Vipin K.
 The understanding
Wani of programming language design
Importance of Studying Programming Languages
14

Reason 4: To allow a better choice of programming language


(Can
Understand Which Language is better for which application)
 It is often necessary to learn about language implementation; it
can lead to a better understanding of why the language was designed
the way that it was.
 Fixing some bugs requires an understanding of implementation
issues.
 Some languages are better for some jobs than others.
 Ex. FORTRAN and APL for calculations, COBOL and RPG for report
generation, LISP and PROLOG for AI, etc.
 Improve your use of existing programming language
 By understanding how features are implemented, you can make
Importance of Studying Programming Languages
15

Reason 5: To make it easier to learn a new language

 By understanding how features are implemented, you can make


more efficient use of them.
 Examples: Creating arrays, strings, lists, records. Using recursions,
object classes,
etc.
 The understanding of programming language design and
implementation makes it easier to learn new languages..
Importance of Studying Programming Languages
16

Reason 6: To make it easier to design a new language


 Designing a new language require prior knowledge of previous
one to make it effective, efficient and convenient to users.
 The previous knowledge as well as concepts are usual to design a
new language
irrespective of their work domains.
History of Programming Languages
1
7

Click here to watch


Video
History of Programming Languages
1
8
⚫ History of Programming
Languages
⚫ Development of Early
Language
⚫ Evolution of Software
Architecture
⚫ Application Domains
History of Programming Languages
1
9
⚫ History of Programming languages
⚫ 1951-55: Experimental use of expression compilers.
⚫ 1956-60: FORTRAN, COBOL, LISP, Algol 60.
⚫ 1961-65: APL notation, Algol 60 (revised),
SNOBOL, CPL.
⚫ 1966-70: APL, SNOBOL 4, FORTRAN 66,
BASIC, SIMULA, Algol 68, Algol-W, BCPL.
⚫ 1971-75: Pascal, PL/1 (Standard), C, Scheme,
Prolog
⚫ 1976-80: Smalltalk, Ada, FORTRAN 77, ML.
History of Programming Languages
2
0
⚫ 1981-85: Smalltalk-80, Prolog, Ada 83.
⚫ 1986-90: C++, SML, Haskell.
⚫ 1991-95: Ada 95, TCL, Perl.
⚫ 1996-2000: Java.
⚫ 2000-05: C#, Python, Ruby, Scala.
History of Programming Languages
2
1
History of Programming Languages
2
2

Prepared By Mr. Vipin K.


Wani
History of Programming Languages
2
3

Development of
Early Language

Prepared By Mr. Vipin K.


Wani
History of Programming Languages
2
4
History of Programming Languages
2
5
Development of Early Language
 Numerically based languages
⚫ Computing mathematical expressions
⚫ Example: R, FORTRAN, Algol, Pascal, PL/1, BASIC,
C, C++
 Business languages
⚫ Example: COBOL (Common Business Oriented
Language) has English-like notation
History of Programming Languages
2
6
Development of Early Language
 Artificial intelligence languages
⚫ Tree search; Rule-based paradigm
 LISP (LIST Processing)
 PROLOG (PROgramming in LOGic)
 System languages :C, C++.Script languages: AWK, Perl,
TCL/TK
 Web programming: HTML, XML, Java, Microsoft
*.NET family
History of Programming Languages
2
7
Development of Early Language
 Artificial intelligence languages (5 t h Generation Lang)
⚫ Mercury, OPS5, AI etc
History of Programming Languages
28

Evolution of Software Architecture


History of Programming Languages
2
9
Evolution of Software Architecture
 Mainframe Era
⚫ Batch processing (batches of files)
⚫ Interactive processing (time sharing)
 Effects on language design
⚫ File I/0 in batch processing
⚫ Error handling in batch processing
⚫ Time constraints in interactive processing

Prepared By Mr. Vipin K.


Wani
History of Programming Languages
3
0
Evolution of Software Architecture
 Networking Era
⚫ Client-server model of computing
⚫ Server: a program that provides information
⚫ Client a program that requests information
 Effects on language design
• Interaction between the client and server programs
• Active web pages, Security issues, Performance

Prepared By Mr. Vipin K.


Wani
History of Programming Languages
31

 Application Domains

1. Scientific applications: Large numbers of floating


point computations; use of arrays: Fortran
2. Business applications: Produce reports, use decimal numbers
and characters: COBOL
3. Artificial intelligence: Symbols rather than
numbers manipulated; use of linked lists: LISP
4. Systems programming: Need efficiency because of continuous
use: C
5. Web Software: Eclectic collection of languages: markup
(e.g.,
HTML), scripting (e.g., PHP)
6. Etc….
Prepared By Mr. Vipin K.
Wani
Impact of Programming Paradigms
3
2
 Paradigm can also be termed as method to solve some
problem or do some task.
 Programming paradigm is an approach to solve problem
using some programming language or also we can say it is
a method to solve a problem using tools and techniques
that are available to us.
 There are lots for programming language that are known
but all of them need to follow some strategy when they are
implemented and this methodology/strategy is paradigms.
 Apart from varieties of programming language there
are lots of paradigms to fulfill each and every demand.

Prepared By Mr. Vipin K.


Wani
Impact of Programming Paradigms
3
3
● Imperative language
● Applicative language
● Rule based language
● Object oriented language

Prepared By Mr. Vipin K.


Wani
Impact of Programming Paradigms
3
4
This Causes Impact on

● Way Programmers are Solving the Program


● Challenge to Describe Needs of the Stakeholders and
Solution
Requirements
● Provided an Underlying Model to Verify and
Validate
the Program in a Reliable Manner.
● Minimize the Design Errors
● Provides Variety of Techniques to manage
Complexity.
● How to Design a Software
Prepared By Mr. Vipin K.
Wani
Impact of Programming Paradigms
3
5

Impact in Design
of Programming
Languages

Prepared By Mr. Vipin K.


Wani
Impact of Programming Paradigms
36

Some influences on the development of Programming


Languages

Prepared By Mr. Vipin K.


Wani
Impact of Programming Paradigms
37

Some influences on the development of Programming


Languages

Prepared By Mr. Vipin K.


Wani
Impact of Programming Paradigms
38

Some influences on the development of Programming


Languages

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
3
9

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
0

Good Language

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
1

Clarity, Simplicity And Unity


● A Programming language provides both a conceptual framework for
Algorithm planning and means of expressing them.
● It should provide a clear, simple and unified set of concepts that can be
used as primitives in developing algorithms.
● It should have
• It has minimum number of different concepts
• with Rules for their combination being
• simple and regular.
This attribute is called conceptual integrity.

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
2

Orthogonality

● It is one of the most important feature of PL orthogonality is the property


that means " Changing A does not change B".
● If I take Real world example of an orthogonal system Would be a radio,
where changing the station does not change the volume and vice versa.
● When the features of a language are orthogonal, language is easier to
learn and programs are easier to write because only few
exceptions and special cases to be remembered.

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
3

Naturalness for the application

● Language should provide appropriate data structures, operations, control


structures and proper natural syntax

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
4

Support for Abstraction

• Language should provide support for various and different data structures.
• There is always found that a substantial gap remaining between the abstract
data structure and operations that characterize the solution to a problem
and their particular data structure and operations built into a language.

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
5

Programming Environment

● An appropriate programming environment adds an extra utility and make


language to be implemented easily like
● The availability of- Reliable- Efficient - Well documentation Speeding
up creation and testing by-special Editors- testing packages
● Facility- Maintaining and Modifying- Multi Version of program software
product.

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
6

Programming Environment

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
7

Ease of program verification:- Reusability

● The reusability of program written in a language is always a central concern.


A program is checked by various testing technique like
● Formal verification method, Syntax checking, Input output test checking,
semantic checking et.
● We verify the program by many more techniques.
● A language that makes program verification difficult maybe far
more troublesome to use.
● Simplicity of semantic and syntactic structure is a primary aspect that tends
to simplify program verification.

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
8

Syntax and Semantics

● The syntax of programming language is what the program looks like.


● How statements declaration and other constructs are written
● The semantic of Pl is meaning is a meaning given to the various syntactic
constructors.

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
4
9

Portability

Language should support portability feature.

Prepared By Mr. Vipin K.


Wani
Role of Programming Languages
5
0

Cost of Use

Cost of Use should be comparatively less.

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
1

Imperative Languages

● Command driven or statement oriented


● The basic concept is machine state
● A program consists of sequences of statement
● Execution of each instruction causes the computer to change the value of one or
more location , to enter a new state.
● Syntax of such languages

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
2

Imperative Languages

● Many Widely used Languages

C, C++, FORTRAN, PL/I, Pascal ,


Ada,
Small Talk and COBOL support
this model.
● Most of the all
conventional
languages

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
3

Applicative Languages
● programming language is to look at the function that the program represents
rather than just the state changes as the program executes, statement by
statement.
● Focus on the desired result rather than at the available data.
● What is the function that must be applied to the initial machine state by
accessing the initial set of variables and combining them in specific ways to
get an answer?
● The languages which emphasize this view are called applicative or functional
languages.

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
4

Applicative Languages
● LISPand ML are two functional
languages

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
5

Rule Based Languages


● execute by checking for the presence of a certain enabling condition and,
when present, executing an appropriate action.
● Themost common rule-based language is Prolog, also called a
logic programming

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
6

Rule Based Languages

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
7

Object Oriented Languages


● Complex data objects are built, then a limited set of functions are designed to
operate on those data.
● Complex objects are designed as extensions of simpler objects, inheriting
properties of the simpler object.
● The best of two of the other computational models.
○ By building concrete data objects, an object-oriented program
gains the efficiency of imperative languages.
○ By building classes of functions that use a restricted set of data objects,
we build the flexibility and reliability of the applicative model.

Prepared By Mr. Vipin K.


Wani
Programming Paradigms
5
8

Object Oriented Languages

Object Object
A B

Object
Functio
ns

Prepared By Mr. Vipin K.


Wani
Programming Environment
59

●Text Editor

●Compiler

●Interpreter

●Debugger

●Effects on Language Design

●Environment Frameworks

●Job Control and Process Languages

●Help Documentation

Prepared By Mr. Vipin K.


Wani
Programming Environment
60

Effects on Language Design

● it is ordinarily desirable to have different programmers or programming groups


design, code, and test. parts
● Language must be structured so that subprograms or other parts can be
separately compiled and executed, later merged without change into the final
program.
● Compiler may need information about other subprograms or shared data
○ The specification of the number, order, and type of parameters expected by
any subprogram
○ to determine the storage representation of the external variable
○ The definition of a data type that is defined externally but is used to declare
any local variable within the subprogram

Prepared By Mr. Vipin K.


Wani
Programming Environment
61

Effects on Language Design

● Another aspect of separate compilation that affects language design


○ shared name
○ scoping rules
○ Inheritance
● Testing and debugging.
○ Execution trace features.
○ Breakpoints.
○ Assertions.
assert( X>0 and A=1) or (X=0 and A>B+10).

Prepared By Mr. Vipin K.


Wani
Programming Environment
62

Environment Frameworks

● Support environment consists of infrastructure services called the

environment framework to manage development of Program.


● Supplies services such as a data repository, graphical user interface,

security, and communication services.


● Languages are sometimes designed to allow for easy access to these

infrastructure services.

Prepared By Mr. Vipin K.


Wani
Programming Environment
63

Job Control and Process Languages


• Click and Execute Environment
• If the compilation fails, the user could invoke an editor to correct
the Program;
● If the compilation succeeds, the user could invoke a loader

and execute the program.


● a process or scripting language which generally interpret and
have the
property that they view programs and files as the primitive data to
manipulate.
● “faster, better, and cheaper.”
Prepared By Mr. Vipin K.
Wani
Impact of Machine Architectures
6
4

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures
6
5

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
6
6

Computer Hardware

● A computer is an integrated set of algorithms and data structures


capable of storing and executing programs.
● A computer may be constructed as an actual physical device using wires,
integrated circuits, circuit boards, and the like, in which case it is
termed an actual computer or hardware computer.
● it may also be constructed via software by programs running on
another computer, in which case it is a software-simulated
computer.
● A programming language is implemented by construction of a translator,
which translates programs in the language into machine
language programs that can be directly executed by some
Prepared By Mr. Vipin K.
Wani computer.
Impact of Machine Architectures (The Operation of a Computer)
67

Computer Hardware
1. Data. A computer must provide various kinds of elementary data items and
data structures to be manipulated.
2. Primitive operations. A computer must provide a set of
primitive operations useful for manipulating the data.
3. Sequence control. A computer must provide mechanisms for controlling
the sequence in which the primitive operations are to be executed.
4. Data access. A computer must provide mechanisms for controlling the data
supplied to each execution of an operation.
5. Storage management. A computer must provide mechanisms to control
the allocation of storage for programs and data
6. Operating environment. A computer must provide mechanisms
for
communication with an external environment containing programs and data
to be processed.
Prepared By Mr. Vipin K.
Wani
Impact of Machine Architectures (The Operation of a Computer)
6
8

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
6
9

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
7
0

Firmware of Computers

● Firmware is the foundation of the software stack that computer hardware uses
for basic operations and to run applications.

● Firmware is a software program on the hardware device, which perform functions


like basic input/output tasks and offers necessary instructions for the
device to communicate with other computing devices. It is a set of instructions
programmed that is permanently etched into a hardware device like
video cards, BIOS, keyboards, or hard drives.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
7
1

Firmware of Computers

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
7
2

Translators and Virtual Architectures

● Translator could be designed to translate programs in the high-level


language into equivalent programs in the machine language of the
actual computer.
● Instead simulate, through programs running on another host
computer, a computer whose machine language is the high-level
language.
● We construct with software running on the host computer (the high-
level language computer) that we might have constructed in hardware.
This is
termed as software interpretation of the high-level language computer on
the host computer.
Prepared By Mr. Vipin K.
Wani
Impact of Machine Architectures (The Operation of a Computer)
7
3

Translators

● An assembler is a translator whose object language is also some variety of


machine language for an actual computer but whose source language,
an assembly language, represents for the most part a
symbolic representation of the object machine code.
● A compiler is a translator whose source language is a high-level language
and whose object language is close to the machine language of an
actual computer,
● A loader or link editor is a translator whose object language is actual
machine code and whose source language is almost identical.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
7
4

Translators

● A preprocessor or a microprocessor is a translator whose source language


is an extended form of some high-level language such as C++ or Java
and whose object language is the standard form of the same
language.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
75

Software Simulation

Simulation software is based on the process of modeling a real


phenomenon with a set of mathematical formulas. It is, essentially,
a program that allows the user to observe an operation
through simulation without actually performing that operation.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (The Operation of a Computer)
76

Software Simulation
● The simulated computer accepts as input data a program in the high-
level language.
● The main simulator program performs an interpretation algorithm
similar to that of decoding and executing each statement of the
input program in the appropriate sequence and producing the
specified output from the program.
● host computer creates a virtual machine simulating the high-level
language.
● When the host computer is executing the high-level program, it is not
possible to tell whether the program is being executed directly
by the hardware or is first converted to the low-level machine
language of the hardware computer.
Prepared By Mr. Vipin K.
Wani
Impact of Machine Architectures (The Operation of a Computer)
77

Advantages of Translation & Simulation


● Translation and simulation provide different advantages in a programming
language implementation.
● Some aspects of program structure are best translated into simpler forms
before execution; other aspects are best left in their original form
and processed only as needed during execution.
● The major disadvantage of translation is loss of information about the
program.
● In Simulation By leaving statements in their original form until they need
to be executed, no space is needed to store multiple copies of long
code sequences;
● the basic code need be stored only once in the simulation routine.
● However, the total cost of decoding must be paid each time the statement is
to be executed.
Prepared By Mr. Vipin K.
Wani
Impact of Machine Architectures
7
8

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
79

1. Through a hardware realization, representing the data structures and algorithms


directly with physical devices.
2. Through a firmware realization, representing the data structures and algorithms by
microprogramming a suitable hardware computer
3. Through a virtual machine, representing the data structures and algorithm by
programs and data structures in some other programming language.
4. Through some combination of these techniques, representing various parts of the
computer directly in hardware, in microprograms, or by software simulation
as appropriate.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
80

Virtual Computers and Language Implementations


● The language is implemented on a different computer, the
implementor tends to see a slightly (or very) different
virtual computer in the language definition.
● two different implementations of the same language may utilize a
different set of data structures and operations in the
implementation,
● three factors lead to differences among implementations of
1. Differences in each implementor’s conception of the
virtual
computer
2. Differences in the facilities provided by the host computer on which
the language is to be implemented.
3. Differences in the choices made by each implementor as to how to
Prepared By Mr. Vipin K.
Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
81

Virtual Computers and Language Implementations


● The language is implemented on a different computer, the
implementor tends to see a slightly (or very) different
virtual computer in the language definition.
● two different implementations of the same language may utilize a
different set of data structures and operations in the
implementation,
● three factors lead to differences among implementations of
1. Differences in each implementor’s conception of the
virtual
computer
2. Differences in the facilities provided by the host computer on which
the language is to be implemented.
3. Differences in the choices made by each implementor as to how to
Prepared By Mr. Vipin K.
Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
8
2

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
83

Bindings: Names and Attributes

● Names are a fundamental abstraction in languages to denote entities


○ Meanings associated with these entities is captured via attributes associated
with the names
● Attributes differ depending on the entity:
○ location (for variables)
○ value (for constants)
○ formal parameter types (functions)
● Binding: Establishing an association between name and an attribute.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
84

Bindings: Names

● Names or Identifiers denote various language entities:


○ Constants
○ Variables
○ Procedures and
○ Functions Types, . . .
● Entities have attributes

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
85

Bindings: Names

● Attributes are associated with names (to be more precise, with the entities they
denote).
● Attributes describe the meaning or semantics of names (and entities).

● An attribute may be
○ static: can be determined at translation (compilation) time, or
○ dynamic: can be determined only at execution time.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
86

Bindings:
Time

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
87

Binding Time -Importance of Binding Times


● Language design time: built-in features such as keywords
● Language implementation time: implementation dependent semantics such
as
bit-width of an integer
● Program writing time: names chosen by programmer
● Compile time: bindings of high-level constructs to machine code
● Link time: final bindings of names to addresses
● Load time: Physical addresses (can change during run time)
● Run time: bindings of variables to values, includes many bindings which change
during execution

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
88

Binding and Binding Time -Classes of Binding Times

1. Execution time (run time)


a. On entry to a subprogram or block.
b. At arbitrary points during execution.
2. At arbitrary points during execution.
a. Bindings chosen by the programmer.
b. Bindings chosen by the translator.
3. Language implementation time.
4. Language definition time.

Prepared By Mr. Vipin K.


Wani
Impact of Machine Architectures (Virtual Computers & Binding Times)
89

Binding and Binding Time -Classes of Binding Times

● consider the simple assignment statement X=X+10


● Points to Think:
○ Set of types for Variable X.
○ Type of variable X.
○ Set of possible values for variable X.
○ Value of Variable X.
○ Representation of the constant 10.
○ Properties of the operator +.

Prepared By Mr. Vipin K.


Wani
Thank You…!
9
0

Visit https://wanivipin.wordpress.com/ to download study


materials

of various subjects
Prepared By Mr. Vipin K.
Wani

You might also like