unit i - wordpress.com...product definition is stable technology is understood new version of an...

43
Programming Language Syntax and semantics UNIT I BByy Kainjan Sanghavi

Upload: others

Post on 08-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Programming Language Syntax and semantics

UNIT I

BB yy

Kainjan Sanghavi

Page 2: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Contents

• Software development process • Language and software development

environments • Language and software design methods

Page 3: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis
Page 4: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

A framework that describes the

activities performed at each stage of a

software development project.

SDLC

Page 5: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

SDLC PHASES

Requirements Gathering and Analysis

Design

Development

Testing

Implementation

Maintenance

Page 6: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

SDLC PHASES

Page 7: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

To help understand and

implement the SDLC phases various

SDLC models have been created by

software development experts, universities, and standards

organizations.

SDLC MODELS

Page 8: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Reasons f o r Using SDLC Models

Provides basis for project planning, estimating & scheduling

Provides framework for standard set of terminologies, activities & deliverables

Provides mechanism for project tracking & control

Increases visibility of project progress to all stakeholders

Page 9: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

an Appropriate SDLC

Increased development speed

Increased product quality

Improved tracking & control

Improved client relations

Decreased project risk

Decreased project management overhead

Advantages of Choosing

Page 10: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Common Life Cycle Models

Waterfall

Spiral/Iterative

Agile

Page 11: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Analysis

Design

Development

Testing

Deployment

Maintenance

Waterfal l Model

Page 12: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Waterfal l Model

Oldest and most well-known SDLC model

Follows a sequential step-by-step process from

requirements analysis to maintenance.

Systems that have well-defined and understood

requirements are a good fit for the Waterfall Model

Page 13: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Waterfal l Model Strengths

Easy to understand, easy to use

Provides structure to inexperienced staff

Milestones are well understood

Sets requirements stability

Good for management control (plan, staff, track)

Works well when quality is more important than cost or schedule

Page 14: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Waterfal l Model Weaknesses

All requirements must be fully specified upfront

Idealised, does not match reality well. Can give a false impression of progress Does not reflect problem-solving nature of software development – iterations of phases Integration is one big bang at the end

Difficult and expensive to make changes

Page 15: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Waterfal l Model Weaknesses

Difficult to integrate risk management

Significant administrative overhead,

costly for small teams and projects.

Page 16: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

When t o use the Waterfal l Model

Requirements are very well known

Product definition is stable

Technology is understood

New version of an existing product

Porting an existing product to a new platform.

Page 17: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Requirements Analysis

Requirements Design Gathering

Development

Quality Assurance Deployment

Maintenance

Enhancement

R e p e at

Iterative

Spiral / I t e r ative Model

Page 18: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Spiral Model

Spiral Model is a Disk-driven iterative model

Divides a project into iterations

Each iteration deals with 1 or more risks

Each iteration starts with small set of requirements and goes through development phase (except Installation and Maintenance) for those set of requirements.

Page 19: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Spiral Model

Iterate until all major risks addressed and the application is ready for the Installation and Maintenance phase (production)

Each of the iterations prior to the production version is a prototype of the application.

Last iteration is a waterfall process

Page 20: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Spiral Model Strengths

Provides early indication of insurmountable

risks, without much cost

Critical high-risk functions are developed first

The design does not have to be perfect

Users see the system early because of rapid

prototyping tools

Users can be closely tied to all lifecycle steps

Early and frequent feedback from users

Page 21: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Time spent for evaluating risks too large for small or low-risk projects

Time spent planning, resetting objectives, doing risk analysis and prototyping may be excessive

The model is complex

Risk assessment expertise is required

Spiral may continue indefinitely

May be hard to define objective, verifiable milestones that indicate readiness to proceed through the next iteration

Spiral Model Weaknesses

Page 22: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

When to use Spir a l Model

When creation of a prototype is appropriate

When costs and risk evaluation is important For medium to high-risk projects Users are unsure of their needs

Requirements are complex

New product line Significant changes are expected (research and exploration)

Page 23: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Discover

Test

Design Develop

Test

Discover

Design Develop

Test

Design

Develop

Discover

Agile Model

Page 24: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Agile Model

Speed up or bypass one or more life cycle phases

Usually less formal and reduced scope

Used for time-critical applications

Used in organizations that employ

disciplined methods

Page 25: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Some Agile Methods

Rapid Application Development (RAD)

Scrum

Extreme Programming (XP) Adaptive Software Development (ASD)

Feature Driven Development (FDD)

Crystal Clear

Dynamic Software Development Method (DSDM)

Rational Unify Process (RUP)

Page 26: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Agile Model Strengths

Deliver a working product faster than conventional linear development model

Customer feedback at every stage ensures that the end deliverable satisfies their expectations

No guesswork between the development team and the customer, as there is face to face communication and continuous inputs from the client

Page 27: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Agile Model Weaknesses

For larger projects, it is difficult to judge the

efforts and the time required for the project in the SDLC.

Since the requirements are ever changing, there is hardly any emphasis, which is laid on

designing and documentation. Therefore, chances of the project going off the track

easily are much more

Page 28: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Language and Software

Development Environment

Environment means group of H/w and S/w tools used by a developer to build software systems.

H/w tools

S/w tools

SDE

Page 29: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Language and Software

Development Environment

In development for Coding tools such as

Compilers, Linkers, Text Editors and

Libraries are used.

Integrated Development Environments

Debuggers are used to find faults and

programming errors

Page 30: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

30

Programmer’s Approach to

Software Engineering

• Skip requirements engineering and design

phases; • start writing code

Page 31: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

31

Why this programmer’s

approach? • Design is a waste of time

• We need to show something to the customer real

quick

• We are judged by the amount of LOC/month

• We expect or know that the schedule is too tight

Page 32: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

32

However, ...

The longer you postpone coding, the sooner

you’ll be finished

Page 33: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

33

Up front remarks

• Design is a trial-and-error process

• The process is not the same as the outcome of that process

• There is an interaction between requirements engineering, architecting, and design

Page 34: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Language and Software

Design Methods Most of the programming languages impose particular programming style…. and this style is known as Programming

Paradigm

Page 35: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Programming Paradigms

C / Pascal/ FORTRAN

• Imperative or Procedural

LISP/ML

• Applicative or Functional

PROLOG

• Rule Based or Logic

C++/ Java

• Object Oriented

Cuda

• Parallel

Generic

• Eiffel

Page 36: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Functional Style : Illustration

Definition: Equations sumto(0) = 0 sumto(n) = n + sumto(n-1) Computation: Substitution and Replacement

sumto(2) = 2 + sumto (2-1)

= 2 + sumto(1)

= 2 + 1 + sumto(1-1) = 2 + 1 + sumto(0)

= 2 + 1 + 0 = …

= 3

Page 37: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Procedural vs Functional

• Program: a sequence of instructions for a von Neumann m/c.

• Computation by instruction execution.

• Iteration. • Modifiable or updatable

variables..

• Program: a collection of function definitions (m/c independent).

• Computation by term rewriting.

• Recursion. • Assign-only-once

variables.

Page 38: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Object-Oriented Style

• ADTs specify/describe behaviors. Programming with

Abstract Data Types

• Implementation of an ADT.

• Abstraction enforced by encapsulation..

Basic Program Unit: Class

• Instance of a class.

• Has an associated state.

Basic Run-time Unit: Object

Page 39: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Procedural vs

Object-Oriented

• Emphasis on procedural abstraction.

• Top-down design; Step-wise refinement.

• Suited for programming in the small.

• Emphasis on data abstraction.

• Bottom-up design; Reusable libraries.

• Suited for programming in the large.

Page 40: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Logic Programming

Paradigm 1. edge(a,b). 2. edge(a,c). 3. edge(c,a). 4. path(X,X). 5. path(X,Y) :- edge(X,Y). 6. path(X,Y) :- edge(X,Z), path(Z,Y). • It is said to be rule based language that checks the

existence of a certain enabling condition. • Order is not sequential but based on enabling conditions

Page 41: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Logic Programming

• A logic program defines a set of relations.

• This “knowledge” can be used in various

ways by the interpreter to solve different

“queries”.

• Make explicit HOW the “declarative

knowledge” is used to solve the query.

Page 42: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Questionairres

1) What is SDLC 2) SDLC Life Cycle 3) Any SDLC Model : Waterfall, Spiral, Agile 4) Software Development Environment 5) Various Programming Paradigms 6) Difference among the paradigms

Page 43: UNIT I - WordPress.com...Product definition is stable Technology is understood New version of an existing product Porting an existing product to a new platform. Requirements Analysis

Thank You!

Angelin