user1088695
user1088695

Reputation:

Descriptive declarative kernel language

In this question I reference Van Roys and Seif Haridi book - "Concepts, techniques, and models of Computer Programming".

Background information(interpreted by my own words from the referenced book):

Declarative program defines what we want to achieve without explaining how to achieve a certain result. A declarative program may be Descriptive or Programmable


The Programmable level describes the component(context and behavior)


This question arose while reading the referenced book, a chapter about declarative programming. (Page 115 tells about classifications of declarative programming, where descriptive declarativeness definition is a little unclear, at least for me)

Upvotes: 1

Views: 285

Answers (1)

wmeyer
wmeyer

Reputation: 3496

A descriptive declarative Oz program is a program that only uses variables and values. It does not use any control structures or recursion. For example:

A = 42

or

B = person(name:"Hans" age:20)

or even (creating a "infinite" record):

C = loop(data:42 link:C)

An HTML document (without using any extensions like embedded Javascript) would also be a descriptive declarative program. A purely descriptive language is not Turing-complete. Purely descriptive programs are a real subset of programmable declarative programs.

A programmable declarative program can contain recursion and many other control elements. The model is described in chapter 2 of the book. An important property is "referential transparency", i.e. no matter in what situation or how often you call a function, it will always return the same result given the same parameters. A purely-functional Haskell program would also be an example of a programmable declarative program.

For questions like this I also recommend the Mozart users mailing list and maybe the "Lambda the Ultimate" forum. At these places your questions may even be answered by the book authors.

Upvotes: 2

Related Questions