Business Definition for: symbolic programming
symbolic programming
a kind of programming in which variables can stand for pieces of the program itself (symbolic expressions), not just numbers, strings, or other values. LISP and Prolog are examples of symbolic programming languages.
See also
LISP (List Processor)
,
Prolog
,
symbolic algebra
Related Terms:
a programming language developed in the late 1950s at MIT under the direction of John McCarthy. Because of the ease with which it can handle complex data structures, Lisp is used for artificial intelligence research and for writing programs whose complexity would render them unmanageable in other languages.
A LISP program is easy to recognize because of the accumulation of closing parentheses at the end of the program. All Lisp statements and most LISP data structures are linked lists, written as lists of elements in parentheses (see linked list). Programmers build a complete program by defining their own statements (actually functions) in terms of those previously defined. For example, a function that computes the factorial of X is:
Translating into English: "This is the definition of a function called FACTORIAL whose parameter is X. If X is zero, its factorial is 1; otherwise, its factorial is equal to X times the factorial of X - 1." The IF keyword works like a Pascal if-then-else statement. This function calls itself recursively; recursion is a normal way of expressing repetition in LISP.
a programming language developed in the early 1970s by Alain Colmerauer at the University of Marseilles and standardized by the ISO in 1995. Prolog is used for writing computer programs that model human thinking. It exemplifies logic programming, a kind of programming developed by Robert Kowalski of the University of London.
In ordinary programming, a program describes the steps that a computer is to work through in order to solve a problem. In logic programming, the program gives the computer facts about the problem, plus rules by means of which other facts can be inferred. The computer then applies a fixed procedure to solve the problem automatically.
For example, Prolog can chain together the fact "Atlanta is in Georgia" and the rule "X is in the U.S.A. if X is in Georgia" to answer the question "Is Atlanta in the U.S.A.?" In Prolog, the fact and the rule are:
located_in(atlanta,georgia).
located_in(X,usa) :- located_in(X,georgia).
The question (called a query) is typed:
?- located_in(atlanta,usa).
and is answered "yes."
One of the most important properties of Prolog is its ability to backtrack, that is, to back up and try alternative solutions. This is necessary whenever the search starts pursuing a chain of rules that do not lead to a solution. For example, rules 2 and 4 do not lead to a solution in our example; if the computer tried either of them, it would need to back up and try alternatives.
Prolog is not confined to the simple kind of logic described here. It can implement all types of algorithms, including sorting, numerical computation, and parsing.
the manipulation of mathematical symbols (not just their numerical values). For example, we can calculate that (a + b) × (c + d) = ac + ad + bc + bd without knowing the values of a, b, c, or d.
Symbolic algebra on computers began with the MACSYMA project at MIT in the 1960s. Today, popular symbolic algebra programs for personal computers include MathCad, Maple, Mathematica, and MATLAB. They greatly simplify the formerly tedious process of deriving and manipulating mathematical formulas.
Copyright © 2006, 2003, 2000, 1998, 1996, 1995, 1992, 1989, 1986 by Barron's Educational Series, Inc. Reprinted by arrangement with Publisher.