Intensional Programming I

10.1142/2879 ◽  
1996 ◽  
Author(s):  
Manolis Gergatsoulis ◽  
Panos Rondogiannis

Author(s):  
E. A. Ashcroft ◽  
A. A. Faustini ◽  
R. Jaggannathan ◽  
W. W. Wadge

The intensional programming language, Lucid, described in Chapter 1 is based directly on intensional logic, a family of mathematical formal systems that permit expressions whose value depends on hidden contexts or indices. Our use of intensional logic is one in which the hidden contexts or indices are integers or tuples of integers. Intensional logic, as used to give semantics to natural language, uses a much more general notion of context or index. Of course, intensional logic is hardly the first example of a formal system of interest to both logicians and computer scientists. The language LISP (invented by McCarthy and others in the early sixties [34]) was originally intended to be an adaptation of the lambda calculus, although it diverged in its treatment of variable-binding and higher-order functions. Shortly after, however, Landin produced ISWIM, the first true functional language [30]. These “logical” programming languages such as ISWIM are in many respects vastly superior to the more conventional ones. They are much simpler and better defined and yet at the same time more regular and more powerful. These languages are notationally closer to ordinary mathematics and are much more problem-oriented. Finally, programs are still expressions in a formal system, and are still subject to the rules of the formal system. It is therefore much easier to reason formally about their correctness, or to apply meaningpreserving transformations. With these languages, programming really is a respectable branch of applied mathematical logic. These logic-based (or declarative) languages at first proved difficult to implement efficiently, and interest in declarative languages declined soon after the promising initial work of McCarthy and Landin. Fortunately, the advent of large scale integration and new compiling technology reawakened interest in declarative languages, and brought about a series of new “second generation” declarative languages, such as Prolog [12] and Miranda [44]. Lucid itself was one of these second generation declarative languages. Lucid is based not so much on classical logical systems as on the possible worlds approach to intensional logic—itself a relatively new branch of logic [43] which reached maturity during the period (1965-75) in which declarative programming languages were in eclipse.


Author(s):  
E. A. Ashcroft ◽  
A. A. Faustini ◽  
R. Jaggannathan ◽  
W. W. Wadge

This book, obviously, is about multidimensional declarative programming. Many different languages and paradigms may be claimed to result in multidimensional declarative programming. We are most concerned with a programming paradigm where the existence of different dimensions (even temporary dimensions) enables algorithms to be expressed naturally. The latest version of the language Lucid uses dimensions in this way and we will use Lucid throughout most of this book. We will emphasize that Lucid is a language that embodies a particular style or paradigm of programming that we call intensional programming. Toward the end of the book there will be a chapter that indicates how other language features and capabilities could fit into this same paradigm. Therefore this book is about multidimensional, declarative, intensional programming, with examples given mostly in the latest version of Lucid. Lucid has been around since the mid-seventies [7]. Nevertheless, with its new poly dimensionality capabilities it provides a fresh approach to programming and, we hope, introduces declarative programming to a whole new audience. In addition, we often find it is useful to think of Lucid programs as manipulating geometrical entities, even though programs are actually implemented very simply i.e., without any data structures corresponding to those geometrical entities. Thinking of programs as manipulating geometrical entities adds a visual aspect to programs, while the fact that there are no actual structures in the implementation emphasizes that Lucid programs can be thought of in several different ways. We tend to think of programs, and variables in programs, at a very high level when writing programs and ignore the implementation details. Yet for a very high level language, those implementation details are surprisingly simple. Programs are written while thinking of large, multidimensional entities, and yet the implementation deals only with small fragments. In fact, we might modify an environmental movement slogan and say “program globally and implement locally.” By the end of the book the appropriateness and meaning of this slogan should be apparent. This introductory chapter begins by illustrating some of the novelty of the new Lucid with a very simple program for transposing a matrix.


Author(s):  
Mehmet A. Orgun ◽  
Edward A. Ashcroft

Sign in / Sign up

Export Citation Format

Share Document