You are on page 1of 9

Programming Languages

Declarative Paradigms

Dr. M. Tanvir Afzal


Programming Languages : Declarative Paradigm
Programming Paradigms

2
Programming Languages : Declarative Paradigm

Declarative Paradigm
 Asks a programmer to describe the
problem to be solved rather than an
algorithm to be followed.

3
Programming Languages : Declarative Paradigm

Declarative Paradigm

 Applies a pre-established general-


purpose problem-solving algorithm to
solve problems presented to it.

4
Programming Languages : Declarative Paradigm

Task of Programmer

 Developing a precise statement of the


problem rather than of describing an
algorithm for solving the problem.

5
Programming Languages : Declarative Paradigm

Obstacle

 Knowing the generic algorithm and then


implementing it.
 Can be useful for some special purpose
software like: Political, economic,
environmental etc.

6
Programming Languages : Declarative Paradigm

Weather Forecasting

 Programmer does not need to invent the


algorithm.
 Just need to enter the current weather
status

7
Programming Languages : Declarative Paradigm

Logic Programming

 Boost to declarative paradigm with a


discovery that the subject of formal logic
within mathematics provides a simple
problem solving algorithm suitable for
use in a general-purpose declarative
programming system- emergence to logic
programming
8
Summary

Programming Languages:
Declarative Paradigm
 Declarative Paradigm
 Task of programmer
 Obstacles
 Logic Programming

You might also like