Many study Prolog in college, but I have personally not come in contact with it professionally. The traditional examples given are AI and expert system applications, but what have you used it for and what made Prolog a suitable language for the task?
I haven't used Prolog in a professional sense but the most interesting commercial application of Prolog outside straight expert-system applications was a Excess of Loss Reinsurance recoveries calculator called Excelsior that was written in LPA Prolog. IIRC they rewrote it in C++ and it's now called RePro.
The first Erlang interpreter was developed in Prolog by Joe Armstrong. Prolog was also used by NASA to build a software named "clarissa", for the ISS. Clarissa is a voice user interface for browsing space station procedures. There's also PrologBeans, which you can use to build even a Web App (integrated with other languages. As for me, I have only used Prolog for AI projects in college...
Genexus, a rapid development language developed by Artech in Uruguay, uses Prolog at its core to generate code. See here for example.
In grad school I used it a bit in some program analysis work I was doing. I would use a conventional parser to go through a C program and build a database of facts about that program (such as which functions called other functions). Prolog made it very easy to search that set of facts to glean some interesting relationships (for example, if a loop called a function, did that function -- or one of the functions it called, etc, etc -- contain a loop).
But mostly it was just an excuse to write Prolog code. Still one of the most fun languages I've ever used.
Prolog is seldom used to write any application. They are usually interfaced with some other programming language( c, c++ mostly ) as a module to handle the AI processing part.
At least that's what i've seen done.
The IBM Tivoli Enterprise Console is an event management system that uses a dialect of Prolog for its event processing rules.
You could just go to some Prolog distributions' customer listings. You will notice that Prolog is typcially used in academic and research contexts. Why this is so, I have no real idea.
Prolog is dynamic, it is extremely well suited for rapid prototyping and it is solid for developing larger scale applications in it. It makes an ideal language to develop a parser and to code up data base logic.
Typically, Prolog is partnered with Java and there are several projects up and coming to enhance Java/Prolog interoperability. Check out jProlog and Prolog Cafe. But Prolog also has a native C interface.
You will also see a lot of Prolog usage in Natural Language Processing and Computational Linguistics. Those fields have typically had a strong Prolog tradition.
Yes, Prolog is underrated and underrepresented, especially in the industry. People still think it's esoteric and whatnot, and it doesn't have the great community Haskell has. Plus, it suffers from the same Lisp disease of having too many different competing implementations. Although SWI and Sicstus are pretty much the "industry" standards right now.
I've used Prolog in academic and commercial fields. Compiled Prolog is fast and makes for extremely good pattern matching and inferencing. I think is probably the mos underrated language hands down.
The problem is that you have to learn to program it and take advantage of Predicate Logic, The Art of Prolog is probably the best book IMHO to learn Prolog.
The main problem i find is the lack of a decent IDE and a modern UI framework, those usually tend to be ad-hoc solutions.
You might find this article very useful. It gives several real world applications where prolog was used.
Prolog is overlooked in many situations where it might be useful in the business world because the treatment of it in academia is not implementation oriented the way Java or C# might be taught. It is mostly used to teach theoretical concepts. This is unfortunate because there are many non numerical problems that may be solved useing a logical language.
Remember a particular project about 3 years back. For an insurance firm they used this software called GraphTalk. It has a nice OOP architecture & the programming language used was Prolog.
Was pretty interesting to work - learnt a lot about cut, predicates, tail recursion and so on.
Our company (www.intologic.com) mostly uses Prolog.
It's really good for rule-based systems; a.k.a "business rules", depending on who you're talking to :)
Our end-customers are Ericsson (for 'building' sales solutions for their telephone switches etc), and some banks and insurance companies, whom we supply with the tools to evaluate loan applications, make profitability calculations etc.
Our customers like not having to have the logic hidden in hard-coded modules made by a programmer with little or no interest/knowledge about the area in question (like me!).
In fact, we have a graphical tool that allows even non-programmers to draw all the logic rules that are needed. (Drawing done in Visio, and Prolog code is constructed directly from the drawings)
It's going very well! The site is not very updated or Anglified (we're swedish), mainly because we get as many customers as we can handle right now. The partner company that supply us with most of our customers are very enthusiastic about the technology, and they are using it for more and more things in their own systems.
We make different interfaces to the rule-engine for different purposes; the desktop and webservice clients are the ones most used, but there is also a web application under development.
The main hassle is the connection to C# and other languages - I wish they had a less archaic way of connecting to the logic engine than sockets, but the version of Prolog we use (Sicstus) is made in C, and has been refined for many years to be brutally efficient at what it does.
As a current developer in GraphTalk, I agree Prolog is a nice language. Not always appropriate, but when needed, very nice.
I use it in my work for machine translation. YA RLY.
It is great for parsing natural language because of backtracking, which matches the inherent ambiguity in language. Debugging it is pretty very slow and painful though.
Despite what many seem to think, Prolog and other related languages has (and is) used in many commercial applications. Quite often it is not advertised; the reasons for this may vary. One relatively old database is kept at
http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/prolog/doc/pl_1000/pl1000v1.gz
In the meantime, many other applications have been developed as posts by companies witness. There are fields where it has been applied with quite a success, such as bioinformatics (automated learning of drug shapes and protein folding), but of course these are not "commercial" applications in the sense that you do not get them sold over the counter. However, the impact they have is the "real world" (we're talking about medications!) is hard to overestimate.
I wholeheartedly agree with the poster who states that Prolog is overlooked in many situations. Also, because the way it has been taught does not empashize practical usage, but quite often theoretical concepts. On the other hand, Prolog by itself is just an example of a logic programming language. Logic programming offers much more tools than just Prolog (answer set programming, tabling, constraint solving, etc.) and narrowing the possibilties of LP to just Prolog is not making justice to LP.
Prolog occupies a very special place in my heart. Here are some notable applications which haven't been mentioned yet:
DealBuilder - automatic construction of legal documents
Arezzo - "Clinical decision support"
InFlow - Social network analysis (looking for the terr'ists)
Unfortunately none of these web pages (AFAIK) mention prolog, so you'll have to take my word for it. If you like, I can send the supporting lecture slides.
LPA, a commercial Prolog vendor from UK, has been mentioned before. They have a list of application briefs on their web site. The page mentions a payroll system, fire training, image recognition and fungus identification, among others.
I implemented a Prolog-based system to write a mobile phone email configuration tool. It was used by several of the world's largest mobile phone makers as a web-based support service.
We used Prolog to escape from unmaintainably large database joins and to implement ever more complex decision making using textual rules rather than dropping and inserting multiple tuples in a database.
We also tried to use Prolog-based meta-interpreters to determine the proof tree that lead to extract the proof tree of rules that lead to an individual permutation of options being included in a customer's contract. Although we got the meta-interpreter code working we failed to present this data meaningfully and usefully.
When I worked at Microsoft in 1994, I learned that the Windows NT 3.1 network adapter bindings graph is represented in Prolog. Prolog queries are used to determine which driver files shall be loaded into the kernel.
I have been using Prolog for many years in a variety of ways. In my commercial experience I have used it for prototyping and analysis. The prototyping works well since Prolog is very concise, dynamic, and conveniently supports custom syntax for domain-specific languages. The meta-programming capabilities are particularly powerful in a prototyping situation. These attributes of concision, dynamicity, and meta-programming support also help in writing systems to analyze other programs and their behavior.
My masters and phd projects were implemented in Prolog: these were strongly logic-based projects, so Prolog was a natural fit. The masters project was a natural deduction interest-driven theorem prover for situation theory and modal logics and the phd project was a visual logic programming language based on sets with partitioning constraints.
Other projects have included a shareware (now defunct) graphical computer game and an expert system shell with fuzzy logic.
I have not used it for commercially deployed applications however. The main barriers for that has been: a lack of familiarity with the language among fellow developers, the weakness of Prolog implementations in handling system programming issues (e.g. high bandwidth data access, parallel execution), cross-platform development issues, and the lack of tools to aid in performance optimization. The Prolog industry has been very fragmented, making it difficult to port from one platform to another, and there has been very little attention to user interface and host system facility integration. The current situation is improving in these aspects.
the link correct to Genexus is http://blog.genexus.es/wp-content/uploads/2010/06/gx_filosofia.pdf
Not really an example of professional or commercial usage, but a good example of when Prolog is exactly the right tool for the task: I've written a number of Prolog programs to solve and/or analyze logic or math puzzles. Its features of backtracking and "find all solutions to the constraint" make it pretty natural for that type of challenge.