Fifth-generation programming language
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. (January 2008) |
This article needs additional citations for verification. (January 2008) |
A fifth-generation programming language (abbreviated 5GL) is a programming language based around solving problems using constraints given to the program, rather than using an algorithm written by a programmer. Most constraint-based and logic programming languages and some declarative languages are fifth-generation languages.
While fourth-generation programming languages are designed to build specific programs, fifth-generation languages are designed to make the computer solve the problem for you. This way, the programmer only needs to worry about what problems need to be solved and what conditions need to be met, without worrying about how to implement a routine or algorithm to solve them. Fifth-generation languages are used mainly in artificial intelligence research. Prolog, OPS5, and Mercury are the best known fifth-generation languages.
These types of languages were also built upon Lisp, many originating on the Lisp machine. ICAD is a good example. Then, there are many frame languages, such as KL-ONE.
In the 1990s, fifth-generation languages were considered to be the wave of the future, and some predicted that they would replace all other languages for system development, with the exception of low-level languages. Most notably, from 1982 to 1993 Japan [1] [2] put much research and money into their fifth generation computer systems project, hoping to design a massive computer network of machines using these tools.
However, as larger programs were built, the flaws of the approach became more apparent. It turns out that, starting from a set of constraints defining a particular problem, deriving an efficient algorithm to solve it is a very difficult problem in itself. This crucial step cannot yet be automated and still requires the insight of a human programmer.
Today, fifth-generation languages have lost part of their initial appeal and are mostly used in academic circles.
Common misconception
From time to time vendors in the application development space have claimed 5GL (5th generation language) capabilities. Most of the time they actually sell 4GLs with a higher level of automation and knowledge base. Since the 5GL awareness has dropped because the hype of the 80's quickly faded away and that the projects were eventually all 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. Their tools actually consisting of 4GLs packed with RAD wizards, case tools and other graphical coding assistance that facilitates code generation.
However, these 'time-saving' tools and features consist in no way an actual higher level of abstraction than the current 4GL, business oriented development tools.
Regular Expressions
The regexp syntax forms a domain-specific 5GL. Rather than defining an algorithm, the programmer specifies, by means of specialized syntax, a pattern to match text against (i.e., constraints). The regex pattern is compiled and run against text, returning the token(s) desired by the programmer.
Regular expressions exist in Perl, Python, Java, Ruby, .NET, PHP, SED, AWK, C and ECMAScript. The difficulty level and repetitive nature of searching text and returning desired tokens makes regular expressions one of the few ubiquitous examples of a 5GL (domain-specific though it is).
See also
References
- ^ Richard Grigonis. "FIFTH-GENERATION COMPUTERS". Retrieved 2008-03-05.
- ^ APL. "Association for Logic Programming (ALP)". Retrieved 2008-03-05.