Declarative Programming Assignment Help

Introduction:

Programming languages are divided into many parts and one of them is Declarative programming in which problems are explained in particular classes. It consist some tools which tools work on abstraction of the problems from implementation. It is a core of logic and functional programming. Basic thing in declarative programming is that the language programming is put in some specific logical theory. And this is the quality by which program gives result very precisely.

By Kowalski’s terms:

Algorithm= logic+ control

But by programmer logic is good but control is not good.

Functional Programming:

This language is made-up of some functional definitions. It is mapped by this symbol in calculus “ƛ” it is a type of denotational semantics. Here both type of languages are use impure and pure functional languages. Overall in this field many more innovations are done such as some modern languages like Haskell come to achieve declarative programming to help controlling of programs, but it execution to evaluation is lazy which is not easy to understand. Anyway, it gives several elegant way to higher order function and very strong system. It can also support using of code many times with predefined functions. Here show an example of it:

Game foldr _ u nil = u

| foldr f u ( x :: xs) = f x ( foldr f u xs)

Foldr is use several times in functional programming to explaining other function recursion in lists.

Logic Programming

It is use for practical operations like Prolog, It is use for several applications like artificial intelligence, in system which is typical knowledge based. It works after proving queries of programs then evaluate. It gives two important features which is not in functional programming: