tau prolog

Prolog is a logic programming language associated with artificial intelligence and computational linguistics, you might never heard about it in the web development but this was my favorite “artificial intelligence” programming language in the 2000s. Tau Prolog is not any prolog implementation, as it is fully implemented on JavaScript and the code is analysed and parsed on the client side.

It’s also a complete Prolog interpreter, which the implementation has been directed by the ISO Prolog Standard; not just an implementation of the logic programming resolution mechanism. Tau Prolog has been developed by a team of students from UCLM (University of Castilla-La Mancha, Spain) as an open source project and released under the BSD 3-Clause License.

Interview with Tau Prolog author

José A. Riaza, Creator & Lead developer of Tau prolog, told PHPMagazine.net about their future plan with the project : “Our plan is to finish implementing all the predicates and directives defined in the ISO Prolog standard (important parts are still missing, such as I/O predicates or user-defined modules), and develop new modules that integrate JavaScript capabilities with Prolog (e.g. js and dom libraries).”

A sandbox is available to try Tau prolog, of course on your own browser. You can download a custom bundle of Tau prolog including only the modules you need, in addition to the support for NodeJs. Note that core includes the resolution mechanism and all built-in predicates.

Few examples available including a use Prolog code to extract information from a Prolog databaseMy little doge  a small game that add a playable doge manipulating the DOM with Prolog. And finally a simulation of the Knight’s tour problem.


It’s clear that we probably cannot see heavy projects based on tau prolog yet, however there are already some interesting projects mainly in education with a Prolog course which uses Tau Prolog for running the Prolog queries by André Dietrich. The course is available here and code here.

In the research group of University of Castilla-La Mancha, José with his team are working on designing fuzzy logic languages (like FASILL) over SWI-Prolog. He added “I hope in the future to be able to integrate them on the web with Tau Prolog. But currently, I think that Tau Prolog is not mature enough for heavy tasks (i.e., queries which require a deep level of recursion to be solved).”.

More information and download at http://tau-prolog.org/


Please enter your comment!
Please enter your name here