Medium 9789381159415

Programming Languages "Design and Constructs" 

Views: 403
Ratings: (0)
Programming Languages "Design and Constructs" is a comprehensive introduction to programming language concepts. This book provides a new approach to Programming Languages by providing a balanced mixture of explanation and experimentation. This book covers the syllabus of many unversities. The book examines design and analysis issues using a wide variety of Programming languages.

List price: $24.95

Your Price: $19.96

You Save: 20%

Remix
Remove
 

12 Slices

Format Buy Remix

pldnc-con.pdf

PDF

(vi)

Some Important Terms

Review Questions

CHAPTER 3: Syntax and Semantics

3.1.

3.2.

3.3.

3.4.

3.5.

Syntax and Semantics

The General Problem of Describing Syntax

Formal Methods of Describing Syntax

Attribute Grammars

Dynamic Semantics

Some Important Terms

Review Questions

CHAPTER 4: Structured Data Objects

4.1.

4.2.

4.3.

4.4.

4.5.

4.6.

4.7.

4.8.

4.9.

4.10.

4.11.

4.12.

4.13.

Structured Data Objects and Data Types

Declaration and Type Checking of Structured Data Objects

Vectors and Arrays

Multidimensional Arrays

Records

Slices

Character String Types

Variable Size Data Structures

Union

Pointers and Programmer-constructed Data Objects

Sets

Lists

Files

Some Important Terms

Review Questions

CHAPTER 5: Subprograms and Programmer Defined Data Types

5.1.

5.2.

5.3.

5.4.

5.5.

5.6.

5.7.

5.8.

5.9.

Data Type Concept

The Concept of Abstraction

Abstract Data Types

Encapsulation and Information Hiding

Encapsulation by Subprograms

Polymorphism

Overloaded Subprogram

Generic Subprograms

Type Definitions

Some Important Terms

Review Questions

34

35

37—70

37

38

40

58

62

69

70

71—100

 

pldnc-1.pdf

PDF

Chapter

1

INTRODUCTION

1.1. Concept of Programming Languages

1.6. Programming Environment

1.2. Why we study Programming Languages

1.7. Programming Language Translators,

Compilers and Interpreter

1.3. Brief History of Programming Languages

1.8. Difference between Compiler and

Interpreter

1.4. Language Paradigms

1.5. Characteristics of a Good Programming

Language

In the early 1950s, symbolic notations started to appear. Grace Hopper led a group at Univac to develop the A-0 language, and John Backus developed speedcoding for the IBM 701. Both were designed to compile simple arithmetic expressions into executable machine language.

The real break through occurred in 1957 due to arrival of FORTRAN in 1957. FORTRAN data were oriented around numerical calculations.

The formula b2 – 4ac was written in FORTRAN as the expression

B ** 2 – 4.0 * A * C.

FORTRAN takes its name from Formula Translation; readable formulas were translated into machine instructions for the IBM 704. FORTRAN was extremely successful and was the dominant language through the 1970s. Because of the suceess of FORTRAN, hundreds of programming languages have since been designed and implemented.

 

pldnc-2.pdf

PDF

Chapter

2

ELEMENTARY DATA

TYPE

2.1. Data Object and Data Value

2.8. Declarations

2.2. The Role of Data Type

2.9. Type Checking

2.3. Binding

2.10. Strong Typing

2.3.1 Static Binding

2.11. Type Conversion and Coercion

2.3.2 Dynamic Binding

2.12. Assignment and Initialization

2.4. Scope and Lifetime of a Variable

2.13. Numeric Data Types

2.5. Blocks

2.13.1 Integers

2.6. Variables and Constants.

2.13.2 Subrange Type

2.7. Specification and Implementation of

Elementary Data Type

2.13.3 Floating Point Real Numbers

2.13.4 Fixed Point Real Numbers

2.7.1. Specification of Elementary Data

Types

2.13.5 Complex Numbers

2.14. Enumerations

2.7.2. Examples of Primitive Operations

2.15. Booleans

2.7.3. Examples of Programmer Defined

Operations

2.16. Characters

Elementary or Primitive data type includes integer, real, character, Boolean, enumeration and pointers. In this chapter, we introduce the concept of data type, data object and various characteristics of elementary data type. Then, we discuss the specification and implementation of elementary data objects. We also discuss the various terms related to data objects like scope of data objects, blocks, lifetime of objects etc. Then, we discuss binding of variables to values.

 

pldnc-3.pdf

PDF

Chapter

3

SYNTAX AND

SEMANTICS

3.3.2.4. Conversion of Ambiguous to Unambiguous Grammar

3.1. Syntax and Semantics

3.2. The General Problem of Describing Syntax

3.3.3. Extended BNF (EBNF)

3.2.1. Language Recognizers and

Language Generators

3.3.4. Syntax Graphs

3.3.5. Finite State Automata

3.3. Formal Methods of Describing Syntax

3.3.6. Regular Grammars and Regular

Expressions

3.3.1. Context Free Grammars (CFG)

3.3.2. BNF Grammars

3.4. Attribute Grammars

3.3.2.1. Derivations

3.5. Dynamic Semantics

3.3.2.2. Parse Tree (Derivation

Trees)

3.5.1. Operational Semantics

3.3.2.3. Ambiguity

3.5.3. Denotational Semantics

3.5.2. Axiomatic Semantics

The study of programming languages, like the study of natural languages, can be divided into examinations of syntax and semantics. The main purpose of a language is to express meaning by means of sound. Programming language implementor obviously must be able to determine how the expressions, statements of a language are formed. The validity of a sentence is based on their syntax and semantics.

 

pldnc-4.pdf

PDF

Chapter

4

STRUCTURED DATA

OBJECTS

4.5. Records

4.1. Structured Data Objects and Data Types

4.5.1. Arrays of Records

4.1.1. Specification of Data Structure or

Structured Data Objects

4.5.2. Variant Records

4.1.2. Operations on Structured Data

Objects

4.6. Slices

4.1.3. Implementation of Structured

Data Objects

4.8. Variable Size Data Structures

4.7. Character String Type

4.9. Unions

4.1.4. Implementation of operations of

Structured Data Objects

4.1.5. Storage

Management

Structured Data Object

4.10. Pointers and Programmer–Constructed

Data Objects

of

4.11. Sets

4.12. Lists

4.2. Declaration and Type Checking of

Structured Data Objects

4.13. Files

4.3. Vectors and Arrays

4.13.1. Accessing a File

4.4. Multidimensional Arrays

4.13.2. Types of File

In chapter 2, we have discussed primitive type or elementary data objects. In application point of view we find that the data is generally structured in some ways. Most imperative languages provide some support for structured types. Users may be able to define their own types, and this can create some meaningful programs. Virtually all languages have included features for creating complex data objects out of the elementary data objects defined by the language designers. Various types can be combined to create aggregate types, composed of elements of other types, such as arrays and records. Most programming language have at least one built in type, although there are typeless languages, where data objects can be coerced automatically from one type to another. Arrays, lists and sets are ways to create homogeneous collection of data objects. Records are a mechanism for creating nonhomogeneous collection of data objects.

 

pldnc-5.pdf

PDF

Chapter

5

SUBPROGRAMS AND

PROGRAMMER

DEFINED DATA

TYPES

5.6. Polymorphism

5.1. Data Type Concept

5.6.1. Parametric Polymorphism

5.2. The Concept of Abstraction

5.7. Overloaded Subprogram

5.3. Abstract Data Types

5.3.1. Floating Point as an Abstract Data

Type

5.8. Generic Subprogram

5.3.2. User Defined Abstract Data Type

5.9. Type Definitions

5.8.1. Generic Functions in C++

5.3.3. Advantages of Abstract Data Type

5.9.1. Type Definition with Parameters.

5.4. Encapsulation and Information Hiding

5.9.2. Type Equivalence

5.5. Encapsulation by Subprograms

5.9.3. Data Object Equality

5.5.1. Subprograms Definitions and

Subprograms Activations

In this chapter, we explore programming language support for data abstraction. Early languages, such as FORTRAN and COBOL, limit the creation of new data types to subprogram definition.

But new language designs have provided better facilities for specify and implementing entire abstract data types. C++ and Java defines class which is abstract data types. By abstract data type we can create new data type. We begin by discussing the evolution of abstract data type concept and then discuss the concept of abstraction and abstract data type. Data encapsulation and Information hiding are also associated with abstraction. In this chapter, we also create programmer–defined data by use of subprograms. Procedures, subroutines and functions are defined and implemented.

 

pldnc-6.pdf

PDF

Chapter

6

SEQUENCE

6.1. Sequence Control

CONTROL

6.2. Implicit and Explicit Sequence Control

6.4.3. Need of Structured Programming

Design

6.3. Sequence Control with in Expressions

6.4.4. Structured Programming Design

in

6.4.5. Structured Sequence Control or

Structured Control Flow

6.3.1.1. Tree-Structure Representation

6.4.6. Problems in Structured Sequence

Control

6.3.1. Sequence control with

Arithmetic Expressions

6.4.7. Prime Programs

6.3.1.2. Execution time of Tree

Structure used in

Expressions

6.5. Subprogram Sequence Control

6.5.1. General Subprogram Characteristics

6.3.2. Sequence Control with in NonArithmetic Expressions.

6.5.2. Procedures and Functions

6.3.2.1. Pattern Matching

6.5.3. Simple Subprogram Call-return

6.3.2.2. Term Rewriting

6.5.4. Recursive Subprogram

6.6. Introduction to Exception Handling

6.3.2.3. Unification

6.3.2.4. Substitution

6.6.1. Exception and Exception Handler

6.3.2.5. Backtracking

6.6.2. Exception Handling in C++

6.4. Sequence Control with in Statements

6.6.3. Exception Handling in Java

6.4.1. Different forms of Statement Level

 

pldnc-7.pdf

PDF

Chapter

7

CONCURRENCY

7.1. Introduction to Concurrency

7.3.1.1. Deadlocks and Starvation

7.1.1 Level of Concurrency

7.3.1.2. Solution of Bounded-Buffer

Problem using Semaphore

7.1.2 Categories of Concurrency

7.3.2. Monitors

7.1.3 Motivation for Studying

Concurrency

7.3.3. Message Passing

7.1.4 Advantages of Concurrency

Control Mechanism

7.2. Indroduction to Subprogram Level

Concurrency and Synchronization

7.2.1. Design Issues of Concurrency

7.3. Methods for Synchronization

7.3.1. Semaphores

7.3.3.1 Message Passing Models

7.3.3.2 Advantages of Message

Passing systems

7.4. Multiprocessor Architectures

7.5. Synchronization in JAVA

7.6. Concurrency in other Languages

This chapter discuss the various concepts regarding concurrency, categories of concurrency and synchronization methods. There are various kinds of concurrency at the subprogram, or

Unit level, and at the statement level. We also discuss competition and cooperation synchronization. The concurrent processes may be executing truly simultaneously, in the case that they run on separate processors, or their execution steps may be interleaved to produce the appearance of concurrency. The intention of this chapter is to discuss the aspects of concurrency that are most relevant to language design issues, rather than to present a definitive study of all of the issues of concurrency.

 

pldnc-8.pdf

PDF

Chapter

8

DATA CONTROL

8.9. Parameters

8.1. Data Control and Attributes of Data

Control

8.9.1. Actual and Formal Parameters

8.2. Names and Referencing Environment

8.9.2. Correspondence between Parameters

8.2.1. Naming of Program Elements

8.2.2. Associations of Identifiers

8.10. Parameter Passing Mechanisms

8.10.1. Semantic Models of Parameter

Passing

8.2.3. Referencing Environments

8.2.4. Visibility of Associations

8.10.2. Implementation Models

Parameter Passing

8.2.5. Different Type of References

8.2.6. Referencing Operations

of

8.10.3. Parameter Passing Methods in

Different Languages

8.3. Concept of Aliasing

8.4. Scope of Variable

8.4.1. Static Scoping

8.10.4 Implementation of Parameter

Transmission Methods

8.4.2. Dynamic Scoping

8.10.5 Parameter Transmission Examples

8.5. Evaluation of Static Scope

8.10.6 Aliases and Parameters

8.6. Evaluation of Dynamic Scoping

8.11. Explicit Common Environments

8.7. Concept of Block Structure

8.12. Non-local Environment

8.7.1. Static Scope Rule Associated with

Block Structured Languages

 

pldnc-9.pdf

PDF

Chapter

9

STORAGE

MANAGEMENT

9.1. Major Runtime Elements Requiring

Storage

9.5. Dynamic Storage Management

9.5.1. Stack based Storage Management

Scheme

9.2. Programmer and System Controlled

Storage Management

9.5.2. Heap Storage Management Scheme

9.3. Storage Management Phases

9.5.2.1.

Heap Storage Management for Fixed Size elements

9.5.2.2.

Heap Storage Management for Variable Size

Elements

9.4. Static Storage Management Technique

9.4.1. Advantages of Static Storage

Management

9.4.2. Disadvantages of Static Storage

Allocation Scheme

Storage Management is a key area in the study of programming language, since it is tightly intertwined with the meaning of programs. Memory or storage is the area where data and instructions are stored. Storage management for data and instructions is one of the central concerns of the programmer, language implementor and language designer. There are various storage management techniques with the help of these techniques data is stored in memory.

In this chapter we are dealing with these storage management techniques and different terms related with storage management. We also discuss the various problems associated with storage management. Programmer is also deeply concerned with storage management and must design programs that use storage efficiently, the programmer is likely to have little direct control over storage. Runtime stack helps to clarify our understanding of how memory is organized to implement functions, a different memory area, called the heap, helps us to understand the runtime behaviour of dynamic objects.

 

pldnc-10.pdf

PDF

Chapter

10

PROGRAMMING

LANGUAGES

10.1. Imperative Programming

10.6.5.1. Expressions

10.2. Procedural Languages

10.6.5.2. LISTS

10.3. Non-procedural Languages

10.6.5.3. LET Expressions

10.4. Structured Programming Languages

10.6.5.4. LAMBDA and DEFINE

Functions

10.5. Object-oriented Programming Languages

10.6.5.5. Semantics of COND

10.5.1. Abstract Data Types

10.6.6. COMMON LISP

10.5.2. Inheritance

10.5.3. Polymorphism and Dynamic

Binding

10.7. Logical Programming Language

10.5.4. Design issues for Object-oriented

Languages

10.7.2. HORN CLAUSES

10.5.5. Role of Object-oriented

Programming in C++

10.7.4. Clausal Form

10.7.1. LOGIC and Predicate Calculus

10.7.3. Propositions

10.7.5. Resolution and Unification

10.5.6. Role of Object-oriented

Programming in Java

10.7.6. Overview of Logic Programming in PROLOG

10.6. Functional Programming Languages

10.7.7. Different

Elements

10.6.1. Mathematical Functions and the

LAMBDA Calculus

10.7.9. Applications of Logic

Programming

10.6.3. Basics of Functional

Programming Languages

10.8. Comparison between Procedural and

 

pldnc-ind.pdf

PDF

INDEX

Binding, 18

Bit Strings, 91

Block, 20, 188

Block in ‘C’, 20

Block in Pascal, 20

Block Structure, 4

Blocked, 160

Blocking Receiver, 170

Blocking Send, 170

BNF Grammars, 42

Booleans, 33

Bounded Buffer, 170

Buffering, 170

A

Absolute Address, 90

Abstract Data Types, 103, 241

Abstraction, 10, 42, 102

Activation Record, 147

Actual Parameter, 193

Aliases and Parameters, 201

Aliasing, 181

Allocation, 243

Alphabet, 38

Alternation, 134

Ambiguity, 49

Argument, 193

Arithmetic Operators, 267

Arrays, 76

Assembler, 12

Assignment, 27, 29

Associations of Identifiers, 179

Associativity, 126

Atoms, 252

Attribute Grammars, 58

Attributes, 21, 59

Attributes of Data Control, 178

Automation, 62

Axiomatic Semantics, 63

C

C Language, 270

C++ Language, 270

CAR, 254

CDR, 254

Clausal Form, 262

Code Segment, 147

Coercion, 26

COMMON LISP, 248, 258

Compaction, 230

Compaction and Reuse, 217

Compile Time Polymorphism, 110

Compiler, 12

Complex Numbers, 32

Composite Name, 179

Composite Program, 144

Composition, 133

B

Backtracking, 131

Best-fit Method, 228

Binary Operation, 29

 

Details

Print Book
E-Books
Slices

Format name
PDF
Encrypted
No
Sku
B000000054299
Isbn
9781944534165
File size
13.6 MB
Printing
Allowed
Copying
Allowed
Read aloud
Allowed
Format name
PDF
Encrypted
No
Printing
Allowed
Copying
Allowed
Read aloud
Allowed
Sku
In metadata
Isbn
In metadata
File size
In metadata