programming language

programming language

programming language, syntax, grammar, and symbols or words used to give instructions to a computer.

Development of Low-Level Languages

All computers operate by following machine language programs, a long sequence of instructions called machine code that is addressed to the hardware of the computer and is written in binary notation (see numeration), which uses only the digits 1 and 0. First-generation languages, called machine languages, required the writing of long strings of binary numbers to represent such operations as "add," "subtract," "and compare." Later improvements allowed octal, decimal, or hexadecimal representation of the binary strings.

Because writing programs in machine language is impractical (it is tedious and error prone), symbolic, or assembly, languages—second-generation languages—were introduced in the early 1950s. They use simple mnemonics such as A for "add" or M for "multiply," which are translated into machine language by a computer program called an assembler. The assembler then turns that program into a machine language program. An extension of such a language is the macro instruction, a mnemonic (such as "READ") for which the assembler substitutes a series of simpler mnemonics. The resulting machine language programs, however, are specific to one type of computer and will usually not run on a computer with a different type of central processing unit (CPU).

Evolution of High-Level Languages

The lack of portability between different computers led to the development of high-level languages—so called because they permitted a programmer to ignore many low-level details of the computer's hardware. Further, it was recognized that the closer the syntax, rules, and mnemonics of the programming language could be to "natural language" the less likely it became that the programmer would inadvertently introduce errors (called "bugs") into the program. Hence, in the mid-1950s a third generation of languages came into use. These algorithmic, or procedural, languages are designed for solving a particular type of problem. Unlike machine or symbolic languages, they vary little between computers. They must be translated into machine code by a program called a compiler or interpreter.

Early computers were used almost exclusively by scientists, and the first high-level language, Fortran [Formula translation], was developed (1953-57) for scientific and engineering applications by John Backus at the IBM Corp. A program that handled recursive algorithms better, LISP [LISt Processing], was developed by John McCarthy at the Massachusetts Institute of Technology in the early 1950s; implemented in 1959, it has become the standard language for the artificial intelligence community. COBOL [COmmon Business Oriented Language], the first language intended for commercial applications, is still widely used; it was developed by a committee of computer manufacturers and users under the leadership of Grace Hopper, a U.S. Navy programmer, in 1959. ALGOL [ALGOrithmic Language], developed in Europe about 1958, is used primarily in mathematics and science, as is APL [A Programming Language], published in the United States in 1962 by Kenneth Iverson. PL/1 [Programming Language 1], developed in the late 1960s by the IBM Corp., and ADA [for Ada Augusta, countess of Lovelace, biographer of Charles Babbage], developed in 1981 by the U.S. Dept. of Defense, are designed for both business and scientific use.

BASIC [Beginner's All-purpose Symbolic Instruction Code] was developed by two Dartmouth College professors, John Kemeny and Thomas Kurtz, as a teaching tool for undergraduates (1966); it subsequently became the primary language of the personal computer revolution. In 1971, Swiss professor Nicholas Wirth developed a more structured language for teaching that he named Pascal (for French mathematician Blaise Pascal, who built the first successful mechanical calculator). Modula 2, a Pascallike language for commercial and mathematical applications, was introduced by Wirth in 1982. Ten years before that, to implement the UNIX operating system, Dennis Ritchie of Bell Laboratories produced a language that he called C; along with its extensions, called C++, developed by Bjarne Stroustrup of Bell Laboratories, it has perhaps become the most widely used general-purpose language among professional programmers because of its ability to deal with the rigors of object-oriented programming. Java is an object-oriented language similar to C++ but simplified to eliminate features that are prone to programming errors. Java was developed specifically as a network-oriented language, for writing programs that can be safely downloaded through the Internet and immediately run without fear of computer viruses. Using small Java programs called applets, World Wide Web pages can be developed that include a full range of multimedia functions.

Fourth-generation languages are nonprocedural—they specify what is to be accomplished without describing how. The first one, FORTH, developed in 1970 by American astronomer Charles Moore, is used in scientific and industrial control applications. Most fourth-generation languages are written for specific purposes. Fifth-generation languages, which are still in their infancy, are an outgrowth of artificial intelligence research. PROLOG [PROgramming LOGic], developed by French computer scientist Alain Colmerauer and logician Philippe Roussel in the early 1970s, is useful for programming logical processes and making deductions automatically.

Many other languages have been designed to meet specialized needs. GPSS [General Purpose System Simulator] is used for modeling physical and environmental events, and SNOBOL [String-Oriented Symbolic Language] is designed for pattern matching and list processing. LOGO, a version of LISP, was developed in the 1960s to help children learn about computers. PILOT [Programmed Instruction Learning, Or Testing] is used in writing instructional software, and Occam is a nonsequential language that optimizes the execution of a program's instructions in parallel-processing systems.

There are also procedural languages that operate solely within a larger program to customize it to a user's particular needs. These include the programming languages of several database and statistical programs, the scripting languages of communications programs, and the macro languages of word-processing programs.

Compilers and Interpreters

Once the program is written and has had any errors repaired (a process called debugging), it may be executed in one of two ways, depending on the language. With some languages, such as C or Pascal, the program is turned into a separate machine language program by a compiler, which functions much as an assembler does. Other languages, such as LISP, do not have compilers but use an interpreter to read and interpret the program a line at a time and convert it into machine code. A few languages, such as BASIC, have both compilers and interpreters. Source code, the form in which a program is written in a high-level language, can easily be transferred from one type of computer to another, and a compiler or interpreter specific to the machine configuration can convert the source code to object, or machine, code.

Bibliography

See R. Cezzar, A Guide to Programming Languages: Overview and Comparison (1995), T. W. Pratt and M. V. Zelkowitz, Programming Languages: Design and Implementation (3d ed. 1996); C. Ghezzi and M. Jazayem, Programming Language Concepts (3d ed. 1997); R. W. Sebasta, Concepts of Programming Languages (4th ed. 1998).

Language in which a computer programmer writes instructions for a computer to execute. Some languages, such as COBOL, FORTRAN, Pascal, and C, are known as procedural languages because they use a sequence of commands to specify how the machine is to solve a problem. Others, such as LISP, are functional, in that programming is done by invoking procedures (sections of code executed within a program). Languages that support object-oriented programming take the data to be manipulated as their point of departure. Programming languages can also be classified as high-level or low-level. Low-level languages address the computer in a way that it can understand directly, but they are very far from human language. High-level languages deal in concepts that humans devise and can understand, but they must be translated by means of a compiler into language the computer understands.

Learn more about programming language with a free trial on Britannica.com.

Ada is a structured, statically typed, imperative, and object-oriented high-level computer programming language based on Pascal. It was originally designed by a team led by Jean Ichbiah of CII Honeywell Bull under contract to the United States Department of Defense during 1977–1983 to supersede the hundreds of programming languages then used by the US Department of Defense (DoD). Ada is strongly typed and compilers are validated for reliability in mission-critical applications, such as avionics software. Ada is an international standard; the current version (known as Ada 2005) is defined by joint ISO/ANSI standard (ISO-8652:1995), combined with major Amendment ISO/IEC 8652:1995/Amd 1:2007

Ada was named after Ada Lovelace (1815–1852), who is often credited as being the first computer programmer.

Features

Ada was originally targeted at embedded and real-time systems. The Ada 95 revision, designed by S. Tucker Taft of Intermetrics between 1992 and 1995, improved support for systems, numerical, financial, and object-oriented programming (OOP).

Notable features of Ada include: strong typing, modularity mechanisms (packages), run-time checking, parallel processing (tasks), exception handling, and generics. Ada 95 added support for object-oriented programming, including dynamic dispatch.

Ada supports run-time checks in order to protect against access to unallocated memory, buffer overflow errors, off-by-one errors, array access errors, and other avoidable bugs. These checks can be disabled in the interest of runtime efficiency, but can often be compiled efficiently. It also includes facilities to help program verification. For these reasons, Ada is widely used in critical systems, where any anomaly might lead to very serious consequences, i.e., accidental death or injury. Examples of systems where Ada is used include avionics, weapon systems (including thermonuclear weapons), and spacecraft.

Ada also supports a large number of compile-time checks to help avoid bugs that would not be detectable until run-time in some other languages or would require explicit checks to be added to the source code.

Ada's dynamic memory management is high-level and type-explicit, requiring explicit instantiation of the Unchecked_Deallocation package to explicitly free allocated memory. The specification does not require any particular implementation. Though the semantics of the language allow automatic garbage collection of inaccessible objects, most implementations do not support it. Ada does support a limited form of region-based storage management. Invalid accesses can always be detected at run time (unless of course the check is turned off) and sometimes at compile time.

The syntax of Ada is simple, consistent and readable. It minimizes choices of ways to perform basic operations, and prefers English keywords (eg "OR") to symbols (eg. "||"). Ada uses the basic mathematical symbols (i.e.: "+", "-", "*" and "/") for basic mathematical operations but avoids using other symbols. Code blocks are delimited by words such as "declare", "begin" and "end". Conditional statements are closed with "end if", avoiding dangling else. Code for complex systems is typically maintained for many years, by programmers other than the original author. It can be argued that these language design principles apply to most software projects, and most phases of software development, but when applied to complex, safety critical projects, benefits in correctness, reliability, and maintainability take precedence over (arguable) costs in initial development.

Unlike most ISO standards, the Ada language definition (known as the Ada Reference Manual or ARM, or sometimes the Language Reference Manual or LRM) is free content. Thus, it is a common reference for Ada programmers, not just programmers implementing Ada compilers. Apart from the reference manual, there is also an extensive rationale document which explains the language design and the use of various language constructs. This document is also widely used by programmers. When the language was revised, a new rationale document was written.

History

In the 1970s, the US Department of Defense (DoD) was concerned by the number of different programming languages being used for its embedded computer system projects, many of which were obsolete or hardware-dependent, and none of which supported safe modular programming. In 1975, the High Order Language Working Group (HOLWG) was formed with the intent to reduce this number by finding or creating a programming language generally suitable for the department's requirements. The result was Ada. The total number of high-level programming languages in use for such projects fell from over 450 in 1983 to 37 by 1996. The working group created a series of language requirements documents—the Strawman, Woodenman, Tinman, Ironman and Steelman documents. Many existing languages were formally reviewed, but the team concluded in 1977 that no existing language met the specifications.

Requests for proposals for a new programming language were issued and four contractors were hired to develop their proposals under the names of Red (Intermetrics led by Benjamin Brosgol), Green (CII Honeywell Bull, led by Jean Ichbiah), Blue (SofTech, led by John Goodenough), and Yellow (SRI International, led by Jay Spitzen). In April 1978, after public scrutiny, the Red and Green proposals passed to the next phase. In May 1979, the Green proposal, designed by Jean Ichbiah at CII Honeywell Bull, was chosen and given the name Ada—after Augusta Ada, Countess of Lovelace. This proposal was influenced by the programming language LIS that Ichbiah and his group had developed in the 1970s. The preliminary Ada reference manual was published in ACM SIGPLAN Notices in June 1979. The Military Standard reference manual was approved on December 10, 1980 (Ada Lovelace's birthday), and given the number MIL-STD-1815 in honor of Ada Lovelace's birth year. In 1981, C. A. R. Hoare took advantage of his Turing Award speech to criticize Ada for being overly complex and hence unreliable.

In 1987, the US Department of Defense began to require the use of Ada (the Ada mandate) for every software project where new code was more than 30% of result, though exceptions to this rule were often granted. This requirement was effectively removed in 1997, as the DoD began to embrace COTS (commercial off-the-shelf) technology. Similar requirements existed in other NATO countries.

Because Ada is a strongly typed language, it has been used outside the military in commercial aviation projects, where a software bug can cause fatalities. The fly-by-wire system software in the Boeing 777 was written in Ada. The Canadian Automated Air Traffic System (completed in year 2000 by Raytheon Canada) was written in 1 million lines of Ada (SLOC count). It featured advanced (for the time) distributed processing, a distributed Ada database, and object-oriented design.

Standardization

The language became an ANSI standard in 1983 (ANSI/MIL-STD 1815A), and without any further changes became an ISO standard in 1987 (ISO-8652:1987). This version of the language is commonly known as Ada 83, from the date of its adoption by ANSI, but is sometimes referred to also as Ada 87, from the date of its adoption by ISO.

Ada 95, the joint ISO/ANSI standard (ISO-8652:1995) is the latest standard for Ada. It was published in February 1995, making Ada 95 the first ISO standard object-oriented programming language. To help with the standard revision and future acceptance, the US Air Force funded the development of the GNAT Compiler. Presently, the GNAT Compiler is part of the GNU Compiler Collection.

Work has continued on improving and updating the technical content of the Ada programming language. A Technical Corrigendum to Ada 95 was published in October 2001, and a major Amendment, ISO/IEC 8652:1995/Amd 1:2007, was published on March 9, 2007. Other related standards include ISO 8651-3:1988 Information processing systems -- Computer graphics -- Graphical Kernel System (GKS) language bindings -- Part 3: Ada

"Hello, world!" in Ada

A common example of a language's syntax is the Hello world program: with Ada.Text_IO; procedure Hello is begin

 Ada.Text_IO.Put_Line("Hello, world!");
end Hello;

Ada also provides alternative constructions that are more streamlined.

See also

Notes

References

International Standards

Rationale

(These documents have been published in various forms including print.)

Books

  • Jan Skansholm: Ada 95 From the Beginning, Addison-Wesley, ISBN 0-201-40376-5
  • Geoff Gilpin: Ada: A Guided Tour and Tutorial, Prentice hall, ISBN 978-0-13-004045-9
  • John Barnes: Programming in Ada 2005, Addison-Wesley, ISBN 0-321-34078-7
  • John Barnes: Programming in Ada plus Language Reference Manual, Addison-Wesley, ISBN 0-201-56539-0
  • John Barnes: Programming in Ada 95, Addison-Wesley, ISBN 0-201-34293-6
  • John Barnes: High Integrity Ada: The SPARK Approach, Addison-Wesley, ISBN 0-201-17517-7
  • John Barnes: High Integrity Software: The SPARK Approach to Safety and Security, Addison-Wesley, ISBN 0-321-13616-0
  • John Beidler: Data Structures and Algorithms: An Object-Oriented Approach Using Ada 95, Springer-Verlag, ISBN 0-387-94834-1
  • Dean W. Gonzalez: Ada Programmer's Handbook, Benjamin-Cummings Publishing Company, ISBN 0-8053-2529-8
  • M. Ben-Ari: Ada for Software Engineers, John Wiley & Sons, ISBN 0-471-97912-0
  • Norman Cohen: Ada as a Second Language, McGraw-Hill Science/Engineering/Math, ISBN 0-07-011607-5
  • Alan Burns, Andy Wellings: Real-Time Systems and Programming Languages. Ada 95, Real-Time Java and Real-Time POSIX., Addison-Wesley, ISBN 0-201-72988-1
  • Alan Burns, Andy Wellings: Concurrency in Ada, Cambridge University Press, ISBN 0-521-62911-X
  • Colin Atkinson: Object-Oriented Reuse, Concurrency and Distribution: An Ada-Based Approach, Addison-Wesley, ISBN 0-201-56527-7
  • Grady Booch, Doug Bryan: Software Engineering with Ada, Addison-Wesley, ISBN 0-8053-0608-0
  • Daniel Stubbs, Neil W. Webre: Data Structures with Abstract Data Types and Ada, Brooks Cole, ISBN 0-534-14448-9
  • Pascal Ledru: Distributed Programming in Ada with Protected Objects, Dissertation.com, ISBN 1-58112-034-6
  • Fintan Culwin: Ada, a Developmental Approach, Prentice Hall, ISBN 0-13-264680-3
  • John English, Fintan Culwin: Ada 95 the Craft of Object Oriented Programming, Prentice Hall, ISBN 0-13-230350-7
  • David A. Wheeler: Ada 95, Springer-Verlag, ISBN 0-387-94801-5
  • David R. Musser, Alexander Stepanov: The Ada Generic Library: Linear List Processing Packages, Springer-Verlag, ISBN 0-387-97133-5
  • Michael B. Feldman: Software Construction and Data Structures with Ada 95, Addison-Wesley, ISBN 0-201-88795-9
  • Simon Johnston: Ada 95 for C and C++ Programmers, Addison-Wesley, ISBN 0-201-40363-3
  • Michael B. Feldman, Elliot B. Koffman: Ada 95, Addison-Wesley, ISBN 0-201-36123-X
  • Nell Dale, Chip Weems, John McCormick: Programming and Problem Solving with Ada 95, Jones & Bartlett Publishers, ISBN 0-7637-0293-5
  • Nell Dale, John McCormick: Ada Plus Data Structures: An Object-Oriented Approach, 2nd edition, Jones & Bartlett Publishers, ISBN 0-7637-3794-1
  • Bruce C. Krell: Developing With Ada: Life-Cycle Methods, Bantam Dell Pub Group, ISBN 0-553-09102-6
  • Judy Bishop: Distributed Ada: Developments and Experiences, Cambridge University Press, ISBN 0-521-39251-9
  • Bo Sanden: Software Systems Construction With Examples in Ada, Prentice Hall, ISBN 0-13-030834-X
  • Bruce Hillam: Introduction to Abstract Data Types Using Ada, Prentice Hall, ISBN 0-13-045949-6
  • David Rudd: Introduction to Software Design and Development With Ada, Brooks Cole, ISBN 0-314-02829-3
  • Ian C. Pyle: Developing Safety Systems: A Guide Using Ada, Prentice Hall, ISBN 0-13-204298-3
  • Louis Baker: Artificial Intelligence With Ada, McGraw-Hill, ISBN 0-07-003350-1
  • Alan Burns, Andy Wellings: HRT-HOOD: A Structured Design Method for Hard Real-Time Ada Systems, North-Holland, ISBN 0-444-82164-3
  • Walter Savitch, Charles Peterson: Ada: An Introduction to the Art and Science of Programming, Benjamin-Cummings Publishing Company, ISBN 0-8053-7070-6
  • Mark Allen Weiss: Data Structures and Algorithm Analysis in Ada, Benjamin-Cummings Publishing Company, ISBN 0-8053-9055-3
  • Henry Ledgard: ADA: AN INTRODUCTION (Second Edition), Springer-Verlag, ISBN 0-387-90814-5

Archives

External links

Search another word or see programming languageon Dictionary | Thesaurus |Spanish
Copyright © 2014 Dictionary.com, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature
FAVORITES
RECENT

;