Examples: Prolog, OPS5, Mercury
A fifth gen programming language is any programming language based on problem-solving using constraints given to
the program,
rather than using an algorithm written by a programmer.
Fifth gen languages are mainly used for artificial intelligence research.
In the 1980s, fifth-generation languages were considered to be the way of the future, and some predicted that
they would replace procedural programming with constraint based programming for all tasks that could be framed
as a series of logical constraints.
Common Misconception: Vendors have been known on occasion to advertise their languages as 5GL.
Most of the time they actually sell 4GLs with a higher level of automation and knowledge base. Because the hype
of the 1980s faded away and the projects were eventually all dropped, 5GL awareness has also dropped; this has
opened doors to the vendors to re-use the term in marketing their new tools, without causing much controversy
among the current generations of programmers.
The leap beyond 4GLs is sought by taking a different approach to the computational challenge of solving
problems. When the programmer dictates how the solution should look, by specifying conditions and constraints in
a logical manner, the computer is then free to search for a suitable solution. Most of the applicable problems
solved by this approach can currently be found in the domain of artificial intelligence.
Considerable research has been invested in the 1980s and 1990s, into the development of 5GLs. As larger programs
were built, it became apparent that the approach of finding an algorithm given a problem description, logical
instructions and a set of constraint is a very hard problem in itself. During the 1990s, the wave of hype that
preceded the popularization of 5GLs and predictions that they will replace most other programming languages,
gave way to a more sober realization.
PROLOG (acronym for PROgramming LOGic) is an example of a Logical Programming Language. It uses a form of
mathematical logic (predicate calculus) to solve queries on a programmer-given database of facts and rules.