Prolog (Programming in Logic) is one of the most widely used programming languages in artificial intelligence research. As opposed to imperative languages such as C or Java, it is a declarative programming language. That means, when implementing the solution to a problem, instead of specifying how to achieve a certain goal in a certain situation, we specify what the situation (rules and facts) and the goal (query) are and let the prolog interpreter derive the solution for us. Prolog is very useful in some problem areas such as artificial intelligence, natural language processing, and database, but pretty useless in others, such as graphics or numerical algorithms.