DTUI Booksite

Chapter 8 Introduction

[Chapter 7 | Introductions Index | Chapter 9]
[ Lecture Notes | Web Resources | Exam Questions]


Command & Natural Languages

Introduction

The history of written language is rich and varied. Early tally marks and pictographs on cave walls existed for millennia before precise notations for numbers or other concepts appeared. The Egyptian hieroglyphs of 5000 years ago were a tremendous advance because standard notations facilitated communication across space and time. Eventually, languages with a small alphabet and rules of word and sentence formation dominated because of the relative ease of learning, writing, and reading. In addition to these natural languages, special languages for mathematics, music, and chemistry emerged because they facilitated communication and problem solving. In the twentieth century, novel notations were created for such diverse domains as dance, knitting, higher forms of mathematics, logic, and DNA molecules.

The basic goals of language design are
· Precision
· Compactness
· Ease in writing and reading
· Speed in learning
· Simplicity to reduce errors
· Ease of retention over time

Higher-level goals include
· Close correspondence between reality and the notation
· Convenience in carrying out manipulations relevant to users' tasks
· Compatibility with existing notations
· Flexibility to accommodate novice and expert users
· Expressiveness to encourage creativity
· Visual appeal

Constraints on a language include
· The capacity for human beings to record the notation
· The match between the recording and the display media (for example, clay tablets, paper, printing presses)
· The convenience in speaking (vocalizing)

Successful languages evolve to serve the goals within the constraints.

The printing press was a remarkable stimulus to language development because it made widespread dissemination of written work possible. The computer is another remarkable stimulus to language development, not only because widespread dissemination through networks is possible, but also because computers are a tool to manipulate languages and because languages are a tool for manipulating computers.

The computer has had only a modest influence on spoken natural languages, compared to its enormous impact as a stimulus to the development of numerous new formal written languages. Early computers were built to perform mathematical computations, so the first programming languages had a strong mathematical flavor. But computers were quickly found to be effective manipulators of logical expressions, business data, graphics, sound, and text. Increasingly, computers are used to operate on the real world: directing robots, issuing dollar bills at bank machines, controlling manufacturing, and guiding spacecraft. These newer applications encourage language designers to find convenient notations to direct the computer while preserving the needs of people to use the language for communication and problem solving.

Therefore, effective computer languages must not only represent the users' tasks and satisfy the human needs for communication, but also be in harmony with mechanisms for recording, manipulating, and displaying these languages in a computer.

Computer programming languages that were developed in the 1960s and early 1970s, such as FORTRAN, COBOL, ALGOL, PL/I, and Pascal, were designed for use in a noninteractive computer environment. Programmers would compose hundreds or thousands of lines of code, carefully check them over, and then compile or interpret by computer to produce a desired result. Incremental programming was one of the design considerations in BASIC and in advanced languages such as LISP, APL, and PROLOG. Programmers in these languages were expected to build smaller pieces online and interactively to execute and test the pieces. Still, the common goal was to create a large program that was preserved, studied, extended, and modified. The attraction of rapid compilation and execution led to the widespread success of the compact, but sometimes obscure, notation used in C. The pressures for team programming, organizational standards for sharing, and the increased demands for reusability promoted encapsulation and the development of object-oriented programming concepts in languages such as ADA and C++. The demands of network environments and the pursuit of cross-platform tools led to the emergence of Java.
Scripting languages emphasizing screen presentation and mouse control became popular in the late 1980s, with the appearance of HyperCard, SuperCard, ToolBook, etc. These languages included novel operators, such as ON MOUSE DOWN, BLINK, or IF FIRST CHARACTER OF THE MESSAGE BOX IS 'A' (see Section 6.3). Java expanded the possibilities for screen management, secure network operations, and animations.

Database query languages for relational databases were developed in the middle to late 1970s and led to the widely used SQL. It emphasized shorter segments of code (three to 20 lines) that could be written at a terminal and executed immediately. The goal of the user was more to create a result than a program. A key part of database query languages and information retrieval languages was the specification of boolean operations AND, OR, and NOT.

Command languages, which originated with operating-systems commands, are distinguished by their immediacy and by their impact on devices or information. Users issue a command and watch what happens. If the result is correct, the next command is issued; if not, some other strategy is adopted. The commands are brief and their existence is transitory. Of course, command histories are sometimes kept and macros are created in some command languages, but the essence of command languages is that they have an ephemeral nature and that they produce an immediate result on some object of interest.

Command languages are distinguished from menu-selection systems in that their users must recall notation and initiate action. Menu selection users receive instructions and must recognize and choose among only a limited set of visible alternatives; they respond more than initiate. Command-language users are often called on to accomplish remarkable feats of memorization and typing. For example, this Unix command, used to delete blank lines from a file, is not obvious:

grep -v ^$ filea > fileb

Similarly, to get printout on unlined paper on a high-volume laser printer, a user at one installation was instructed to type

CP TAG DEV E VTSO LOCAL 2 OPTCD=J F=3871 X=GB12

The puzzled user was greeted with a shrug of the shoulders and the equally cryptic comment that "Sometimes, logic doesn't come into play; it's just getting the job done." This style of work may have been acceptable in the past, but user communities and their expectations are changing. While there are still millions of users of command languages, the development of new ones has slowed dramatically due to the emergence of direct manipulation and menu selection interfaces.

Command languages may consist of single commands or have complex syntax (Section 8.2). The language may have only a few operations, or may have thousands. Commands may have a hierarchical structure or permit concatenation to form variations (Section 8.3). A typical form is a verb followed by a noun object with qualifiers or arguments for the verb or noun. Abbreviations may be permitted (Section 8.5). Feedback may be generated for acceptable commands, and error messages (Section 11.2) may result from unacceptable forms or typos. Command-language systems may offer the user brief prompts, or may be close to menu-selection systems (Section 8.6). Finally, natural-language interaction can be considered as a complex form of command language (Section 8.7).


Please send comments and suggestions to the Booksite Director
Last Updated: 11 December 2002